def resolve_repository(self, info): return json2obj(json.dumps(cl.ays.getRepository(self.repository).json()))
def resolve_repositories(self, info): repos = cl.ays.listRepositories().json() return json2obj(json.dumps(repos))
def resolve_repository(self, info, name): repo = cl.ays.getRepository(repository=name).json() return json2obj(json.dumps(repo))
def resolve_actors(self, info): actors = cl.ays.listActors(self.name).json() fullactors = [cl.ays.getActorByName(repository=self.name, actor=a[ 'name']).json() for a in actors] return json2obj(json.dumps(fullactors))
def resolve_templates(self, info): templates = cl.ays.listTemplates(repository=self.name).json() return json2obj(json.dumps(templates))
def resolve_services(self, info): services = cl.ays.listServices(self.name).json() fullservices = [cl.ays.getServiceByName(repository=self.name, role=s[ 'role'], name=s['name']).json() for s in services] return json2obj(json.dumps(fullservices))
def resolve_blueprints(self, info): blueprints = cl.ays.listBlueprints(self.name).json() return json2obj(json.dumps(blueprints))
def resolve_consumers(self, info): consumers = [cl.ays.getServiceByName( repository=self.repository, role=x.role, name=x.name).json() for x in self.consumers] return json2obj(json.dumps(consumers))
def resolve_children(self, info): children = [cl.ays.getServiceByName( repository=self.repository, role=x.role, name=x.name).json() for x in self.children] return json2obj(json.dumps(children))
def resolve_parent(self, info): if self.parent is not None: return json2obj(json.dumps(cl.ays.getServiceByName(repository=self.repository, role=self.parent.role, name=self.parent.name).json()))