コード例 #1
0
 def setUp(self):
     super(VMwareVMOpsTestCase, self).setUp()
     subnet_4 = network_model.Subnet(cidr='192.168.0.1/24',
                                     dns=[network_model.IP('192.168.0.1')],
                                     gateway=
                                         network_model.IP('192.168.0.1'),
                                     ips=[
                                         network_model.IP('192.168.0.100')],
                                     routes=None)
     subnet_6 = network_model.Subnet(cidr='dead:beef::1/64',
                                     dns=None,
                                     gateway=
                                         network_model.IP('dead:beef::1'),
                                     ips=[network_model.IP(
                                         'dead:beef::dcad:beff:feef:0')],
                                     routes=None)
     network = network_model.Network(id=0,
                                     bridge='fa0',
                                     label='fake',
                                     subnets=[subnet_4, subnet_6],
                                     vlan=None,
                                     bridge_interface=None,
                                     injected=True)
     self.network_info = network_model.NetworkInfo([
             network_model.VIF(id=None,
                               address='DE:AD:BE:EF:00:00',
                               network=network,
                               type=None,
                               devname=None,
                               ovs_interfaceid=None,
                               rxtx_cap=3)
             ])
     utils.reset_is_neutron()
コード例 #2
0
 def setUp(self):
     super(VMwareVMOpsTestCase, self).setUp()
     subnet_4 = network_model.Subnet(
         cidr='192.168.0.1/24',
         dns=[network_model.IP('192.168.0.1')],
         gateway=network_model.IP('192.168.0.1'),
         ips=[network_model.IP('192.168.0.100')],
         routes=None)
     subnet_6 = network_model.Subnet(
         cidr='dead:beef::1/64',
         dns=None,
         gateway=network_model.IP('dead:beef::1'),
         ips=[network_model.IP('dead:beef::dcad:beff:feef:0')],
         routes=None)
     network = network_model.Network(id=0,
                                     bridge='fa0',
                                     label='fake',
                                     subnets=[subnet_4, subnet_6],
                                     vlan=None,
                                     bridge_interface=None,
                                     injected=True)
     self.network_info = network_model.NetworkInfo([
         network_model.VIF(id=None,
                           address='DE:AD:BE:EF:00:00',
                           network=network,
                           type=None,
                           devname=None,
                           ovs_interfaceid=None,
                           rxtx_cap=3)
     ])
     utils.reset_is_neutron()
コード例 #3
0
ファイル: test_vmops.py プロジェクト: boosheng/nova
    def setUp(self):
        super(VMwareVMOpsTestCase, self).setUp()
        vmwareapi_fake.reset()
        stubs.set_stubs(self.stubs)
        self._session = driver.VMwareAPISession()

        self._vmops = vmops.VMwareVMOps(self._session, None, None)
        self._instance = {'name': 'fake_name', 'uuid': 'fake_uuid'}

        subnet_4 = network_model.Subnet(cidr='192.168.0.1/24',
                                        dns=[network_model.IP('192.168.0.1')],
                                        gateway=
                                            network_model.IP('192.168.0.1'),
                                        ips=[
                                            network_model.IP('192.168.0.100')],
                                        routes=None)
        subnet_6 = network_model.Subnet(cidr='dead:beef::1/64',
                                        dns=None,
                                        gateway=
                                            network_model.IP('dead:beef::1'),
                                        ips=[network_model.IP(
                                            'dead:beef::dcad:beff:feef:0')],
                                        routes=None)
        network = network_model.Network(id=0,
                                        bridge='fa0',
                                        label='fake',
                                        subnets=[subnet_4, subnet_6],
                                        vlan=None,
                                        bridge_interface=None,
                                        injected=True)
        self.network_info = network_model.NetworkInfo([
                network_model.VIF(id=None,
                                  address='DE:AD:BE:EF:00:00',
                                  network=network,
                                  type=None,
                                  devname=None,
                                  ovs_interfaceid=None,
                                  rxtx_cap=3)
                ])
        pure_IPv6_network = network_model.Network(id=0,
                                        bridge='fa0',
                                        label='fake',
                                        subnets=[subnet_6],
                                        vlan=None,
                                        bridge_interface=None,
                                        injected=True)
        self.pure_IPv6_network_info = network_model.NetworkInfo([
                network_model.VIF(id=None,
                                  address='DE:AD:BE:EF:00:00',
                                  network=pure_IPv6_network,
                                  type=None,
                                  devname=None,
                                  ovs_interfaceid=None,
                                  rxtx_cap=3)
                ])
        utils.reset_is_neutron()
