Class Observer


public class Observer extends XenAPIObject
Describes a observer which will control observability activity in the Toolstack First published in .
Author:
Cloud Software Group, Inc.
  • Field Details

    • ref

      protected final String ref
      The XenAPI reference (OpaqueRef) to this object.
  • Method Details

    • toWireString

      public String toWireString()
      Specified by:
      toWireString in class XenAPIObject
      Returns:
      The XenAPI reference (OpaqueRef) to this object.
    • equals

      public boolean equals(Object obj)
      If obj is a Observer, compares XenAPI references for equality.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getRecord

      public Observer.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get a record containing the current state of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getByUuid

      public static Observer getByUuid(Connection c, String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get a reference to the Observer instance with the specified UUID. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      uuid - 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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • createAsync

      public static Task createAsync(Connection c, Observer.Record record) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Create a new Observer instance, and return its handle. Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      record - All constructor arguments
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • create

      public static Observer create(Connection c, Observer.Record record) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Create a new Observer instance, and return its handle. Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      record - 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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • destroyAsync

      public Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Destroy the specified Observer instance. Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • destroy

      public void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Destroy the specified Observer instance. Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getByNameLabel

      public static Set<Observer> getByNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get all the Observer instances with the given label. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      label - 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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getUuid

      public String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the uuid field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getNameLabel

      public String getNameLabel(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the name/label field of the given Observer. Minimum allowed role: read-only First published in XenServer 4.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getNameDescription

      public String getNameDescription(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the name/description field of the given Observer. Minimum allowed role: read-only First published in XenServer 4.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getHosts

      public Set<Host> getHosts(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the hosts field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getAttributes

      public Map<String,String> getAttributes(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the attributes field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getEndpoints

      public Set<String> getEndpoints(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the endpoints field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getComponents

      public Set<String> getComponents(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the components field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getEnabled

      public Boolean getEnabled(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Get the enabled field of the given Observer. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setNameLabel

      public void setNameLabel(Connection c, String label) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the name/label field of the given Observer. Minimum allowed role: pool-admin First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      label - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setNameDescription

      public void setNameDescription(Connection c, String description) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the name/description field of the given Observer. Minimum allowed role: pool-admin First published in XenServer 4.0.
      Parameters:
      c - The connection the call is made on
      description - New value to set
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setHostsAsync

      public Task setHostsAsync(Connection c, Set<Host> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Sets the hosts that the observer is to be registered on Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - Hosts the observer is registered on
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setHosts

      public void setHosts(Connection c, Set<Host> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Sets the hosts that the observer is to be registered on Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - Hosts the observer is registered on
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setEnabledAsync

      public Task setEnabledAsync(Connection c, Boolean value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Enable / disable this observer which will stop the observer from producing observability information Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - If the observer is to be enabled (true) or disabled (false)
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setEnabled

      public void setEnabled(Connection c, Boolean value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Enable / disable this observer which will stop the observer from producing observability information Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - If the observer is to be enabled (true) or disabled (false)
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setAttributesAsync

      public Task setAttributesAsync(Connection c, Map<String,String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the attributes of an observer. These are used to emit metadata by the observer Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - The attributes that the observer emits as part of the data
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setAttributes

      public void setAttributes(Connection c, Map<String,String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the attributes of an observer. These are used to emit metadata by the observer Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - The attributes that the observer emits as part of the data
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setEndpointsAsync

      public Task setEndpointsAsync(Connection c, Set<String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the file/HTTP endpoints the observer sends data to Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - The endpoints that the observer will export data to. A URL or the string 'bugtool'. This can refer to an enpoint to the local file system
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setEndpoints

      public void setEndpoints(Connection c, Set<String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the file/HTTP endpoints the observer sends data to Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - The endpoints that the observer will export data to. A URL or the string 'bugtool'. This can refer to an enpoint to the local file system
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setComponentsAsync

      public Task setComponentsAsync(Connection c, Set<String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the components on which the observer will broadcast to. i.e. xapi, xenopsd, networkd, etc Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - The components the observer will broadcast to
      Returns:
      Task
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • setComponents

      public void setComponents(Connection c, Set<String> value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Set the components on which the observer will broadcast to. i.e. xapi, xenopsd, networkd, etc Minimum allowed role: pool-admin Experimental. First published in 23.14.0.
      Parameters:
      c - The connection the call is made on
      value - The components the observer will broadcast to
      Throws:
      Types.BadServerResponse - Thrown if the response from the server contains an invalid status.
      Types.XenAPIException - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getAll

      public static Set<Observer> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Return a list of all the Observers known to the system. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.
    • getAllRecords

      public static Map<Observer,Observer.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
      Return a map of Observer references to Observer records for all Observers known to the system. Minimum allowed role: read-only Experimental. First published in 23.14.0.
      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 - Thrown if the call failed.
      org.apache.xmlrpc.XmlRpcException - Thrown if the result of an asynchronous call could not be parsed.