should only call create_snapshot if db_snapshot_identifier is filled
This commit is contained in:
parent
7afd3532c6
commit
6c3c6623bf
@ -741,7 +741,8 @@ class RDS2Backend(BaseBackend):
|
|||||||
return RDSClientError('InvalidDBClusterStateFault', 'Invalid DB type, when trying to perform StopDBInstance. See AWS RDS documentation on rds.stop_db_instance')
|
return RDSClientError('InvalidDBClusterStateFault', 'Invalid DB type, when trying to perform StopDBInstance. See AWS RDS documentation on rds.stop_db_instance')
|
||||||
if database.status != 'available':
|
if database.status != 'available':
|
||||||
return RDSClientError('InvalidDBInstanceState', 'when calling the StopDBInstance operation: Instance %s is not in available state' % db_instance_identifier)
|
return RDSClientError('InvalidDBInstanceState', 'when calling the StopDBInstance operation: Instance %s is not in available state' % db_instance_identifier)
|
||||||
self.create_rds_snapshot(db_instance_identifier, db_snapshot_identifier)
|
if db_snapshot_identifier:
|
||||||
|
self.create_rds_snapshot(db_instance_identifier, db_snapshot_identifier)
|
||||||
database.status = 'shutdown'
|
database.status = 'shutdown'
|
||||||
return database
|
return database
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user