crossbar.master.cluster

Submodules

Classes

RouterClusterManager

Manages Router clusters, which runs Crossbar.io Web transport listening

WebClusterManager

Manages Web clusters, which runs Crossbar.io Web transport listening

Package Contents

class RouterClusterManager(session, globaldb, globalschema, db, schema, reactor=None)[source]

Bases: object

Manages Router clusters, which runs Crossbar.io Web transport listening endpoints on many (frontend) workers over many nodes using applying a shared, common transport definition, such as regarding the Web services configured on URL paths of the Web transport.

  • routercluster - routercluster nodes - routercluster workergroup

_PUBOPTS
_monitors
_mrealm_oid
_personality
_prefix = None
_reactor
_session
_started = None
_worker
async add_routercluster_node(routercluster_oid: str, node_oid: str, config: dict | None = None, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Add a node to a router cluster. You can configure the node association for the cluster using config:

  • hardlimit: hard limit on node utilization (number of workers run on this node)

  • softlimit: soft limit on node utilization (number of workers run on this node)

Parameters:
  • routercluster_oid – OID of the router cluster to which to add the node.

  • node_oid – OID of the node to add to the cluster. A node can be added to more than one cluster.

Returns:

Added node, for example:

{
    "cluster_oid": "ad6cfb53-3712-4683-8b15-f48a6d71d410",
    "node_oid": "6009c4d1-b5e5-4ca8-aee3-0da28b5a08b2",
    "hardlimit": null,
    "softlimit": null
}

async add_routercluster_workergroup(routercluster_oid: str, workergroup: dict, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Add a Router worker group to a Router cluster. The workergroup can be configured:

{
    "name": "mygroup1",
    "scale": 4
}
Parameters:
  • routercluster_oid – Router cluster to which to add the router worker group.

  • workergroup – Web service definition object.

Returns:

Router cluster worker group creation information, for example:

{
    "changed": 1598452531613401997,
    "cluster_oid": "b99833d5-0f03-4759-b1ed-b7059e81b2d8",
    "description": null,
    "label": null,
    "name": "mygroup1",
    "oid": "5c295684-7f7f-4560-b175-7466ed957c2e",
    "scale": 4,
    "status": "STOPPED",
    "tags": null
}

async create_routercluster(routercluster: dict, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Create a new router cluster definition.

Procedure:

crossbarfabriccenter.mrealm.cluster.create_routercluster URI of WAMP procedure to call.

Event:

crossbarfabriccenter.mrealm.cluster.on_routercluster_created WAMP event published once the router cluster has been created.

Error:

wamp.error.invalid_configuration WAMP error returned when the router cluster configuration provided has a problem.

Error:

wamp.error.not_authorized WAMP error returned when the user is currently not allowed to created (another) router cluster.

Error:

crossbar.error.already_exists WAMP error returned when a router cluster named as contained in the configuration already exists.

Parameters:

routercluster

Router cluster settings. For example:

{
    "name": "cluster5"
}

Returns:

Router cluster creation information. For example:

{
    "changed": 1598379288123799334,
    "description": null,
    "label": null,
    "name": "cluster5",
    "oid": "3eccb1fd-251b-4eda-bee9-06b3d24b1c5e",
    "owner_oid": "f1c62815-56b2-484f-bb5a-a66a788c2aff",
    "status": "STOPPED",
    "tags": null
}

db
async delete_routercluster(routercluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Delete an existing router cluster definition. The router cluster must be in status "STOPPED".

Procedure:

crossbarfabriccenter.routercluster.delete_routercluster URI of WAMP procedure to call.

Event:

crossbarfabriccenter.routercluster.on_routercluster_deleted WAMP event published once the router cluster has been deleted.

Error:

wamp.error.invalid_argument WAMP error returned when routercluster_oid was invalid.

Error:

crossbar.error.no_such_object WAMP error returned when routercluster_oid was not found.

Error:

crossbar.error.not_stopped WAMP error returned when router cluster is not in status STOPPED.

Parameters:

routercluster_oid – OID of the router cluster to delete

Returns:

Deleted router cluster, for example:

{
    "changed": 1598380973225053489,
    "description": null,
    "label": null,
    "name": "cluster5",
    "oid": "3eccb1fd-251b-4eda-bee9-06b3d24b1c5e",
    "owner_oid": "f1c62815-56b2-484f-bb5a-a66a788c2aff",
    "status": "STOPPED",
    "tags": null
}

gdb
get_routercluster(routercluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Return configuration and run-time status information for a router cluster (by object ID).

Parameters:

routercluster_oid – Object ID of the router cluster to return.

Returns:

Router cluster definition. For example, initially, after a router cluster has been created:

{
    "changed": 1598273658338443875,
    "description": null,
    "label": null,
    "name": "cluster2",
    "oid": "634e0725-df03-4daf-becd-1de60dd2b0b3",
    "status": "STOPPED",
    "tags": null
}

get_routercluster_by_name(routercluster_name: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Return configuration and run-time status information for a router cluster (by name).

See also the corresponding procedure crossbar.master.cluster.routercluster.RouterClusterManager.get_routercluster() which returns the same information, given and object ID rather than name.

Parameters:

routercluster_name – Name of the router cluster to return.

Returns:

Router cluster definition.

get_routercluster_node(routercluster_oid: str, node_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Get information (such as for example parallel degree) for the association of a node with a routercluster.

Parameters:
  • routercluster_oid – The router cluster to which the node was added.

  • node_oid – The node to return.

Returns:

Information for the association of the node with the routercluster. For example:

{
    "cluster_oid": "ad6cfb53-3712-4683-8b15-f48a6d71d410",
    "node_oid": "d87b502c-83d9-4cce-87be-0bb1bbd9539a",
    "hardlimit": null,
    "softlimit": null
}

get_routercluster_workergroup(routercluster_oid: str, workergroup_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Get definition of a router worker group in a cluster by ID.

Parameters:
  • routercluster_oid – The router cluster running the router worker group to return.

  • workergroup_oid – The router worker group to return.

Returns:

The router cluster worker group, for example:

{
    "changed": 1598452531613401997,
    "cluster_oid": "b99833d5-0f03-4759-b1ed-b7059e81b2d8",
    "description": null,
    "label": null,
    "name": "mygroup1",
    "oid": "5c295684-7f7f-4560-b175-7466ed957c2e",
    "scale": 4,
    "status": "STOPPED",
    "tags": null
}

get_routercluster_workergroup_by_name(routercluster_name: str, workergroup_name: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Get definition of a router worker group in a cluster by name.

See also crossbar.master.cluster.routercluster.RouterClusterManager.get_routercluster_workergroup().

Parameters:
  • routercluster_name – The router cluster running the router worker group to return.

  • workergroup_name – The router worker group to return.

Returns:

The router cluster worker group.

gschema
list_routercluster_nodes(routercluster_oid: str, return_names: bool | None = None, filter_by_status: str | None = None, details: autobahn.wamp.types.CallDetails | None = None) List[str][source]

List nodes currently associated with the given router cluster.

Parameters:
  • routercluster_oid – The router cluster to list nodes for.

  • return_names – Return routercluster names instead of object IDs

  • filter_by_status – Filter nodes by this status, eg. "online".

Returns:

List of node IDs of nodes associated with the router cluster. For example:

[
    "0afb5897-d8da-433a-9214-ed64e8da50b9",
    "2f656d47-5251-44bb-a507-6cebc533eb50",
    "7ddf39c5-6752-4467-9497-3f1758b2ac5e",
    "879d05f3-e3d3-4bce-894e-a281e4782a0b"
]

or with return_names set:

[
    "node1",
    "node2",
    "node3",
    "node4"
]

list_routercluster_workergroups(routercluster_oid: str, return_names: bool | None = None, filter_by_status: str | None = None, details: autobahn.wamp.types.CallDetails | None = None) List[str][source]

List worker groups in a router cluster. Detail information for a router cluster worker group can be retrieved using crossbar.master.cluster.routercluster.RouterClusterManager.get_routercluster_workergroup().

Parameters:
  • routercluster_oid – The object ID of the router cluster to list router worker groups for.

  • return_names – If set, return router worker group names instead of object IDs.

  • filter_by_status – If set, only return worker group in this status.

Returns:

List of router cluster worker group object IDs, for example:

[
    "5c295684-7f7f-4560-b175-7466ed957c2e"
]

or with return_names set:

[
    "mygroup1"
]
list_routerclusters(return_names: bool | None = None, details: autobahn.wamp.types.CallDetails | None = None) List[str][source]

Returns list of router clusters defined. Detail information for a router cluster can be retrieved using crossbar.master.cluster.routercluster.RouterClusterManager.get_routercluster().

Parameters:

return_names – Return router clusters names instead of object IDs.

Returns:

List of router clusters object IDs or names. For example:

[
    "634e0725-df03-4daf-becd-1de60dd2b0b3",
    "7dc55a4e-e52a-4bea-a8b4-daf869cc417f"
]

or with return_names set:

[
    "cluster1"
]

log
async remove_routercluster_node(routercluster_oid: str, node_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Remove a node from a router cluster.

Parameters:
  • routercluster_oid – OID of the router cluster from which to remove the node.

  • node_oid – OID of the node to remove from the router cluster

Returns:

Node removed from router cluster, for example:

{
    "cluster_oid": "ad6cfb53-3712-4683-8b15-f48a6d71d410",
    "node_oid": "6009c4d1-b5e5-4ca8-aee3-0da28b5a08b2",
    "hardlimit": null,
    "softlimit": null
}

async remove_routercluster_workergroup(routercluster_oid: str, workergroup_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Remove a router worker group from a router cluster.

Parameters:
  • routercluster_oid – The object ID of the router cluster to remove a router worker group from.

  • workergroup_oid – The object ID of the router worker group to remove.

Returns:

Removed router worker group, for example:

{
    "changed": 1598455166431307344,
    "cluster_oid": "b99833d5-0f03-4759-b1ed-b7059e81b2d8",
    "description": null,
    "label": null,
    "name": "mygroup1",
    "oid": "fa5498b7-c660-4a5b-81f5-95f9223a19f5",
    "scale": 4,
    "status": "STOPPED",
    "tags": null
}

schema
start(prefix)[source]

Start this router cluster manager, including all monitors of router clusters defined.

Returns:

async start_routercluster(routercluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Start a router cluster

Parameters:

routercluster_oid – Object ID of router cluster to start.

Returns:

Started router cluster, for example:

{
    "changed": 1598402748823470105,
    "oid": "ad6cfb53-3712-4683-8b15-f48a6d71d410",
    "status": "STARTING",
    "who": {
        "authid": "superuser",
        "authrole": "owner",
        "session": 6761363113437744
    }
}

stat_routercluster(routercluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

NOT YET IMPLEMENTED

Get current status and statistics for given router cluster.

Parameters:

routercluster_oid – The router cluster to return status and statistics for.

Returns:

Current status and statistics for given router cluster.

stat_routercluster_workergroup(routercluster_oid: str, workergroup_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

NOT YET IMPLEMENTED

Return current status and statistics for the router worker group.

Parameters:
  • routercluster_oid – The router cluster running the web service to return status and statistics for.

  • workergroup_oid – The worker group to return status and statistics for.

Returns:

Current status and statistics information for the router worker group.

stop()[source]

Stop the currently running router cluster manager. This will stop all monitors for router clusters.

Returns:

async stop_routercluster(routercluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Stop a running router cluster.

Parameters:

routercluster_oid – Object ID of router cluster to stop.

Returns:

Stopped router cluster, for example:

{
    "changed": 1598402964397396934,
    "oid": "ad6cfb53-3712-4683-8b15-f48a6d71d410",
    "status": "STOPPING",
    "who": {
        "authid": "superuser",
        "authrole": "owner",
        "session": 8299909547427073
    }
}

class WebClusterManager(session, globaldb, globalschema, db, schema, reactor=None)[source]

Bases: object

Manages Web clusters, which runs Crossbar.io Web transport listening endpoints on many (frontend) workers over many nodes using applying a shared, common transport definition, such as regarding the Web services configured on URL paths of the Web transport.

_PUBOPTS
_WEB_SERVICE_CHECKERS
_monitors
_mrealm_oid
_personality
_prefix = None
_reactor
_session
_started = None
_worker
async add_webcluster_node(webcluster_oid: str, node_oid: str, config: dict | None = None, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Add a node to a web cluster. The node-to-webcluster association can be configured in config:

{
    "parallel": 2,
    "standby": false
}
  • parallel: The parallelism (in CPU) that the node should receive.

  • standby: Wheather to add this node as a standby node that only takes over work when active nodes fail.

The web cluster will start and manage parallel proxy workers on the node. When standby is set (NOT YET IMPLEMENTED), the node will not become active immediately, but only be used and become active to replace a failed (active) node in the cluster.

Parameters:
  • webcluster_oid – OID of the web cluster to which to add the node.

  • node_oid – OID of the node to add to the cluster. A node can be added to more than one cluster.

Returns:

Added node, for example:

{
    "cluster_oid": "92f5f4c7-4175-4c72-a0a6-81467c343565",
    "node_oid": "b0b36b60-5712-40fd-8ae5-ac1177ea850c",
    "parallel": 2,
    "standby": null
}

async add_webcluster_service(webcluster_oid: str, path: str, webservice: dict, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Add a Web service to a Web cluster.

Parameters:
  • webcluster_oid – Web cluster to which to add the Web service.

  • path – The path on which to add the webservice.

  • webservice – Web service definition object.

Returns:

The web service added to the web cluster, for example:

{
    "description": null,
    "directory": "..",
    "label": null,
    "oid": "4411eb80-006a-45a0-8624-52a7ee84d0ce",
    "options": {
        "enable_directory_listing": true
    },
    "path": "/",
    "tags": null,
    "type": "static",
    "webcluster_oid": "92f5f4c7-4175-4c72-a0a6-81467c343565"
}

async create_webcluster(webcluster: dict, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Create a new web cluster definition webcluster:

Web listening endpoint:

  • tcp_version: IP version, either 4 for 6

  • tcp_port: IP listening port

  • tcp_shared: enable TCP port sharing

  • tcp_interface: listen on this interface

  • tcp_backlog: TCP accept backlog queue size

Web endpoint TLS configuration:

  • tls_key: TLS server private key to use

  • tls_certificate: TLS server certificate to use

  • tls_chain_certificates: TLS certificate chain

  • tls_dhparam: DH parameter file

  • tls_ciphers: Ciphers list

  • tls_ca_certificates: CA certificates to use

Web transport options:

  • http_client_timeout: HTTP client inactivity timeout

  • http_hsts: enable HTTP strict transport security (HSTS)

  • http_hsts_max_age: HSTS maximum age to announce

  • http_access_log: enable Web request access logging

  • http_display_tracebacks: enable tracebacks when running into Web errors

Procedure:

crossbarfabriccenter.mrealm.cluster.create_webcluster URI of WAMP procedure to call.

Event:

crossbarfabriccenter.mrealm.cluster.on_webcluster_created WAMP event published once the web cluster has been created.

Error:

wamp.error.invalid_configuration WAMP error returned when the web cluster configuration provided has a problem.

Error:

wamp.error.not_authorized WAMP error returned when the user is currently not allowed to created (another) web cluster.

Error:

crossbar.error.already_exists WAMP error returned when a web cluster named as contained in the configuration already exists.

Parameters:

webcluster

Web cluster settings. For example:

{
    "name": "cluster1"
}

Returns:

Web cluster creation information. For example:

{
    "changed": 1598388333642427113,
    "description": null,
    "http_access_log": null,
    "http_client_timeout": null,
    "http_display_tracebacks": null,
    "http_hsts": null,
    "http_hsts_max_age": null,
    "label": null,
    "name": "cluster1",
    "oid": "96e3d9a6-3e88-4205-8eec-2e7c338b2620",
    "owner_oid": "c10a7e49-cea6-47ce-a003-74f7196d1763",
    "status": "STOPPED",
    "tags": null,
    "tcp_backlog": null,
    "tcp_interface": null,
    "tcp_port": 8080,
    "tcp_shared": true,
    "tcp_version": null,
    "tls_ca_certificates": null,
    "tls_certificate": null,
    "tls_chain_certificates": null,
    "tls_ciphers": null,
    "tls_dhparam": null,
    "tls_key": null
}

db
async delete_webcluster(webcluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Delete an web router cluster definition. The web cluster must be in status "STOPPED".

Procedure:

crossbarfabriccenter.webcluster.delete_webcluster URI of WAMP procedure to call.

Event:

crossbarfabriccenter.webcluster.on_webcluster_deleted WAMP event published once the web cluster has been deleted.

Error:

wamp.error.invalid_argument WAMP error returned when webcluster_oid was invalid.

Error:

crossbar.error.no_such_object WAMP error returned when webcluster_oid was not found.

Error:

crossbar.error.not_stopped WAMP error returned when web cluster is not in status STOPPED.

Parameters:

webcluster_oid – OID of the Web cluster to delete

Returns:

Deleted router cluster, for example:

{
    "changed": 1598391866736370655,
    "description": null,
    "http_access_log": null,
    "http_client_timeout": null,
    "http_display_tracebacks": null,
    "http_hsts": null,
    "http_hsts_max_age": null,
    "label": null,
    "name": "cluster1",
    "oid": "90d46851-0ba4-4e3d-8d9d-7a117379b212",
    "owner_oid": "8d6e3068-900a-4fa8-a6f5-0828c8d0ee24",
    "status": "STOPPED",
    "tags": null,
    "tcp_backlog": null,
    "tcp_interface": null,
    "tcp_port": 8080,
    "tcp_shared": true,
    "tcp_version": null,
    "tls_ca_certificates": null,
    "tls_certificate": null,
    "tls_chain_certificates": null,
    "tls_ciphers": null,
    "tls_dhparam": null,
    "tls_key": null
}

gdb
get_webcluster(webcluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Return configuration and run-time status information for a web cluster (by object ID).

Parameters:

routercluster_oid – Object ID of the web cluster to return.

Returns:

Web cluster definition. For example:

{
    "changed": 1598388779771813358,
    "description": null,
    "http_access_log": null,
    "http_client_timeout": null,
    "http_display_tracebacks": null,
    "http_hsts": null,
    "http_hsts_max_age": null,
    "label": null,
    "name": "cluster1",
    "oid": "4917ca20-acc5-497a-9801-b53db5db4d89",
    "owner_oid": "8d6e3068-900a-4fa8-a6f5-0828c8d0ee24",
    "status": "STOPPED",
    "tags": null,
    "tcp_backlog": null,
    "tcp_interface": null,
    "tcp_port": 8080,
    "tcp_shared": true,
    "tcp_version": null,
    "tls_ca_certificates": null,
    "tls_certificate": null,
    "tls_chain_certificates": null,
    "tls_ciphers": null,
    "tls_dhparam": null,
    "tls_key": null
}

get_webcluster_by_name(webcluster_name: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Return configuration and run-time status information for a web cluster (by name).

See also the corresponding procedure crossbar.master.cluster.webcluster.WebClusterManager.get_webcluster() which returns the same information, given and object ID rather than name.

Parameters:

webcluster_name – Name of the web cluster to return.

Returns:

Web cluster definition.

get_webcluster_node(webcluster_oid: str, node_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Get information (such as for example parallel degree) for the association of a node with a web cluster.

Parameters:
  • webcluster_oid – Object ID of web cluster to return node association for.

  • node_oid – Object ID of node to return association for.

Returns:

Information for the association of the node with the webcluster, for example:

{
    "cluster_oid": "92f5f4c7-4175-4c72-a0a6-81467c343565",
    "node_oid": "cf0241bc-b9d9-4b81-a496-5873a74b5f0a",
    "parallel": 2,
    "standby": null
}

get_webcluster_service(webcluster_oid: str, webservice_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Get definition of a web service by ID.

See also the corresponding procedure crossbar.master.cluster.webcluster.WebClusterManager.get_webcluster_service_by_path() which returns the same information, given HTTP path rather than object ID.

Parameters:
  • webcluster_oid – The web cluster running the web service to return.

  • webservice_oid – The web service to return.

Returns:

The web service definition, for example:

{
    "description": null,
    "label": null,
    "oid": "6cc51192-4259-4640-84cb-ee03b6f92fbf",
    "path": "info",
    "tags": null,
    "type": "nodeinfo",
    "webcluster_oid": "92f5f4c7-4175-4c72-a0a6-81467c343565"
}

get_webcluster_service_by_path(webcluster_oid: str, path: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Get definition of a web service by HTTP path.

See also the corresponding procedure crossbar.master.cluster.webcluster.WebClusterManager.get_webcluster_service() which returns the same information, given and object ID rather than HTTP path.

Parameters:
  • webcluster_oid – The web cluster running the web service to return.

  • path – HTTP path of web service to return.

Returns:

see crossbar.master.cluster.webcluster.WebClusterManager.get_webcluster_service()

get_webcluster_workers(webcluster_oid, filter_online=False)[source]
gschema
list_webcluster_nodes(webcluster_oid: str, return_names: bool | None = None, filter_by_status: str | None = None, details: autobahn.wamp.types.CallDetails | None = None) List[str][source]

List nodes currently associated with the given web cluster.

Parameters:
  • webcluster_oid – The web cluster to list nodes for.

  • return_names – Return web cluster node names (WAMP authid) instead of object IDs.

  • filter_by_status – Filter nodes by this status, eg. "online".

Returns:

List of node IDs of nodes associated with the web cluster, for example:

[
    "3c7584f7-b8db-4e9b-8508-7ab4d573265d",
    "aa1d67de-d434-4bee-96ec-d0f576c12e02",
    "b0b36b60-5712-40fd-8ae5-ac1177ea850c",
    "cf0241bc-b9d9-4b81-a496-5873a74b5f0a"
]

or with return_names set:

[
    "node1",
    "node2",
    "node3",
    "node4"
]

list_webcluster_services(webcluster_oid: str, prefix: str | None = None, details: autobahn.wamp.types.CallDetails | None = None) Dict[str, str][source]

List webservices defined on a webcluster, optionally filtering by prefix.

Parameters:
  • webcluster_oid – The web cluster for which to list currently defined web services.

  • prefix – If provided, the path prefix for filtering web services.

Returns:

A map with HTTP paths as keys and webservice ID as values, for example:

{
    "/": "92f5f4c7-4175-4c72-a0a6-81467c343565",
    "info": "92f5f4c7-4175-4c72-a0a6-81467c343565",
    "settings": "92f5f4c7-4175-4c72-a0a6-81467c343565",
    "ws": "92f5f4c7-4175-4c72-a0a6-81467c343565"
}

list_webclusters(return_names: bool | None = False, details: autobahn.wamp.types.CallDetails | None = None) List[str][source]

Returns list of web clusters defined. Detail information for a web cluster can be retrieved using crossbar.master.cluster.webcluster.WebClusterManager.get_webcluster().

Parameters:

return_names – Return webcluster names instead of object IDs

Returns:

List of WebCluster UUIDs (or names). For example:

[
    "4917ca20-acc5-497a-9801-b53db5db4d89"
]

or with return_names set:

[
    "cluster1"
]

log
async remove_webcluster_node(webcluster_oid: str, node_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Remove a node from a web cluster.

Parameters:
  • webcluster_oid – OID of the web cluster from which to remove the node.

  • node_oid – OID of the node to remove from the web cluster

Returns:

Node removed from web cluster, for example:

{
    "cluster_oid": "92f5f4c7-4175-4c72-a0a6-81467c343565",
    "node_oid": "cf0241bc-b9d9-4b81-a496-5873a74b5f0a",
    "parallel": 2,
    "standby": null
}

async remove_webcluster_service(webcluster_oid: str, webservice_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Remove the Web service from the Web cluster.

Parameters:
  • webcluster_oid – Object ID of the web cluster from which to remove the web service.

  • webservice_oid – Object ID of the web service to remove.

Returns:

The web service removed from the web cluster, for example:

{
    "description": null,
    "label": null,
    "oid": "96d30fa8-6df2-4888-9845-87db8884a062",
    "path": "settings",
    "tags": null,
    "type": "json",
    "value": [
        1,
        2,
        3
    ],
    "webcluster_oid": "92f5f4c7-4175-4c72-a0a6-81467c343565"
}

schema
start(prefix)[source]

Start the Web-cluster manager.

Returns:

async start_webcluster(webcluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Start a web cluster.

Parameters:

webcluster_oid – Object ID of web cluster to start.

Returns:

Started web cluster, for example:

{
    "changed": 1598395797587541578,
    "oid": "92f5f4c7-4175-4c72-a0a6-81467c343565",
    "status": "STARTING",
    "who": {
        "authid": "superuser",
        "authrole": "owner",
        "session": 2587789023701533
    }
}

stop()[source]

Stop the (currently running) Web-cluster manager.

Returns:

async stop_webcluster(webcluster_oid: str, details: autobahn.wamp.types.CallDetails | None = None) dict[source]

Stop a running web cluster.

Procedure:

crossbarfabriccenter.webcluster.stop_webcluster URI of WAMP procedure to call.

Event:

crossbarfabriccenter.webcluster.on_webcluster_stoppping WAMP event published once the web cluster is stopping.

Error:

wamp.error.invalid_argument WAMP error returned when webcluster_oid was invalid.

Error:

crossbar.error.no_such_object WAMP error returned when webcluster_oid was not found.

Error:

crossbar.error.cannot_stop WAMP error returned when web cluster is not in status RUNNING or STARTING.

Parameters:

webcluster_oid – Object ID of web cluster to stop.

Returns:

Stopped web cluster, for example:

{
    "changed": 1598395878649535271,
    "oid": "92f5f4c7-4175-4c72-a0a6-81467c343565",
    "status": "STOPPING",
    "who": {
        "authid": "superuser",
        "authrole": "owner",
        "session": 1047738189758144
    }
}