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
评论列表
文章目录