本文整理匯總了Python中isp.nsmUtil.NsmUtil.getRequest方法的典型用法代碼示例。如果您正苦於以下問題:Python NsmUtil.getRequest方法的具體用法?Python NsmUtil.getRequest怎麽用?Python NsmUtil.getRequest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類isp.nsmUtil.NsmUtil
的用法示例。
在下文中一共展示了NsmUtil.getRequest方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: NsmV1
# 需要導入模塊: from isp.nsmUtil import NsmUtil [as 別名]
# 或者: from isp.nsmUtil.NsmUtil import getRequest [as 別名]
descriptionPrefix = 'This is the description of '
name = 'My Default NSM V1'
myNsmV1 = NsmV1(None, name)
myNsmV1.setOnLine()
myNsmV1.create('001')
myNsmV1Catalog = myNsmV1.getCatalog('201')
myNsmV1ProviderList = myNsmV1.getProviderList('301')
firstProviderUidUrl = Util.getXpathValue(myNsmV1ProviderList, XPath._DetailFirstUidFromList)
print firstProviderUidUrl
tenantListUrl = firstProviderUidUrl + '/tenant'
print tenantListUrl
tenantListXml = NsmUtil.getRequest(tenantListUrl)
print tenantListXml
firstTenantUidUrl = Util.getXpathValue(tenantListXml, XPath._DetailFirstUidFromList)
print firstTenantUidUrl
name = 'My Default Tenant'
myTenant = Tenant(None, name, None)
myTenant.setOnLine()
myTenant.setUid(firstTenantUidUrl)
myTenant.delete('501')
NsmUtil.printHeadLine1('Delete tenant completed')