当前位置: 首页>>代码示例>>Python>>正文


Python Environment.get_test_vapp_with_network方法代码示例

本文整理汇总了Python中pyvcloud.system_test_framework.environment.Environment.get_test_vapp_with_network方法的典型用法代码示例。如果您正苦于以下问题:Python Environment.get_test_vapp_with_network方法的具体用法?Python Environment.get_test_vapp_with_network怎么用?Python Environment.get_test_vapp_with_network使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyvcloud.system_test_framework.environment.Environment的用法示例。


在下文中一共展示了Environment.get_test_vapp_with_network方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_0000_setup

# 需要导入模块: from pyvcloud.system_test_framework.environment import Environment [as 别名]
# 或者: from pyvcloud.system_test_framework.environment.Environment import get_test_vapp_with_network [as 别名]
 def test_0000_setup(self):
     TestVappFirewall._client = Environment.get_sys_admin_client()
     vapp = Environment.get_test_vapp_with_network(TestVappFirewall._client)
     vapp.reload()
     TestVappFirewall._network_name = \
         Environment.get_default_orgvdc_network_name()
     task = vapp.connect_org_vdc_network(
         TestVappFirewall._network_name,
         fence_mode=FenceMode.NAT_ROUTED.value)
     result = TestVappFirewall._client.get_task_monitor().wait_for_success(
         task)
     self.assertEqual(result.get('status'), TaskStatus.SUCCESS.value)
开发者ID:vmware,项目名称:pyvcloud,代码行数:14,代码来源:vapp_firewall_tests.py

示例2: test_0000_setup

# 需要导入模块: from pyvcloud.system_test_framework.environment import Environment [as 别名]
# 或者: from pyvcloud.system_test_framework.environment.Environment import get_test_vapp_with_network [as 别名]
    def test_0000_setup(self):
        """Load configuration and create a click runner to invoke CLI."""
        VmTest._config = Environment.get_config()
        VmTest._logger = Environment.get_default_logger()
        VmTest._client = Environment.get_client_in_default_org(
            CommonRoles.ORGANIZATION_ADMINISTRATOR)
        VmTest._media_resource = Environment.get_test_media_resource()

        VmTest._runner = CliRunner()
        default_org = VmTest._config['vcd']['default_org_name']
        VmTest._login(self)
        VmTest._runner.invoke(org, ['use', default_org])
        VmTest._test_vdc = Environment.get_test_vdc(VmTest._client)
        VmTest._test_vapp = Environment.get_test_vapp_with_network(
            VmTest._client)
        VmTest._test_vm = VM(
            VmTest._client,
            href=VmTest._test_vapp.get_vm(VAppConstants.vm1_name).get('href'))
开发者ID:vmware,项目名称:vca-cli,代码行数:20,代码来源:vm_tests.py

示例3: test_0000_setup

# 需要导入模块: from pyvcloud.system_test_framework.environment import Environment [as 别名]
# 或者: from pyvcloud.system_test_framework.environment.Environment import get_test_vapp_with_network [as 别名]
    def test_0000_setup(self):
        self._config = Environment.get_config()
        TestVappFirewall._logger = Environment.get_default_logger()
        TestVappFirewall._client = Environment.get_sys_admin_client()
        TestVappFirewall._runner = CliRunner()
        default_org = self._config['vcd']['default_org_name']
        self._login()
        TestVappFirewall._runner.invoke(org, ['use', default_org])

        vapp = Environment.get_test_vapp_with_network(TestVappFirewall._client)
        vapp.reload()

        TestVappFirewall._vapp_network_name = \
            Environment.get_default_orgvdc_network_name()
        task = vapp.connect_org_vdc_network(
            TestVappFirewall._vapp_network_name,
            fence_mode=FenceMode.NAT_ROUTED.value)
        result = TestVappFirewall._client.get_task_monitor().wait_for_success(
            task)
        self.assertEqual(result.get('status'), TaskStatus.SUCCESS.value)
开发者ID:vmware,项目名称:vca-cli,代码行数:22,代码来源:vapp_network_firewall_tests.py

示例4: test_0000_setup

# 需要导入模块: from pyvcloud.system_test_framework.environment import Environment [as 别名]
# 或者: from pyvcloud.system_test_framework.environment.Environment import get_test_vapp_with_network [as 别名]
 def test_0000_setup(self):
     TestVappDhcp._client = Environment.get_sys_admin_client()
     vapp = Environment.get_test_vapp_with_network(TestVappDhcp._client)
     self.assertIsNotNone(vapp)
开发者ID:vmware,项目名称:pyvcloud,代码行数:6,代码来源:vapp_dhcp_tests.py


注:本文中的pyvcloud.system_test_framework.environment.Environment.get_test_vapp_with_network方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。