Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EC2.RouteTable.delete_route() is missing #283

Closed
kislyuk opened this issue Sep 28, 2015 · 4 comments
Closed

EC2.RouteTable.delete_route() is missing #283

kislyuk opened this issue Sep 28, 2015 · 4 comments
Labels
feature-request This issue requests a feature. requires-model-update This issue requires an update in a model to resolve.

Comments

@kislyuk
Copy link
Contributor

kislyuk commented Sep 28, 2015

for vpc in ec2.vpcs.all():
    for route_table in vpc.route_tables.all():
        print(route_table)
        print(route_table.meta.client.create_route)
        print(route_table.create_route)
        print(route_table.meta.client.delete_route)
        print(route_table.delete_route)
<bound method EC2.create_route of <botocore.client.EC2 object at 0x7f7a723afdd8>>
<bound method ec2.RouteTable.create_route of ec2.RouteTable(id='rtb-513cb835')>
<bound method EC2.delete_route of <botocore.client.EC2 object at 0x7f7a723afdd8>>
Traceback (most recent call last):
  File "./scripts/foo", line 193, in <module>
    print(route_table.delete_route)
AttributeError: 'ec2.RouteTable' object has no attribute 'delete_route'
@rayluo
Copy link
Contributor

rayluo commented Sep 30, 2015

Thanks for your suggestion. We will look into this.

@kyleknap
Copy link
Contributor

@kislyuk
Agreed there should be some parity. I think route_table.delete_route is a reasonable interface. Feel free to submit a PR to our resource model for EC2 to add this. We can add it as well. If you have any other questions feel free to ask.

@mandeepbal
Copy link

I'm running into the same issue.

---> 29                 x = ec2_client.delete_route(RouteTableId=route_table.id,DestinationCidrBlock=route['DestinationCidrBlock'])
     30                 print x
     31 
AttributeError: 'ec2.ServiceResource' object has no attribute 'delete_route'

@cloudreach-jw
Copy link

ditto - quite annoying as I have to shell call the CLI to delete routes :(

@swetashre swetashre added the requires-model-update This issue requires an update in a model to resolve. label Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue requests a feature. requires-model-update This issue requires an update in a model to resolve.
Projects
None yet
Development

No branches or pull requests

7 participants