Merge commit 'local_master/master'
authorroot <root@blitz.inria.fr>
Thu, 2 Sep 2010 14:23:02 +0000 (16:23 +0200)
committerroot <root@blitz.inria.fr>
Thu, 2 Sep 2010 14:23:02 +0000 (16:23 +0200)
PLC/Accessor.py
PLC/Accessors/Factory.py
PLC/Methods/GetSlivers.py
PLCAPI.spec

index acf9a49..ea69ccb 100644 (file)
@@ -6,13 +6,17 @@
 #
 # just a placeholder for storing accessor-related tag checkers
 # this is filled by the accessors factory
+#
+# NOTE. If you ever come to manually delete a TagType that was created
+# by the Factory, you need to restart your python instance / web server
+# as the cached information then becomes wrong
 
 from PLC.TagTypes import TagTypes, TagType
 
 # implementation
 class Accessor (object) :
-    """This is placeholder for storing accessor-related tag checkers
-methods in this class are defined by the accessors factory
+    """This is placeholder for storing accessor-related tag checkers.
+Methods in this class are defined by the accessors factory
 
 This is implemented as a singleton, so we can cache results over time"""
 
index 546e3d9..1c6d03e 100644 (file)
@@ -25,9 +25,7 @@ from PLC.PersonTags import PersonTags, PersonTag
 # this is another story..
 #from PLC.Ilinks import Ilink
 
-from PLC.TagTypes import TagTypes, TagType
-
-# known classes : { class -> secondary_key }
+# known classes : { class -> details }
 taggable_classes = { Node : {'table_class' : Nodes,
                              'joins_class' : NodeTags, 'join_class' : NodeTag,
                              'secondary_key': 'hostname'},
@@ -54,7 +52,7 @@ tech_roles = [ 'admin', 'pi', 'tech' ]
 #
 # generates 2 method classes:
 # Get<classname><methodsuffix> (auth, id_or_name) -> value or None
-# Set<classname><methodsuffix> (auth, id_or_name, value) -> None
+# Set<classname><methodsuffix> (auth, id_or_name, value) -> value
 # value is always a string, no cast nor typecheck for now
 #
 # The expose_in_api flag tells whether this tag may be handled
@@ -201,6 +199,7 @@ def define_accessors (module, objclass, methodsuffix, tagname,
         else:
             self.message += " %d "%objs[0][primary_key]
         self.message += "updated"
+        return value
 
     # attach it
     setattr (set_class,"call",set_call)
index 951b352..a8ee408 100644 (file)
@@ -27,6 +27,7 @@ from PLC.Accessors.Accessors_standard import *
 # XXX used to check if slice expiration time is sane
 MAXINT =  2L**31-1
 
+# slice_filter essentially contains the slice_ids for the relevant slices (on the node + system & delegated slices)
 def get_slivers(api, auth, slice_filter, node = None):
     # Get slice information
     slices = Slices(api, slice_filter, ['slice_id', 'name', 'instantiation', 'expires', 'person_ids', 'slice_tag_ids'])
index 0963502..5ff7915 100644 (file)
@@ -6,7 +6,7 @@
 
 %define name PLCAPI
 %define version 5.0
-%define taglevel 15
+%define taglevel 16
 
 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
 
@@ -143,6 +143,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Sep 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-16
+- set accessors return the new value
+- tweaks in the pubsub groups management
+
 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - plcapi-5.0-15
 - convert hostnames to lower case and use ILIKE instead of LIKE