Persisting selected LicenseModel in RDS instances
This commit is contained in:
parent
8f2a0a83a1
commit
c3d9f4e056
@ -182,7 +182,7 @@ class Database(BaseModel):
|
||||
<ReadReplicaSourceDBInstanceIdentifier>{{ database.source_db_identifier }}</ReadReplicaSourceDBInstanceIdentifier>
|
||||
{% endif %}
|
||||
<Engine>{{ database.engine }}</Engine>
|
||||
<LicenseModel>general-public-license</LicenseModel>
|
||||
<LicenseModel>{{ database.license_model }}</LicenseModel>
|
||||
<EngineVersion>{{ database.engine_version }}</EngineVersion>
|
||||
<DBParameterGroups>
|
||||
</DBParameterGroups>
|
||||
|
@ -89,8 +89,7 @@ class Database(BaseModel):
|
||||
|
||||
self.preferred_backup_window = kwargs.get(
|
||||
'preferred_backup_window', '13:14-13:44')
|
||||
self.license_model = kwargs.get(
|
||||
'license_model', 'general-public-license')
|
||||
self.license_model = kwargs.get('license_model', 'general-public-license')
|
||||
self.option_group_name = kwargs.get('option_group_name', None)
|
||||
self.default_option_groups = {"MySQL": "default.mysql5.6",
|
||||
"mysql": "default.mysql5.6",
|
||||
@ -159,7 +158,7 @@ class Database(BaseModel):
|
||||
<ReadReplicaSourceDBInstanceIdentifier>{{ database.source_db_identifier }}</ReadReplicaSourceDBInstanceIdentifier>
|
||||
{% endif %}
|
||||
<Engine>{{ database.engine }}</Engine>
|
||||
<LicenseModel>general-public-license</LicenseModel>
|
||||
<LicenseModel>{{ database.license_model }}</LicenseModel>
|
||||
<EngineVersion>{{ database.engine_version }}</EngineVersion>
|
||||
<OptionGroupMemberships>
|
||||
</OptionGroupMemberships>
|
||||
@ -427,7 +426,7 @@ class Snapshot(BaseModel):
|
||||
<InstanceCreateTime>{{ snapshot.created_at }}</InstanceCreateTime>
|
||||
<MasterUsername>{{ database.master_username }}</MasterUsername>
|
||||
<EngineVersion>{{ database.engine_version }}</EngineVersion>
|
||||
<LicenseModel>general-public-license</LicenseModel>
|
||||
<LicenseModel>{{ database.license_model }}</LicenseModel>
|
||||
<SnapshotType>manual</SnapshotType>
|
||||
{% if database.iops %}
|
||||
<Iops>{{ database.iops }}</Iops>
|
||||
|
@ -26,6 +26,7 @@ class RDS2Response(BaseResponse):
|
||||
"db_subnet_group_name": self._get_param("DBSubnetGroupName"),
|
||||
"engine": self._get_param("Engine"),
|
||||
"engine_version": self._get_param("EngineVersion"),
|
||||
"license_model": self._get_param("LicenseModel"),
|
||||
"iops": self._get_int_param("Iops"),
|
||||
"kms_key_id": self._get_param("KmsKeyId"),
|
||||
"master_user_password": self._get_param('MasterUserPassword'),
|
||||
|
@ -14,6 +14,7 @@ def test_create_database():
|
||||
Engine='postgres',
|
||||
DBName='staging-postgres',
|
||||
DBInstanceClass='db.m1.small',
|
||||
LicenseModel='license-included',
|
||||
MasterUsername='root',
|
||||
MasterUserPassword='hunter2',
|
||||
Port=1234,
|
||||
@ -23,6 +24,7 @@ def test_create_database():
|
||||
database['DBInstance']['DBInstanceIdentifier'].should.equal("db-master-1")
|
||||
database['DBInstance']['AllocatedStorage'].should.equal(10)
|
||||
database['DBInstance']['DBInstanceClass'].should.equal("db.m1.small")
|
||||
database['DBInstance']['LicenseModel'].should.equal("license-included")
|
||||
database['DBInstance']['MasterUsername'].should.equal("root")
|
||||
database['DBInstance']['DBSecurityGroups'][0][
|
||||
'DBSecurityGroupName'].should.equal('my_sg')
|
||||
|
Loading…
Reference in New Issue
Block a user