コード例 #4
0
ファイル: test_vmops.py プロジェクト: gukai/su-nova
    def setUp(self):
        super(VMwareVMOpsTestCase, self).setUp()
        vmwareapi_fake.reset()
        stubs.set_stubs(self.stubs)
        self._session = driver.VMwareAPISession()

        self._vmops = vmops.VMwareVMOps(self._session, None, None)
        self._instance = {'name': 'fake_name', 'uuid': 'fake_uuid'}

        subnet_4 = network_model.Subnet(
            cidr='192.168.0.1/24',
            dns=[network_model.IP('192.168.0.1')],
            gateway=network_model.IP('192.168.0.1'),
            ips=[network_model.IP('192.168.0.100')],
            routes=None)
        subnet_6 = network_model.Subnet(
            cidr='dead:beef::1/64',
            dns=None,
            gateway=network_model.IP('dead:beef::1'),
            ips=[network_model.IP('dead:beef::dcad:beff:feef:0')],
            routes=None)
        network = network_model.Network(id=0,
                                        bridge='fa0',
                                        label='fake',
                                        subnets=[subnet_4, subnet_6],
                                        vlan=None,
                                        bridge_interface=None,
                                        injected=True)
        self.network_info = network_model.NetworkInfo([
            network_model.VIF(id=None,
                              address='DE:AD:BE:EF:00:00',
                              network=network,
                              type=None,
                              devname=None,
                              ovs_interfaceid=None,
                              rxtx_cap=3)
        ])
        pure_IPv6_network = network_model.Network(id=0,
                                                  bridge='fa0',
                                                  label='fake',
                                                  subnets=[subnet_6],
                                                  vlan=None,
                                                  bridge_interface=None,
                                                  injected=True)
        self.pure_IPv6_network_info = network_model.NetworkInfo([
            network_model.VIF(id=None,
                              address='DE:AD:BE:EF:00:00',
                              network=pure_IPv6_network,
                              type=None,
                              devname=None,
                              ovs_interfaceid=None,
                              rxtx_cap=3)
        ])
        utils.reset_is_neutron()
コード例 #5
0
ファイル: test_utils.py プロジェクト: LeoDuo/nova
 def setUp(self):
     super(ValidateNeutronConfiguration, self).setUp()
     utils.reset_is_neutron()
コード例 #6
0
 def setUp(self):
     super(ValidateNeutronConfiguration, self).setUp()
     utils.reset_is_neutron()
コード例 #7
0
ファイル: test_vmops.py プロジェクト: hail100/nova
    def setUp(self):
        super(VMwareVMOpsTestCase, self).setUp()
        vmwareapi_fake.reset()
        stubs.set_stubs(self.stubs)
        self._session = driver.VMwareAPISession()

        self._vmops = vmops.VMwareVMOps(self._session, None, None)
        self._instance = {"name": "fake_name", "uuid": "fake_uuid"}

        subnet_4 = network_model.Subnet(
            cidr="192.168.0.1/24",
            dns=[network_model.IP("192.168.0.1")],
            gateway=network_model.IP("192.168.0.1"),
            ips=[network_model.IP("192.168.0.100")],
            routes=None,
        )
        subnet_6 = network_model.Subnet(
            cidr="dead:beef::1/64",
            dns=None,
            gateway=network_model.IP("dead:beef::1"),
            ips=[network_model.IP("dead:beef::dcad:beff:feef:0")],
            routes=None,
        )
        network = network_model.Network(
            id=0,
            bridge="fa0",
            label="fake",
            subnets=[subnet_4, subnet_6],
            vlan=None,
            bridge_interface=None,
            injected=True,
        )
        self.network_info = network_model.NetworkInfo(
            [
                network_model.VIF(
                    id=None,
                    address="DE:AD:BE:EF:00:00",
                    network=network,
                    type=None,
                    devname=None,
                    ovs_interfaceid=None,
                    rxtx_cap=3,
                )
            ]
        )
        pure_IPv6_network = network_model.Network(
            id=0, bridge="fa0", label="fake", subnets=[subnet_6], vlan=None, bridge_interface=None, injected=True
        )
        self.pure_IPv6_network_info = network_model.NetworkInfo(
            [
                network_model.VIF(
                    id=None,
                    address="DE:AD:BE:EF:00:00",
                    network=pure_IPv6_network,
                    type=None,
                    devname=None,
                    ovs_interfaceid=None,
                    rxtx_cap=3,
                )
            ]
        )
        utils.reset_is_neutron()
