suseapi.swamp
¶
This module allows remote access to SWAMP service. It is basically just a wrapper around suds to workaround some weirdness which SWAMP SOAP interface exposes.
-
class
suseapi.swamp.
SWAMP
(user, password, url=None, tracefile=None)¶ Parameters: - user (string) – User name.
- password (string) – Password to authenticate to SWAMP.
- url (string) – SWAMP URL (default is http://swamp.suse.de:8080/axis/services/swamp)
- tracefile (file object) – File handle where SOAP traces will be written.
-
getMethodDoc
(name)¶ Gets online documentation for method.
Parameters: name (string) – Name of method Returns: Documentation for method Return type: string
-
getAllDocs
()¶ Gets online documentation for all methods.
Returns: Documentation for all methods Return type: dict
-
login
()¶ Logins to SWAMP.
This actually only tests whether login information is correct.
Returns: None
-
doGetProperty
(name)¶ Gets SWAMP property.
Parameters: name (string) – Name of property Returns: Value of property Return type: string
-
getWorkflowInfo
(id)¶ Gets the workflows properties.
Parameters: id (integer) – Workflow ID. Returns: Workflow properties.
-
doGetAllDataPaths
(id)¶ Gets all workflows data paths.
Parameters: id (integer) – Workflow ID. Returns: Workflow data paths.
-
doGetData
(id, path)¶ Gets workflow data bit.
Parameters: - id (integer) – Workflow ID.
- path (string) – Data path.
Returns: Workflow data bit value.
-
doGetAllData
(id)¶ Gets all workflow data bits.
Parameters: id (integer) – Workflow ID. Returns: Workflow data bit values. Return type: dict
-
getDataBit
(id, path)¶ Efficient wrapper around
doGetAllData()
anddoGetData()
to get a data bit. It first tries to use all data, because getting it takes same time as single bit, but the data is cached and reused for next time.Parameters: - id (integer) – Workflow ID.
- path (string) – Data path.
Returns: Workflow data bit value.
Return type: string
-
doSendData
(id, path, value)¶ Sets data bit in a workflow.
Parameters: - id (integer) – Workflow ID.
- path (string) – Data path.
- value (string) – Data value.
Returns: None
-
doSendEvent
(id, envent)¶ Sets data bit in a workflow.
Parameters: - id (integer) – Workflow ID.
- event (string) – Event name.
Returns: None