示例#1
0
 def test_assign_vm_pool_to_mgmt_domain(self, proxy, mgmt_domain_name,
                                        vm_pool_name):
     '''Configure mgmt_domain by adding a VM pool to it
     '''
     pool_config = RwMcYang.MgmtDomainPools_Vm(name=vm_pool_name)
     proxy.create_config(
         "/mgmt-domain/domain[name='%s']/pools/vm" % mgmt_domain_name,
         pool_config)
示例#2
0
    def test_start_lp_with_empty_vm_pool(self, proxy, mgmt_domain_name, vm_pool_name):
        '''Tests that starting launchpad fails when vm pool does not have a vm
        Configure mgmt_domain by adding a VM pool to it

        Arguments:
            mgmt_domain_name - a pytest fixture for the management domain name
            vm_pool_name     - a pytest fixture for the vm pool name

        Asserts:
            rift.auto.session.ProxyExpectTimeoutError is raised

        '''
        with pytest.raises(ProxyExpectTimeoutError):
            pool_config = RwMcYang.MgmtDomainPools_Vm(name=vm_pool_name)
            proxy.create_config(
                "/mgmt-domain/domain[name='%s']/pools/vm" % mgmt_domain_name,
                pool_config,
            )
            proxy.wait_for(
                "/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name,
                'started',
                timeout=120,
                fail_on=['crashed'])