Skip to content

Volume snapshot object's getName() method error,return with null. but the API actually returned the name value. #1019

@zhoutiekui

Description

@zhoutiekui

OS4J Version:
3.0.4-snapshot

Test Code:
VolumeSnapshot snapshotForce = os.blockStorage().snapshots().create(Builders.volumeSnapshot()
.name(snapshotName)
.volume(volume.getId())
.force(true)
.build());
System.out.println("snapshot id:\t" + snapshotForce.getId());
System.out.println("snapshot name:\t" + snapshotForce.getName());
System.out.println(os.blockStorage().snapshots().get(snapshotForce.getId()).getId());
assertEquals(snapshotName, os.blockStorage().snapshots().get(snapshotForce.getId()).getName());

Output:
snapshot id: 6980f66a-110d-4bcb-a7f9-eb8752395799
snapshot name: null

Analyze:
the package org.openstack4j.openstack.storage.block.domain has following codes:
@JsonProperty("display_name")
private String name;
@JsonProperty("display_description")
private String description;
While the API definition the name "name" not the desplay_name.
The same error with the description attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions