Ejemplo n.º 1
0
    def setUp(self):
        super(NeutronInterfaceTestCase, self).setUp()
        self.config(enabled_hardware_types=['fake-hardware'])
        for iface in drivers_base.ALL_INTERFACES:
            name = 'fake'
            if iface == 'network':
                name = 'neutron'
            config_kwarg = {
                'enabled_%s_interfaces' % iface: [name],
                'default_%s_interface' % iface: name
            }
            self.config(**config_kwarg)

        self.interface = neutron.NeutronNetwork()
        self.node = utils.create_test_node(self.context,
                                           driver='fake-hardware',
                                           network_interface='neutron')
        self.port = utils.create_test_port(
            self.context,
            node_id=self.node.id,
            address='52:54:00:cf:2d:32',
            extra={'vif_port_id': uuidutils.generate_uuid()})
        self.neutron_port = {
            'id': '132f871f-eaec-4fed-9475-0d54465e0f00',
            'mac_address': '52:54:00:cf:2d:32'
        }
Ejemplo n.º 2
0
 def setUp(self):
     super(NeutronInterfaceTestCase, self).setUp()
     self.config(enabled_drivers=['fake'])
     mgr_utils.mock_the_extension_manager()
     self.interface = neutron.NeutronNetwork()
     self.node = utils.create_test_node(self.context,
                                        network_interface='neutron')
     self.port = utils.create_test_port(
         self.context, node_id=self.node.id,
         address='52:54:00:cf:2d:32',
         extra={'vif_port_id': uuidutils.generate_uuid()})
     self.neutron_port = {'id': '132f871f-eaec-4fed-9475-0d54465e0f00',
                          'mac_address': '52:54:00:cf:2d:32'}