diff --git a/.gitignore b/.gitignore index 5ada6c6e1..d4f527872 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ pom-shade.xml *.versionsBackup */bin/* *.iml +*.ipr +*.iws diff --git a/core-test/src/main/java/org/openstack4j/api/storage/VolumeTests.java b/core-test/src/main/java/org/openstack4j/api/storage/VolumeTests.java index 055848f4f..d1a0021b7 100644 --- a/core-test/src/main/java/org/openstack4j/api/storage/VolumeTests.java +++ b/core-test/src/main/java/org/openstack4j/api/storage/VolumeTests.java @@ -63,8 +63,8 @@ public void getVolumeV1() throws Exception { assertTrue(getRequest.getPath().matches("/v[12]/\\p{XDigit}*/volumes/8a9287b7-4f4d-4213-8d75-63470f19f27c")); assertEquals(volume.getId(), "8a9287b7-4f4d-4213-8d75-63470f19f27c"); - assertEquals(volume.getName(), "vol-test"); - assertEquals(volume.getDescription(), "a description"); + assertEquals(volume.getDisplayName(), "vol-test"); + assertEquals(volume.getDisplayDescription(), "a description"); assertNotNull(volume.getCreated()); assertEquals(volume.getZone(), "nova"); assertEquals(volume.getSize(), 100); @@ -91,7 +91,6 @@ public void getVolumeV1() throws Exception { @SuppressWarnings("unchecked") @Test - @SkipTest(connector = ".*", issue = 395, description = "Volume attribute not recognized when using cinder v2 api") public void getVolumeV2() throws Exception { // Check get volume respondWith("/storage/v2/volume.json"); @@ -101,7 +100,7 @@ public void getVolumeV2() throws Exception { assertTrue(getRequest.getPath().matches("/v[12]/\\p{XDigit}*/volumes/8a9287b7-4f4d-4213-8d75-63470f19f27c")); assertEquals(volume.getId(), "8a9287b7-4f4d-4213-8d75-63470f19f27c"); - assertEquals(volume.getName(), "vol-test"); + assertEquals(volume.getName(), "test-volume"); assertEquals(volume.getDescription(), "a description"); assertNotNull(volume.getCreated()); assertEquals(volume.getZone(), "nova"); diff --git a/core-test/src/main/resources/storage/v2/volume.json b/core-test/src/main/resources/storage/v2/volume.json index 86d148068..366063e18 100644 --- a/core-test/src/main/resources/storage/v2/volume.json +++ b/core-test/src/main/resources/storage/v2/volume.json @@ -3,7 +3,7 @@ "status": "in-use", "user_id": "92ac3530a6cb4d47aa406f1c2c90fca4", "attachments": [{ - "host_name": null, + "host_name": "myhost", "device": "/dev/vdd", "server_id": "eaa6a54d-35c1-40ce-831d-bb61f991e1a9", "id": "8a9287b7-4f4d-4213-8d75-63470f19f27c", diff --git a/core/src/main/java/org/openstack4j/model/storage/block/Volume.java b/core/src/main/java/org/openstack4j/model/storage/block/Volume.java index c0639c751..c160481a5 100644 --- a/core/src/main/java/org/openstack4j/model/storage/block/Volume.java +++ b/core/src/main/java/org/openstack4j/model/storage/block/Volume.java @@ -86,11 +86,23 @@ public static MigrationStatus fromValue(String migrationStatus) { */ String getName(); + /** + * @return the display name of the volume + */ + @Deprecated + String getDisplayName(); + /** * @return the description of the volume */ String getDescription(); + /** + * @return the display description of the volume + */ + @Deprecated + String getDisplayDescription(); + /** * @return the status of the volume */ diff --git a/core/src/main/java/org/openstack4j/model/storage/block/VolumeSnapshot.java b/core/src/main/java/org/openstack4j/model/storage/block/VolumeSnapshot.java index d49c585a2..fc9883dc5 100644 --- a/core/src/main/java/org/openstack4j/model/storage/block/VolumeSnapshot.java +++ b/core/src/main/java/org/openstack4j/model/storage/block/VolumeSnapshot.java @@ -24,11 +24,23 @@ public interface VolumeSnapshot extends ModelEntity, Buildable