Cloud Provider

Combiner for Cloud information. It uses the results of the multiple parsers:

The combiner uses these parsers determine the Cloud Provider based on a set of criteria that is unique to each cloud provider.

Examples

>>> cp_aws.cloud_provider
'aws'
>>> cp_aws.cp_bios_version['aws'] == '4.2.amazon'
True
>>> cp_aws.cp_rpms['aws'] == ['rh-amazon-rhui-client-2.2.124-1.el7']
True
>>> cp_aws.cp_uuid['aws']
'EC2F58AF-2DAD-C57E-88C0-A81CB6084290'
>>> cp_aws.long_name
'Amazon Web Services'
>>> cp_azure.cloud_provider
'azure'
>>> cp_azure.cp_yum['azure'] == ['rhui-microsoft-azure-rhel7-2.2-74']
True
>>> cp_azure.cp_asset_tag['azure']
'7783-7084-3265-9085-8269-3286-77'
>>> cp_alibaba.cloud_provider
'alibaba'
>>> cp_alibaba.cp_manufacturer['alibaba'] == 'Alibaba Cloud'
True
>>> cp_ibm.cp_rhsm_server_hostname['ibm'] == 'host.networklayer.com'
True
class insights.combiners.cloud_provider.AlibabaCloudProvider(*args, **kwargs)[source]

Bases: CloudProviderInstance

Class to identify Alibaba Cloud provider

Alibaba CP can be identified by manufacturer

class insights.combiners.cloud_provider.AmazonCloudProvider(*args, **kwargs)[source]

Bases: CloudProviderInstance

Class to identify Amazon Cloud provider

Amazon CP can be identified by RPM, BIOS verndor/version, and system UUID

class insights.combiners.cloud_provider.AzureCloudProvider(*args, **kwargs)[source]

Bases: CloudProviderInstance

Class to identify Azure Cloud provider

Azure CP can be identified by RPM, Yum repo, and system asset tag

class insights.combiners.cloud_provider.CloudProvider(rpms, dmidcd, yrl, rhsm_cfg)[source]

Bases: object

Combiner class to provide cloud vendor facts

cp_bios_vendor

Dictionary containing a value , for each provider, of Bios vendor used to determine cloud provider. Each providers value will be empty if none found

Type:

dict

cp_bios_version

Dictionary containing a value, for each provider, of Bios version used to determine cloud provider. Each providers value will be empty if none found

Type:

dict

cp_rpms

Dictionary containing a list, for each provider, of rpm information used to determine cloud provider. Each providers list will be empty if no matches found

Type:

dict

cp_yum

Dictionary containing a list, for each provider, of yum repo information used to determine cloud provider. Each providers list will be empty if no matches found

Type:

dict

cp_asset_tag

Dictionary containing a value, for each provider, of rpm information used to determine cloud provider. Each providers value will be empty if no matches found

Type:

dict

cp_uuid

Dictionary containing a value, for each provider, of uuid information used to determine cloud provider. Each providers value will be empty if no matches are found

Type:

dict

cp_manufacturer

Dictionary containing a value, for each provider, of system information used to determine cloud provider. Provider value will be empty if no matches are found.

Type:

dict

cp_rhsm_server_hostname

Dictionary containing a value, for each provider, of rhsm.conf server hostnames. Value will be empty if no matches are found.

Type:

dict

cloud_provider

String representing the cloud provider that was detected. If none are detected then it will have the default value None.

Type:

str

ALIBABA = 'alibaba'

Alibaba Cloud Provider short name

AWS = 'aws'

AWS Cloud Provider short name

AZURE = 'azure'

AZURE Cloud Provider short name

GOOGLE = 'gcp'

GOOGLE Cloud Provider short name

IBM = 'ibm'

IBM Cloud Provider short name

property long_name

Return long name for the specific cloud provider, or None if no cloud provider

Type:

str

class insights.combiners.cloud_provider.CloudProviderInstance(rpms=None, dmidcd=None, yum_repos=None, rhsm_cfg=None)[source]

Bases: object

Class to represent a base cloud provider instance

Use this base class to derive new cloud provider classes. In each new cloud provider class set the particular values that will be used to detect that particular cloud provider.

rpm

RPM string in lowercase to use when searching for this cloud provider.

Type:

str

yum

Yum repo name string in lowercase to use when searching for this cloud provider.

Type:

str

bios_vendor_version

BIOS vendor version string in lowercase to use when searching for this cloud provider.

Type:

str

manuf

Manufacturer string in lowercase to use when searching for this cloud provider.

Type:

str

asset_tag

Asset tag string in lowercase to use when searching for this cloud provider.

Type:

str

uuid

UUID string in lowercase to use when searchinf for this cloud provider.

Type:

str

rhsm_hostname

Hostname string in lowercase to use when searching for this cloud provider in rhsm.conf.

Type:

str

cp_bios_vendor

BIOS vendor string value found in search for this cloud provider.

Type:

str

cp_bios_version

BIOS version string value found in search for this cloud provider.

Type:

str

cp_rpms

List of RPM string values found in search for this cloud provider.

Type:

list

cp_yum

List of Yum repo name string values found in search for this cloud provider.

Type:

list

cp_asset_tag

Asset tag string value found in search for this cloud provider.

Type:

str

cp_uuid

UUID string value found in search for this cloud provider.

Type:

str

cp_manufacturer

Manufacturer string value found in search for this cloud provider.

Type:

str

cp_rhsm_server_hostname

RHSM server hostname string value found in search for this cloud provider.

Type:

str

property long_name

Long cloud provider name

Type:

str

property name

Short cloud provider class name or ID

Type:

str

class insights.combiners.cloud_provider.GoogleCloudProvider(*args, **kwargs)[source]

Bases: CloudProviderInstance

Class to identify Google Cloud provider

Google CP can be identified by RPM and BIOS vendor/version

class insights.combiners.cloud_provider.IBMCloudProvider(*args, **kwargs)[source]

Bases: CloudProviderInstance

Class to identify IBM Cloud provider

IBM CP can be identified by rhsm.conf server hostname setting