GoVirt.Proxy

g GObject.Object GObject.Object Rest.Proxy Rest.Proxy GObject.Object->Rest.Proxy GoVirt.Proxy GoVirt.Proxy Rest.Proxy->GoVirt.Proxy

Subclasses:

None

Methods

Inherited:

Rest.Proxy (6), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (host)

fetch_api ()

fetch_api_async (cancellable, callback, *user_data)

fetch_api_finish (result)

fetch_ca_certificate ()

fetch_ca_certificate_async (cancellable, callback, *user_data)

fetch_ca_certificate_finish (result)

fetch_vms ()

fetch_vms_async (cancellable, callback, *user_data)

fetch_vms_finish (result)

get_api ()

get_vms ()

lookup_vm (vm_name)

Virtual Methods

Inherited:

Rest.Proxy (2), GObject.Object (7)

Properties

Inherited:

Rest.Proxy (8)

Name

Type

Flags

Short Description

admin

bool

r/w

Use REST API as an admin

ca-cert

GLib.ByteArray

r/w

Virt CA certificate to use for HTTPS REST communication

session-id

str

r/w

oVirt/RHEV JSESSIONID

sso-token

str

r/w

oVirt/RHEV SSO token

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Rest.Proxy

r

Class Details

class GoVirt.Proxy(**kwargs)
Bases:

Rest.Proxy

Abstract:

No

Structure:

GoVirt.ProxyClass

classmethod new(host)
Parameters:

host (str) –

Return type:

GoVirt.Proxy

fetch_api()
Raises:

GLib.Error

Return type:

GoVirt.Api

fetch_api_async(cancellable, callback, *user_data)
Parameters:
fetch_api_finish(result)
Parameters:

result (Gio.AsyncResult) – async method result

Raises:

GLib.Error

Returns:

an GoVirt.Api instance to interact with oVirt/RHEV REST API.

Return type:

GoVirt.Api

fetch_ca_certificate()
Raises:

GLib.Error

Return type:

bool

fetch_ca_certificate_async(cancellable, callback, *user_data)
Parameters:
fetch_ca_certificate_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bytes

fetch_vms()
Raises:

GLib.Error

Return type:

bool

fetch_vms_async(cancellable, callback, *user_data)
Parameters:
fetch_vms_finish(result)
Parameters:

result (Gio.AsyncResult) – async method result

Raises:

GLib.Error

Returns:

the list of GoVirt.Vm associated with GoVirt.Proxy. The returned list should be freed with g_list_free(), and can become invalid any time a GoVirt.Proxy call completes.

Return type:

[GoVirt.Vm]

get_api()
Returns:

an GoVirt.Api instance used to interact with oVirt REST API.

Return type:

GoVirt.Api

Gets the api entry point to access remote oVirt resources and collections. This method does not initiate any network activity, the remote API entry point must have been fetched with GoVirt.Proxy.fetch_api() or GoVirt.Proxy.fetch_api_async() before calling this function.

get_vms()
Returns:

the list of GoVirt.Vm associated with GoVirt.Proxy. The returned list should be freed with g_list_free(), and can become invalid any time a GoVirt.Proxy call completes.

Return type:

[GoVirt.Vm]

Gets the list of remote VMs from the proxy object. This method does not initiate any network activity, the remote VM list must have been fetched with GoVirt.Proxy.fetch_vms() or GoVirt.Proxy.fetch_vms_async() before calling this function.

lookup_vm(vm_name)
Parameters:

vm_name (str) – name of the virtual machine to lookup

Returns:

a GoVirt.Vm whose name is name or None

Return type:

GoVirt.Vm

Looks up a virtual machine whose name is name. If it cannot be found, None is returned. This method does not initiate any network activity, the remote VM list must have been fetched with GoVirt.Proxy.fetch_vms() or GoVirt.Proxy.fetch_vms_async() before calling this function.

Property Details

GoVirt.Proxy.props.admin
Name:

admin

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Indicates whether to connect to the REST API as an admin, or as a regular user. Different content will be shown for the same user depending on if they connect as an admin or not. Connecting as an admin requires to have admin priviledges on the oVirt instance.

New in version 0.0.2.

GoVirt.Proxy.props.ca_cert
Name:

ca-cert

Type:

GLib.ByteArray

Default Value:

None

Flags:

READABLE, WRITABLE

Path to a file containing the CA certificates to use for the HTTPS REST API communication with the oVirt instance

GoVirt.Proxy.props.session_id
Name:

session-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

jsessionid cookie value. This allows to use the REST API without authenticating first. This was used by oVirt 3.6 and is now replaced by GoVirt.Proxy :sso-token.

New in version 0.3.1.

GoVirt.Proxy.props.sso_token
Name:

sso-token

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Token to use for SSO. This allows to use the REST API without authenticating first. This is used starting with oVirt 4.0.

New in version 0.3.4.