From b62dd6ca4b3e9d6702aae5c5c6a32cff7d39baac Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 26 Jan 2010 17:20:29 +0000 Subject: [PATCH] fix bootstrapfs names, and add fcdistro to extension tarballs --- PLC/Methods/GetNodeFlavour.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PLC/Methods/GetNodeFlavour.py b/PLC/Methods/GetNodeFlavour.py index 7363aba..f1e258d 100644 --- a/PLC/Methods/GetNodeFlavour.py +++ b/PLC/Methods/GetNodeFlavour.py @@ -36,7 +36,7 @@ class GetNodeFlavour(Method): ########## nodefamily - def nodefamily (self, auth, node_id, arch): + def nodefamily (self, auth, node_id, fcdistro, arch): # the deployment tag, if set, wins deployment = GetNodeDeployment (self.api).call(auth,node_id) @@ -45,15 +45,12 @@ class GetNodeFlavour(Method): pldistro = GetNodePldistro (self.api).call(auth, node_id) if not pldistro: pldistro = self.api.config.PLC_FLAVOUR_NODE_PLDISTRO - fcdistro = GetNodeFcdistro (self.api).call(auth, node_id) - if not fcdistro: fcdistro = self.api.config.PLC_FLAVOUR_NODE_FCDISTRO - # xxx would make sense to check the corresponding bootstrapfs is available return "%s-%s-%s"%(pldistro,fcdistro,arch) - def extensions (self, auth, node_id, arch): + def extensions (self, auth, node_id, fcdistro, arch): try: - return [ "%s-%s"%(e,arch) for e in GetNodeExtensions(self.api).call(auth,node_id).split() ] + return [ "%s-%s-%s"%(e,fcdistro,arch) for e in GetNodeExtensions(self.api).call(auth,node_id).split() ] except: return [] @@ -71,8 +68,11 @@ class GetNodeFlavour(Method): arch = GetNodeArch (self.api).call(auth,node_id) if not arch: arch = self.api.config.PLC_FLAVOUR_NODE_ARCH + fcdistro = GetNodeFcdistro (self.api).call(auth, node_id) + if not fcdistro: fcdistro = self.api.config.PLC_FLAVOUR_NODE_FCDISTRO + # xxx could use some sanity checking, and could provide fallbacks - return { 'nodefamily' : self.nodefamily(auth,node_id, arch), - 'extensions' : self.extensions(auth,node_id, arch), + return { 'nodefamily' : self.nodefamily(auth,node_id, fcdistro, arch), + 'extensions' : self.extensions(auth,node_id, fcdistro, arch), 'plain' : self.plain(auth,node_id), } -- 2.43.0