Adding current date as InstanceCreateTime parameter (RDS)
This commit is contained in:
parent
cae86a8eeb
commit
2c744f2a59
@ -1,6 +1,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
import datetime
|
||||||
|
|
||||||
import boto.rds
|
import boto.rds
|
||||||
from jinja2 import Template
|
from jinja2 import Template
|
||||||
@ -49,6 +50,7 @@ class Database(object):
|
|||||||
self.availability_zone = kwargs.get("availability_zone")
|
self.availability_zone = kwargs.get("availability_zone")
|
||||||
self.multi_az = kwargs.get("multi_az")
|
self.multi_az = kwargs.get("multi_az")
|
||||||
self.db_subnet_group_name = kwargs.get("db_subnet_group_name")
|
self.db_subnet_group_name = kwargs.get("db_subnet_group_name")
|
||||||
|
self.instance_create_time = str(datetime.datetime.now())
|
||||||
if self.db_subnet_group_name:
|
if self.db_subnet_group_name:
|
||||||
self.db_subnet_group = rds_backends[self.region].describe_subnet_groups(self.db_subnet_group_name)[0]
|
self.db_subnet_group = rds_backends[self.region].describe_subnet_groups(self.db_subnet_group_name)[0]
|
||||||
else:
|
else:
|
||||||
@ -206,6 +208,7 @@ class Database(object):
|
|||||||
<StorageType>{{ database.storage_type }}</StorageType>
|
<StorageType>{{ database.storage_type }}</StorageType>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<DBInstanceClass>{{ database.db_instance_class }}</DBInstanceClass>
|
<DBInstanceClass>{{ database.db_instance_class }}</DBInstanceClass>
|
||||||
|
<InstanceCreateTime>{{ database.instance_create_time }}</InstanceCreateTime>
|
||||||
<MasterUsername>{{ database.master_username }}</MasterUsername>
|
<MasterUsername>{{ database.master_username }}</MasterUsername>
|
||||||
<Endpoint>
|
<Endpoint>
|
||||||
<Address>{{ database.address }}</Address>
|
<Address>{{ database.address }}</Address>
|
||||||
|
Loading…
Reference in New Issue
Block a user