public static VolumeManagementDto volumePost() { VolumeManagementDto volume = new VolumeManagementDto(); volume.setName("Volume"); volume.setSizeInMB(1024); volume.addLink(new RESTLink("tier", "http://localhost/api/cloud/virtualdatacenters/1/tiers/1")); return volume; }
public static VolumeManagementDto volumePut() { VolumeManagementDto volume = volumePost(); volume.setId(1); volume.setState(VolumeState.DETACHED.name()); volume.getLinks().clear(); RESTLink mappings = new RESTLink( "action", "http://localhost/api/cloud/virtualdatacenters/1/volumes/1/action/initiatormappings"); mappings.setTitle("initiator mappings"); volume.addLink(mappings); volume.addLink( new RESTLink("edit", "http://localhost/api/cloud/virtualdatacenters/1/volumes/1")); volume.addLink(new RESTLink("tier", "http://localhost/api/cloud/virtualdatacenters/1/tiers/1")); volume.addLink( new RESTLink("virtualdatacenter", "http://localhost/api/cloud/virtualdatacenters/1")); return volume; }