From ec862388f729b7efaba464ce0d6d626f48453eef Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 1 Sep 2010 10:21:26 +0200 Subject: [PATCH] only comments --- PLC/Accessor.py | 8 ++++++-- PLC/Accessors/Factory.py | 4 +--- PLC/Methods/GetSlivers.py | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/PLC/Accessor.py b/PLC/Accessor.py index acf9a49..ea69ccb 100644 --- a/PLC/Accessor.py +++ b/PLC/Accessor.py @@ -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""" diff --git a/PLC/Accessors/Factory.py b/PLC/Accessors/Factory.py index fc1cb17..1c6d03e 100644 --- a/PLC/Accessors/Factory.py +++ b/PLC/Accessors/Factory.py @@ -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'}, diff --git a/PLC/Methods/GetSlivers.py b/PLC/Methods/GetSlivers.py index 951b352..a8ee408 100644 --- a/PLC/Methods/GetSlivers.py +++ b/PLC/Methods/GetSlivers.py @@ -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']) -- 2.43.0