Re: [boto-users] boto and network acl support

156 views
Skip to first unread message

Mitchell Garnaat

unread,
Nov 9, 2012, 11:04:33 AM11/9/12
to boto-...@googlegroups.com
Hi -

The basic approach to handling this kind of situation is to create a new class designed to hold the subordinate data and make that object responsible for parsing the data within that subordinate type.

For example, if you look at instance.py you will see a class called InstanceState.  That class is responsible for parsing the status code and status name data for an instance.  To get this working, the Instance object adds code to it's startElement method that creates a new InstanceState object when the appropriate XML element is encountered and returns that object so it gets pushed onto the stack.  That InstanceState object then handles the parsing of the <code> and <name>.  Once the closing element is encountered, the InstanceState object gets popped off the stack.

Does that help?

Mitch

On Thu, Nov 8, 2012 at 8:23 PM, James Martin <james.s...@gmail.com> wrote:
I've been working on a fork that supports network acl support.

https://github.com/boto/boto/pull/1098

The problem I'm currently having :

In the http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeNetworkAcls.html call, a response with the network portRange will appear as:
   <item>
     <ruleNumber>110</ruleNumber>
     <protocol>6</protocol>
     <ruleAction>allow</ruleAction>
     <egress>false</egress>
     <cidrBlock>0.0.0.0/0</cidrBlock>
     <portRange>
       <from>80</from>
       <to>80</to>
     </portRange>
   </item>
 

and I can't quite figure out how to break that apart in my NetworkAclEntry class.  Most of the other responses would have portRangeFrom and portRangeTo instead of nested items.

Any help would be greatly appreciated as I would like to get this pull request merged :).


Thanks,


James

--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/boto-users/-/0_rMx5rY-igJ.
To post to this group, send email to boto-...@googlegroups.com.
To unsubscribe from this group, send email to boto-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.

James Martin

unread,
Nov 9, 2012, 12:05:21 PM11/9/12
to boto-...@googlegroups.com
Makes pefect sense.  Got it working!  Thanks.  I'm going to do the  the same for the Icmp stuff and then push my changes. 

Thanks again,

James

bernadette guinan

unread,
Sep 28, 2013, 1:37:34 PM9/28/13
to boto-...@googlegroups.com
Hi,

I am using Boto.Version is 2.8.0 and I wanted to ask does it support network ACLs ?

I see you may have added it in but can you tell me what version of Boto it is in? 

Otherwise, how can I set Network ACLs in AWS using python?

many thanks
Bernadette

koteswara rao sakhamuri

unread,
Mar 26, 2014, 3:51:48 AM3/26/14
to boto-...@googlegroups.com

Hi,

I'm trying to get the output like "ec2-describe-network-acls" using Boto. i endup with associations, acl entries, i need to get cidr, subnets etc like the output of "ec2-describe-network-acls" command. Please suggest me how can i achive this.
Suggestions are welcome.

Thanks,
Sakhamuri



On Friday, November 9, 2012 9:53:28 AM UTC+5:30, James Martin wrote:

Reply all
Reply to author
Forward
0 new messages