AwxManage - commands awx-manage

Parsers contains in this module are:

AnsibleTowerLicenseType - command /usr/bin/awx-manage check_license

AnsibleTowerLicense - command /usr/bin/awx-manage check_license --data

class insights.parsers.awx_manage.AnsibleTowerLicense(context, extra_bad_lines=None)[source]

Bases: insights.core.CommandParser, insights.core.JSONParser

Parses the output of command /usr/bin/awx-manage check_license --data

Sample output of the command:

{"instance_count": 100, "license_date": 1655092799, "license_type": "enterprise", "support_level": "Standard", "time_remaining": 29885220, "trial": false, "grace_period_remaining": 32477220, "compliant": true, "date_warning": false, "date_expired": false}

Examples

>>> type(awx_manage_license)
<class 'insights.parsers.awx_manage.AnsibleTowerLicense'>
>>> awx_manage_license.data['license_type'] == "enterprise"
True
>>> awx_manage_license.data['time_remaining']
29885220
class insights.parsers.awx_manage.AnsibleTowerLicenseType(context, extra_bad_lines=None)[source]

Bases: insights.core.CommandParser, insights.core.JSONParser

Parses the output of command /usr/bin/awx-manage check_license

Sample output of the command:

enterprise
type

The license type, e.g. “enterprise”

Type

str

Examples: >>> type(awx_license) <class ‘insights.parsers.awx_manage.AnsibleTowerLicenseType’> >>> awx_license.type == “enterprise” True

parse_content(content)[source]

This method must be implemented by classes based on this class.