/** * Changes the owner/group * * @param client XML-RPC Client. * @param id The virtual machine id (vid) of the target instance. * @param uid The new owner user ID. Set it to -1 to leave the current one. * @param gid The new group ID. Set it to -1 to leave the current one. * @return If an error occurs the error message contains the reason. */ public static OneResponse chown(Client client, int id, int uid, int gid) { return client.call(CHOWN, id, uid, gid); }
/** * Allocates a new VM in OpenNebula. * * @param client XML-RPC Client. * @param description A string containing the template of the vm. * @return If successful the message contains the associated id generated for this VM. */ public static OneResponse allocate(Client client, String description) { return client.call(ALLOCATE, description); }
/** * Allocates a new Document in OpenNebula. * * @param client XML-RPC Client. * @param description A string containing the template of the document. * @return If successful the message contains the associated id generated for this Document. */ protected static OneResponse allocate(Client client, String description, int type) { return client.call(ALLOCATE, description, type); }
/** * Retrieves the information of the given VM. * * @param client XML-RPC Client. * @param id The virtual machine id (vid) of the target instance. * @return If successful the message contains the string with the information returned by * OpenNebula. */ public static OneResponse info(Client client, int id) { return client.call(INFO, id); }
/** * Retrieves all or part of the Virtual Machines in the pool. * * @param client XML-RPC Client. * @param filter Filter flag to use. Possible values: * <ul> * <li>{@link Pool#ALL}: All Virtual Machines * <li>{@link Pool#MINE}: Connected user's Virtual Machines * <li>{@link Pool#MINE_GROUP}: Connected user's Virtual Machines, and the ones in his group * <li>{@link Pool#GROUP}: User's primary group Virtual Machines * <li>>= 0 UID User's Virtual Machines * </ul> * * @return If successful the message contains the string with the information returned by * OpenNebula. */ public static OneResponse info(Client client, int filter) { return client.call(INFO_METHOD, filter, -1, -1, NOT_DONE); }
/** * Retrieves the monitoring data for all the hosts in the pool. * * @param client XML-RPC Client. * @return If successful the message contains the string with the information returned by * OpenNebula. */ public static OneResponse monitoring(Client client) { return client.call(MONITORING); }
/** * Retrieves the monitoring data for all or part of the Virtual Machines in the pool. * * @param client XML-RPC Client. * @param filter Filter flag to use. Possible values: * <ul> * <li>{@link Pool#ALL}: All Virtual Machines * <li>{@link Pool#MINE}: Connected user's Virtual Machines * <li>{@link Pool#MINE_GROUP}: Connected user's Virtual Machines, and the ones in his group * <li>{@link Pool#GROUP}: User's primary group Virtual Machines * <li>>= 0 UID User's Virtual Machines * </ul> * * @return If successful the message contains the string with the information returned by * OpenNebula. */ public static OneResponse monitoring(Client client, int filter) { return client.call(MONITORING, filter); }
/** * Retrieves all or part of the Virtual Machines in the pool. The Virtual Machines to retrieve can * be also filtered by Id, specifying the first and last Id to include; and by state. * * @param client XML-RPC Client. * @param filter Filter flag to use. Possible values: * <ul> * <li>{@link Pool#ALL}: All Virtual Machines * <li>{@link Pool#MINE}: Connected user's Virtual Machines * <li>{@link Pool#MINE_GROUP}: Connected user's Virtual Machines, and the ones in his group * <li>{@link Pool#GROUP}: User's primary group Virtual Machines * <li>>= 0 UID User's Virtual Machines * </ul> * * @param startId Lowest Id to retrieve * @param endId Biggest Id to retrieve * @param state Numeric state of the Virtual Machines wanted, or one of {@link * VirtualMachinePool#ALL_VM} or {@link VirtualMachinePool#NOT_DONE} * @return If successful the message contains the string with the information returned by * OpenNebula. */ public static OneResponse info(Client client, int filter, int startId, int endId, int state) { return client.call(INFO_METHOD, filter, startId, endId, state); }
/** * Retrieves all the connected user's Virtual Machines and the ones in his group. * * @param client XML-RPC Client. * @return If successful the message contains the string with the information returned by * OpenNebula. */ public static OneResponse infoGroup(Client client) { return client.call(INFO_METHOD, MINE_GROUP, -1, -1, NOT_DONE); }
/** * Retrieves all the connected user's Virtual Machines. * * @param client XML-RPC Client. * @return If successful the message contains the string with the information returned by * OpenNebula. */ public static OneResponse infoMine(Client client) { return client.call(INFO_METHOD, MINE, -1, -1, NOT_DONE); }
/** * Retrieves all the Virtual Machines in the pool. * * @param client XML-RPC Client. * @return If successful the message contains the string with the information returned by * OpenNebula. */ public static OneResponse infoAll(Client client) { return client.call(INFO_METHOD, ALL, -1, -1, NOT_DONE); }