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)
예제 #3
0
 def test_create(self):
     sot = volume.VolumeDetail(**VOLUMEDETAIL)
     self.assertEqual(VOLUMEDETAIL["volumes_links"], sot.volumes_links)