Skip to content

Commit 430b622

Browse files
committed
bf
1 parent 597d3a0 commit 430b622

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/main/java/org/openstack/model/compute/nova/volume/NovaVolumeList.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import javax.xml.bind.annotation.XmlElement;
1010
import javax.xml.bind.annotation.XmlRootElement;
1111

12+
import org.codehaus.jackson.annotate.JsonProperty;
13+
import org.codehaus.jackson.map.annotate.JsonDeserialize;
1214
import org.openstack.model.compute.Volume;
1315
import org.openstack.model.compute.VolumeList;
1416

@@ -17,23 +19,25 @@
1719
public class NovaVolumeList implements Serializable, VolumeList {
1820

1921
@XmlElement(name="volume")
20-
private List<Volume> volumes = new ArrayList<Volume>();
22+
@JsonProperty("volumes")
23+
@JsonDeserialize(as=List.class, contentAs=NovaVolume.class)
24+
private List<Volume> list = new ArrayList<Volume>();
2125

2226
/* (non-Javadoc)
2327
* @see org.openstack.model.compute.VolumeList#getList()
2428
*/
2529
@Override
2630
public List<Volume> getList() {
27-
return volumes;
31+
return list;
2832
}
2933

3034
public void setList(List<Volume> list) {
31-
this.volumes = list;
35+
this.list = list;
3236
}
3337

3438
@Override
3539
public String toString() {
36-
return "NovaVolumeList [list=" + volumes + "]";
40+
return "NovaVolumeList [list=" + list + "]";
3741
}
3842

3943
}

0 commit comments

Comments
 (0)