def test_make_it(self):
     sot = volume_attachment.VolumeAttachment(**EXAMPLE)
     self.assertEqual(EXAMPLE['device'], sot.device)
     self.assertEqual(EXAMPLE['id'], sot.id)
     self.assertEqual(EXAMPLE['volume_id'], sot.volume_id)
     self.assertEqual(EXAMPLE['tag'], sot.tag)
     self.assertEqual(EXAMPLE['delete_on_termination'],
                      sot.delete_on_termination)
Exemplo n.º 2
0
 def test_basic(self):
     sot = volume_attachment.VolumeAttachment()
     self.assertEqual('volumeAttachment', sot.resource_key)
     self.assertEqual('volumeAttachments', sot.resources_key)
     self.assertEqual('/servers/%(server_id)s/os-volume_attachments',
                      sot.base_path)
     self.assertEqual('compute', sot.service.service_type)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_fetch)
     self.assertFalse(sot.allow_commit)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
     self.assertDictEqual({"limit": "limit",
                           "offset": "offset",
                           "marker": "marker"},
                          sot._query_mapping._mapping)
Exemplo n.º 3
0
 def test_make_it(self):
     sot = volume_attachment.VolumeAttachment(**EXAMPLE)
     self.assertEqual(EXAMPLE['device'], sot.device)
     self.assertEqual(EXAMPLE['id'], sot.id)
     self.assertEqual(EXAMPLE['volume_id'], sot.volume_id)