Пример #1
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 = utils.get_test_network_info(legacy_model=False)

        self.image = {
            'id': 'c1c8ce3d-c2e0-4247-890c-ccf5cc1c004c',
            'disk_format': 'vhd',
            'size': 512,
        }
        nova.tests.image.fake.stub_out_image_service(self.stubs)
Пример #2
0
 def setUp(self):
     super(VMWareAPIVMTestCase, self).setUp()
     self.context = context.RequestContext('fake', 'fake', False)
     self.flags(vmwareapi_host_ip='test_url',
                vmwareapi_host_username='******',
                vmwareapi_host_password='******')
     self.user_id = 'fake'
     self.project_id = 'fake'
     self.context = context.RequestContext(self.user_id, self.project_id)
     self.network = utils.import_object(FLAGS.network_manager)
     vmwareapi_fake.reset()
     db_fakes.stub_out_db_instance_api(self.stubs)
     stubs.set_stubs(self.stubs)
     glance_stubs.stubout_glance_client(self.stubs)
     self.conn = vmwareapi_conn.get_connection(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',
                        'gateway6': '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})]
Пример #3
0
 def setUp(self):
     super(VMWareAPIVMTestCase, self).setUp()
     self.flags(vmwareapi_host_ip='test_url',
                vmwareapi_host_username='******',
                vmwareapi_host_password='******')
     self.user_id = 'fake'
     self.project_id = 'fake'
     self.context = context.RequestContext(self.user_id, self.project_id)
     self.network = utils.import_object(FLAGS.network_manager)
     vmwareapi_fake.reset()
     db_fakes.stub_out_db_instance_api(self.stubs)
     stubs.set_stubs(self.stubs)
     glance_stubs.stubout_glance_client(self.stubs)
     self.conn = vmwareapi_conn.get_connection(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',
                        'gateway6': '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})]
Пример #4
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="******"
        )
        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 = vmwareapi_conn.VMWareESXDriver(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}
        api_fakes.stub_out_image_service(self.stubs)
Пример #5
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 = utils.get_test_network_info(legacy_model=False)

        self.image = {
            'id': 'c1c8ce3d-c2e0-4247-890c-ccf5cc1c004c',
            'disk_format': 'vhd',
            'size': 512,
        }
        nova.tests.image.fake.stub_out_image_service(self.stubs)
Пример #6
0
 def setUp(self):
     super(VMwareAPIHostTestCase, self).setUp()
     self.flags(vmwareapi_host_ip='test_url',
                vmwareapi_host_username='******',
                vmwareapi_host_password='******')
     vmwareapi_fake.reset()
     stubs.set_stubs(self.stubs)
     self.conn = driver.VMwareESXDriver(False)
Пример #7
0
 def setUp(self):
     super(VMwareAPIHostTestCase, self).setUp()
     self.flags(vmwareapi_host_ip='test_url',
                vmwareapi_host_username='******',
                vmwareapi_host_password='******')
     vmwareapi_fake.reset()
     stubs.set_stubs(self.stubs)
     self.conn = driver.VMwareESXDriver(False)
Пример #8
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)
Пример #9
0
 def setUp(self):
     super(VMWareAPIVMTestCase, self).setUp()
     self.flags(vmwareapi_host_ip='test_url',
                vmwareapi_host_username='******',
                vmwareapi_host_password='******')
     self.manager = manager.AuthManager()
     self.user = self.manager.create_user('fake', 'fake', 'fake',
                                          admin=True)
     self.project = self.manager.create_project('fake', 'fake', 'fake')
     self.network = utils.import_object(FLAGS.network_manager)
     self.stubs = stubout.StubOutForTesting()
     vmwareapi_fake.reset()
     db_fakes.stub_out_db_instance_api(self.stubs)
     stubs.set_stubs(self.stubs)
     glance_stubs.stubout_glance_client(self.stubs,
                                        glance_stubs.FakeGlance)
     self.conn = vmwareapi_conn.get_connection(False)
Пример #10
0
 def setUp(self):
     super(VMWareAPIVMTestCase, self).setUp()
     self.flags(vmwareapi_host_ip='test_url',
                vmwareapi_host_username='******',
                vmwareapi_host_password='******')
     self.manager = manager.AuthManager()
     self.user = self.manager.create_user('fake',
                                          'fake',
                                          'fake',
                                          admin=True)
     self.project = self.manager.create_project('fake', 'fake', 'fake')
     self.network = utils.import_object(FLAGS.network_manager)
     self.stubs = stubout.StubOutForTesting()
     vmwareapi_fake.reset()
     db_fakes.stub_out_db_instance_api(self.stubs)
     stubs.set_stubs(self.stubs)
     glance_stubs.stubout_glance_client(self.stubs, glance_stubs.FakeGlance)
     self.conn = vmwareapi_conn.get_connection(False)
Пример #11
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',
                           'id': 'foo',
                           '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)