You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/02/26 19:50:02 UTC
[15/50] [abbrv] CLOUDSTACK-6058: New XenServer 6.2sp1 SDKs
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ff9abad/deps/XenServerJava/src/com/xensource/xenapi/Network.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Network.java b/deps/XenServerJava/src/com/xensource/xenapi/Network.java
index e9194ef..9f8c929 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/Network.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/Network.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 Network extends XenAPIObject {
* For internal use only.
*/
Network(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 Network extends XenAPIObject {
{
if (obj != null && obj instanceof Network)
{
- Network other = (Network)obj;
+ Network other = (Network) obj;
return other.ref.equals(this.ref);
} else
{
@@ -118,8 +119,8 @@ public class Network extends XenAPIObject {
/**
* Convert a network.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("name_label", this.nameLabel == null ? "" : this.nameLabel);
map.put("name_description", this.nameDescription == null ? "" : this.nameDescription);
@@ -196,15 +197,15 @@ public class Network extends XenAPIObject {
* @return all fields from the object
*/
public Network.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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.toNetworkRecord(result);
+ return Types.toNetworkRecord(result);
}
/**
@@ -214,15 +215,15 @@ public class Network extends XenAPIObject {
* @return reference to the object
*/
public static Network getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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.toNetwork(result);
+ return Types.toNetwork(result);
}
/**
@@ -232,9 +233,9 @@ public class Network extends XenAPIObject {
* @return Task
*/
public static Task createAsync(Connection c, Network.Record record) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.network.create";
String session = c.getSessionReference();
Map<String, Object> record_map = record.toMap();
@@ -251,16 +252,16 @@ public class Network extends XenAPIObject {
* @return reference to the newly created object
*/
public static Network create(Connection c, Network.Record record) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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.toNetwork(result);
+ return Types.toNetwork(result);
}
/**
@@ -269,9 +270,9 @@ public class Network extends XenAPIObject {
* @return Task
*/
public Task destroyAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.network.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -285,9 +286,9 @@ public class Network extends XenAPIObject {
*
*/
public void destroy(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -302,15 +303,15 @@ public class Network extends XenAPIObject {
* @return references to objects with matching names
*/
public static Set<Network> getByNameLabel(Connection c, String label) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_by_name_label";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSetOfNetwork(result);
+ return Types.toSetOfNetwork(result);
}
/**
@@ -319,15 +320,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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);
}
/**
@@ -336,15 +337,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public String getNameLabel(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_name_label";
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);
}
/**
@@ -353,15 +354,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public String getNameDescription(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_name_description";
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);
}
/**
@@ -370,15 +371,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Set<Types.NetworkOperations> getAllowedOperations(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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.toSetOfNetworkOperations(result);
+ return Types.toSetOfNetworkOperations(result);
}
/**
@@ -387,15 +388,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Map<String, Types.NetworkOperations> getCurrentOperations(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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.toMapOfStringNetworkOperations(result);
+ return Types.toMapOfStringNetworkOperations(result);
}
/**
@@ -404,15 +405,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Set<VIF> getVIFs(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_VIFs";
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.toSetOfVIF(result);
+ return Types.toSetOfVIF(result);
}
/**
@@ -421,15 +422,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Set<PIF> getPIFs(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_PIFs";
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.toSetOfPIF(result);
+ return Types.toSetOfPIF(result);
}
/**
@@ -438,15 +439,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Long getMTU(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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);
}
/**
@@ -455,15 +456,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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);
}
/**
@@ -472,15 +473,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public String getBridge(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_bridge";
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);
}
/**
@@ -489,15 +490,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Map<String, Blob> getBlobs(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_blobs";
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.toMapOfStringBlob(result);
+ return Types.toMapOfStringBlob(result);
}
/**
@@ -506,15 +507,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Set<String> getTags(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_tags";
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);
}
/**
@@ -523,15 +524,15 @@ public class Network extends XenAPIObject {
* @return value of the field
*/
public Types.NetworkDefaultLockingMode getDefaultLockingMode(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.get_default_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.toNetworkDefaultLockingMode(result);
+ return Types.toNetworkDefaultLockingMode(result);
}
/**
@@ -540,9 +541,9 @@ public class Network extends XenAPIObject {
* @param label New value to set
*/
public void setNameLabel(Connection c, String label) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.set_name_label";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)};
@@ -556,9 +557,9 @@ public class Network extends XenAPIObject {
* @param description New value to set
*/
public void setNameDescription(Connection c, String description) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.set_name_description";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)};
@@ -572,9 +573,9 @@ public class Network extends XenAPIObject {
* @param MTU New value to set
*/
public void setMTU(Connection c, Long MTU) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.set_MTU";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(MTU)};
@@ -588,9 +589,9 @@ public class Network 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 = "network.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -605,9 +606,9 @@ public class Network 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 = "network.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -621,9 +622,9 @@ public class Network extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -637,9 +638,9 @@ public class Network extends XenAPIObject {
* @param tags New value to set
*/
public void setTags(Connection c, Set<String> tags) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.set_tags";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)};
@@ -653,9 +654,9 @@ public class Network extends XenAPIObject {
* @param value New value to add
*/
public void addTags(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.add_tags";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -669,9 +670,9 @@ public class Network extends XenAPIObject {
* @param value Value to remove
*/
public void removeTags(Connection c, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.remove_tags";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -688,13 +689,12 @@ public class Network extends XenAPIObject {
* @return Task
*/
public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.network.create_new_blob";
String session = c.getSessionReference();
- Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType),
- Marshalling.toXMLRPC(_public)};
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
return Types.toTask(result);
@@ -709,16 +709,15 @@ public class Network extends XenAPIObject {
* @return The reference of the blob, needed for populating its data
*/
public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.create_new_blob";
String session = c.getSessionReference();
- Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType),
- Marshalling.toXMLRPC(_public)};
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toBlob(result);
+ return Types.toBlob(result);
}
/**
@@ -728,9 +727,9 @@ public class Network extends XenAPIObject {
* @return Task
*/
public Task setDefaultLockingModeAsync(Connection c, Types.NetworkDefaultLockingMode value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.network.set_default_locking_mode";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -745,9 +744,9 @@ public class Network extends XenAPIObject {
* @param value The default locking mode for VIFs attached to this network.
*/
public void setDefaultLockingMode(Connection c, Types.NetworkDefaultLockingMode value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.set_default_locking_mode";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -761,15 +760,15 @@ public class Network extends XenAPIObject {
* @return references to all objects
*/
public static Set<Network> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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.toSetOfNetwork(result);
+ return Types.toSetOfNetwork(result);
}
/**
@@ -778,15 +777,15 @@ public class Network extends XenAPIObject {
* @return records of all objects
*/
public static Map<Network, Network.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "network.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.toMapOfNetworkNetworkRecord(result);
+ return Types.toMapOfNetworkNetworkRecord(result);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ff9abad/deps/XenServerJava/src/com/xensource/xenapi/PBD.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PBD.java b/deps/XenServerJava/src/com/xensource/xenapi/PBD.java
index d289824..bae095f 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/PBD.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/PBD.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 PBD extends XenAPIObject {
* For internal use only.
*/
PBD(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 PBD extends XenAPIObject {
{
if (obj != null && obj instanceof PBD)
{
- PBD other = (PBD)obj;
+ PBD other = (PBD) obj;
return other.ref.equals(this.ref);
} else
{
@@ -111,8 +112,8 @@ public class PBD extends XenAPIObject {
/**
* Convert a PBD.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("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host);
map.put("SR", this.SR == null ? new SR("OpaqueRef:NULL") : this.SR);
@@ -154,15 +155,15 @@ public class PBD extends XenAPIObject {
* @return all fields from the object
*/
public PBD.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.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.toPBDRecord(result);
+ return Types.toPBDRecord(result);
}
/**
@@ -172,15 +173,15 @@ public class PBD extends XenAPIObject {
* @return reference to the object
*/
public static PBD getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.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.toPBD(result);
+ return Types.toPBD(result);
}
/**
@@ -190,9 +191,9 @@ public class PBD extends XenAPIObject {
* @return Task
*/
public static Task createAsync(Connection c, PBD.Record record) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.PBD.create";
String session = c.getSessionReference();
Map<String, Object> record_map = record.toMap();
@@ -209,16 +210,16 @@ public class PBD extends XenAPIObject {
* @return reference to the newly created object
*/
public static PBD create(Connection c, PBD.Record record) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.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.toPBD(result);
+ return Types.toPBD(result);
}
/**
@@ -227,9 +228,9 @@ public class PBD extends XenAPIObject {
* @return Task
*/
public Task destroyAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.PBD.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -243,9 +244,9 @@ public class PBD extends XenAPIObject {
*
*/
public void destroy(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -259,15 +260,15 @@ public class PBD extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.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);
}
/**
@@ -276,15 +277,15 @@ public class PBD extends XenAPIObject {
* @return value of the field
*/
public Host getHost(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.get_host";
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.toHost(result);
+ return Types.toHost(result);
}
/**
@@ -293,15 +294,15 @@ public class PBD extends XenAPIObject {
* @return value of the field
*/
public SR getSR(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.get_SR";
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.toSR(result);
+ return Types.toSR(result);
}
/**
@@ -310,15 +311,15 @@ public class PBD extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getDeviceConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.get_device_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);
}
/**
@@ -327,15 +328,15 @@ public class PBD extends XenAPIObject {
* @return value of the field
*/
public Boolean getCurrentlyAttached(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.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);
}
/**
@@ -344,15 +345,15 @@ public class PBD extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.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);
}
/**
@@ -361,9 +362,9 @@ public class PBD 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 = "PBD.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -378,9 +379,9 @@ public class PBD 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 = "PBD.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -394,9 +395,9 @@ public class PBD extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -410,10 +411,10 @@ public class PBD extends XenAPIObject {
* @return Task
*/
public Task plugAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException,
- Types.SrUnknownDriver {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException,
+ Types.SrUnknownDriver {
String method_call = "Async.PBD.plug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -427,10 +428,10 @@ public class PBD extends XenAPIObject {
*
*/
public void plug(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException,
- Types.SrUnknownDriver {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException,
+ Types.SrUnknownDriver {
String method_call = "PBD.plug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -444,9 +445,9 @@ public class PBD extends XenAPIObject {
* @return Task
*/
public Task unplugAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.PBD.unplug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -460,9 +461,9 @@ public class PBD extends XenAPIObject {
*
*/
public void unplug(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.unplug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -477,9 +478,9 @@ public class PBD extends XenAPIObject {
* @return Task
*/
public Task setDeviceConfigAsync(Connection c, Map<String, String> value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.PBD.set_device_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -494,9 +495,9 @@ public class PBD extends XenAPIObject {
* @param value The new value of the PBD's device_config
*/
public void setDeviceConfig(Connection c, Map<String, String> value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.set_device_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
@@ -510,15 +511,15 @@ public class PBD extends XenAPIObject {
* @return references to all objects
*/
public static Set<PBD> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.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.toSetOfPBD(result);
+ return Types.toSetOfPBD(result);
}
/**
@@ -527,15 +528,15 @@ public class PBD extends XenAPIObject {
* @return records of all objects
*/
public static Map<PBD, PBD.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PBD.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.toMapOfPBDPBDRecord(result);
+ return Types.toMapOfPBDPBDRecord(result);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ff9abad/deps/XenServerJava/src/com/xensource/xenapi/PCI.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PCI.java b/deps/XenServerJava/src/com/xensource/xenapi/PCI.java
index e11230a..fbee50a 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/PCI.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/PCI.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 PCI extends XenAPIObject {
* For internal use only.
*/
PCI(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 PCI extends XenAPIObject {
{
if (obj != null && obj instanceof PCI)
{
- PCI other = (PCI)obj;
+ PCI other = (PCI) obj;
return other.ref.equals(this.ref);
} else
{
@@ -113,8 +114,8 @@ public class PCI extends XenAPIObject {
/**
* Convert a PCI.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("class_name", this.clazzName == null ? "" : this.clazzName);
map.put("vendor_name", this.vendorName == null ? "" : this.vendorName);
@@ -166,15 +167,15 @@ public class PCI extends XenAPIObject {
* @return all fields from the object
*/
public PCI.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.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.toPCIRecord(result);
+ return Types.toPCIRecord(result);
}
/**
@@ -184,15 +185,15 @@ public class PCI extends XenAPIObject {
* @return reference to the object
*/
public static PCI getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.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.toPCI(result);
+ return Types.toPCI(result);
}
/**
@@ -201,15 +202,15 @@ public class PCI extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.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);
}
/**
@@ -218,15 +219,15 @@ public class PCI extends XenAPIObject {
* @return value of the field
*/
public String getClazzName(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.get_class_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);
+ return Types.toString(result);
}
/**
@@ -235,15 +236,15 @@ public class PCI extends XenAPIObject {
* @return value of the field
*/
public String getVendorName(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.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);
+ return Types.toString(result);
}
/**
@@ -252,15 +253,15 @@ public class PCI extends XenAPIObject {
* @return value of the field
*/
public String getDeviceName(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.get_device_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);
+ return Types.toString(result);
}
/**
@@ -269,15 +270,15 @@ public class PCI extends XenAPIObject {
* @return value of the field
*/
public Host getHost(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.get_host";
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.toHost(result);
+ return Types.toHost(result);
}
/**
@@ -286,15 +287,15 @@ public class PCI extends XenAPIObject {
* @return value of the field
*/
public String getPciId(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.get_pci_id";
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);
}
/**
@@ -303,15 +304,15 @@ public class PCI extends XenAPIObject {
* @return value of the field
*/
public Set<PCI> getDependencies(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.get_dependencies";
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.toSetOfPCI(result);
+ return Types.toSetOfPCI(result);
}
/**
@@ -320,15 +321,15 @@ public class PCI extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.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);
}
/**
@@ -337,9 +338,9 @@ public class PCI 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 = "PCI.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -354,9 +355,9 @@ public class PCI 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 = "PCI.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -370,9 +371,9 @@ public class PCI extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -386,15 +387,15 @@ public class PCI extends XenAPIObject {
* @return references to all objects
*/
public static Set<PCI> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.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.toSetOfPCI(result);
+ return Types.toSetOfPCI(result);
}
/**
@@ -403,15 +404,15 @@ public class PCI extends XenAPIObject {
* @return records of all objects
*/
public static Map<PCI, PCI.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PCI.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.toMapOfPCIPCIRecord(result);
+ return Types.toMapOfPCIPCIRecord(result);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ff9abad/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java b/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java
index 0f5ddb4..43eadf5 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/PGPU.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 PGPU extends XenAPIObject {
* For internal use only.
*/
PGPU(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 PGPU extends XenAPIObject {
{
if (obj != null && obj instanceof PGPU)
{
- PGPU other = (PGPU)obj;
+ PGPU other = (PGPU) obj;
return other.ref.equals(this.ref);
} else
{
@@ -104,19 +105,27 @@ public class PGPU extends XenAPIObject {
print.printf("%1$20s: %2$s\n", "GPUGroup", this.GPUGroup);
print.printf("%1$20s: %2$s\n", "host", this.host);
print.printf("%1$20s: %2$s\n", "otherConfig", this.otherConfig);
+ print.printf("%1$20s: %2$s\n", "supportedVGPUTypes", this.supportedVGPUTypes);
+ print.printf("%1$20s: %2$s\n", "enabledVGPUTypes", this.enabledVGPUTypes);
+ print.printf("%1$20s: %2$s\n", "residentVGPUs", this.residentVGPUs);
+ print.printf("%1$20s: %2$s\n", "supportedVGPUMaxCapacities", this.supportedVGPUMaxCapacities);
return writer.toString();
}
/**
* Convert a PGPU.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("PCI", this.PCI == null ? new PCI("OpaqueRef:NULL") : this.PCI);
map.put("GPU_group", this.GPUGroup == null ? new GPUGroup("OpaqueRef:NULL") : this.GPUGroup);
map.put("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host);
map.put("other_config", this.otherConfig == null ? new HashMap<String, String>() : this.otherConfig);
+ map.put("supported_VGPU_types", this.supportedVGPUTypes == null ? new LinkedHashSet<VGPUType>() : this.supportedVGPUTypes);
+ map.put("enabled_VGPU_types", this.enabledVGPUTypes == null ? new LinkedHashSet<VGPUType>() : this.enabledVGPUTypes);
+ map.put("resident_VGPUs", this.residentVGPUs == null ? new LinkedHashSet<VGPU>() : this.residentVGPUs);
+ map.put("supported_VGPU_max_capacities", this.supportedVGPUMaxCapacities == null ? new HashMap<VGPUType, Long>() : this.supportedVGPUMaxCapacities);
return map;
}
@@ -140,6 +149,22 @@ public class PGPU extends XenAPIObject {
* Additional configuration
*/
public Map<String, String> otherConfig;
+ /**
+ * List of VGPU types supported by the underlying hardware
+ */
+ public Set<VGPUType> supportedVGPUTypes;
+ /**
+ * List of VGPU types which have been enabled for this PGPU
+ */
+ public Set<VGPUType> enabledVGPUTypes;
+ /**
+ * List of VGPUs running on this PGPU
+ */
+ public Set<VGPU> residentVGPUs;
+ /**
+ * A map relating each VGPU type supported on this GPU to the maximum number of VGPUs of that type which can run simultaneously on this GPU
+ */
+ public Map<VGPUType, Long> supportedVGPUMaxCapacities;
}
/**
@@ -148,15 +173,15 @@ public class PGPU extends XenAPIObject {
* @return all fields from the object
*/
public PGPU.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.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.toPGPURecord(result);
+ return Types.toPGPURecord(result);
}
/**
@@ -166,15 +191,15 @@ public class PGPU extends XenAPIObject {
* @return reference to the object
*/
public static PGPU getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.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.toPGPU(result);
+ return Types.toPGPU(result);
}
/**
@@ -183,15 +208,15 @@ public class PGPU extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.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 +225,15 @@ public class PGPU extends XenAPIObject {
* @return value of the field
*/
public PCI getPCI(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.get_PCI";
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.toPCI(result);
+ return Types.toPCI(result);
}
/**
@@ -217,15 +242,15 @@ public class PGPU extends XenAPIObject {
* @return value of the field
*/
public GPUGroup getGPUGroup(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.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);
}
/**
@@ -234,15 +259,15 @@ public class PGPU extends XenAPIObject {
* @return value of the field
*/
public Host getHost(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.get_host";
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.toHost(result);
+ return Types.toHost(result);
}
/**
@@ -251,15 +276,83 @@ public class PGPU extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.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 supported_VGPU_types field of the given PGPU.
+ *
+ * @return value of the field
+ */
+ public Set<VGPUType> getSupportedVGPUTypes(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.get_supported_VGPU_types";
+ 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.toSetOfVGPUType(result);
+ }
+
+ /**
+ * Get the enabled_VGPU_types field of the given PGPU.
+ *
+ * @return value of the field
+ */
+ public Set<VGPUType> getEnabledVGPUTypes(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.get_enabled_VGPU_types";
+ 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.toSetOfVGPUType(result);
+ }
+
+ /**
+ * Get the resident_VGPUs field of the given PGPU.
+ *
+ * @return value of the field
+ */
+ public Set<VGPU> getResidentVGPUs(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.get_resident_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_VGPU_max_capacities field of the given PGPU.
+ *
+ * @return value of the field
+ */
+ public Map<VGPUType, Long> getSupportedVGPUMaxCapacities(Connection c) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.get_supported_VGPU_max_capacities";
+ 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.toMapOfVGPUTypeLong(result);
}
/**
@@ -268,9 +361,9 @@ public class PGPU 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 = "PGPU.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -285,9 +378,9 @@ public class PGPU 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 = "PGPU.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 +394,9 @@ public class PGPU extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -312,20 +405,192 @@ public class PGPU extends XenAPIObject {
}
/**
+ *
+ *
+ * @param value The VGPU type to enable
+ * @return Task
+ */
+ public Task addEnabledVGPUTypesAsync(Connection c, VGPUType value) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "Async.PGPU.add_enabled_VGPU_types";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ *
+ *
+ * @param value The VGPU type to enable
+ */
+ public void addEnabledVGPUTypes(Connection c, VGPUType value) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.add_enabled_VGPU_types";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ *
+ *
+ * @param value The VGPU type to disable
+ * @return Task
+ */
+ public Task removeEnabledVGPUTypesAsync(Connection c, VGPUType value) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "Async.PGPU.remove_enabled_VGPU_types";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ *
+ *
+ * @param value The VGPU type to disable
+ */
+ public void removeEnabledVGPUTypes(Connection c, VGPUType value) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.remove_enabled_VGPU_types";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ *
+ *
+ * @param value The VGPU types to enable
+ * @return Task
+ */
+ public Task setEnabledVGPUTypesAsync(Connection c, Set<VGPUType> value) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "Async.PGPU.set_enabled_VGPU_types";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ *
+ *
+ * @param value The VGPU types to enable
+ */
+ public void setEnabledVGPUTypes(Connection c, Set<VGPUType> value) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.set_enabled_VGPU_types";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ *
+ *
+ * @param value The group to which the PGPU will be moved
+ * @return Task
+ */
+ public Task setGPUGroupAsync(Connection c, GPUGroup value) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "Async.PGPU.set_GPU_group";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ *
+ *
+ * @param value The group to which the PGPU will be moved
+ */
+ public void setGPUGroup(Connection c, GPUGroup value) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.set_GPU_group";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)};
+ Map response = c.dispatch(method_call, method_params);
+ return;
+ }
+
+ /**
+ *
+ *
+ * @param vgpuType The VGPU type for which we want to find the number of VGPUs which can still be started on this PGPU
+ * @return Task
+ */
+ public Task getRemainingCapacityAsync(Connection c, VGPUType vgpuType) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "Async.PGPU.get_remaining_capacity";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vgpuType)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toTask(result);
+ }
+
+ /**
+ *
+ *
+ * @param vgpuType The VGPU type for which we want to find the number of VGPUs which can still be started on this PGPU
+ * @return The number of VGPUs of the specified type which can still be started on this PGPU
+ */
+ public Long getRemainingCapacity(Connection c, VGPUType vgpuType) throws
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
+ String method_call = "PGPU.get_remaining_capacity";
+ String session = c.getSessionReference();
+ Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vgpuType)};
+ Map response = c.dispatch(method_call, method_params);
+ Object result = response.get("Value");
+ return Types.toLong(result);
+ }
+
+ /**
* Return a list of all the PGPUs known to the system.
*
* @return references to all objects
*/
public static Set<PGPU> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.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.toSetOfPGPU(result);
+ return Types.toSetOfPGPU(result);
}
/**
@@ -334,15 +599,15 @@ public class PGPU extends XenAPIObject {
* @return records of all objects
*/
public static Map<PGPU, PGPU.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "PGPU.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.toMapOfPGPUPGPURecord(result);
+ return Types.toMapOfPGPUPGPURecord(result);
}
}
\ No newline at end of file