Python X2Go Broker API Documentation (v0.0.4.4)

x2gobroker.uccsjson module

«  x2gobroker.loggers module   ::   Contents   ::   x2gobroker.utils module  »

x2gobroker.uccsjson module

This modules provides various helper functions and classes for the UCCS web frontend of the X2Go Session Broker.

The UCCS protocol was originally brought to life by Canonical and was part of Unity Greeter in Ubuntu 12.10.

See early blog posts about that topic:

The UCCS web frontend of the X2Go Session Broker offers remote logon support to the Unity Greeter fork called Arctica Greeter.

class x2gobroker.uccsjson.AdditionalManagementServer[source]

Bases: builtins.object

Instantiate a to-be-cascaded sub-management UCCS server.

In UCCS, other than terminal servers, you can add AdditionalManagementServer instances and cascade UCCS setups.

Parameters:
  • url (str) – URL of the UCCS broker server
  • name (str) – human-readable, descriptive server name
  • api_version (int) – API version used between remote logon service and broker
class x2gobroker.uccsjson.ICAServer(host, name, username='', password='', api_version=5)[source]

Bases: builtins.object

Instantiate a UCCS compatible ICA server session profile object.

Parameters:
  • host (str) – hostname of ICA server host
  • name (str) – session profile name
  • username (str) – username to be used for login
  • password (str) – password to be used for login
  • api_version (int) – API version used between remote logon service and broker
set_domain(domain)[source]

Set the domain for this ICA server.

Parameters:domain (str) – the domain name to be set
Raises TypeError:
 domain has to be str
toJson()[source]

Dump this instance as JSON object.

class x2gobroker.uccsjson.ManagementServer(url, name, api_version=5)[source]

Bases: builtins.object

Generate a UCCS compatible JSON object for a UCCS management server.

A ManagementServer in UCCS terminology is a host offering a UCCS compliant API for handling remote logons from clients over the web.

The ManagementServer is the entry point for all clients.

Parameters:
  • url (str) – URL of the UCCS broker server
  • name (str) – human-readable, descriptive server name
  • api_version (int) – API version used between remote logon service and broker
add_additional_management_server(amserver)[source]

Add / cascade a managemnet server to this management server object.

Parameters:server (obj) – instance of class AdditionalManagementServer
add_terminalserver(server)[source]

Add a terminal server to this management server object.

Parameters:server (obj) – instance of class RDPServer or X2GoServer
set_default(ts_name)[source]

Define the default (terminal) server instance.

Parameters:ts_name (str) – name of the terminal server that is to be set as default
toJson()[source]

Dump this instance as JSON object.

class x2gobroker.uccsjson.RDPServer(host, name, username='', password='', api_version=5)[source]

Bases: builtins.object

Instantiate a UCCS compatible RDP server session profile object.

Parameters:
  • host (str) – hostname of RDP server host
  • name (str) – session profile name
  • username (str) – username to be used for login
  • password (str) – password to be used for login
  • api_version (int) – API version used between remote logon service and broker
set_domain(domain)[source]

Set the domain for this RDP server.

Parameters:domain (str) – the domain name to be set
Raises TypeError:
 domain has to be str
toJson()[source]

Dump this instance as JSON object.

class x2gobroker.uccsjson.X2GoServer(host, name, username='', password='', api_version=5)[source]

Bases: builtins.object

Instantiate a UCCS compatible X2Go Server session profile object.

Parameters:
  • host (str) – hostname of X2Go Server host
  • name (str) – session profile name
  • username (str) – username to be used for login
  • password (str) – password to be used for login
  • api_version (int) – API version used between remote logon service and broker
set_command(command)[source]

Set the command to be used on this X2Go Server.

Added since APIv5 of the UCCS protocol.

Parameters:command (str) – the session type to be set
Raises TypeError:
 command has to be str
set_session_type(session_type)[source]

Set the session type to be used on this X2Go Server.

This method is a legacy method formerly used by APIv4 of the UCCS protocol. In APIv5, the method set_command() gets used instead.

Parameters:command (str) – the session type to be set
Raises TypeError:
 command has to be str
toJson()[source]

Dump this instance as JSON object.

x2gobroker.uccsjson.convert_to_builtin_type(obj)[source]

Helper function for converting Python objects to dictionaries. Used for doing JSON dumps.

«  x2gobroker.loggers module   ::   Contents   ::   x2gobroker.utils module  »