def getRole(dataConnect, roleId): apiPath = "pc/sys/role/{0}" content = getRest(dataConnect, apiPath, "", roleId + "", "") return content
def getCompetenceByUserId(dataConnect, userId): apiPath = "pc/sys/functions/relaUser/{0}" content = getRest(dataConnect, apiPath, "", userId + "", "") return content
def getRoleList(dataConnect): apiPath = "pc/sys/role/getRoleList" content = getRest(dataConnect, apiPath, "", "", "") return content
def getFun(dataConnect): apiPath = "pc/sys/functions" content = getRest(dataConnect, apiPath, "", "", "") return content
def getRelaByRoleId(dataConnect, roleId): apiPath = "pc/sys/functions/rela/{0}" content = getRest(dataConnect, apiPath, "", roleId + "", "") return content
def getFirewallNic(dataConnect,vmId,nicId): apiPath = "wce/api/fireWall/vm/{0}/nic/{1}"; content = getRest(dataConnect, apiPath, "", vmId+ "," + nicId, ""); return content
def queryFirewall(dataConnect, firstResult, maxResult, resourcePoolId): apiPath = "wce/api/fireWall/resourcePools/{0}"; params = "firstResult=" + firstResult + "&maxResult=" + maxResult; content = getRest(dataConnect, apiPath, params, "" + resourcePoolId, ""); return content
def getSnapshotList(dataConnect,vmId): apiPath = "wce/api/snapShots"; params = "vmId=" + vmId; content = getRest(dataConnect, apiPath, params, "",""); return content
def getHostPm(dataConnect, hostId, params): apiKey = "wce/api/pm/hosts/{0}"; content = getRest(dataConnect, apiKey, params, hostId, ""); return content
def getSnapshotInfo(dataConnect,snapshotId): apiPath = "wce/api/snapShots/{0}"; content = getRest(dataConnect, apiPath, "",snapshotId + "", ""); return content
def getVolume(dataConnect,volumeId): apiKey = "wce/api/volumes/{0}"; return getRest(dataConnect, apiKey, "", volumeId+"", "");
def getAllVmTemplates(dataConnect): apiKey = "wce/api/templates/"; return getRest(dataConnect, apiKey, "", "", "");
def getVmTemplateInfo(dataConnect,vmTemplateId): apiKey = "wce/api/templates/{0}"; return getRest(dataConnect, apiKey, "", vmTemplateId, "");
def getProcessData(dataConnect, vmId, uuid): apiPath = "pc/sys/agent/processInfo/{0}"; params = "uuid=" + uuid; content = getRest(dataConnect, apiPath, params, vmId+ "", ""); return content