Develop for XenServer

Class: Observer

Describes an observer which will control observability activity in the Toolstack

Fields for class: Observer

Field Type Qualifier Description
attributes (string -> string) map RO/constructor Attributes that observer will add to the data they produce
components string set RO/constructor The list of xenserver components the observer will broadcast. An empty list means all components
enabled bool RO/constructor This denotes if the observer is enabled. true if it is enabled and false if it is disabled
endpoints string set RO/constructor The list of endpoints where data is exported to. Each endpoint is a URL or the string ‘bugtool’ refering to the internal logs
hosts host ref set RO/constructor The list of hosts the observer is active on. An empty list means all hosts
name_description string RW a notes field containing human-readable description
name_label string RW a human-readable name
uuid string RO/runtime Unique identifier/object reference

RPCs associated with class: Observer

RPC name: create

Overview:

Create a new Observer instance, and return its handle.

Signature:

Observer ref create (session ref session_ref, Observer record args)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer record args All constructor arguments

Minimum Role: pool-admin

Return Type: Observer ref

reference to the newly created object

RPC name: destroy

Overview:

Destroy the specified Observer instance.

Signature:

void destroy (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: pool-admin

Return Type: void

RPC name: get_all

Overview:

Return a list of all the Observers known to the system.

Signature:

Observer ref set get_all (session ref session_ref)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session

Minimum Role: read-only

Return Type: Observer ref set

references to all objects

RPC name: get_all_records

Overview:

Return a map of Observer references to Observer records for all Observers known to the system.

Signature:

(Observer ref -> Observer record) map get_all_records (session ref session_ref)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session

Minimum Role: read-only

Return Type: (Observer ref -> Observer record) map

records of all objects

RPC name: get_attributes

Overview:

Get the attributes field of the given Observer.

Signature:

(string -> string) map get_attributes (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: (string -> string) map

value of the field

RPC name: get_by_name_label

Overview:

Get all the Observer instances with the given label.

Signature:

Observer ref set get_by_name_label (session ref session_ref, string label)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
string label label of object to return

Minimum Role: read-only

Return Type: Observer ref set

references to objects with matching names

RPC name: get_by_uuid

Overview:

Get a reference to the Observer instance with the specified UUID.

Signature:

Observer ref get_by_uuid (session ref session_ref, string uuid)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
string uuid UUID of object to return

Minimum Role: read-only

Return Type: Observer ref

reference to the object

RPC name: get_components

Overview:

Get the components field of the given Observer.

Signature:

string set get_components (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: string set

value of the field

RPC name: get_enabled

Overview:

Get the enabled field of the given Observer.

Signature:

bool get_enabled (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: bool

value of the field

RPC name: get_endpoints

Overview:

Get the endpoints field of the given Observer.

Signature:

string set get_endpoints (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: string set

value of the field

RPC name: get_hosts

Overview:

Get the hosts field of the given Observer.

Signature:

host ref set get_hosts (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: host ref set

value of the field

RPC name: get_name_description

Overview:

Get the name/description field of the given Observer.

Signature:

string get_name_description (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_name_label

Overview:

Get the name/label field of the given Observer.

Signature:

string get_name_label (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: string

value of the field

RPC name: get_record

Overview:

Get a record containing the current state of the given Observer.

Signature:

Observer record get_record (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: Observer record

all fields from the object

RPC name: get_uuid

Overview:

Get the uuid field of the given Observer.

Signature:

string get_uuid (session ref session_ref, Observer ref self)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object

Minimum Role: read-only

Return Type: string

value of the field

RPC name: set_attributes

Overview:

Set the attributes of an observer. These are used to emit metadata by the observer

Signature:

void set_attributes (session ref session_ref, Observer ref self, (string -> string) map value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self The observer
(string -> string) map value The attributes that the observer emits as part of the data

Minimum Role: pool-admin

Return Type: void

RPC name: set_components

Overview:

Set the components on which the observer will broadcast to. i.e. xapi, xenopsd, networkd, etc.

Signature:

void set_components (session ref session_ref, Observer ref self, string set value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self The observer
string set value The components the observer will broadcast to

Minimum Role: pool-admin

Return Type: void

RPC name: set_enabled

Overview:

Enable / disable this observer which will stop the observer from producing observability information

Signature:

void set_enabled (session ref session_ref, Observer ref self, bool value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self The observer
bool value If the observer is to be enabled (true) or disabled (false)

Minimum Role: pool-admin

Return Type: void

RPC name: set_endpoints

Overview:

Set the file/HTTP endpoints the observer sends data to

Signature:

void set_endpoints (session ref session_ref, Observer ref self, string set value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self The observer
string set 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

Minimum Role: pool-admin

Return Type: void

RPC name: set_hosts

Overview:

Sets the hosts that the observer is to be registered on

Signature:

void set_hosts (session ref session_ref, Observer ref self, host ref set value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self The observer
host ref set value Hosts the observer is registered on

Minimum Role: pool-admin

Return Type: void

RPC name: set_name_description

Overview:

Set the name/description field of the given Observer.

Signature:

void set_name_description (session ref session_ref, Observer ref self, string value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object
string value New value to set

Minimum Role: pool-admin

Return Type: void

RPC name: set_name_label

Overview:

Set the name/label field of the given Observer.

Signature:

void set_name_label (session ref session_ref, Observer ref self, string value)
<!--NeedCopy-->

Arguments:

Type Name Description
session ref session_ref Reference to a valid session
Observer ref self reference to the object
string value New value to set

Minimum Role: pool-admin

Return Type: void