You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2013/12/23 19:20:32 UTC
[3/5] git commit: Modify EC2ResercedNode to call parent constructor
and drop unused arguments from the constructor.
Modify EC2ResercedNode to call parent constructor and drop unused arguments from
the constructor.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/49e2f3bf
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/49e2f3bf
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/49e2f3bf
Branch: refs/heads/trunk
Commit: 49e2f3bf55b9ef510e48c8c7174d7377f27e620a
Parents: c1d8660
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Dec 23 19:07:41 2013 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Dec 23 19:07:41 2013 +0100
----------------------------------------------------------------------
libcloud/compute/drivers/ec2.py | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/49e2f3bf/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index e4387fe..c7ab920 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -567,15 +567,11 @@ class EC2ReservedNode(Node):
Note: This class is EC2 specific.
"""
- def __init__(self, id, name, state, public_ips, private_ips,
- driver, size=None, image=None, extra=None):
- self.id = str(id) if id else None
- self.name = name
- self.state = state
- self.public_ips = public_ips
- self.private_ips = private_ips
- self.driver = driver
- self.extra = extra or {}
+ def __init__(self, id, state, driver, size=None, image=None, extra=None):
+ super(EC2ReservedNode, self).__init__(id=id, name=None, state=state,
+ public_ips=None,
+ private_ips=None,
+ driver=driver, extra=extra)
def __repr__(self):
return (('<EC2ReservedNode: id=%s>') % (self.id))
@@ -699,12 +695,9 @@ class BaseEC2NodeDriver(NodeDriver):
return EC2ReservedNode(id=findtext(element=element,
xpath='reservedInstancesId',
namespace=NAMESPACE),
- name=None,
state=findattr(element=element,
xpath='state',
namespace=NAMESPACE),
- public_ips=None,
- private_ips=None,
driver=self,
extra=extra)