diff options
Diffstat (limited to 'contrib/boto_v6/ec2/instance.py')
-rw-r--r-- | contrib/boto_v6/ec2/instance.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/boto_v6/ec2/instance.py b/contrib/boto_v6/ec2/instance.py new file mode 100644 index 000000000..255114935 --- /dev/null +++ b/contrib/boto_v6/ec2/instance.py @@ -0,0 +1,33 @@ +''' +Created on 2010/12/20 + +@author: Nachi Ueno <ueno.nachi@lab.ntt.co.jp> +''' +import boto +from boto.resultset import ResultSet +from boto.ec2.instance import Reservation +from boto.ec2.instance import Group +from boto.ec2.instance import Instance + + +class ReservationV6(Reservation): + def startElement(self, name, attrs, connection): + if name == 'instancesSet': + self.instances = ResultSet([('item', InstanceV6)]) + return self.instances + elif name == 'groupSet': + self.groups = ResultSet([('item', Group)]) + return self.groups + else: + return None + + +class InstanceV6(Instance): + def __init__(self, connection=None): + Instance.__init__(self, connection) + self.public_dns_name_v6 = None + + def endElement(self, name, value, connection): + Instance.endElement(self, name, value, connection) + if name == 'dnsNameV6': + self.dns_name_v6 = value |