Getting there

This commit is contained in:
2025-11-25 10:51:26 -05:00
parent 60fa02c181
commit 5867e7029f
7 changed files with 108 additions and 21 deletions

12
list_oracle_databases.py Normal file → Executable file
View File

@@ -20,6 +20,7 @@ def list_oracle_databases():
nodes {
dbUniqueName
id
isRelic
cluster {
id
name
@@ -34,13 +35,9 @@ def list_oracle_databases():
}
"""
# Variables: exclude relics and replicated databases
# Variables: exclude replicated databases only
variables = {
"filter": [
{
"texts": ["false"],
"field": "IS_RELIC"
},
{
"texts": ["false"],
"field": "IS_REPLICATED"
@@ -71,11 +68,12 @@ def list_oracle_databases():
db['dbUniqueName'],
db['id'],
cluster_name,
host_name
host_name,
'Yes' if db['isRelic'] else 'No'
])
# Print tabulated output
headers = ['Database Name', 'ID', 'Cluster', 'Host']
headers = ['Database Name', 'ID', 'Cluster', 'Host', 'Relic']
print(tabulate(table_data, headers=headers, tablefmt='grid'))
if __name__ == "__main__":