Groovy Documentation

com.ace.mws.plugins
[Java] Class VirtualMachineReport

java.lang.Object
  com.ace.mws.plugins.VirtualMachineReport

public class VirtualMachineReport
extends Object

A VM report consists of values for all of the known, changed properties for a specific VM resource. This typically represents changes in a specific time period (ie between the last poll and the current poll), but can also represent all known information concerning a resource (ie the first time poll is run).

For more information on reporting resources, see the Plugin Reporting section in the MWS documentation.

Authors:
bsaville


Field Summary
private String host

The name of the host (hypervisor/node) that the VM resides on.

private String image

The image name for the VM.

private Map metrics

The VM's reported metrics.

private String name

The VM's name.

private String pluginId

The ID of the plugin which has generated the report.

private NodeReportPower power

The VM's current power state.

private Long precedence

The precedence of the plugin which has generated the report.

private ReportResourceMap resources

The VM's resources information.

private NodeReportState state

The VM's current state.

private Date timestamp

The date that the report was made or for which the report is current.

private Map variables

The VM's variables.

 
Constructor Summary
VirtualMachineReport()

Creates a new, empty VM report.

VirtualMachineReport(String name)

Creates a new VM report for specified VM.

 
Method Summary
String getHost()

@see #host

String getImage()

@see #image

Map getMetrics()

@see #metrics

String getName()

@see #name

String getPluginId()

@see #pluginId

NodeReportPower getPower()

@see #power

Long getPrecedence()

@see #precedence

ReportResourceMap getResources()

@see #resources

NodeReportState getState()

@see #state

Date getTimestamp()

Retrieves the set timestamp for the report.

Map getVariables()

@see #variables

void setHost(String host)

@see #host

void setImage(String image)

Sets the image name for the VM.

void setMetrics(Map metrics)

@see #metrics

void setName(String name)

@see #name

void setPluginId(String pluginId)

Sets the ID of the plugin which has generated the report.

void setPower(NodeReportPower power)

@see #power

void setPower(String power)

Calls NodeReportPower.parse to set the power field.

void setPrecedence(Long precedence)

Sets the precedence, corresponding to the precedence of the plugin which has generated the report.

void setResources(ReportResourceMap resources)

@see #resources

void setState(NodeReportState state)

@see #state

void setState(String state)

Calls NodeReportState.parse to set the state field.

void setTimestamp(Date timestamp)

@see #timestamp

void setTimestamp(String timestamp)

@see #timestamp

void setVariables(Map variables)

@see #variables

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

host

private String host
The name of the host (hypervisor/node) that the VM resides on.


image

private String image
The image name for the VM. This is used along with the MWS Image Catalog to retrieve operating system information.


metrics

private Map metrics
The VM's reported metrics.


name

private String name
The VM's name. This should be lower-case, but it will be converted automatically if it is not in setName(String).


pluginId

private String pluginId
The ID of the plugin which has generated the report. NOTE: This is overridden by the RM services automatically and should not be set by the plugin.


power

private NodeReportPower power
The VM's current power state.


precedence

private Long precedence
The precedence of the plugin which has generated the report. NOTE: This is overridden by the RM services automatically and should not be set by the plugin.


resources

private ReportResourceMap resources
The VM's resources information. Note that no null checks are needed to act on the resources.


state

private NodeReportState state
The VM's current state.


timestamp

private Date timestamp
The date that the report was made or for which the report is current. This will be set to the current date and time if not provided. This may also be set as a string which will use PluginConstants.STANDARD_DATE_FORMAT to parse into a date.


variables

private Map variables
The VM's variables.


 
Constructor Detail

VirtualMachineReport

public VirtualMachineReport()
Creates a new, empty VM report.


VirtualMachineReport

public VirtualMachineReport(String name)
Creates a new VM report for specified VM.
Parameters:
name - See setName


 
Method Detail

getHost

public String getHost()
See Also:
host


getImage

public String getImage()
See Also:
image


getMetrics

public Map getMetrics()
See Also:
metrics


getName

public String getName()
See Also:
name


getPluginId

public String getPluginId()
See Also:
pluginId


getPower

public NodeReportPower getPower()
See Also:
power


getPrecedence

public Long getPrecedence()
See Also:
precedence


getResources

public ReportResourceMap getResources()
See Also:
resources


getState

public NodeReportState getState()
See Also:
state


getTimestamp

public Date getTimestamp()
Retrieves the set timestamp for the report. NOTE: If no timestamp is provided by the plugin, the timestamp will be assigned a value of the current date and time.
See Also:
timestamp


getVariables

public Map getVariables()
See Also:
variables


setHost

public void setHost(String host)
See Also:
host


setImage

public void setImage(String image)
Sets the image name for the VM. This is used along with the MWS Image Catalog to retrieve operating system information.
See Also:
image


setMetrics

public void setMetrics(Map metrics)
See Also:
metrics


setName

public void setName(String name)
See Also:
name


setPluginId

public void setPluginId(String pluginId)
Sets the ID of the plugin which has generated the report. NOTE: This is overridden by the RM services automatically and should not be set by the plugin.
See Also:
pluginId


setPower

public void setPower(NodeReportPower power)
See Also:
power


setPower

public void setPower(String power)
Calls NodeReportPower.parse to set the power field.
See Also:
power


setPrecedence

public void setPrecedence(Long precedence)
Sets the precedence, corresponding to the precedence of the plugin which has generated the report. NOTE: This is overridden by the RM services automatically and should not be set by the plugin.
See Also:
precedence


setResources

public void setResources(ReportResourceMap resources)
See Also:
resources


setState

public void setState(NodeReportState state)
See Also:
state


setState

public void setState(String state)
Calls NodeReportState.parse to set the state field.
See Also:
state


setTimestamp

public void setTimestamp(Date timestamp)
See Also:
timestamp


setTimestamp

public void setTimestamp(String timestamp)
See Also:
timestamp


setVariables

public void setVariables(Map variables)
See Also:
variables


 

Groovy Documentation