def _test_snapshot_from_bdm(self, template): snapshot = block_device.snapshot_from_bdm('new-snapshot-id', template) self.assertEqual(snapshot['snapshot_id'], 'new-snapshot-id') self.assertEqual(snapshot['source_type'], 'snapshot') self.assertEqual(snapshot['destination_type'], 'volume') for key in ['disk_bus', 'device_type', 'boot_index']: self.assertEqual(snapshot[key], template[key])
def _test_snapshot_from_bdm(self, template): snapshot = block_device.snapshot_from_bdm("new-snapshot-id", template) self.assertEqual(snapshot["snapshot_id"], "new-snapshot-id") self.assertEqual(snapshot["source_type"], "snapshot") self.assertEqual(snapshot["destination_type"], "volume") for key in ["disk_bus", "device_type", "boot_index"]: self.assertEqual(snapshot[key], template[key])
def _test_snapshot_from_bdm(self, template): snapshot = block_device.snapshot_from_bdm('new-snapshot-id', template) self.assertEqual('new-snapshot-id', snapshot['snapshot_id']) self.assertEqual('snapshot', snapshot['source_type']) self.assertEqual('volume', snapshot['destination_type']) self.assertEqual(template.volume_size, snapshot['volume_size']) self.assertEqual(template.delete_on_termination, snapshot['delete_on_termination']) self.assertEqual(template.device_name, snapshot['device_name']) for key in ['disk_bus', 'device_type', 'boot_index']: self.assertEqual(template[key], snapshot[key])