new-openstackcheck/ng_openstack/nova.py

16 lines
523 B
Python

import settings,os
import ng_openstack.openstackRequest
def getAllServers(projectID):
return ng_openstack.openstackRequest.openstackRequest("GET", "/servers/detail?all_tenants=True&project_id="+projectID,
"", "http://172.25.110.147:8774/v2.1").json()
def getAllFlavors():
return ng_openstack.openstackRequest.openstackRequest("GET", "/flavors/detail",
"", "http://172.25.110.147:8774/v2.1").json()