galaxia.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:galaxia 作者: WiproOpenSourcePractice 项目源码 文件源码
def list(self):
        resp = None
        self.parser.add_argument('--type', help="Type of unit valid values are\
                                containers, nodes", required=True)
        args = self.parser.parse_args()
        unit_type = vars(args)['type']
        data = {"sub_type": unit_type}
        galaxia_api_endpoint = os.getenv("galaxia_api_endpoint")
        target_url = client.concatenate_url(galaxia_api_endpoint, self.metrics_uri)
        try:
            resp = client.http_request('GET', target_url, self.headers, data)
            headers = ["NAME", "DESCRIPTION"]
            print "List of supported metrics for "+unit_type
            format_print.format_dict(resp.json(), headers)
        except Exception as ex:
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号