api interface — VMware Salt API
api interface
The LoadedMod class allows for the module loaded onto the sub to return custom sequencing, for instance it can be iterated over to return all functions
discover(include: dict | list | None)
Returns: <class 'dict'>
Return the RPC resources, their methods and the methods documentation. The RPC client calls this method on each connection and stores the result in the client object in _discovered_api.
| param dict or list include: | filter document to only include listed sections |
|---|
include: {'<section-key>': '<sub-section-key>'} or ['<section1-key>']
from sseapiclient import APIClient client = APIClient('http://localhost', 'root', 'salt') client.api.api.discover() client.api.api.discover(include=['constants']) client.api.api.discover(include={'constants': ['permissions', 'command-states']})
get_versions()
Returns: <class 'dict'>
Return information on various software components used by RaaS.
from sseapiclient import APIClient client = APIClient('http://localhost', 'root', 'salt') client.api.api.get_versions()
RPCResponse( riq=4, ret={'python': '3.5.3 (default, Sep 14 2017, 22:58:41)', 'opts': {'sql': {'dialect': 'postgresql', 'host': 'localhost', 'pool_timeout': 10, 'driver': 'psycopg2', 'pool_recycle': 3600}, 'customer_id': '43cab1f4-de60-4ab1-85b5-1d883c5c5d09'}, 'raas': {'raas': '5.2.0-762-g3a64d15' ... error=None, warnings=[])