コード例 #8
0
    def setUp(self):
        super(VMwareVMOpsTestCase, self).setUp()
        vmwareapi_fake.reset()
        stubs.set_stubs(self.stubs)
        self._session = driver.VMwareAPISession()

        self._vmops = vmops.VMwareVMOps(self._session, None, None)
        self._image_id = nova.tests.image.fake.get_valid_image_id()
        values = {
            'name': 'fake_name',
            'uuid': 'fake_uuid',
            'vcpus': 1,
            'memory_mb': 512,
            'image_ref': self._image_id,
            'root_gb': 1,
            'node': 'respool-1001(MyResPoolName)',
        }
        self._context = context.RequestContext('fake_user', 'fake_project')
        self._instance = fake_instance.fake_instance_obj(
            self._context, **values)

        subnet_4 = network_model.Subnet(
            cidr='192.168.0.1/24',
            dns=[network_model.IP('192.168.0.1')],
            gateway=network_model.IP('192.168.0.1'),
            ips=[network_model.IP('192.168.0.100')],
            routes=None)
        subnet_6 = network_model.Subnet(
            cidr='dead:beef::1/64',
            dns=None,
            gateway=network_model.IP('dead:beef::1'),
            ips=[network_model.IP('dead:beef::dcad:beff:feef:0')],
            routes=None)
        network = network_model.Network(id=0,
                                        bridge='fa0',
                                        label='fake',
                                        subnets=[subnet_4, subnet_6],
                                        vlan=None,
                                        bridge_interface=None,
                                        injected=True)
        self.network_info = network_model.NetworkInfo([
            network_model.VIF(id=None,
                              address='DE:AD:BE:EF:00:00',
                              network=network,
                              type=None,
                              devname=None,
                              ovs_interfaceid=None,
                              rxtx_cap=3)
        ])
        pure_IPv6_network = network_model.Network(id=0,
                                                  bridge='fa0',
                                                  label='fake',
                                                  subnets=[subnet_6],
                                                  vlan=None,
                                                  bridge_interface=None,
                                                  injected=True)
        self.pure_IPv6_network_info = network_model.NetworkInfo([
            network_model.VIF(id=None,
                              address='DE:AD:BE:EF:00:00',
                              network=pure_IPv6_network,
                              type=None,
                              devname=None,
                              ovs_interfaceid=None,
                              rxtx_cap=3)
        ])
        utils.reset_is_neutron()
コード例 #9
0
ファイル: test_vmops.py プロジェクト: VeenaSL/sriov
    def setUp(self):
        super(VMwareVMOpsTestCase, self).setUp()
        vmwareapi_fake.reset()
        stubs.set_stubs(self.stubs)
        self._session = driver.VMwareAPISession()

        self._vmops = vmops.VMwareVMOps(self._session, None, None)
        self._image_id = nova.tests.image.fake.get_valid_image_id()
        values = {
            'name': 'fake_name',
            'uuid': 'fake_uuid',
            'vcpus': 1,
            'memory_mb': 512,
            'image_ref': self._image_id,
            'root_gb': 1,
            'node': 'respool-1001(MyResPoolName)',
        }
        self._context = context.RequestContext('fake_user', 'fake_project')
        self._instance = fake_instance.fake_instance_obj(self._context,
                                                         **values)

        subnet_4 = network_model.Subnet(cidr='192.168.0.1/24',
                                        dns=[network_model.IP('192.168.0.1')],
                                        gateway=
                                            network_model.IP('192.168.0.1'),
                                        ips=[
                                            network_model.IP('192.168.0.100')],
                                        routes=None)
        subnet_6 = network_model.Subnet(cidr='dead:beef::1/64',
                                        dns=None,
                                        gateway=
                                            network_model.IP('dead:beef::1'),
                                        ips=[network_model.IP(
                                            'dead:beef::dcad:beff:feef:0')],
                                        routes=None)
        network = network_model.Network(id=0,
                                        bridge='fa0',
                                        label='fake',
                                        subnets=[subnet_4, subnet_6],
                                        vlan=None,
                                        bridge_interface=None,
                                        injected=True)
        self.network_info = network_model.NetworkInfo([
                network_model.VIF(id=None,
                                  address='DE:AD:BE:EF:00:00',
                                  network=network,
                                  type=None,
                                  devname=None,
                                  ovs_interfaceid=None,
                                  rxtx_cap=3)
                ])
        pure_IPv6_network = network_model.Network(id=0,
                                        bridge='fa0',
                                        label='fake',
                                        subnets=[subnet_6],
                                        vlan=None,
                                        bridge_interface=None,
                                        injected=True)
        self.pure_IPv6_network_info = network_model.NetworkInfo([
                network_model.VIF(id=None,
                                  address='DE:AD:BE:EF:00:00',
                                  network=pure_IPv6_network,
                                  type=None,
                                  devname=None,
                                  ovs_interfaceid=None,
                                  rxtx_cap=3)
                ])
        utils.reset_is_neutron()