예제 #1
0
 def execute(self):
     appNames = yield self.node.list()
     appInfoList = {}
     for appName in appNames:
         info = ''
         try:
             app = Service(appName, blockingConnect=False)
             yield app.connectThroughLocator(self.locator)
             info = yield app.info()
         except Exception as err:
             info = str(err)
         finally:
             appInfoList[appName] = info
     result = {'apps': appInfoList}
     yield result
예제 #2
0
 def execute(self):
     appNames = yield self.node.list()
     appInfoList = {}
     for appName in appNames:
         info = ''
         try:
             app = Service(appName, blockingConnect=False)
             yield app.connectThroughLocator(self.locator)
             info = yield app.info()
         except Exception as err:
             info = str(err)
         finally:
             appInfoList[appName] = info
     result = {
         'apps': appInfoList
     }
     yield result
예제 #3
0
 def info(self, apps):
     infos = {}
     for app_ in apps:
         info = ''
         try:
             app = Service(app_, blockingConnect=False)
             yield app.connectThroughLocator(self.locator)
             info = yield app.info()
             if all([self._expand, self._storage is not None, 'profile' in info]):
                 info['profile'] = yield profile.View(self._storage, info['profile']).execute()
         except Exception as err:
             info = str(err)
         finally:
             infos[app_] = info
     result = {
         'apps': infos
     }
     yield result