core: added getNamespace method to retrieve a namespace from short name.

This commit is contained in:
Goffi 2019-04-14 08:21:51 +02:00
commit 553ebe5ab8

View file

@ -613,6 +613,13 @@ class SAT(service.Service):
def getNamespaces(self):
return self.ns_map
def getNamespace(self, short_name):
try:
return self.ns_map[short_name]
except KeyError:
raise exceptions.NotFound(u"namespace {short_name} is not registered"
.format(short_name=short_name))
def getSessionInfos(self, profile_key):
"""compile interesting data on current profile session"""
client = self.getClient(profile_key)