ó FRTc@sFdZddlmZdefd„ƒYZdefd„ƒYZdS(s Represents an EC2 Object iÿÿÿÿ(tTagSett EC2ObjectcBs&eZdd„Zd„Zd„ZRS(cCs@||_|jr3t|jdƒr3|j|_n d|_dS(Ntregion(t connectionthasattrRtNone(tselfR((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyt__init__s cCsdS(N(R(RtnametattrsR((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyt startElement&scCst|||ƒdS(N(tsetattr(RRtvalueR((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyt endElement)sN(t__name__t __module__RRR R (((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyRs  tTaggedEC2ObjectcBsYeZdZdd„Zd„Zded„Zed„Zded„Z ed„Z RS( sŠ Any EC2 resource that can be tagged should be represented by a Python object that subclasses this class. This class has the mechanism in place to handle the tagSet element in the Describe* responses. If tags are found, it will create a TagSet object and allow it to parse and collect the tags into a dict that is stored in the "tags" attribute of the object. cCs&tt|ƒj|ƒtƒ|_dS(N(tsuperRRRttags(RR((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyR8scCs|dkr|jSdSdS(NttagSet(RR(RRR R((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyR <s tcCs|ji||6|ƒdS(só Add a tag to this object. Tags are stored by AWS and can be used to organize and filter resources. Adding a tag involves a round-trip to the EC2 service. :type key: str :param key: The key or name of the tag being stored. :type value: str :param value: An optional value that can be stored with the tag. If you want only the tag name and no value, the value should be the empty string. N(tadd_tags(RtkeyR tdry_run((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pytadd_tagBscCsS|jj|jg|d|ƒ}|jdkr?tƒ|_n|jj|ƒdS(sß Add tags to this object. Tags are stored by AWS and can be used to organize and filter resources. Adding tags involves a round-trip to the EC2 service. :type tags: dict :param tags: A dictionary of key-value pairs for the tags being stored. If for some tags you want only the name and no value, the corresponding value for that tag name should be an empty string. RN(Rt create_tagstidRRRtupdate(RRRtstatus((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyRRs   cCs|ji||6|ƒdS(sº Remove a tag from this object. Removing a tag involves a round-trip to the EC2 service. :type key: str :param key: The key or name of the tag being stored. :type value: str :param value: An optional value that can be stored with the tag. If a value is provided, it must match the value currently stored in EC2. If not, the tag will not be removed. If a value of None is provided, the tag will be unconditionally deleted. NOTE: There is an important distinction between a value of '' and a value of None. N(t remove_tags(RRR R((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyt remove_taggscCs€|jj|jg|d|ƒ}xX|jƒD]J\}}||jkr.|dksh||j|krx|j|=qxq.q.WdS(s Removes tags from this object. Removing tags involves a round-trip to the EC2 service. :type tags: dict :param tags: A dictionary of key-value pairs for the tags being removed. For each key, the provided value must match the value currently stored in EC2. If not, that particular tag will not be removed. However, if a value of None is provided, the tag will be unconditionally deleted. NOTE: There is an important distinction between a value of '' and a value of None. RN(Rt delete_tagsRtitemsRR(RRRRRR ((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyRzs   N( RRt__doc__RRR tFalseRRRR(((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyR-s    N(R!t boto.ec2.tagRtobjectRR(((s?/opt/freeware/lib/python2.7/site-packages/boto/ec2/ec2object.pyts