saltext.sap_hostctrl._modules.sap_hostctrl#
SaltStack extension for SAP Host Agent Copyright (C) 2022 SAP UCC Magdeburg
SAP Host Agent execution module#
SaltStack execution module that wraps SAP Host Agent functions.
- codeauthor
Benjamin Wegener, Alexander Wilke
- maturity
new
- depends
zeep, requests
- platform
Linux
This module wraps different functions of the SAP Host Agent by calling the corresponding SOAP services. For controlling the state of the SAP Host Agent itself, use the service module.
By default, the functions will try to connect to the SAP Host Agent over HTTPS on port 1129 and can optionally fall back to HTTP communication on port 1128.
Note
Because functions are called over SOAP, only authenticated requests are accepted.
Currently, only basic authentication (username/password) is implemented.
Note
This module was only tested on linux platforms.
- saltext.sap_hostctrl._modules.sap_hostctrl.__virtual__()[source]#
Only load this module if all libraries are available.
- saltext.sap_hostctrl._modules.sap_hostctrl.list_systems(username, password, fallback=True, fqdn=None, **kwargs)[source]#
Lists all SAP systems on the host. Should only be used for SAP System detection.
- username
The username to use for authentication against the SOAP service.
- password
The password to use for authentication against the SOAP service.
- fallback
Switch to allow falling back to HTTP communication if no valid HTTPS connection can be created (e.g. due to invalid certificates). Default is
True
.- fqdn
FQDN of the SAP Host Agent to connect to. Default is the current FQDN.
CLI Example:
salt "*" sap_hostctrl.list_systems username="sapadm" password="Abcd1234"
- saltext.sap_hostctrl._modules.sap_hostctrl.list_instances(sid, username, password, fallback=True, fqdn=None, **kwargs)[source]#
Retrieves all instances for a given SID.
- sid
SAP System ID for which all instances should be retrieved.
- username
The username to use for authentication against the SOAP service.
- password
The password to use for authentication against the SOAP service.
- fallback
Switch to allow falling back to HTTP communication if no valid HTTPS connection can be created (e.g. due to invalid certificates). Default is
True
.- fqdn
FQDN of the SAP Host Agent to connect to. Default is the current FQDN.
CLI Example:
salt "*" sap_hostctrl.list_instances sid="S4H" username="sapadm" password="Abcd1234"
- saltext.sap_hostctrl._modules.sap_hostctrl.list_database_systems(username, password, fallback=True, fqdn=None, **kwargs)[source]#
Lists all database systems on the host. The returned information will include all database instances and connection information for each database.
- username
The username to use for authentication against the SOAP service.
- password
The password to use for authentication against the SOAP service.
- fallback
Switch to allow falling back to HTTP communication if no valid HTTPS connection can be created (e.g. due to invalid certificates). Default is
True
.- fqdn
FQDN of the SAP Host Agent to connect to. Default is the current FQDN.
CLI Example:
salt "*" sap_hostctrl.list_database_systems username="sapadm" password="Abcd1234"
- saltext.sap_hostctrl._modules.sap_hostctrl.get_database_status(dbname, dbtype, username, password, fallback=True, fqdn=None, **kwargs)[source]#
Retrieve the status of a database.
- dbname
Name of the database, usually the identifier, e.g. HAN
- dbtype
Type of the database, can be but is not limited to: ada, db6, hdb
- username
The username to use for authentication against the SOAP service.
- password
The password to use for authentication against the SOAP service.
- fallback
Switch to allow falling back to HTTP communication if no valid HTTPS connection can be created (e.g. due to invalid certificates). Default is
True
.- fqdn
FQDN of the SAP Host Agent to connect to. Default is the current FQDN.
CLI Example:
salt "*" sap_hostctrl.get_database_status dbname="S4H" dbtype="hdb" username="sapadm" password="Abcd1234"
- saltext.sap_hostctrl._modules.sap_hostctrl.start_database(dbname, dbtype, username, password, fallback=True, fqdn=None, **kwargs)[source]#
Starts a database.
- dbname
Name of the database, usually the identifier, e.g. HAN
- dbtype
Type of the database, can be but is not limited to: ada, db6, hdb
- username
The username to use for authentication against the SOAP service.
- password
The password to use for authentication against the SOAP service.
- fallback
Switch to allow falling back to HTTP communication if no valid HTTPS connection can be created (e.g. due to invalid certificates). Default is
True
.- fqdn
FQDN of the SAP Host Agent to connect to. Default is the current FQDN.
CLI Example:
salt "*" sap_hostctrl.start_database dbname="S4H" dbtype="hdb" username="sapadm" password="Abcd1234"
- saltext.sap_hostctrl._modules.sap_hostctrl.stop_database(dbname, dbtype, username, password, fallback=True, fqdn=None, **kwargs)[source]#
Stops a database
- dbname
Name of the database, usually the identifier, e.g. HAN
- dbtype
Type of the database, can be but is not limited to: ada, db6, hdb
- username
The username to use for authentication against the SOAP service.
- password
The password to use for authentication against the SOAP service.
- fallback
Switch to allow falling back to HTTP communication if no valid HTTPS connection can be created (e.g. due to invalid certificates). Default is
True
.- fqdn
FQDN of the SAP Host Agent to connect to. Default is the current FQDN.
CLI Example:
salt "*" sap_hostctrl.stop_database dbname="S4H" dbtype="hdb" username="sapadm" password="Abcd1234"
- saltext.sap_hostctrl._modules.sap_hostctrl.configure_outside_discovery(sld_host, sld_port, sld_username, sld_password, username, password, fqdn=None, fallback=True, **kwargs)[source]#
# pylint: disable=line-too-long Configure the outside discovery for the SAP Host Agent, i.e. write the SLD configuration.
- sld_host
SLD / LMDB fully qualified domain name.
- sld_port
Port of the SLD / LMDB.
- sld_username
Username used for authentication against the SLD / LMDB.
- sld_password
Password used for authentication against the SLD / LMDB.
- username
The username to use for authentication against the SOAP service.
- password
The password to use for authentication against the SOAP service.
- fallback
Switch to allow falling back to HTTP communication if no valid HTTPS connection can be created (e.g. due to invalid certificates). Default is
True
.- fqdn
FQDN of the SAP Host Agent to connect to. Default is the current FQDN.
CLI Example:
salt "*" sap_hostctrl.configure_outside_discovery sld_host="sol.my.domain" sld_port="50000" sld_username="SLD_DS_USER" sld_password="Abcd1234" username="sapadm" password="Abcd1234"
- saltext.sap_hostctrl._modules.sap_hostctrl.execute_outside_discovery(username, password, fqdn=None, fallback=True, **kwargs)[source]#
Execute the outside discovery, i.e. send the data. This requires the outside discovery to be properly configured.
- username
The username to use for authentication against the SOAP service.
- password
The password to use for authentication against the SOAP service.
- fallback
Switch to allow falling back to HTTP communication if no valid HTTPS connection can be created (e.g. due to invalid certificates). Default is
True
.- fqdn
FQDN of the SAP Host Agent to connect to. Default is the current FQDN.
CLI Example:
salt "*" sap_hostctrl.configure_outside_discovery username="sapadm" password="Abcd1234"