本文整理匯總了Python中qubell.api.provider.router.ROUTER.get_instances方法的典型用法代碼示例。如果您正苦於以下問題:Python ROUTER.get_instances方法的具體用法?Python ROUTER.get_instances怎麽用?Python ROUTER.get_instances使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類qubell.api.provider.router.ROUTER
的用法示例。
在下文中一共展示了ROUTER.get_instances方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: list_instances_json
# 需要導入模塊: from qubell.api.provider.router import ROUTER [as 別名]
# 或者: from qubell.api.provider.router.ROUTER import get_instances [as 別名]
def list_instances_json(self, application=None):
""" Get list of instances in json format converted to list"""
if application: # todo: application should not be parameter here. Application should do its own list
warnings.warn("organization.list_instances_json(app) is deprecated, use app.list_instances_json", DeprecationWarning, stacklevel=2)
instances = application.list_instances_json()
else: # Return all instances in organization
instances = router.get_instances(org_id=self.organizationId).json()
return [ins for ins in instances if ins['status'] not in DEAD_STATUS]