Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3302)

Unified Diff: boto/ec2/ec2object.py

Issue 8386013: Merging in latest boto. (Closed) Base URL: svn://svn.chromium.org/boto
Patch Set: Redoing vendor drop by deleting and then merging. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « boto/ec2/connection.py ('k') | boto/ec2/elb/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: boto/ec2/ec2object.py
diff --git a/boto/ec2/ec2object.py b/boto/ec2/ec2object.py
index 6e375961ee56d7e5941f23687b84cbeca68e342d..7756bee7a667c19f9257c7f6c9d61a9c89d378f9 100644
--- a/boto/ec2/ec2object.py
+++ b/boto/ec2/ec2object.py
@@ -62,7 +62,7 @@ class TaggedEC2Object(EC2Object):
else:
return None
- def add_tag(self, key, value=None):
+ def add_tag(self, key, value=''):
"""
Add a tag to this object. Tag's are stored by AWS and can be used
to organize and filter resources. Adding a tag involves a round-trip
@@ -73,6 +73,8 @@ class TaggedEC2Object(EC2Object):
: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.
"""
status = self.connection.create_tags([self.id], {key : value})
if self.tags is None:
@@ -91,7 +93,10 @@ class TaggedEC2Object(EC2Object):
: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.
+ be removed. If a value of None is provided, all
+ tags with the specified name will be deleted.
+ NOTE: There is an important distinction between
+ a value of '' and a value of None.
"""
if value:
tags = {key : value}
« no previous file with comments | « boto/ec2/connection.py ('k') | boto/ec2/elb/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698