Пример #1
0
 def test_basic(self):
     sot = port_group.PortGroupDetail()
     self.assertIsNone(sot.resource_key)
     self.assertEqual('portgroups', sot.resources_key)
     self.assertEqual('/portgroups/detail', sot.base_path)
     self.assertFalse(sot.allow_create)
     self.assertFalse(sot.allow_fetch)
     self.assertFalse(sot.allow_commit)
     self.assertFalse(sot.allow_delete)
     self.assertTrue(sot.allow_list)
Пример #2
0
 def test_basic(self):
     sot = port_group.PortGroupDetail()
     self.assertIsNone(sot.resource_key)
     self.assertEqual('portgroups', sot.resources_key)
     self.assertEqual('/portgroups/detail', sot.base_path)
     self.assertEqual('baremetal', sot.service.service_type)
     self.assertFalse(sot.allow_create)
     self.assertFalse(sot.allow_get)
     self.assertFalse(sot.allow_update)
     self.assertFalse(sot.allow_delete)
     self.assertTrue(sot.allow_list)
Пример #3
0
 def test_instantiate(self):
     sot = port_group.PortGroupDetail(**FAKE)
     self.assertEqual(FAKE['uuid'], sot.id)
     self.assertEqual(FAKE['address'], sot.address)
     self.assertEqual(FAKE['created_at'], sot.created_at)
     self.assertEqual(FAKE['extra'], sot.extra)
     self.assertEqual(FAKE['internal_info'], sot.internal_info)
     self.assertEqual(FAKE['links'], sot.links)
     self.assertEqual(FAKE['name'], sot.name)
     self.assertEqual(FAKE['node_uuid'], sot.node_id)
     self.assertEqual(FAKE['ports'], sot.ports)
     self.assertEqual(FAKE['standalone_ports_supported'],
                      sot.is_standalone_ports_supported)
     self.assertEqual(FAKE['updated_at'], sot.updated_at)