You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/12/12 22:01:32 UTC
[32/48] All Checkstyle problems corrected
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/deps/XenServerJava/src/com/xensource/xenapi/Session.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Session.java b/deps/XenServerJava/src/com/xensource/xenapi/Session.java
index f34476b..bdf3b4c 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/Session.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/Session.java
@@ -28,7 +28,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
package com.xensource.xenapi;
import com.xensource.xenapi.Types.BadServerResponse;
@@ -61,14 +60,14 @@ public class Session extends XenAPIObject {
* For internal use only.
*/
Session(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;
}
/**
@@ -79,7 +78,7 @@ public class Session extends XenAPIObject {
{
if (obj != null && obj instanceof Session)
{
- Session other = (Session) obj;
+ Session other = (Session)obj;
return other.ref.equals(this.ref);
} else
{
@@ -120,8 +119,8 @@ public class Session extends XenAPIObject {
/**
* Convert a session.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("this_host", this.thisHost == null ? new Host("OpaqueRef:NULL") : this.thisHost);
map.put("this_user", this.thisUser == null ? new User("OpaqueRef:NULL") : this.thisUser);
@@ -203,15 +202,15 @@ public class Session extends XenAPIObject {
* @return all fields from the object
*/
public Session.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.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.toSessionRecord(result);
+ return Types.toSessionRecord(result);
}
/**
@@ -221,15 +220,15 @@ public class Session extends XenAPIObject {
* @return reference to the object
*/
public static Session getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.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.toSession(result);
+ return Types.toSession(result);
}
/**
@@ -238,15 +237,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.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);
}
/**
@@ -255,15 +254,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Host getThisHost(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_this_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);
}
/**
@@ -272,15 +271,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public User getThisUser(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_this_user";
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.toUser(result);
+ return Types.toUser(result);
}
/**
@@ -289,15 +288,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Date getLastActive(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_last_active";
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);
}
/**
@@ -306,15 +305,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Boolean getPool(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_pool";
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);
}
/**
@@ -323,15 +322,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.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);
}
/**
@@ -340,15 +339,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Boolean getIsLocalSuperuser(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_is_local_superuser";
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);
}
/**
@@ -357,15 +356,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Subject getSubject(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_subject";
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.toSubject(result);
+ return Types.toSubject(result);
}
/**
@@ -374,15 +373,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Date getValidationTime(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_validation_time";
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);
}
/**
@@ -391,15 +390,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public String getAuthUserSid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_auth_user_sid";
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);
}
/**
@@ -408,15 +407,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public String getAuthUserName(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_auth_user_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);
}
/**
@@ -425,15 +424,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Set<String> getRbacPermissions(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_rbac_permissions";
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);
}
/**
@@ -442,15 +441,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Set<Task> getTasks(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_tasks";
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.toSetOfTask(result);
+ return Types.toSetOfTask(result);
}
/**
@@ -459,15 +458,15 @@ public class Session extends XenAPIObject {
* @return value of the field
*/
public Session getParent(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_parent";
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.toSession(result);
+ return Types.toSession(result);
}
/**
@@ -476,9 +475,9 @@ public class Session 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 = "session.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -493,9 +492,9 @@ public class Session 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 = "session.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -509,9 +508,9 @@ public class Session extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -528,15 +527,15 @@ public class Session extends XenAPIObject {
* @return reference of newly created session
*/
public static Session loginWithPassword(Connection c, String uname, String pwd, String version) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException,
- Types.SessionAuthenticationFailed {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException,
+ Types.SessionAuthenticationFailed {
String method_call = "session.login_with_password";
Object[] method_params = {Marshalling.toXMLRPC(uname), Marshalling.toXMLRPC(pwd), Marshalling.toXMLRPC(version)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSession(result);
+ return Types.toSession(result);
}
/**
@@ -544,9 +543,9 @@ public class Session extends XenAPIObject {
*
*/
public static void logout(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.logout";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
@@ -561,9 +560,9 @@ public class Session extends XenAPIObject {
* @param newPwd New password for account
*/
public static void changePassword(Connection c, String oldPwd, String newPwd) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.change_password";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(oldPwd), Marshalling.toXMLRPC(newPwd)};
@@ -579,14 +578,14 @@ public class Session extends XenAPIObject {
* @return ID of newly created session
*/
public static Session slaveLocalLoginWithPassword(Connection c, String uname, String pwd) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.slave_local_login_with_password";
Object[] method_params = {Marshalling.toXMLRPC(uname), Marshalling.toXMLRPC(pwd)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toSession(result);
+ return Types.toSession(result);
}
/**
@@ -594,9 +593,9 @@ public class Session extends XenAPIObject {
*
*/
public static void localLogout(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.local_logout";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
@@ -610,9 +609,9 @@ public class Session extends XenAPIObject {
* @return Task
*/
public static Task getAllSubjectIdentifiersAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.session.get_all_subject_identifiers";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session)};
@@ -627,15 +626,15 @@ public class Session extends XenAPIObject {
* @return The list of user subject-identifiers of all existing sessions
*/
public static Set<String> getAllSubjectIdentifiers(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.get_all_subject_identifiers";
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.toSetOfString(result);
+ return Types.toSetOfString(result);
}
/**
@@ -645,9 +644,9 @@ public class Session extends XenAPIObject {
* @return Task
*/
public static Task logoutSubjectIdentifierAsync(Connection c, String subjectIdentifier) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.session.logout_subject_identifier";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)};
@@ -662,9 +661,9 @@ public class Session extends XenAPIObject {
* @param subjectIdentifier User subject-identifier of the sessions to be destroyed
*/
public static void logoutSubjectIdentifier(Connection c, String subjectIdentifier) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "session.logout_subject_identifier";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)};
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/deps/XenServerJava/src/com/xensource/xenapi/Subject.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Subject.java b/deps/XenServerJava/src/com/xensource/xenapi/Subject.java
index a181b58..a599f237 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/Subject.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/Subject.java
@@ -28,7 +28,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
package com.xensource.xenapi;
import com.xensource.xenapi.Types.BadServerResponse;
@@ -61,14 +60,14 @@ public class Subject extends XenAPIObject {
* For internal use only.
*/
Subject(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;
}
/**
@@ -79,7 +78,7 @@ public class Subject extends XenAPIObject {
{
if (obj != null && obj instanceof Subject)
{
- Subject other = (Subject) obj;
+ Subject other = (Subject)obj;
return other.ref.equals(this.ref);
} else
{
@@ -110,8 +109,8 @@ public class Subject extends XenAPIObject {
/**
* Convert a subject.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("subject_identifier", this.subjectIdentifier == null ? "" : this.subjectIdentifier);
map.put("other_config", this.otherConfig == null ? new HashMap<String, String>() : this.otherConfig);
@@ -143,15 +142,15 @@ public class Subject extends XenAPIObject {
* @return all fields from the object
*/
public Subject.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.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.toSubjectRecord(result);
+ return Types.toSubjectRecord(result);
}
/**
@@ -161,15 +160,15 @@ public class Subject extends XenAPIObject {
* @return reference to the object
*/
public static Subject getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.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.toSubject(result);
+ return Types.toSubject(result);
}
/**
@@ -179,9 +178,9 @@ public class Subject extends XenAPIObject {
* @return Task
*/
public static Task createAsync(Connection c, Subject.Record record) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.subject.create";
String session = c.getSessionReference();
Map<String, Object> record_map = record.toMap();
@@ -198,16 +197,16 @@ public class Subject extends XenAPIObject {
* @return reference to the newly created object
*/
public static Subject create(Connection c, Subject.Record record) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.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.toSubject(result);
+ return Types.toSubject(result);
}
/**
@@ -216,9 +215,9 @@ public class Subject extends XenAPIObject {
* @return Task
*/
public Task destroyAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.subject.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -232,9 +231,9 @@ public class Subject extends XenAPIObject {
*
*/
public void destroy(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -248,15 +247,15 @@ public class Subject extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.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);
}
/**
@@ -265,15 +264,15 @@ public class Subject extends XenAPIObject {
* @return value of the field
*/
public String getSubjectIdentifier(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.get_subject_identifier";
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);
}
/**
@@ -282,15 +281,15 @@ public class Subject extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.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);
}
/**
@@ -299,15 +298,15 @@ public class Subject extends XenAPIObject {
* @return value of the field
*/
public Set<Role> getRoles(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.get_roles";
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.toSetOfRole(result);
+ return Types.toSetOfRole(result);
}
/**
@@ -316,9 +315,9 @@ public class Subject extends XenAPIObject {
* @param role The unique role reference
*/
public void addToRoles(Connection c, Role role) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.add_to_roles";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(role)};
@@ -332,9 +331,9 @@ public class Subject extends XenAPIObject {
* @param role The unique role reference in the subject's roles field
*/
public void removeFromRoles(Connection c, Role role) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.remove_from_roles";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(role)};
@@ -348,15 +347,15 @@ public class Subject extends XenAPIObject {
* @return a list of permission names
*/
public Set<String> getPermissionsNameLabel(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.get_permissions_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.toSetOfString(result);
+ return Types.toSetOfString(result);
}
/**
@@ -365,15 +364,15 @@ public class Subject extends XenAPIObject {
* @return references to all objects
*/
public static Set<Subject> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.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.toSetOfSubject(result);
+ return Types.toSetOfSubject(result);
}
/**
@@ -382,15 +381,15 @@ public class Subject extends XenAPIObject {
* @return records of all objects
*/
public static Map<Subject, Subject.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "subject.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.toMapOfSubjectSubjectRecord(result);
+ return Types.toMapOfSubjectSubjectRecord(result);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/deps/XenServerJava/src/com/xensource/xenapi/Task.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Task.java b/deps/XenServerJava/src/com/xensource/xenapi/Task.java
index beb9686..59d59f6 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/Task.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/Task.java
@@ -28,7 +28,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
package com.xensource.xenapi;
import com.xensource.xenapi.Types.BadServerResponse;
@@ -61,14 +60,14 @@ public class Task extends XenAPIObject {
* For internal use only.
*/
Task(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;
}
/**
@@ -79,7 +78,7 @@ public class Task extends XenAPIObject {
{
if (obj != null && obj instanceof Task)
{
- Task other = (Task) obj;
+ Task other = (Task)obj;
return other.ref.equals(this.ref);
} else
{
@@ -122,8 +121,8 @@ public class Task extends XenAPIObject {
/**
* Convert a task.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);
@@ -215,15 +214,15 @@ public class Task extends XenAPIObject {
* @return all fields from the object
*/
public Task.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toTaskRecord(result);
+ return Types.toTaskRecord(result);
}
/**
@@ -233,15 +232,15 @@ public class Task extends XenAPIObject {
* @return reference to the object
*/
public static Task getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toTask(result);
+ return Types.toTask(result);
}
/**
@@ -251,15 +250,15 @@ public class Task extends XenAPIObject {
* @return references to objects with matching names
*/
public static Set<Task> getByNameLabel(Connection c, String label) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toSetOfTask(result);
+ return Types.toSetOfTask(result);
}
/**
@@ -268,15 +267,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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);
}
/**
@@ -285,15 +284,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public String getNameLabel(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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);
}
/**
@@ -302,15 +301,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public String getNameDescription(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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);
}
/**
@@ -319,15 +318,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Set<Types.TaskAllowedOperations> getAllowedOperations(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toSetOfTaskAllowedOperations(result);
+ return Types.toSetOfTaskAllowedOperations(result);
}
/**
@@ -336,15 +335,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Map<String, Types.TaskAllowedOperations> getCurrentOperations(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toMapOfStringTaskAllowedOperations(result);
+ return Types.toMapOfStringTaskAllowedOperations(result);
}
/**
@@ -353,15 +352,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Date getCreated(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.get_created";
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);
}
/**
@@ -370,15 +369,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Date getFinished(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.get_finished";
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);
}
/**
@@ -387,15 +386,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Types.TaskStatusType getStatus(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.get_status";
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.toTaskStatusType(result);
+ return Types.toTaskStatusType(result);
}
/**
@@ -404,15 +403,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Host getResidentOn(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toHost(result);
+ return Types.toHost(result);
}
/**
@@ -421,15 +420,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Double getProgress(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.get_progress";
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);
}
/**
@@ -438,15 +437,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public String getType(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toString(result);
+ return Types.toString(result);
}
/**
@@ -455,15 +454,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public String getResult(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.get_result";
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);
}
/**
@@ -472,15 +471,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Set<String> getErrorInfo(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.get_error_info";
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);
}
/**
@@ -489,15 +488,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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);
}
/**
@@ -506,15 +505,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Task getSubtaskOf(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.get_subtask_of";
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.toTask(result);
+ return Types.toTask(result);
}
/**
@@ -523,15 +522,15 @@ public class Task extends XenAPIObject {
* @return value of the field
*/
public Set<Task> getSubtasks(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.get_subtasks";
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.toSetOfTask(result);
+ return Types.toSetOfTask(result);
}
/**
@@ -540,9 +539,9 @@ public class Task 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 = "task.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -557,9 +556,9 @@ public class Task 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 = "task.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -573,9 +572,9 @@ public class Task extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -591,15 +590,15 @@ public class Task extends XenAPIObject {
* @return The reference of the created task object
*/
public static Task create(Connection c, String label, String description) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.create";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label), Marshalling.toXMLRPC(description)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toTask(result);
+ return Types.toTask(result);
}
/**
@@ -607,9 +606,9 @@ public class Task extends XenAPIObject {
*
*/
public void destroy(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -623,10 +622,10 @@ public class Task extends XenAPIObject {
* @return Task
*/
public Task cancelAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException,
- Types.OperationNotAllowed {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException,
+ Types.OperationNotAllowed {
String method_call = "Async.task.cancel";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -640,10 +639,10 @@ public class Task extends XenAPIObject {
*
*/
public void cancel(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException,
- Types.OperationNotAllowed {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException,
+ Types.OperationNotAllowed {
String method_call = "task.cancel";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -657,15 +656,15 @@ public class Task extends XenAPIObject {
* @return references to all objects
*/
public static Set<Task> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toSetOfTask(result);
+ return Types.toSetOfTask(result);
}
/**
@@ -674,15 +673,15 @@ public class Task extends XenAPIObject {
* @return records of all objects
*/
public static Map<Task, Task.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "task.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.toMapOfTaskTaskRecord(result);
+ return Types.toMapOfTaskTaskRecord(result);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java b/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java
index 8289e8f..44b236d 100644
--- a/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java
+++ b/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java
@@ -28,7 +28,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
package com.xensource.xenapi;
import com.xensource.xenapi.Types.BadServerResponse;
@@ -61,14 +60,14 @@ public class Tunnel extends XenAPIObject {
* For internal use only.
*/
Tunnel(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;
}
/**
@@ -79,7 +78,7 @@ public class Tunnel extends XenAPIObject {
{
if (obj != null && obj instanceof Tunnel)
{
- Tunnel other = (Tunnel) obj;
+ Tunnel other = (Tunnel)obj;
return other.ref.equals(this.ref);
} else
{
@@ -111,8 +110,8 @@ public class Tunnel extends XenAPIObject {
/**
* Convert a tunnel.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("access_PIF", this.accessPIF == null ? new PIF("OpaqueRef:NULL") : this.accessPIF);
map.put("transport_PIF", this.transportPIF == null ? new PIF("OpaqueRef:NULL") : this.transportPIF);
@@ -149,15 +148,15 @@ public class Tunnel extends XenAPIObject {
* @return all fields from the object
*/
public Tunnel.Record getRecord(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.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.toTunnelRecord(result);
+ return Types.toTunnelRecord(result);
}
/**
@@ -167,15 +166,15 @@ public class Tunnel extends XenAPIObject {
* @return reference to the object
*/
public static Tunnel getByUuid(Connection c, String uuid) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.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.toTunnel(result);
+ return Types.toTunnel(result);
}
/**
@@ -184,15 +183,15 @@ public class Tunnel extends XenAPIObject {
* @return value of the field
*/
public String getUuid(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.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);
}
/**
@@ -201,15 +200,15 @@ public class Tunnel extends XenAPIObject {
* @return value of the field
*/
public PIF getAccessPIF(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.get_access_PIF";
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.toPIF(result);
+ return Types.toPIF(result);
}
/**
@@ -218,15 +217,15 @@ public class Tunnel extends XenAPIObject {
* @return value of the field
*/
public PIF getTransportPIF(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.get_transport_PIF";
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.toPIF(result);
+ return Types.toPIF(result);
}
/**
@@ -235,15 +234,15 @@ public class Tunnel extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getStatus(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.get_status";
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);
}
/**
@@ -252,15 +251,15 @@ public class Tunnel extends XenAPIObject {
* @return value of the field
*/
public Map<String, String> getOtherConfig(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.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);
}
/**
@@ -269,9 +268,9 @@ public class Tunnel extends XenAPIObject {
* @param status New value to set
*/
public void setStatus(Connection c, Map<String, String> status) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.set_status";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(status)};
@@ -286,9 +285,9 @@ public class Tunnel extends XenAPIObject {
* @param value Value to add
*/
public void addToStatus(Connection c, String key, String value) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.add_to_status";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -302,9 +301,9 @@ public class Tunnel extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromStatus(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.remove_from_status";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -318,9 +317,9 @@ public class Tunnel 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 = "tunnel.set_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)};
@@ -335,9 +334,9 @@ public class Tunnel 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 = "tunnel.add_to_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)};
@@ -351,9 +350,9 @@ public class Tunnel extends XenAPIObject {
* @param key Key to remove
*/
public void removeFromOtherConfig(Connection c, String key) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)};
@@ -369,12 +368,12 @@ public class Tunnel extends XenAPIObject {
* @return Task
*/
public static Task createAsync(Connection c, PIF transportPIF, Network network) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException,
- Types.OpenvswitchNotActive,
- Types.TransportPifNotConfigured,
- Types.IsTunnelAccessPif {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException,
+ Types.OpenvswitchNotActive,
+ Types.TransportPifNotConfigured,
+ Types.IsTunnelAccessPif {
String method_call = "Async.tunnel.create";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(transportPIF), Marshalling.toXMLRPC(network)};
@@ -391,18 +390,18 @@ public class Tunnel extends XenAPIObject {
* @return The reference of the created tunnel object
*/
public static Tunnel create(Connection c, PIF transportPIF, Network network) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException,
- Types.OpenvswitchNotActive,
- Types.TransportPifNotConfigured,
- Types.IsTunnelAccessPif {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException,
+ Types.OpenvswitchNotActive,
+ Types.TransportPifNotConfigured,
+ Types.IsTunnelAccessPif {
String method_call = "tunnel.create";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(transportPIF), Marshalling.toXMLRPC(network)};
Map response = c.dispatch(method_call, method_params);
Object result = response.get("Value");
- return Types.toTunnel(result);
+ return Types.toTunnel(result);
}
/**
@@ -411,9 +410,9 @@ public class Tunnel extends XenAPIObject {
* @return Task
*/
public Task destroyAsync(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "Async.tunnel.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -427,9 +426,9 @@ public class Tunnel extends XenAPIObject {
*
*/
public void destroy(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.destroy";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
@@ -443,15 +442,15 @@ public class Tunnel extends XenAPIObject {
* @return references to all objects
*/
public static Set<Tunnel> getAll(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.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.toSetOfTunnel(result);
+ return Types.toSetOfTunnel(result);
}
/**
@@ -460,15 +459,15 @@ public class Tunnel extends XenAPIObject {
* @return records of all objects
*/
public static Map<Tunnel, Tunnel.Record> getAllRecords(Connection c) throws
- BadServerResponse,
- XenAPIException,
- XmlRpcException {
+ BadServerResponse,
+ XenAPIException,
+ XmlRpcException {
String method_call = "tunnel.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.toMapOfTunnelTunnelRecord(result);
+ return Types.toMapOfTunnelTunnelRecord(result);
}
}
\ No newline at end of file