本文整理汇总了Python中pyvcloud.vcd.vdc.VDC.delete_direct_orgvdc_network方法的典型用法代码示例。如果您正苦于以下问题:Python VDC.delete_direct_orgvdc_network方法的具体用法?Python VDC.delete_direct_orgvdc_network怎么用?Python VDC.delete_direct_orgvdc_network使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyvcloud.vcd.vdc.VDC
的用法示例。
在下文中一共展示了VDC.delete_direct_orgvdc_network方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_190_delete_direct_orgvdc_networks
# 需要导入模块: from pyvcloud.vcd.vdc import VDC [as 别名]
# 或者: from pyvcloud.vcd.vdc.VDC import delete_direct_orgvdc_network [as 别名]
def test_190_delete_direct_orgvdc_networks(self):
org_record = self.client.get_org_by_name(
self.config['vcd']['org_name'])
org = Org(self.client, href=org_record.get('href'))
vdc_resource = org.get_vdc(self.config['vcd']['vdc_name'])
vdc = VDC(self.client, href=vdc_resource.get('href'))
result = vdc.delete_direct_orgvdc_network(
name=self.config['vcd']['vdc_direct_network_name'], force=True)
task = self.client.get_task_monitor().wait_for_success(
task=result)
assert task.get('status') == TaskStatus.SUCCESS.value
示例2: delete_direct_networks
# 需要导入模块: from pyvcloud.vcd.vdc import VDC [as 别名]
# 或者: from pyvcloud.vcd.vdc.VDC import delete_direct_orgvdc_network [as 别名]
def delete_direct_networks(ctx, name, force):
try:
restore_session(ctx, vdc_required=True)
client = ctx.obj['client']
in_use_vdc_href = ctx.obj['profiles'].get('vdc_href')
vdc = VDC(client, href=in_use_vdc_href)
delete_task = vdc.delete_direct_orgvdc_network(name=name, force=force)
stdout(delete_task, ctx)
except Exception as e:
stderr(e, ctx)