Cloud Provider¶
Combiner for Cloud information. It uses the results of the multiple parsers:
InstalledRpms
,YumRepoList
andDMIDecode
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', 'google': '', 'azure': '', 'alibaba': ''}
True
>>> cp_aws.cp_rpms == {'aws': ['rh-amazon-rhui-client-2.2.124-1.el7'], 'google': [], 'azure': [], 'alibaba': []}
True
>>> cp_aws.cp_uuid['aws']
'EC2F58AF-2DAD-C57E-88C0-A81CB6084290'
>>> cp_azure.cloud_provider
'azure'
>>> cp_azure.cp_yum == {'aws': [], 'google': [], 'azure': ['rhui-microsoft-azure-rhel7-2.2-74'], 'alibaba': []}
True
>>> cp_azure.cp_asset_tag['azure']
'7783-7084-3265-9085-8269-3286-77'
>>> cp_alibaba.cloud_provider
'alibaba'
>>> cp_alibaba.cp_manufacturer == {'aws': '', 'google': '', 'azure': '', 'alibaba': 'Alibaba Cloud'}
True
-
class
insights.combiners.cloud_provider.
CloudProvider
(rpms, dmidcd, yrl)[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
-
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 Constant
-
AWS
= 'aws'¶ AWS Cloud Provider Constant
-
AZURE
= 'azure'¶ AZURE Cloud Provider Constant
-
GOOGLE
= 'google'¶ GOOGLE Cloud Provider Constant
-