GoVirt.Resource

g GObject.GInterface GObject.GInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object GoVirt.Resource GoVirt.Resource GObject.Object->GoVirt.Resource Gio.Initable->GoVirt.Resource

Subclasses:

GoVirt.Api, GoVirt.Cdrom, GoVirt.Cluster, GoVirt.DataCenter, GoVirt.Disk, GoVirt.Host, GoVirt.StorageDomain, GoVirt.Vm, GoVirt.VmPool

Methods

Inherited:

GObject.Object (37), Gio.Initable (2)

Structs:

GObject.ObjectClass (5)

delete (proxy)

delete_async (proxy, cancellable, callback, *user_data)

delete_finish (result)

get_sub_collection (sub_collection)

refresh (proxy)

refresh_async (proxy, cancellable, callback, *user_data)

refresh_finish (result)

update (proxy)

update_async (proxy, cancellable, callback, *user_data)

update_finish (result)

Virtual Methods

Inherited:

GObject.Object (7), Gio.Initable (1)

do_init_from_xml (node)

do_to_xml ()

Properties

Name

Type

Flags

Short Description

description

str

r/w

Resource Description

guid

str

r/w

Resource GUID

href

str

r/w

Resource Href

name

str

r/w

Resource Name

xml-node

Rest.XmlNode

w/co

XML data to fill this resource with

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class GoVirt.Resource(**kwargs)
Bases:

GObject.Object, Gio.Initable

Abstract:

No

Structure:

GoVirt.ResourceClass

delete(proxy)
Parameters:

proxy (GoVirt.Proxy) – an GoVirt.Proxy.

Raises:

GLib.Error

Returns:

True if the call was successful, False otherwise.

Sends an HTTP DELETE request to self.

The calling thread is blocked until this request is processed, see GoVirt.Resource.delete_async() for the asynchronous version of this method.

Return type:

bool

delete_async(proxy, cancellable, callback, *user_data)
Parameters:

Asynchronously send an HTTP DELETE request to self.

When the call is complete, callback will be invoked. You can then call GoVirt.Resource.delete_finish() to get the result of the call.

delete_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult.

Raises:

GLib.Error

Returns:

True if the call was successful, False otherwise.

Finishes an asynchronous HTTP DELETE request on self.

Return type:

bool

get_sub_collection(sub_collection)
Parameters:

sub_collection (str) –

Return type:

str

refresh(proxy)
Parameters:

proxy (GoVirt.Proxy) –

Raises:

GLib.Error

Return type:

bool

refresh_async(proxy, cancellable, callback, *user_data)
Parameters:
refresh_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

update(proxy)
Parameters:

proxy (GoVirt.Proxy) –

Raises:

GLib.Error

Return type:

bool

update_async(proxy, cancellable, callback, *user_data)
Parameters:
update_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

do_init_from_xml(node) virtual
Parameters:

node (Rest.XmlNode) –

Return type:

bool

do_to_xml() virtual
Return type:

str

Property Details

GoVirt.Resource.props.description
Name:

description

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Resource Description

GoVirt.Resource.props.guid
Name:

guid

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Resource GUID

GoVirt.Resource.props.href
Name:

href

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Resource Href

GoVirt.Resource.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Resource Name

GoVirt.Resource.props.xml_node
Name:

xml-node

Type:

Rest.XmlNode

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

XML data to fill this resource with