mirror of https://github.com/apache/jclouds.git
Nova VolumeClient: improving javadocs
This commit is contained in:
parent
0e9153017c
commit
01c6a48786
|
@ -193,40 +193,46 @@ public class Volume {
|
||||||
this.snapshotId = builder.snapshotId;
|
this.snapshotId = builder.snapshotId;
|
||||||
this.name = builder.name;
|
this.name = builder.name;
|
||||||
this.description = builder.description;
|
this.description = builder.description;
|
||||||
this.metadata = ImmutableMap.copyOf(builder.metadata);
|
this.metadata = ImmutableMap.copyOf(checkNotNull(builder.metadata, "metadata"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the id of this volume
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the status of this volume
|
||||||
*/
|
*/
|
||||||
public Status getStatus() {
|
public Status getStatus() {
|
||||||
return this.status;
|
return this.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the size in GB of this volume
|
||||||
*/
|
*/
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
return this.size;
|
return this.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the availabilityZone containing this volume
|
||||||
*/
|
*/
|
||||||
public String getZone() {
|
public String getZone() {
|
||||||
return this.zone;
|
return this.zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the time this volume was created
|
||||||
*/
|
*/
|
||||||
public Date getCreated() {
|
public Date getCreated() {
|
||||||
return this.created;
|
return this.created;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the set of attachments (to Servers)
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public Set<VolumeAttachment> getAttachments() {
|
public Set<VolumeAttachment> getAttachments() {
|
||||||
|
@ -234,6 +240,7 @@ public class Volume {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the type of this volume
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getVolumeType() {
|
public String getVolumeType() {
|
||||||
|
@ -241,6 +248,7 @@ public class Volume {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the snapshot id this volume is associated with.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getSnapshotId() {
|
public String getSnapshotId() {
|
||||||
|
@ -248,6 +256,7 @@ public class Volume {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the name of this volume - as displayed in the openstack console
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -255,14 +264,13 @@ public class Volume {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the description of this volume - as displayed in the openstack console
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return this.description;
|
return this.description;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Map<String, String> getMetadata() {
|
public Map<String, String> getMetadata() {
|
||||||
return Collections.unmodifiableMap(this.metadata);
|
return Collections.unmodifiableMap(this.metadata);
|
||||||
|
|
|
@ -18,13 +18,15 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.openstack.nova.v1_1.domain;
|
package org.jclouds.openstack.nova.v1_1.domain;
|
||||||
|
|
||||||
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import org.jclouds.javax.annotation.Nullable;
|
import org.jclouds.javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An Openstack Nova Volume Attachment
|
* An Openstack Nova Volume Attachment (describes how Volumes are attached to Servers)
|
||||||
*/
|
*/
|
||||||
public class VolumeAttachment {
|
public class VolumeAttachment {
|
||||||
|
|
||||||
|
@ -92,27 +94,28 @@ public class VolumeAttachment {
|
||||||
private final String device;
|
private final String device;
|
||||||
|
|
||||||
protected VolumeAttachment(Builder<?> builder) {
|
protected VolumeAttachment(Builder<?> builder) {
|
||||||
this.id = builder.id;
|
this.id = checkNotNull(builder.id, "id");
|
||||||
this.volumeId = builder.volumeId;
|
this.volumeId = checkNotNull(builder.volumeId, "volumeId");
|
||||||
this.serverId = builder.serverId;
|
this.serverId = builder.serverId;
|
||||||
this.device = builder.device;
|
this.device = builder.device;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the attachment id (typically the same as #getVolumeId())
|
||||||
*/
|
*/
|
||||||
@Nullable
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the id of the volume attached
|
||||||
*/
|
*/
|
||||||
@Nullable
|
|
||||||
public String getVolumeId() {
|
public String getVolumeId() {
|
||||||
return this.volumeId;
|
return this.volumeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the id of the server the volume is attached to
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getServerId() {
|
public String getServerId() {
|
||||||
|
@ -120,6 +123,7 @@ public class VolumeAttachment {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the device name (e.g. "/dev/vdc")
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getDevice() {
|
public String getDevice() {
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.openstack.nova.v1_1.domain;
|
package org.jclouds.openstack.nova.v1_1.domain;
|
||||||
|
|
||||||
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.jclouds.javax.annotation.Nullable;
|
import org.jclouds.javax.annotation.Nullable;
|
||||||
|
@ -122,9 +124,9 @@ public class VolumeSnapshot {
|
||||||
private final String description;
|
private final String description;
|
||||||
|
|
||||||
protected VolumeSnapshot(Builder<?> builder) {
|
protected VolumeSnapshot(Builder<?> builder) {
|
||||||
this.id = builder.id;
|
this.id = checkNotNull(builder.id, "id");
|
||||||
this.volumeId = builder.volumeId;
|
this.volumeId = checkNotNull(builder.volumeId, "volumeId");
|
||||||
this.status = builder.status;
|
this.status = checkNotNull(builder.status, "status");
|
||||||
this.size = builder.size;
|
this.size = builder.size;
|
||||||
this.created = builder.created;
|
this.created = builder.created;
|
||||||
this.name = builder.name;
|
this.name = builder.name;
|
||||||
|
@ -132,34 +134,35 @@ public class VolumeSnapshot {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the id of this snapshot
|
||||||
*/
|
*/
|
||||||
@Nullable
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the id of the Volume this snapshot was taken from
|
||||||
*/
|
*/
|
||||||
@Nullable
|
|
||||||
public String getVolumeId() {
|
public String getVolumeId() {
|
||||||
return this.volumeId;
|
return this.volumeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the status of this snapshot
|
||||||
*/
|
*/
|
||||||
@Nullable
|
|
||||||
public Volume.Status getStatus() {
|
public Volume.Status getStatus() {
|
||||||
return this.status;
|
return this.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the size in GB of the volume this snapshot was taken from
|
||||||
*/
|
*/
|
||||||
@Nullable
|
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
return this.size;
|
return this.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the data the snapshot was taken
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public Date getCreated() {
|
public Date getCreated() {
|
||||||
|
@ -167,13 +170,16 @@ public class VolumeSnapshot {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the name of this snapshot - as displayed in the openstack console
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @return the description of this snapshot - as displayed in the openstack console
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
|
|
Loading…
Reference in New Issue