You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2014/02/25 11:58:53 UTC
[05/20] CLOUDSTACK-6058: New XenServer 6.2sp1 SDKs
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ff9abad/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java b/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java
index 19c88fd..ebd0a64 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java
@@ -1,19 +1,19 @@
/*
* Copyright (c) Citrix Systems, Inc.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -28,6 +28,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
package com.xensource.xenapi;
import com.xensource.xenapi.Types.BadServerResponse;
@@ -60,14 +61,14 @@ public class VGPU extends XenAPIObject {
* For internal use only.
*/
VGPU(String ref) {
- this.ref = ref;
+ this.ref = ref;
}
/**
* @return The XenAPI reference (OpaqueRef) to this object.
*/
public String toWireString() {
- return this.ref;
+ return this.ref;
}
/**
@@ -78,7 +79,7 @@ public class VGPU extends XenAPIObject {
{
if (obj != null && obj instanceof VGPU)
{
- VGPU other = (VGPU)obj;
+ VGPU other = (VGPU) obj;
return other.ref.equals(this.ref);
} else
{
@@ -105,20 +106,24 @@ public class VGPU extends XenAPIObject {
print.printf("%1$20s: %2$s\n", "device", this.device);
print.printf("%1$20s: %2$s\n", "currentlyAttached", this.currentlyAttached);
print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig);
+ print.printf("%1$20s: %2$s\n", "type", this.type);
+ print.printf("%1$20s: %2$s\n", "residentOn", this.residentOn);
return writer.toString();
}
/**
* Convert a VGPU.Record to a Map
*/
- public Map<String, Object> toMap() {
- Map<String, Object> map = new HashMap<String, Object>();
+ public Map<String,Object> toMap() {
+ Map<String,Object> map = new HashMap<String,Object>();
map.put("uuid", this.uuid == null ? "" : this.uuid);
map.put("VM", this.VM == null ? new VM("OpaqueRef:NULL") : this.VM);
map.put("GPU_group", this.GPUGroup == null ? new GPUGroup("OpaqueRef:NULL") : this.GPUGroup);
map.put("device", this.device == null ? "" : this.device);
map.put("currently_attached", this.currentlyAttached == null ? false : this.currentlyAttached);
map.put("other_config", this.otherConfig == null ? new HashMap<String, String>() : this.otherConfig);
+ map.put("type", this.type == null ? new VGPUType("OpaqueRef:NULL") : this.type);
+ map.put("resident_on", this.residentOn == null ? new PGPU("OpaqueRef:NULL") : this.residentOn);
return map;
}
@@ -146,6 +151,14 @@ public class VGPU extends XenAPIObject {
* Additional configuration
*/
public Map<String, String> otherConfig;
+ /**
+ * Preset type for this VGPU
+ */
+ public VGPUType type;
+ /**
+ * The PGPU on which this VGPU is running
+ */
+ public PGPU residentOn;
}
/**
@@ -154,15 +167,15 @@ public class VGPU extends XenAPIObject {
* @return all fields from the object
*/
public VGPU.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_record";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVGPURecord(result);
+ return Types.toVGPURecord(result);
}
/**
@@ -172,15 +185,15 @@ public class VGPU extends XenAPIObject {
* @return reference to the object
*/
public static VGPU getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_by_uuid";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVGPU(result);
+ return Types.toVGPU(result);
}
/**
@@ -189,15 +202,15 @@ public class VGPU extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_uuid";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toString(result);
+ return Types.toString(result);
}
/**
@@ -206,15 +219,15 @@ public class VGPU extends XenAPIObject {
* @return value of the field
*/
public VM getVM(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_VM";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVM(result);
+ return Types.toVM(result);
}
/**
@@ -223,15 +236,15 @@ public class VGPU extends XenAPIObject {
* @return value of the field
*/
public GPUGroup getGPUGroup(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_GPU_group";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toGPUGroup(result);
+ return Types.toGPUGroup(result);
}
/**
@@ -240,15 +253,15 @@ public class VGPU extends XenAPIObject {
* @return value of the field
*/
public String getDevice(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_device";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toString(result);
+ return Types.toString(result);
}
/**
@@ -257,15 +270,15 @@ public class VGPU extends XenAPIObject {
* @return value of the field
*/
public Boolean getCurrentlyAttached(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_currently_attached";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toBoolean(result);
+ return Types.toBoolean(result);
}
/**
@@ -274,15 +287,49 @@ public class VGPU extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfStringString(result);
+ return Types.toMapOfStringString(result);
+ }
+
+ /**
+ * Get the type field of the given VGPU.
+ *
+ * @return value of the field
+ */
+ public VGPUType getType(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU.get_type";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toVGPUType(result);
+ }
+
+ /**
+ * Get the resident_on field of the given VGPU.
+ *
+ * @return value of the field
+ */
+ public PGPU getResidentOn(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU.get_resident_on";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toPGPU(result);
}
/**
@@ -291,9 +338,9 @@ public class VGPU extends XenAPIObject {
* @param otherConfig New value to set
*/
public void setOtherConfig(Connection c, Map<String, String> otherConfig) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -308,9 +355,9 @@ public class VGPU extends XenAPIObject {
* @param value Value to add
*/
public void addToOtherConfig(Connection c, String key, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -324,9 +371,9 @@ public class VGPU extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -335,58 +382,58 @@ public class VGPU extends XenAPIObject {
}
/**
+ *
*
- *
- * @param VM
- * @param GPUGroup
- * @param device
- * @param otherConfig
+ * @param VM
+ * @param GPUGroup
+ * @param device
+ * @param otherConfig
+ * @param type
* @return Task
*/
- public static Task createAsync(Connection c, VM VM, GPUGroup GPUGroup, String device, Map<String, String> otherConfig) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ public static Task createAsync(Connection c, VM VM, GPUGroup GPUGroup, String device, Map<String, String> otherConfig, VGPUType type) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VGPU.create";
String session = c.getSessionReference();
- Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device),
- Marshalling.toXMLRPC(otherConfig)};
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(type)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
return Types.toTask(result);
}
/**
+ *
*
- *
- * @param VM
- * @param GPUGroup
- * @param device
- * @param otherConfig
+ * @param VM
+ * @param GPUGroup
+ * @param device
+ * @param otherConfig
+ * @param type
* @return reference to the newly created object
*/
- public static VGPU create(Connection c, VM VM, GPUGroup GPUGroup, String device, Map<String, String> otherConfig) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ public static VGPU create(Connection c, VM VM, GPUGroup GPUGroup, String device, Map<String, String> otherConfig, VGPUType type) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.create";
String session = c.getSessionReference();
- Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device),
- Marshalling.toXMLRPC(otherConfig)};
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(type)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVGPU(result);
+ return Types.toVGPU(result);
}
/**
- *
+ *
*
* @return Task
*/
public Task destroyAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VGPU.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -396,13 +443,13 @@ public class VGPU extends XenAPIObject {
}
/**
- *
+ *
*
*/
public void destroy(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -416,15 +463,15 @@ public class VGPU extends XenAPIObject {
* @return references to all objects
*/
public static Set<VGPU> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_all";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSetOfVGPU(result);
+ return Types.toSetOfVGPU(result);
}
/**
@@ -433,15 +480,15 @@ public class VGPU extends XenAPIObject {
* @return records of all objects
*/
public static Map<VGPU, VGPU.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VGPU.get_all_records";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfVGPUVGPURecord(result);
+ return Types.toMapOfVGPUVGPURecord(result);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ff9abad/deps/XenServerJava/src/com/xensource/xenapi/VGPUType.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VGPUType.java b/deps/XenServerJava/src/com/xensource/xenapi/VGPUType.java
new file mode 100644
index 0000000..075ec18
--- /dev/null
+++ b/deps/XenServerJava/src/com/xensource/xenapi/VGPUType.java
@@ -0,0 +1,461 @@
+/*
+ * Copyright (c) Citrix Systems, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1) Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2) Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+package com.xensource.xenapi;
+
+import com.xensource.xenapi.Types.BadServerResponse;
+import com.xensource.xenapi.Types.VersionException;
+import com.xensource.xenapi.Types.XenAPIException;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.xmlrpc.XmlRpcException;
+
+/**
+ * A type of virtual GPU
+ *
+ * @author Citrix Systems, Inc.
+ */
+public class VGPUType extends XenAPIObject {
+
+ /**
+ * The XenAPI reference (OpaqueRef) to this object.
+ */
+ protected final String ref;
+
+ /**
+ * For internal use only.
+ */
+ VGPUType(String ref) {
+ this.ref = ref;
+ }
+
+ /**
+ * @return The XenAPI reference (OpaqueRef) to this object.
+ */
+ public String toWireString() {
+ return this.ref;
+ }
+
+ /**
+ * If obj is a VGPUType, compares XenAPI references for equality.
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj != null && obj instanceof VGPUType)
+ {
+ VGPUType other = (VGPUType) obj;
+ return other.ref.equals(this.ref);
+ } else
+ {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return ref.hashCode();
+ }
+
+ /**
+ * Represents all the fields in a VGPUType
+ */
+ public static class Record implements Types.Record {
+ public String toString() {
+ StringWriter writer = new StringWriter();
+ PrintWriter print = new PrintWriter(writer);
+ print.printf("%1$20s: %2$s\n", "uuid", this.uuid);
+ print.printf("%1$20s: %2$s\n", "vendorName", this.vendorName);
+ print.printf("%1$20s: %2$s\n", "modelName", this.modelName);
+ print.printf("%1$20s: %2$s\n", "framebufferSize", this.framebufferSize);
+ print.printf("%1$20s: %2$s\n", "maxHeads", this.maxHeads);
+ print.printf("%1$20s: %2$s\n", "maxResolutionX", this.maxResolutionX);
+ print.printf("%1$20s: %2$s\n", "maxResolutionY", this.maxResolutionY);
+ print.printf("%1$20s: %2$s\n", "supportedOnPGPUs", this.supportedOnPGPUs);
+ print.printf("%1$20s: %2$s\n", "enabledOnPGPUs", this.enabledOnPGPUs);
+ print.printf("%1$20s: %2$s\n", "VGPUs", this.VGPUs);
+ print.printf("%1$20s: %2$s\n", "supportedOnGPUGroups", this.supportedOnGPUGroups);
+ print.printf("%1$20s: %2$s\n", "enabledOnGPUGroups", this.enabledOnGPUGroups);
+ return writer.toString();
+ }
+
+ /**
+ * Convert a VGPU_type.Record to a Map
+ */
+ public Map<String,Object> toMap() {
+ Map<String,Object> map = new HashMap<String,Object>();
+ map.put("uuid", this.uuid == null ? "" : this.uuid);
+ map.put("vendor_name", this.vendorName == null ? "" : this.vendorName);
+ map.put("model_name", this.modelName == null ? "" : this.modelName);
+ map.put("framebuffer_size", this.framebufferSize == null ? 0 : this.framebufferSize);
+ map.put("max_heads", this.maxHeads == null ? 0 : this.maxHeads);
+ map.put("max_resolution_x", this.maxResolutionX == null ? 0 : this.maxResolutionX);
+ map.put("max_resolution_y", this.maxResolutionY == null ? 0 : this.maxResolutionY);
+ map.put("supported_on_PGPUs", this.supportedOnPGPUs == null ? new LinkedHashSet<PGPU>() : this.supportedOnPGPUs);
+ map.put("enabled_on_PGPUs", this.enabledOnPGPUs == null ? new LinkedHashSet<PGPU>() : this.enabledOnPGPUs);
+ map.put("VGPUs", this.VGPUs == null ? new LinkedHashSet<VGPU>() : this.VGPUs);
+ map.put("supported_on_GPU_groups", this.supportedOnGPUGroups == null ? new LinkedHashSet<GPUGroup>() : this.supportedOnGPUGroups);
+ map.put("enabled_on_GPU_groups", this.enabledOnGPUGroups == null ? new LinkedHashSet<GPUGroup>() : this.enabledOnGPUGroups);
+ return map;
+ }
+
+ /**
+ * Unique identifier/object reference
+ */
+ public String uuid;
+ /**
+ * Name of VGPU vendor
+ */
+ public String vendorName;
+ /**
+ * Model name associated with the VGPU type
+ */
+ public String modelName;
+ /**
+ * Framebuffer size of the VGPU type, in bytes
+ */
+ public Long framebufferSize;
+ /**
+ * Maximum number of displays supported by the VGPU type
+ */
+ public Long maxHeads;
+ /**
+ * Maximum resultion (width) supported by the VGPU type
+ */
+ public Long maxResolutionX;
+ /**
+ * Maximum resoltion (height) supported by the VGPU type
+ */
+ public Long maxResolutionY;
+ /**
+ * List of PGPUs that support this VGPU type
+ */
+ public Set<PGPU> supportedOnPGPUs;
+ /**
+ * List of PGPUs that have this VGPU type enabled
+ */
+ public Set<PGPU> enabledOnPGPUs;
+ /**
+ * List of VGPUs of this type
+ */
+ public Set<VGPU> VGPUs;
+ /**
+ * List of GPU groups in which at least one PGPU supports this VGPU type
+ */
+ public Set<GPUGroup> supportedOnGPUGroups;
+ /**
+ * List of GPU groups in which at least one have this VGPU type enabled
+ */
+ public Set<GPUGroup> enabledOnGPUGroups;
+ }
+
+ /**
+ * Get a record containing the current state of the given VGPU_type.
+ *
+ * @return all fields from the object
+ */
+ public VGPUType.Record getRecord(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_record";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toVGPUTypeRecord(result);
+ }
+
+ /**
+ * Get a reference to the VGPU_type instance with the specified UUID.
+ *
+ * @param uuid UUID of object to return
+ * @return reference to the object
+ */
+ public static VGPUType getByUuid(Connection c, String uuid) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_by_uuid";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toVGPUType(result);
+ }
+
+ /**
+ * Get the uuid field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public String getUuid(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_uuid";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toString(result);
+ }
+
+ /**
+ * Get the vendor_name field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public String getVendorName(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_vendor_name";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toString(result);
+ }
+
+ /**
+ * Get the model_name field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public String getModelName(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_model_name";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toString(result);
+ }
+
+ /**
+ * Get the framebuffer_size field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Long getFramebufferSize(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_framebuffer_size";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toLong(result);
+ }
+
+ /**
+ * Get the max_heads field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Long getMaxHeads(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_max_heads";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toLong(result);
+ }
+
+ /**
+ * Get the max_resolution_x field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Long getMaxResolutionX(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_max_resolution_x";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toLong(result);
+ }
+
+ /**
+ * Get the max_resolution_y field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Long getMaxResolutionY(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_max_resolution_y";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toLong(result);
+ }
+
+ /**
+ * Get the supported_on_PGPUs field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Set<PGPU> getSupportedOnPGPUs(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_supported_on_PGPUs";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toSetOfPGPU(result);
+ }
+
+ /**
+ * Get the enabled_on_PGPUs field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Set<PGPU> getEnabledOnPGPUs(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_enabled_on_PGPUs";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toSetOfPGPU(result);
+ }
+
+ /**
+ * Get the VGPUs field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Set<VGPU> getVGPUs(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_VGPUs";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toSetOfVGPU(result);
+ }
+
+ /**
+ * Get the supported_on_GPU_groups field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Set<GPUGroup> getSupportedOnGPUGroups(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_supported_on_GPU_groups";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toSetOfGPUGroup(result);
+ }
+
+ /**
+ * Get the enabled_on_GPU_groups field of the given VGPU_type.
+ *
+ * @return value of the field
+ */
+ public Set<GPUGroup> getEnabledOnGPUGroups(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_enabled_on_GPU_groups";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toSetOfGPUGroup(result);
+ }
+
+ /**
+ * Return a list of all the VGPU_types known to the system.
+ *
+ * @return references to all objects
+ */
+ public static Set<VGPUType> getAll(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_all";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toSetOfVGPUType(result);
+ }
+
+ /**
+ * Return a map of VGPU_type references to VGPU_type records for all VGPU_types known to the system.
+ *
+ * @return records of all objects
+ */
+ public static Map<VGPUType, VGPUType.Record> getAllRecords(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "VGPU_type.get_all_records";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toMapOfVGPUTypeVGPUTypeRecord(result);
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ff9abad/deps/XenServerJava/src/com/xensource/xenapi/VIF.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VIF.java b/deps/XenServerJava/src/com/xensource/xenapi/VIF.java
index 8302800..c755dc4 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/VIF.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/VIF.java
@@ -1,19 +1,19 @@
/*
* Copyright (c) Citrix Systems, Inc.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -28,6 +28,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
package com.xensource.xenapi;
import com.xensource.xenapi.Types.BadServerResponse;
@@ -60,14 +61,14 @@ public class VIF extends XenAPIObject {
* For internal use only.
*/
VIF(String ref) {
- this.ref = ref;
+ this.ref = ref;
}
/**
* @return The XenAPI reference (OpaqueRef) to this object.
*/
public String toWireString() {
- return this.ref;
+ return this.ref;
}
/**
@@ -78,7 +79,7 @@ public class VIF extends XenAPIObject {
{
if (obj != null && obj instanceof VIF)
{
- VIF other = (VIF)obj;
+ VIF other = (VIF) obj;
return other.ref.equals(this.ref);
} else
{
@@ -126,8 +127,8 @@ public class VIF extends XenAPIObject {
/**
* Convert a VIF.Record to a Map
*/
- public Map<String, Object> toMap() {
- Map<String, Object> map = new HashMap<String, Object>();
+ public Map<String,Object> toMap() {
+ Map<String,Object> map = new HashMap<String,Object>();
map.put("uuid", this.uuid == null ? "" : this.uuid);
map.put("allowed_operations", this.allowedOperations == null ? new LinkedHashSet<Types.VifOperations>() : this.allowedOperations);
map.put("current_operations", this.currentOperations == null ? new HashMap<String, Types.VifOperations>() : this.currentOperations);
@@ -146,7 +147,7 @@ public class VIF extends XenAPIObject {
map.put("qos_supported_algorithms", this.qosSupportedAlgorithms == null ? new LinkedHashSet<String>() : this.qosSupportedAlgorithms);
map.put("metrics", this.metrics == null ? new VIFMetrics("OpaqueRef:NULL") : this.metrics);
map.put("MAC_autogenerated", this.MACAutogenerated == null ? false : this.MACAutogenerated);
- map.put("locking_mode", this.lockingMode == null ? Types.VifLockingMode.UNRECOGNIZED : this.lockingMode);
+ map.put("locking_mode", this.lockingMode == null ? Types.VifLockingMode.NETWORK_DEFAULT : this.lockingMode);
map.put("ipv4_allowed", this.ipv4Allowed == null ? new LinkedHashSet<String>() : this.ipv4Allowed);
map.put("ipv6_allowed", this.ipv6Allowed == null ? new LinkedHashSet<String>() : this.ipv6Allowed);
return map;
@@ -244,15 +245,15 @@ public class VIF extends XenAPIObject {
* @return all fields from the object
*/
public VIF.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_record";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVIFRecord(result);
+ return Types.toVIFRecord(result);
}
/**
@@ -262,15 +263,15 @@ public class VIF extends XenAPIObject {
* @return reference to the object
*/
public static VIF getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_by_uuid";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVIF(result);
+ return Types.toVIF(result);
}
/**
@@ -280,9 +281,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public static Task createAsync(Connection c, VIF.Record record) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.create";
String session = c.getSessionReference();
Map<String, Object> record_map = record.toMap();
@@ -299,16 +300,16 @@ public class VIF extends XenAPIObject {
* @return reference to the newly created object
*/
public static VIF create(Connection c, VIF.Record record) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.create";
String session = c.getSessionReference();
Map<String, Object> record_map = record.toMap();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVIF(result);
+ return Types.toVIF(result);
}
/**
@@ -317,9 +318,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task destroyAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -333,9 +334,9 @@ public class VIF extends XenAPIObject {
*
*/
public void destroy(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -349,15 +350,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_uuid";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toString(result);
+ return Types.toString(result);
}
/**
@@ -366,15 +367,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Set<Types.VifOperations> getAllowedOperations(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_allowed_operations";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSetOfVifOperations(result);
+ return Types.toSetOfVifOperations(result);
}
/**
@@ -383,15 +384,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Map<String, Types.VifOperations> getCurrentOperations(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_current_operations";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfStringVifOperations(result);
+ return Types.toMapOfStringVifOperations(result);
}
/**
@@ -400,15 +401,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public String getDevice(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_device";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toString(result);
+ return Types.toString(result);
}
/**
@@ -417,15 +418,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Network getNetwork(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_network";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toNetwork(result);
+ return Types.toNetwork(result);
}
/**
@@ -434,15 +435,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public VM getVM(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_VM";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVM(result);
+ return Types.toVM(result);
}
/**
@@ -451,15 +452,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public String getMAC(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_MAC";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toString(result);
+ return Types.toString(result);
}
/**
@@ -468,15 +469,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Long getMTU(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_MTU";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toLong(result);
+ return Types.toLong(result);
}
/**
@@ -485,15 +486,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfStringString(result);
+ return Types.toMapOfStringString(result);
}
/**
@@ -502,15 +503,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Boolean getCurrentlyAttached(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_currently_attached";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toBoolean(result);
+ return Types.toBoolean(result);
}
/**
@@ -519,15 +520,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Long getStatusCode(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_status_code";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toLong(result);
+ return Types.toLong(result);
}
/**
@@ -536,15 +537,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public String getStatusDetail(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_status_detail";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toString(result);
+ return Types.toString(result);
}
/**
@@ -553,15 +554,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getRuntimeProperties(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_runtime_properties";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfStringString(result);
+ return Types.toMapOfStringString(result);
}
/**
@@ -570,15 +571,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public String getQosAlgorithmType(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_qos_algorithm_type";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toString(result);
+ return Types.toString(result);
}
/**
@@ -587,15 +588,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getQosAlgorithmParams(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_qos_algorithm_params";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfStringString(result);
+ return Types.toMapOfStringString(result);
}
/**
@@ -604,15 +605,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Set<String> getQosSupportedAlgorithms(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_qos_supported_algorithms";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSetOfString(result);
+ return Types.toSetOfString(result);
}
/**
@@ -621,15 +622,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public VIFMetrics getMetrics(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_metrics";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVIFMetrics(result);
+ return Types.toVIFMetrics(result);
}
/**
@@ -638,15 +639,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Boolean getMACAutogenerated(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_MAC_autogenerated";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toBoolean(result);
+ return Types.toBoolean(result);
}
/**
@@ -655,15 +656,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Types.VifLockingMode getLockingMode(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_locking_mode";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVifLockingMode(result);
+ return Types.toVifLockingMode(result);
}
/**
@@ -672,15 +673,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Set<String> getIpv4Allowed(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_ipv4_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSetOfString(result);
+ return Types.toSetOfString(result);
}
/**
@@ -689,15 +690,15 @@ public class VIF extends XenAPIObject {
* @return value of the field
*/
public Set<String> getIpv6Allowed(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_ipv6_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSetOfString(result);
+ return Types.toSetOfString(result);
}
/**
@@ -706,9 +707,9 @@ public class VIF extends XenAPIObject {
* @param otherConfig New value to set
*/
public void setOtherConfig(Connection c, Map<String, String> otherConfig) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -723,9 +724,9 @@ public class VIF extends XenAPIObject {
* @param value Value to add
*/
public void addToOtherConfig(Connection c, String key, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -739,9 +740,9 @@ public class VIF extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -755,9 +756,9 @@ public class VIF extends XenAPIObject {
* @param algorithmType New value to set
*/
public void setQosAlgorithmType(Connection c, String algorithmType) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.set_qos_algorithm_type";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmType)};
@@ -771,9 +772,9 @@ public class VIF extends XenAPIObject {
* @param algorithmParams New value to set
*/
public void setQosAlgorithmParams(Connection c, Map<String, String> algorithmParams) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.set_qos_algorithm_params";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmParams)};
@@ -788,9 +789,9 @@ public class VIF extends XenAPIObject {
* @param value Value to add
*/
public void addToQosAlgorithmParams(Connection c, String key, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.add_to_qos_algorithm_params";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -804,9 +805,9 @@ public class VIF extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromQosAlgorithmParams(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.remove_from_qos_algorithm_params";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -820,9 +821,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task plugAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.plug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -836,9 +837,9 @@ public class VIF extends XenAPIObject {
*
*/
public void plug(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.plug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -852,9 +853,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task unplugAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.unplug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -868,9 +869,9 @@ public class VIF extends XenAPIObject {
*
*/
public void unplug(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.unplug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -884,9 +885,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task unplugForceAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.unplug_force";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -900,9 +901,9 @@ public class VIF extends XenAPIObject {
*
*/
public void unplugForce(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.unplug_force";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -917,9 +918,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task setLockingModeAsync(Connection c, Types.VifLockingMode value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.set_locking_mode";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -934,9 +935,9 @@ public class VIF extends XenAPIObject {
* @param value The new locking mode for the VIF
*/
public void setLockingMode(Connection c, Types.VifLockingMode value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.set_locking_mode";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -951,9 +952,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task setIpv4AllowedAsync(Connection c, Set<String> value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.set_ipv4_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -968,9 +969,9 @@ public class VIF extends XenAPIObject {
* @param value The IP addresses which will be associated with the VIF
*/
public void setIpv4Allowed(Connection c, Set<String> value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.set_ipv4_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -985,9 +986,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task addIpv4AllowedAsync(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.add_ipv4_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1002,9 +1003,9 @@ public class VIF extends XenAPIObject {
* @param value The IP address which will be associated with the VIF
*/
public void addIpv4Allowed(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.add_ipv4_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1019,9 +1020,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task removeIpv4AllowedAsync(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.remove_ipv4_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1036,9 +1037,9 @@ public class VIF extends XenAPIObject {
* @param value The IP address which will be removed from the VIF
*/
public void removeIpv4Allowed(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.remove_ipv4_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1053,9 +1054,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task setIpv6AllowedAsync(Connection c, Set<String> value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.set_ipv6_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1070,9 +1071,9 @@ public class VIF extends XenAPIObject {
* @param value The IP addresses which will be associated with the VIF
*/
public void setIpv6Allowed(Connection c, Set<String> value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.set_ipv6_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1087,9 +1088,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task addIpv6AllowedAsync(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.add_ipv6_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1104,9 +1105,9 @@ public class VIF extends XenAPIObject {
* @param value The IP address which will be associated with the VIF
*/
public void addIpv6Allowed(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.add_ipv6_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1121,9 +1122,9 @@ public class VIF extends XenAPIObject {
* @return Task
*/
public Task removeIpv6AllowedAsync(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.VIF.remove_ipv6_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1138,9 +1139,9 @@ public class VIF extends XenAPIObject {
* @param value The IP address which will be removed from the VIF
*/
public void removeIpv6Allowed(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.remove_ipv6_allowed";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -1154,15 +1155,15 @@ public class VIF extends XenAPIObject {
* @return references to all objects
*/
public static Set<VIF> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_all";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSetOfVIF(result);
+ return Types.toSetOfVIF(result);
}
/**
@@ -1171,15 +1172,15 @@ public class VIF extends XenAPIObject {
* @return records of all objects
*/
public static Map<VIF, VIF.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF.get_all_records";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfVIFVIFRecord(result);
+ return Types.toMapOfVIFVIFRecord(result);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ff9abad/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java
index 0c17217..c051e53 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java
@@ -1,19 +1,19 @@
/*
* Copyright (c) Citrix Systems, Inc.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1) Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2) Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -28,6 +28,7 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
package com.xensource.xenapi;
import com.xensource.xenapi.Types.BadServerResponse;
@@ -60,14 +61,14 @@ public class VIFMetrics extends XenAPIObject {
* For internal use only.
*/
VIFMetrics(String ref) {
- this.ref = ref;
+ this.ref = ref;
}
/**
* @return The XenAPI reference (OpaqueRef) to this object.
*/
public String toWireString() {
- return this.ref;
+ return this.ref;
}
/**
@@ -78,7 +79,7 @@ public class VIFMetrics extends XenAPIObject {
{
if (obj != null && obj instanceof VIFMetrics)
{
- VIFMetrics other = (VIFMetrics)obj;
+ VIFMetrics other = (VIFMetrics) obj;
return other.ref.equals(this.ref);
} else
{
@@ -110,8 +111,8 @@ public class VIFMetrics extends XenAPIObject {
/**
* Convert a VIF_metrics.Record to a Map
*/
- public Map<String, Object> toMap() {
- Map<String, Object> map = new HashMap<String, Object>();
+ public Map<String,Object> toMap() {
+ Map<String,Object> map = new HashMap<String,Object>();
map.put("uuid", this.uuid == null ? "" : this.uuid);
map.put("io_read_kbs", this.ioReadKbs == null ? 0.0 : this.ioReadKbs);
map.put("io_write_kbs", this.ioWriteKbs == null ? 0.0 : this.ioWriteKbs);
@@ -148,15 +149,15 @@ public class VIFMetrics extends XenAPIObject {
* @return all fields from the object
*/
public VIFMetrics.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_record";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVIFMetricsRecord(result);
+ return Types.toVIFMetricsRecord(result);
}
/**
@@ -166,15 +167,15 @@ public class VIFMetrics extends XenAPIObject {
* @return reference to the object
*/
public static VIFMetrics getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_by_uuid";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toVIFMetrics(result);
+ return Types.toVIFMetrics(result);
}
/**
@@ -183,15 +184,15 @@ public class VIFMetrics extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_uuid";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toString(result);
+ return Types.toString(result);
}
/**
@@ -200,15 +201,15 @@ public class VIFMetrics extends XenAPIObject {
* @return value of the field
*/
public Double getIoReadKbs(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_io_read_kbs";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toDouble(result);
+ return Types.toDouble(result);
}
/**
@@ -217,15 +218,15 @@ public class VIFMetrics extends XenAPIObject {
* @return value of the field
*/
public Double getIoWriteKbs(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_io_write_kbs";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toDouble(result);
+ return Types.toDouble(result);
}
/**
@@ -234,15 +235,15 @@ public class VIFMetrics extends XenAPIObject {
* @return value of the field
*/
public Date getLastUpdated(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_last_updated";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toDate(result);
+ return Types.toDate(result);
}
/**
@@ -251,15 +252,15 @@ public class VIFMetrics extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfStringString(result);
+ return Types.toMapOfStringString(result);
}
/**
@@ -268,9 +269,9 @@ public class VIFMetrics extends XenAPIObject {
* @param otherConfig New value to set
*/
public void setOtherConfig(Connection c, Map<String, String> otherConfig) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -285,9 +286,9 @@ public class VIFMetrics extends XenAPIObject {
* @param value Value to add
*/
public void addToOtherConfig(Connection c, String key, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -301,9 +302,9 @@ public class VIFMetrics extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -317,15 +318,15 @@ public class VIFMetrics extends XenAPIObject {
* @return references to all objects
*/
public static Set<VIFMetrics> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_all";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSetOfVIFMetrics(result);
+ return Types.toSetOfVIFMetrics(result);
}
/**
@@ -334,15 +335,15 @@ public class VIFMetrics extends XenAPIObject {
* @return records of all objects
*/
public static Map<VIFMetrics, VIFMetrics.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "VIF_metrics.get_all_records";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toMapOfVIFMetricsVIFMetricsRecord(result);
+ return Types.toMapOfVIFMetricsVIFMetricsRecord(result);
}
}
\ No newline at end of file