From: Thierry Parmentelat Date: Tue, 3 Jun 2008 08:12:35 +0000 (+0000) Subject: 5.0 X-Git-Tag: NodeManager-1.8-0~39 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5c00a570abc223d58b171bc88b072085d69fa232;p=nodemanager.git 5.0 --- diff --git a/Makefile b/Makefile index 2492116..eeab636 100644 --- a/Makefile +++ b/Makefile @@ -35,3 +35,5 @@ clean: tags: find . '(' -name '*.py' -o -name '*.c' -o -name '*.spec' ')' | xargs etags +.PHONY: tags + diff --git a/codemux.py b/codemux.py index 7b11350..ce69e4a 100644 --- a/codemux.py +++ b/codemux.py @@ -16,7 +16,10 @@ def start(options, config): def GetSlivers(data): - """For each sliver with the codemux attribute, parse out "host,port" and make entry in conf. Restart service after.""" + """ + For each sliver with the codemux attribute, parse out "host,port" + and make entry in conf. Restart service after. + """ logger.log("codemux: Starting.", 2) # slices already in conf slicesinconf = parseConf() @@ -30,7 +33,7 @@ def GetSlivers(data): # Parse attributes and update dict of scripts for sliver in data['slivers']: for attribute in sliver['attributes']: - if attribute['name'] == 'codemux': + if attribute['tagname'] == 'codemux': # add to conf. Attribute is [host, port] params = {'host': attribute['value'].split(",")[0], 'port': attribute['value'].split(",")[1]} diff --git a/proper.py b/proper.py index aad468e..dea0db9 100644 --- a/proper.py +++ b/proper.py @@ -19,7 +19,7 @@ def GetSlivers(data): for sliver in data['slivers']: for attribute in sliver['attributes']: - if attribute['name'] == 'proper_op': + if attribute['tagname'] == 'proper_op': buf += "%s: %s\n" % (sliver['name'], attribute['value']) try: os.makedirs("/etc/proper") diff --git a/sm.py b/sm.py index 8fab86e..9ba2c38 100644 --- a/sm.py +++ b/sm.py @@ -91,7 +91,7 @@ def GetSlivers(data, fullupdate=True): # convert attributes field to a proper dict attr_dict = {} - for attr in rec.pop('attributes'): attr_dict[attr['name']] = attr['value'] + for attr in rec.pop('attributes'): attr_dict[attr['tagname']] = attr['value'] # squash keys keys = rec.pop('keys') diff --git a/vsys.py b/vsys.py index 17b3b59..a1558bd 100644 --- a/vsys.py +++ b/vsys.py @@ -24,7 +24,7 @@ def GetSlivers(data): # Parse attributes and update dict of scripts for sliver in data['slivers']: for attribute in sliver['attributes']: - if attribute['name'] == 'vsys': + if attribute['tagname'] == 'vsys': if sliver['name'] not in slices: # add to conf slices.append(sliver['name'])