mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
Merge branch 'master' into feature-1712
This commit is contained in:
commit
56681cec9a
46 files changed
+1180
-232
No files matched your search
@@ -37,6 +37,7 @@ public class Cluster extends PoolElement{
|
||||
private static final String DELDATASTORE = METHOD_PREFIX + "deldatastore";
|
||||
private static final String ADDVNET = METHOD_PREFIX + "addvnet";
|
||||
private static final String DELVNET = METHOD_PREFIX + "delvnet";
|
||||
private static final String RENAME = METHOD_PREFIX + "rename";
|
||||
|
||||
/**
|
||||
* Creates a new Cluster representation.
|
||||
@@ -199,6 +200,19 @@ public class Cluster extends PoolElement{
|
||||
return client.call(DELVNET, id, vnetId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renames this Cluster.
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The image id of the target host we want to modify.
|
||||
* @param name New name for the Cluster
|
||||
* @return If successful the message contains the cluster id.
|
||||
*/
|
||||
public static OneResponse rename(Client client, int id, String name)
|
||||
{
|
||||
return client.call(RENAME, id, name);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Instanced object XML-RPC methods
|
||||
// =================================
|
||||
@@ -315,6 +329,17 @@ public class Cluster extends PoolElement{
|
||||
return delVnet(client, id, vnetId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renames this Cluster
|
||||
*
|
||||
* @param name New name for the Cluster.
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse rename(String name)
|
||||
{
|
||||
return rename(client, id, name);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Helpers
|
||||
// =================================
|
||||
|
||||
@@ -35,6 +35,7 @@ public class Datastore extends PoolElement
|
||||
private static final String UPDATE = METHOD_PREFIX + "update";
|
||||
private static final String CHOWN = METHOD_PREFIX + "chown";
|
||||
private static final String CHMOD = METHOD_PREFIX + "chmod";
|
||||
private static final String RENAME = METHOD_PREFIX + "rename";
|
||||
|
||||
private static final String[] DATASTORE_TYPES = {"IMAGE", "SYSTEM", "FILE"};
|
||||
|
||||
@@ -212,6 +213,19 @@ public class Datastore extends PoolElement
|
||||
return chmod(client, CHMOD, id, octet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renames this Datastore.
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The image id of the target host we want to modify.
|
||||
* @param name New name for the Datastore
|
||||
* @return If successful the message contains the datastore id.
|
||||
*/
|
||||
public static OneResponse rename(Client client, int id, String name)
|
||||
{
|
||||
return client.call(RENAME, id, name);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Instanced object XML-RPC methods
|
||||
// =================================
|
||||
@@ -373,6 +387,17 @@ public class Datastore extends PoolElement
|
||||
return chmod(client, id, octet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renames this Datastore
|
||||
*
|
||||
* @param name New name for the Datastore.
|
||||
* @return If an error occurs the error message contains the reason.
|
||||
*/
|
||||
public OneResponse rename(String name)
|
||||
{
|
||||
return rename(client, id, name);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Helpers
|
||||
// =================================
|
||||
|
||||
@@ -34,6 +34,7 @@ public class Host extends PoolElement{
|
||||
private static final String ENABLE = METHOD_PREFIX + "enable";
|
||||
private static final String UPDATE = METHOD_PREFIX + "update";
|
||||
private static final String MONITORING = METHOD_PREFIX + "monitoring";
|
||||
private static final String RENAME = METHOD_PREFIX + "rename";
|
||||
|
||||
private static final String[] HOST_STATES =
|
||||
{"INIT", "MONITORING_MONITORED", "MONITORED", "ERROR", "DISABLED",
|
||||
@@ -189,6 +190,19 @@ public class Host extends PoolElement{
|
||||
return client.call(MONITORING, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renames this Host.
|
||||
*
|
||||
* @param client XML-RPC Client.
|
||||
* @param id The image id of the target host we want to modify.
|
||||
* @param name New name for the Host
|
||||
* @return If successful the message contains the host id.
|
||||
*/
|
||||
public static OneResponse rename(Client client, int id, String name)
|
||||
{
|
||||
return client.call(RENAME, id, name);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Instanced object XML-RPC methods
|
||||
// =================================
|
||||
@@ -280,6 +294,17 @@ public class Host extends PoolElement{
|
||||
return monitoring(client, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renames this Host.
|
||||
*
|
||||
* @param name New name for the Host
|
||||
* @return If successful the message contains the host id.
|
||||
*/
|
||||
public OneResponse rename(String name)
|
||||
{
|
||||
return rename(client, id, name);
|
||||
}
|
||||
|
||||
// =================================
|
||||
// Helpers
|
||||
// =================================
|
||||
|
||||
Reference in new issue
Block a user