adding physical_resource_id in SubnetRouteTableAssociation, Route and NatGW classes (#3789)

* adding physical_resource_id in SubnetRouteTableAssociation, Route and NatGW classes

* adding tests

* passing litern at test

* passsing black==19.10b0 as lintern

* passing test to python 2.7
This commit is contained in:
Ismael Fernandez Molina 2021-03-20 09:57:53 +01:00 committed by GitHub
commit 04cbd1fa1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View file

@ -4030,6 +4030,10 @@ class SubnetRouteTableAssociation(CloudFormationModel):
self.route_table_id = route_table_id
self.subnet_id = subnet_id
@property
def physical_resource_id(self):
return self.route_table_id
@staticmethod
def cloudformation_name_type():
return None
@ -4254,6 +4258,10 @@ class Route(CloudFormationModel):
self.interface = interface
self.vpc_pcx = vpc_pcx
@property
def physical_resource_id(self):
return self.id
@staticmethod
def cloudformation_name_type():
return None
@ -5843,6 +5851,10 @@ class NatGateway(CloudFormationModel):
self._backend.associate_address(eni=self._eni, allocation_id=self.allocation_id)
self.tags = tags
@property
def physical_resource_id(self):
return self.id
@property
def vpc_id(self):
subnet = self._backend.get_subnet(self.subnet_id)