saltext.sap_hostctrl._states.sap_hostctrl#

SaltStack extension for SAP Host Agent Copyright (C) 2022 SAP UCC Magdeburg

SAP Host Agent state module#

SaltStack module that implements states based on SAP Host Agent functionality.

codeauthor

Benjamin Wegener, Alexander Wilke

maturity

new

depends

requests

platform

Linux

This module implements states that utilize SAP Host Agent functionality.

Note

Because functions are called over SOAP, only authenticated requests are accepted.

Currently, only basic authentication (username/password) is implemented.

Note

This module can only run on linux platforms.

saltext.sap_hostctrl._states.sap_hostctrl.system_installed(name, password, username='sapadm', **kwargs)[source]#

Checks if an SAP system is installed over the SAP Host Agent function ListSystems.

name

SID of the SAP system.

password

Password for the user that executes SAP Host Agent commands (see username).

username

User that executes SAP Host Agent commands, default is sapadm.

This state can be used to initially check if an SAP system is installed before running many other states against it.

Example:

SAP System S4H is installed:
  sap_hostctrl.system_installed:
    - name: S4H
    - username: sapadm
    - password: __slot__:salt:vault.read_secret(path="os", key="sapadm")
saltext.sap_hostctrl._states.sap_hostctrl.outside_discovery_executed(name, sld_port, sld_user, sld_password, password, username='sapadm', overwrite=False, keep_other_config=False, **kwargs)[source]#

Ensure that SAP Host Agent is configured to use outside discovery and is executed. This state can manage multiple SLD / LMDB configurations, see parameter keep_other_config for more information.

name

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.

password

Password for the user that executes SAP Host Agent commands (see username).

username

User that executes SAP Host Agent commands, default is sapadm.

overwrite

Overwrite the SLD configuration even if the correct configuration is already set, default is False.

keep_other_config

If set to True, other SLD configurations are not removed. Default is False.

Example:

Outside Discovery is executed:
  sap_hostctrl.outside_discovery_executed:
    - name: sol.my.domain
    - sld_port: 50000
    - sld_username: SLD_DS_USER
    - sld_password: __slot__:salt:vault.read_secret(path="SAP", key="SLD_DS_USER")
    - username: sapadm
    - password: __slot__:salt:vault.read_secret(path="os", key="sapadm")
saltext.sap_hostctrl._states.sap_hostctrl.sda_installed(name, jvm_arch, password, username='sapadm', verify=True, overwrite=False, **kwargs)[source]#

Ensures that a Simple Diagnostics Agent is installed on the SAP Host Agent.

name

Path to the SDA SAR archive.

jvm_arch

Path to the SAPJVM SAR archive.

password

Password for the user that executes SAP Host Agent commands (see “username”).

username

User that executes SAP Host Agent commands, default is “sapadm”.

verify

If set to False, HTTPS connections will not be verified.

overwrite

If set to True, SDA will be installed, even if it was already installed.

Note

This state will use the CA bundle of the OS to determine the validity of the HTTPS connection.

Example:

Simple Diagnostics Agent is installed:
  sap_hostctrl.sda_installed:
    - name: /mnt/nfs/SIMDIAGAGNT1SP60P_3-70002252.SAR
    - jvm_arch: /mnt/nfs/SAPJVM8_90-80000202.SAR
    - username: sapadm
    - password: __slot__:salt:vault.read_secret(path="os", key="sapadm")