Merge lp:~xtoddx/nova-adminclient/provider_fw_rules into lp:nova-adminclient

Proposed by Todd Willey
Status: Merged
Approved by: Devin Carlen
Approved revision: 7
Merged at revision: 7
Proposed branch: lp:~xtoddx/nova-adminclient/provider_fw_rules
Merge into: lp:nova-adminclient
Diff against target: 59 lines (+33/-1)
2 files modified
nova_adminclient/client.py (+32/-0)
setup.py (+1/-1)
To merge this branch: bzr merge lp:~xtoddx/nova-adminclient/provider_fw_rules
Reviewer Review Type Date Requested Status
Devin Carlen Approve
Review via email: mp+64320@code.launchpad.net

Description of the change

Add provider firewall rules handlers.

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

Actually - needs one minor bit. Can you bump the version number in setup.py? I'll push to pypi once you do that.

review: Needs Fixing
7. By Todd Willey

Bump revno.

Revision history for this message
Todd Willey (xtoddx) wrote :

All better now.

Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

0.1.8 uploaded to pypi

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'nova_adminclient/client.py'
--- nova_adminclient/client.py 2011-05-21 04:34:25 +0000
+++ nova_adminclient/client.py 2011-06-12 16:22:23 +0000
@@ -264,6 +264,21 @@
264 else:264 else:
265 setattr(self, name, str(value))265 setattr(self, name, str(value))
266266
267class IpBlock(object):
268 def __init__(self, connection=None):
269 self.connection = connection
270 self.cidr = None
271
272 def __repr__(self):
273 return 'IpBlock:%s' % self.cidr
274
275 def startElement(self, name, attrs, connection):
276 return None
277
278 def endElement(self, name, value, connection):
279 if name == 'cidr':
280 self.cidr = str(value)
281
267class StatusResponse(object):282class StatusResponse(object):
268 def __init__(self, connection=None):283 def __init__(self, connection=None):
269 self.connection = connection284 self.connection = connection
@@ -496,3 +511,20 @@
496 """Revoke project credentials and kill the cloudpipe/vpn instance."""511 """Revoke project credentials and kill the cloudpipe/vpn instance."""
497 return self.apiconn.get_object('DisableProjectCredentials',512 return self.apiconn.get_object('DisableProjectCredentials',
498 {'Project': project}, StatusResponse)513 {'Project': project}, StatusResponse)
514
515 def block_ips(self, cidr):
516 """Block incoming traffic from specified hosts."""
517 return self.apiconn.get_object('BlockExternalAddresses',
518 {'Cidr': cidr}, StatusResponse)
519
520 def get_ip_blocks(self):
521 """Block incoming traffic from specified hosts."""
522 return self.apiconn.get_list('DescribeExternalAddressBlocks', {},
523 [('item', IpBlock)])
524 return self.apiconn.get_list('DescribeExternalAddressBlocks', {}
525 [('item', IpBlock)])
526
527 def remove_ip_block(self, cidr):
528 """Block incoming traffic from specified hosts."""
529 return self.apiconn.get_object('RemoveExternalAddressBlock',
530 {'Cidr': cidr}, StatusResponse)
499531
=== modified file 'setup.py'
--- setup.py 2011-05-21 04:34:25 +0000
+++ setup.py 2011-06-12 16:22:23 +0000
@@ -20,7 +20,7 @@
20from setuptools import setup, find_packages20from setuptools import setup, find_packages
2121
22setup(name = "nova-adminclient",22setup(name = "nova-adminclient",
23 version = "0.1.7",23 version = "0.1.8",
24 license = 'Apache License (2.0)',24 license = 'Apache License (2.0)',
25 description = "client for administering OpenStack Nova",25 description = "client for administering OpenStack Nova",
26 author = 'OpenStack',26 author = 'OpenStack',

Subscribers

People subscribed via source and target branches