-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added logic for RHEL AWS Stratosphere images.
These changes are part of CLOUDX-993, to adapt our tooling to deal with recent changes that have merged all type of AMIs together in the same testing request.
- Loading branch information
Showing
4 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import json | ||
|
||
|
||
def get_aws_instance_identity_from_web(host): | ||
instance_document_url = 'http://169.254.169.254/latest/dynamic/instance-identity/document' | ||
return json.loads(host.check_output(f'curl -s {instance_document_url}')) | ||
|
||
|
||
def is_rhel_aws_stratosphere(host): | ||
instance_data = get_aws_instance_identity_from_web(host) | ||
|
||
return instance_data['billingProducts'] is None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters