rlib2: Set tag operation param “name” to None for cluster tags
authorMichael Hanselmann <hansmi@google.com>
Wed, 15 Sep 2010 19:39:05 +0000 (21:39 +0200)
committerMichael Hanselmann <hansmi@google.com>
Wed, 15 Sep 2010 19:48:40 +0000 (21:48 +0200)
Otherwise parameter verification in the master daemon fails.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/rapi/rlib2.py

index b7e9b9b..eed9640 100644 (file)
@@ -1122,10 +1122,10 @@ class _R_Tags(baserlib.R_Generic):
     """
     baserlib.R_Generic.__init__(self, items, queryargs, req)
 
-    if self.TAG_LEVEL != constants.TAG_CLUSTER:
-      self.name = items[0]
+    if self.TAG_LEVEL == constants.TAG_CLUSTER:
+      self.name = None
     else:
-      self.name = ""
+      self.name = items[0]
 
   def GET(self):
     """Returns a list of tags.