Package com.xensource.xenapi
Class VMSS
java.lang.Object
com.xensource.xenapi.XenAPIObject
com.xensource.xenapi.VMSS
VM Snapshot Schedule
First published in XenServer 7.2.
- Author:
- Cloud Software Group, Inc.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToSchedule
(Connection c, String key, String value) Minimum allowed role: pool-operator First published in XenServer 7.2.static VMSS
create
(Connection c, VMSS.Record record) Create a new VMSS instance, and return its handle.static Task
createAsync
(Connection c, VMSS.Record record) Create a new VMSS instance, and return its handle.void
Destroy the specified VMSS instance.Destroy the specified VMSS instance.boolean
If obj is a VMSS, compares XenAPI references for equality.getAll
(Connection c) Return a list of all the VMSSs known to the system.static Map<VMSS,
VMSS.Record> Return a map of VMSS references to VMSS records for all VMSSs known to the system.getByNameLabel
(Connection c, String label) Get all the VMSS instances with the given label.static VMSS
getByUuid
(Connection c, String uuid) Get a reference to the VMSS instance with the specified UUID.Get the enabled field of the given VMSS.Get the frequency field of the given VMSS.Get the last_run_time field of the given VMSS.Get the name/description field of the given VMSS.Get the name/label field of the given VMSS.Get a record containing the current state of the given VMSS.Get the retained_snapshots field of the given VMSS.Get the schedule field of the given VMSS.Get the type field of the given VMSS.Get the uuid field of the given VMSS.getVMs
(Connection c) Get the VMs field of the given VMSS.int
hashCode()
void
removeFromSchedule
(Connection c, String key) Minimum allowed role: pool-operator First published in XenServer 7.2.void
setEnabled
(Connection c, Boolean enabled) Set the enabled field of the given VMSS.void
setFrequency
(Connection c, Types.VmssFrequency value) Set the value of the frequency field Minimum allowed role: pool-operator First published in XenServer 7.2.void
setLastRunTime
(Connection c, Date value) Minimum allowed role: Not Applicable First published in XenServer 7.2.void
setNameDescription
(Connection c, String description) Set the name/description field of the given VMSS.void
setNameLabel
(Connection c, String label) Set the name/label field of the given VMSS.void
setRetainedSnapshots
(Connection c, Long value) Minimum allowed role: pool-operator First published in XenServer 7.2.void
setSchedule
(Connection c, Map<String, String> value) Minimum allowed role: pool-operator First published in XenServer 7.2.void
setType
(Connection c, Types.VmssType value) Minimum allowed role: pool-operator First published in XenServer 7.2.This call executes the snapshot schedule immediately Minimum allowed role: pool-operator First published in XenServer 7.2.Methods inherited from class com.xensource.xenapi.XenAPIObject
isNull
-
Field Details
-
ref
The XenAPI reference (OpaqueRef) to this object.
-
-
Method Details
-
toWireString
- Specified by:
toWireString
in classXenAPIObject
- Returns:
- The XenAPI reference (OpaqueRef) to this object.
-
equals
If obj is a VMSS, compares XenAPI references for equality. -
hashCode
public int hashCode() -
getRecord
public VMSS.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get a record containing the current state of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- all fields from the object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByUuid
public static VMSS getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, IOException Get a reference to the VMSS instance with the specified UUID. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onuuid
- UUID of object to return- Returns:
- reference to the object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
create
public static VMSS create(Connection c, VMSS.Record record) throws Types.BadServerResponse, Types.XenAPIException, IOException Create a new VMSS instance, and return its handle. Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onrecord
- All constructor arguments- Returns:
- reference to the newly created object
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
createAsync
public static Task createAsync(Connection c, VMSS.Record record) throws Types.BadServerResponse, Types.XenAPIException, IOException Create a new VMSS instance, and return its handle. Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onrecord
- All constructor arguments- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
destroy
public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Destroy the specified VMSS instance. Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
destroyAsync
public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Destroy the specified VMSS instance. Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- Task
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getByNameLabel
public static Set<VMSS> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, IOException Get all the VMSS instances with the given label. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onlabel
- label of object to return- Returns:
- references to objects with matching names
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getUuid
public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the uuid field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getNameLabel
public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the name/label field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getNameDescription
public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the name/description field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getEnabled
public Boolean getEnabled(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the enabled field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getType
public Types.VmssType getType(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the type field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getRetainedSnapshots
public Long getRetainedSnapshots(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the retained_snapshots field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getFrequency
public Types.VmssFrequency getFrequency(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the frequency field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getSchedule
public Map<String,String> getSchedule(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the schedule field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getLastRunTime
public Date getLastRunTime(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the last_run_time field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getVMs
public Set<VM> getVMs(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Get the VMs field of the given VMSS. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- value of the field
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setNameLabel
public void setNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the name/label field of the given VMSS. Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onlabel
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setNameDescription
public void setNameDescription(Connection c, String description) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the name/description field of the given VMSS. Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made ondescription
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setEnabled
public void setEnabled(Connection c, Boolean enabled) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the enabled field of the given VMSS. Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onenabled
- New value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
snapshotNow
public String snapshotNow(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException This call executes the snapshot schedule immediately Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- An XMLRPC result
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setRetainedSnapshots
public void setRetainedSnapshots(Connection c, Long value) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onvalue
- the value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setFrequency
public void setFrequency(Connection c, Types.VmssFrequency value) throws Types.BadServerResponse, Types.XenAPIException, IOException Set the value of the frequency field Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onvalue
- the snapshot schedule frequency- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setSchedule
public void setSchedule(Connection c, Map<String, String> value) throws Types.BadServerResponse, Types.XenAPIException, IOExceptionMinimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onvalue
- the value to set- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
addToSchedule
public void addToSchedule(Connection c, String key, String value) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onkey
- the key to addvalue
- the value to add- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
removeFromSchedule
public void removeFromSchedule(Connection c, String key) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onkey
- the key to remove- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setLastRunTime
public void setLastRunTime(Connection c, Date value) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: Not Applicable First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onvalue
- The time at which the schedule was last run. When the timezone is missing, UTC is assumed- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
setType
public void setType(Connection c, Types.VmssType value) throws Types.BadServerResponse, Types.XenAPIException, IOException Minimum allowed role: pool-operator First published in XenServer 7.2.- Parameters:
c
- The connection the call is made onvalue
- the snapshot schedule type- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAll
public static Set<VMSS> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return a list of all the VMSSs known to the system. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- references to all objects
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-
getAllRecords
public static Map<VMSS,VMSS.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, IOException Return a map of VMSS references to VMSS records for all VMSSs known to the system. Minimum allowed role: read-only First published in XenServer 7.2.- Parameters:
c
- The connection the call is made on- Returns:
- records of all objects
- Throws:
Types.BadServerResponse
- Thrown if the response from the server contains an invalid status.Types.XenAPIException
- if the call failed.IOException
- if an error occurs during a send or receive. This includes cases where a payload is invalid JSON.
-