[cloud] Add DBName to RDS Facts if it exists (#27121)

* + Add DBName in RDS Facts if it's not null

* - remove 2 offending lines for automatic tests

* Syntax change for shorter code and improved readability
pull/28437/head
Radu Epure 7 years ago committed by Ryan Brown
parent 5be37018a2
commit 54c295699e

@ -780,7 +780,8 @@ class RDSDBInstance:
d["endpoint"] = None
d["port"] = None
d["vpc_security_groups"] = None
if self.instance.DBName:
d['DBName'] = self.instance.DBName
# ReadReplicaSourceDBInstanceIdentifier may or may not exist
try:
d["replication_source"] = self.instance.ReadReplicaSourceDBInstanceIdentifier
@ -873,7 +874,8 @@ class RDS2DBInstance:
else:
d['endpoint'] = None
d['port'] = None
if self.instance["DBName"]:
d['DBName'] = self.instance['DBName']
return d

Loading…
Cancel
Save