Example #1
0
 def test_basic(self):
     sot = volume.VolumeDetail(VOLUME_DETAIL)
     self.assertIsInstance(sot, volume.Volume)
     self.assertEqual("/volumes/detail", sot.base_path)
     self.assertFalse(sot.allow_fetch)
     self.assertFalse(sot.allow_commit)
     self.assertFalse(sot.allow_create)
     self.assertFalse(sot.allow_delete)
     self.assertTrue(sot.allow_list)
Example #2
0
 def test_create(self):
     sot = volume.VolumeDetail(**VOLUME_DETAIL)
     self.assertEqual(VOLUME_DETAIL["os-vol-host-attr:host"], sot.host)
     self.assertEqual(VOLUME_DETAIL["os-vol-tenant-attr:tenant_id"],
                      sot.project_id)
     self.assertEqual(VOLUME_DETAIL["os-vol-mig-status-attr:migstat"],
                      sot.migration_status)
     self.assertEqual(VOLUME_DETAIL["os-vol-mig-status-attr:name_id"],
                      sot.migration_id)
     self.assertEqual(VOLUME_DETAIL["replication_status"],
                      sot.replication_status)
     self.assertEqual(
         VOLUME_DETAIL["os-volume-replication:extended_status"],
         sot.extended_replication_status)
     self.assertEqual(VOLUME_DETAIL["consistencygroup_id"],
                      sot.consistency_group_id)
     self.assertEqual(VOLUME_DETAIL["os-volume-replication:driver_data"],
                      sot.replication_driver_data)
     self.assertFalse(sot.is_encrypted)
 def test_basic(self):
     sot = volume.VolumeDetail(VOLUME_DETAIL)
     self.assertIsInstance(sot, volume.Volume)
     self.assertEqual("/volumes/detail", sot.base_path)