X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetNodeFlavour.py;h=92c0fc4be08536db4cf25c6b0b0429fad3d45ac1;hb=e795c7325c38c212ed525e567fe028e8ed0c8e90;hp=6ebcc120573270133181eee2fd1357638a2c1144;hpb=f7ce7ce813d4c44502629820a3583f32a99a98f7;p=plcapi.git diff --git a/PLC/Methods/GetNodeFlavour.py b/PLC/Methods/GetNodeFlavour.py index 6ebcc12..92c0fc4 100644 --- a/PLC/Methods/GetNodeFlavour.py +++ b/PLC/Methods/GetNodeFlavour.py @@ -1,5 +1,3 @@ -# $Id$ -# $URL$ from PLC.Method import Method from PLC.Auth import Auth from PLC.Faults import * @@ -42,25 +40,25 @@ class GetNodeFlavour(Method): # the deployment tag, if set, wins # xxx Thierry: this probably is wrong; we need fcdistro to be set anyway # for generating the proper yum config.... - deployment = GetNodeDeployment (self.api).call(auth,node_id) + deployment = GetNodeDeployment (self.api,self.caller).call(auth,node_id) if deployment: return deployment - pldistro = GetNodePldistro (self.api).call(auth, node_id) + pldistro = GetNodePldistro (self.api,self.caller).call(auth, node_id) if not pldistro: pldistro = self.api.config.PLC_FLAVOUR_NODE_PLDISTRO - SetNodePldistro(self.api).call(auth,node_id,pldistro) + SetNodePldistro(self.api,self.caller).call(auth,node_id,pldistro) # xxx would make sense to check the corresponding bootstrapfs is available return "%s-%s-%s"%(pldistro,fcdistro,arch) def extensions (self, auth, node_id, fcdistro, arch): try: - return [ "%s-%s-%s"%(e,fcdistro,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,self.caller).call(auth,node_id).split() ] except: return [] def plain (self, auth, node_id): - return not not GetNodePlainBootstrapfs(self.api).call(auth,node_id) + return not not GetNodePlainBootstrapfs(self.api,self.caller).call(auth,node_id) def call(self, auth, node_id_or_name): # Get node information @@ -70,16 +68,16 @@ class GetNodeFlavour(Method): node = nodes[0] node_id = node['node_id'] - arch = GetNodeArch (self.api).call(auth,node_id) + arch = GetNodeArch (self.api,self.caller).call(auth,node_id) # if not set, use the global default and tag the node, in case the global default changes later on if not arch: arch = self.api.config.PLC_FLAVOUR_NODE_ARCH - SetNodeArch (self.api).call(auth,node_id,arch) + SetNodeArch (self.api,self.caller).call(auth,node_id,arch) - fcdistro = GetNodeFcdistro (self.api).call(auth, node_id) + fcdistro = GetNodeFcdistro (self.api,self.caller).call(auth, node_id) if not fcdistro: fcdistro = self.api.config.PLC_FLAVOUR_NODE_FCDISTRO - SetNodeFcdistro (self.api).call (auth, node_id, fcdistro) + SetNodeFcdistro (self.api,self.caller).call (auth, node_id, fcdistro) # xxx could use some sanity checking, and could provide fallbacks return { 'nodefamily' : self.nodefamily(auth,node_id, fcdistro, arch),