Beispiel #1
0
 def test_get_port_by_tag_not_found_returns_None(self):
     tenant_id = 'pippo'
     quantum_port_id = 'whatever'
     lswitch = nvplib.create_lswitch(self.fake_cluster, tenant_id,
                                     'fake-switch')
     lport = nvplib.get_port_by_quantum_tag(self.fake_cluster,
                                            lswitch['uuid'],
                                            quantum_port_id)
     self.assertIsNone(lport)
Beispiel #2
0
 def test_get_port_by_tag_not_found_returns_None(self):
     tenant_id = 'pippo'
     quantum_port_id = 'whatever'
     lswitch = nvplib.create_lswitch(self.fake_cluster, tenant_id,
                                     'fake-switch')
     lport = nvplib.get_port_by_quantum_tag(self.fake_cluster,
                                            lswitch['uuid'],
                                            quantum_port_id)
     self.assertIsNone(lport)
Beispiel #3
0
 def test_get_port_by_tag(self):
     tenant_id = 'pippo'
     quantum_port_id = 'whatever'
     lswitch = nvplib.create_lswitch(self.fake_cluster, tenant_id,
                                     'fake-switch')
     lport = nvplib.create_lport(self.fake_cluster, lswitch['uuid'],
                                 tenant_id, quantum_port_id,
                                 'name', 'device_id', True)
     lport2 = nvplib.get_port_by_quantum_tag(self.fake_cluster,
                                             lswitch['uuid'],
                                             quantum_port_id)
     self.assertIsNotNone(lport2)
     self.assertEqual(lport['uuid'], lport2['uuid'])
Beispiel #4
0
 def test_get_port_by_tag(self):
     tenant_id = 'pippo'
     quantum_port_id = 'whatever'
     lswitch = nvplib.create_lswitch(self.fake_cluster, tenant_id,
                                     'fake-switch')
     lport = nvplib.create_lport(self.fake_cluster, lswitch['uuid'],
                                 tenant_id, quantum_port_id, 'name',
                                 'device_id', True)
     lport2 = nvplib.get_port_by_quantum_tag(self.fake_cluster,
                                             lswitch['uuid'],
                                             quantum_port_id)
     self.assertIsNotNone(lport2)
     self.assertEqual(lport['uuid'], lport2['uuid'])