How to use disable_vgw_route_propagation method in localstack

Best Python code snippet using localstack_python

test_vpngateway.py

Source:test_vpngateway.py Github

copy

Full Screen

...145 <requestId>4f35a1b2-c2c3-4093-b51f-abb9d7311990</requestId>146 <return>true</return>147 </DisableVgwRoutePropagationResponse>148 """149 def test_disable_vgw_route_propagation(self):150 self.set_http_response(status_code=200)151 api_response = self.service_connection.disable_vgw_route_propagation(152 'rtb-c98a35a0', 'vgw-d8e09e8a')153 self.assert_request_parameters({154 'Action': 'DisableVgwRoutePropagation',155 'GatewayId': 'vgw-d8e09e8a',156 'RouteTableId': 'rtb-c98a35a0'},157 ignore_params_values=['AWSAccessKeyId', 'SignatureMethod',158 'SignatureVersion', 'Timestamp',159 'Version'])160 self.assertEqual(api_response, True)161class TestEnableVgwRoutePropagation(AWSMockServiceTestCase):162 connection_class = VPCConnection163 def default_body(self):164 return b"""165 <DisableVgwRoutePropagationResponse xmlns="http://ec2.amazonaws.com/doc/2013-10-01/">...

Full Screen

Full Screen

vpc.py

Source:vpc.py Github

copy

Full Screen

...102 LOG.logger.info("Enabling Propagation .... " + route_id)103 return self._client.enable_vgw_route_propagation(GatewayId=vgw_id, RouteTableId=route_id)104 def disable_route_propagation(self, vgw_id, route_id):105 LOG.logger.info("Disabling Propagation .... " + route_id)106 return self._client.disable_vgw_route_propagation(GatewayId=vgw_id, RouteTableId=route_id)107 def add_route_to_igw_vgw(self, gw_id, rt_id, cidirip):108 LOG.logger.info(f"Adding IP Address {cidirip} and Gateway {gw_id} to this Route Table {rt_id} ")109 return self._client.create_route(110 DestinationCidrBlock=cidirip,111 GatewayId=gw_id,112 RouteTableId=rt_id113 )114 def add_route_to_nat(self, ngw_id, rt_id, cidirip):115 LOG.logger.info(f"Adding IP Address {cidirip} and Gateway {ngw_id} to this Route Table {rt_id} ")116 return self._client.create_route(117 DestinationCidrBlock=cidirip,118 NatGatewayId=ngw_id,119 RouteTableId=rt_id120 )121 def add_route_to_tgw(self, tgw_id, rt_id, cidirip):122 LOG.logger.info(f"Adding IP Address {cidirip} and Gateway {tgw_id} to this Route Table {rt_id} ")123 return self._client.create_route(124 DestinationCidrBlock=cidirip,125 TransitGatewayId=tgw_id,126 RouteTableId=rt_id127 )128 def add_route_to_vpc_peering(self, peer_id, rt_id, cidirip):129 LOG.logger.info(f"Adding IP Address {cidirip} and Gateway {peer_id} to this Route Table {rt_id} ")130 return self._client.create_route(131 DestinationCidrBlock=cidirip,132 VpcPeeringConnectionId=peer_id,133 RouteTableId=rt_id134 )135 def add_route_to_endpoint_gw(self, vpce_id, rm_rt, add_rt):136 LOG.logger.info("Adding Endpoint " + vpce_id + " Remove Route Table " + rm_rt + " Add Route table " + add_rt)137 return self._client.modify_vpc_endpoint(138 VpcEndpointId=vpce_id,139 RemoveRouteTableIds=[rm_rt],140 AddRouteTableIds=[add_rt],141 )142 def delete_route_record(self, rt_id, cidirip):143 LOG.logger.info("delete IP Address to " + cidirip + " This Route Table " + rt_id)144 return self._client.delete_route(145 DestinationCidrBlock=cidirip,146 RouteTableId=rt_id,147 )148 def enable_propagation_route_table(self, vgw_id, rt_id):149 LOG.logger.info(f"Enable Propagation This Route Table {rt_id}")150 return self._client.enable_vgw_route_propagation(151 GatewayId=vgw_id,152 RouteTableId=rt_id,153 )154 def disable_propagation_route_table(self, vgw_id, rt_id):155 LOG.logger.info(f"Disabling Propagation This Route Table {rt_id}")156 return self._client.disable_vgw_route_propagation(157 GatewayId=vgw_id,158 RouteTableId=rt_id,159 )160 def route_table_associate_with_subnet(self, route_id, subnet_id):161 LOG.logger.info("Associating Route Table " + route_id + " to Subnet " + subnet_id)162 return self._client.associate_route_table(RouteTableId=route_id, SubnetId=subnet_id)163 def route_table_disassociate_with_subnet(self, disassocate_id):164 LOG.logger.info("Disassociating Route " + disassocate_id)165 self._client.disassociate_route_table(AssociationId=disassocate_id)166 # Delete Route Table167 def delete_route_tables(self, route_id):168 LOG.logger.info("Deleting This Route Table - " + route_id)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful