saltext.sap_likey._modules.sap_likey#

SaltStack extension for saplikey Copyright (C) 2022 SAP UCC Magdeburg

saplikey execution module#

SaltStack execution module that wraps saplikey functions.

codeauthor

Benjamin Wegener, Alexander Wilke

maturity

new

depends

N/A

platform

Linux

This module wraps different functions of the saplikey command line tool.

Note

This module was only tested on linux platforms.

saltext.sap_likey._modules.sap_likey.__virtual__()[source]#

Only work on POSIX-like systems

saltext.sap_likey._modules.sap_likey.info(sid, **kwargs)[source]#

Wrapper for the saplikey function get. Retrieves system license information.

sid

SID of the SAP NetWeaver systems.

Returns list of dictonaries of the license keys.

CLI Example:

salt "*" sap_likey.info sid="S4H"
saltext.sap_likey._modules.sap_likey.show(sid, **kwargs)[source]#

Wrapper for the saplikey function show. Retrieves all SAP licenses.

sid

SID of the SAP NetWeaver systems.

Returns list of dictonaries of the license keys.

CLI Example:

salt "*" sap_likey.show sid="S4H"
saltext.sap_likey._modules.sap_likey.install(sid, filename, **kwargs)[source]#

Wrapper for the saplikey function install. Install SAP licenses from a file.

sid

SID of the SAP NetWeaver systems.

filename

Full path of the license file to install.

Returns (True|False)

CLI Example:

salt "*" sap_likey.install sid="S4H" filename="/tmp/S4H.txt"
saltext.sap_likey._modules.sap_likey.delete(name, sid, hwkey='*', product='*', **kwargs)[source]#

Wrapper for the saplikey function delete. Delete SAP licenses.

name

Name of the license to delete. This is the SID of the system for which the license was installed.

sid

SID of the SAP NetWeaver system.

hwkey

Hardware key, default is *.

product

Product key, e.g. NetWeaver_HDB or Maintenance_HDB, default is *.

Returns (True|False)

CLI Example:

salt "*" sap_likey.delete name="M70" sid="S4H"

Note

The arguments hwkey and product support globbing.

saltext.sap_likey._modules.sap_likey.temp(sid, product, **kwargs)[source]#

Wrapper for the saplikey function temp. Installs a temporary SAP license.

sid

SID of the SAP NetWeaver systems.

product

Product key, e.g. NetWeaver_HBD or Maintenance_HDB.

Returns (True|False)

CLI Example:

salt "*" sap_likey.temp sid="S4H" product="NetWeaver_HBD"

Note

The installation of temporary licenses is only supported if the system already had a valid license installed at some point in time.

saltext.sap_likey._modules.sap_likey.read_lic_file(filename, **kwargs)[source]#

Reads a SAP license file and returns a dictionary with information, e.g. a text file with:

SAPSYSTEM=ZZZ
HARDWARE-KEY=Z0000000000
INSTNO=0020000000
BEGIN=20220720
EXPIRATION=99991231
LKEY=*******
SWPRODUCTNAME=NetWeaver_HDB
SWPRODUCTLIMIT=2147483647
SYSTEM-NR=000000000800000000
filename

Full path to the license file.

CLI Example:

salt "*" sap_likey.read_lic_file filename="/tmp/S4H.txt"

Note

All keys (except LKEY) are converted to the same naming convention as in the saplikey function -show.