Exemple #1
0
    def setUp(self):
        super(VMwareAPIVMTestCase, self).setUp()
        self.context = context.RequestContext('fake', 'fake', is_admin=False)
        self.flags(host_ip='test_url',
                   host_username='******',
                   host_password='******',
                   cluster_name='test_cluster',
                   use_linked_clone=False, group='vmware')
        self.flags(vnc_enabled=False)
        self.user_id = 'fake'
        self.project_id = 'fake'
        self.node_name = 'test_url'
        self.context = context.RequestContext(self.user_id, self.project_id)
        vmwareapi_fake.reset()
        db_fakes.stub_out_db_instance_api(self.stubs)
        stubs.set_stubs(self.stubs)
        self.conn = driver.VMwareESXDriver(fake.FakeVirtAPI)
        # NOTE(vish): none of the network plugging code is actually
        #             being tested
        self.network_info = utils.get_test_network_info()

        self.image = {
            'id': 'c1c8ce3d-c2e0-4247-890c-ccf5cc1c004c',
            'disk_format': 'vhd',
            'size': 512,
        }
        nova.tests.image.fake.stub_out_image_service(self.stubs)
        self.vnc_host = 'test_url'
Exemple #2
0
 def setUp(self):
     super(VMwareAPIHostTestCase, self).setUp()
     self.flags(host_ip='test_url',
                host_username='******',
                host_password='******', group='vmware')
     vmwareapi_fake.reset()
     stubs.set_stubs(self.stubs)
     self.conn = driver.VMwareESXDriver(False)
Exemple #3
0
    def setUp(self):
        super(VMwareAPIVMTestCase, self).setUp()
        self.context = context.RequestContext('fake', 'fake', is_admin=False)
        self.flags(vmwareapi_host_ip='test_url',
                   vmwareapi_host_username='******',
                   vmwareapi_host_password='******',
                   vnc_enabled=False,
                   use_linked_clone=False)
        self.user_id = 'fake'
        self.project_id = 'fake'
        self.context = context.RequestContext(self.user_id, self.project_id)
        vmwareapi_fake.reset()
        db_fakes.stub_out_db_instance_api(self.stubs)
        stubs.set_stubs(self.stubs)
        self.conn = driver.VMwareESXDriver(None, False)
        # NOTE(vish): none of the network plugging code is actually
        #             being tested
        self.network_info = [({
            'bridge': 'fa0',
            'id': 0,
            'vlan': None,
            'bridge_interface': None,
            'injected': True
        }, {
            'broadcast':
            '192.168.0.255',
            'dns': ['192.168.0.1'],
            'gateway':
            '192.168.0.1',
            'gateway_v6':
            'dead:beef::1',
            'ip6s': [{
                'enabled': '1',
                'ip': 'dead:beef::dcad:beff:feef:0',
                'netmask': '64'
            }],
            'ips': [{
                'enabled': '1',
                'ip': '192.168.0.100',
                'netmask': '255.255.255.0'
            }],
            'label':
            'fake',
            'mac':
            'DE:AD:BE:EF:00:00',
            'rxtx_cap':
            3
        })]

        self.image = {
            'id': 'c1c8ce3d-c2e0-4247-890c-ccf5cc1c004c',
            'disk_format': 'vhd',
            'size': 512,
        }
        nova.tests.image.fake.stub_out_image_service(self.stubs)