Skip to content

Commit

Permalink
Add new os name variations
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Jan 9, 2025
1 parent eaf227b commit 615c464
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions samples/sensor_download/download_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def create_constants():
os_name = ""
if args.os:
check_os = args.os.lower()
if check_os in ["rhel", "centos", "oracle", "rhel/centos/oracle"]:
if check_os == "rhel/centos/oracle":
os_name = "RHEL/CentOS/Oracle"
if check_os in ["amzn", "az", "amazon", "amazon linux"]:
os_name = "Amazon Linux"
Expand All @@ -172,6 +172,14 @@ def create_constants():
os_name = "Container"
if check_os in ["idp", "identity", "identity protection"]:
os_name = "Identity*"
if check_os in ["rhel/centos stream/oracle", "stream", "centos stream"]:
os_name = "RHEL/CentOS Stream/Oracle"
if check_os in ["rhel/centos", "centos"]:
os_name = "RHEL/CentOS"
if check_os == "rhel":
os_name = "RHEL"
if check_os == "oracle":
os_name = "Oracle"

os_filter = ""
if os_name:
Expand All @@ -181,7 +189,8 @@ def create_constants():
allowed = ["rhel", "centos", "oracle", "rhel/centos/oracle", "mac", "macos", "apple",
"amzn", "az", "amazon", "amazon linux", "ubuntu", "kali", "deb", "debian",
"sles", "suse", "win", "windows", "microsoft", "container", "docker",
"kubernetes", "idp", "identity", "identity protection"
"kubernetes", "idp", "identity", "identity protection", "stream",
"rhel/centos stream/oracle", "rhel/centos"
]
raise SystemExit(f"Invalid operating system specified.\nAllowed values: {', '.join(allowed)}")
return cmd, args.key, args.secret, os_filter, args.filename, args.table_format, args.all, \
Expand Down

0 comments on commit 615c464

Please sign in to comment.