You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defreconfigure(self):
"""Apply configuration from config file managed by .cf. to this Habery Process any oobis or endpoints conf { dt: "isodatetime", curls: ["tcp://localhost:5620/"], iurls: ["tcp://localhost:5621/?name=eve"], } Config file is meant to be read only at init not changed by app at run time. Any dynamic app changes must go in database not config file that way we don't have to worry about multiple writers of cf. Use config file to preload database not as a database. Config file may have named sections for Habery or individual Habs as needed. """conf=self.cf.get()
if"dt"inconf: # datetime of config filedt=help.fromIso8601(conf["dt"]) # raises error if not convertif"iurls"inconf: # process OOBI URLsforoobiinconf["iurls"]:
obr=basing.OobiRecord(date=help.toIso8601(dt))
self.db.oobis.put(keys=(oobi,), val=obr)
if"durls"inconf: # process OOBI URLsforoobiinconf["durls"]:
obr=basing.OobiRecord(date=help.toIso8601(dt))
self.db.oobis.put(keys=(oobi,), val=obr)
if"wurls"inconf: # well known OOBI URLs for MFAforoobiinconf["wurls"]:
obr=basing.OobiRecord(date=help.toIso8601(dt))
self.db.woobi.put(keys=(oobi,), val=obr)
BaseHab.reconfigure
defreconfigure(self):
"""Apply configuration from config file managed by .cf. to this Hab. Assumes that .pre and signing keys have been setup in order to create own endpoint auth when provided in .cf. conf { dt: "isodatetime", curls: ["tcp://localhost:5620/"], iurls: ["tcp://localhost:5621/?name=eve"] } Config file is meant to be read only at init not changed by app at run time. Any dynamic app changes must go in database not config file that way we don't have to worry about multiple writers of cf. Use config file to preload database not as a database. Config file may have named sections for Habery or individual Habs as needed. """conf=self.cf.get()
ifself.namenotinconf:
returnconf=conf[self.name]
if"dt"inconf: # datetime of config filedt=help.fromIso8601(conf["dt"]) # raises error if not convertmsgs=bytearray()
msgs.extend(self.makeEndRole(eid=self.pre,
role=kering.Roles.controller,
stamp=help.toIso8601(dt=dt)))
if"curls"inconf:
curls=conf["curls"]
forurlincurls:
splits=urlsplit(url)
scheme= (splits.schemeifsplits.schemeinkering.Schemeselsekering.Schemes.http)
msgs.extend(self.makeLocScheme(url=url,
scheme=scheme,
stamp=help.toIso8601(dt=dt)))
self.psr.parse(ims=msgs)
The text was updated successfully, but these errors were encountered:
The keripy config file has well known labels for config data but these are not documented anywhere:
Suggest label definition in the doc strings of keri.app.configing
and documented labels with examples in a markdown doc in scripts/keri/cf
reserved labels:
dt
curls
iurls
durls
wurls
Hab name labels: "nel"
Not used in config file?
murls
Habery. reconfigure
BaseHab.reconfigure
The text was updated successfully, but these errors were encountered: