X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGenerateNodeConfFile.py;h=dc34ae278cbea61b6829356cdedb84d4ac71a401;hb=f6b58b9f2dd4c39a49aff67f37d5061e45910636;hp=ece5fd112989bb36d0f0bf3797fafe7fc75d57b2;hpb=f5cd72e35593c96b9996ab4e49674cccc7525c48;p=plcapi.git diff --git a/PLC/Methods/GenerateNodeConfFile.py b/PLC/Methods/GenerateNodeConfFile.py index ece5fd1..dc34ae2 100644 --- a/PLC/Methods/GenerateNodeConfFile.py +++ b/PLC/Methods/GenerateNodeConfFile.py @@ -28,7 +28,7 @@ class GenerateNodeConfFile(Method): Auth(), Mixed(Node.fields['node_id'], Node.fields['hostname']), - Parameter(bool, "True if you want to regenerate node key") + Parameter(bool, "True if you want to regenerate node key") ] returns = Parameter(str, "Node configuration file") @@ -49,7 +49,7 @@ class GenerateNodeConfFile(Method): if node['site_id'] not in self.caller['site_ids']: raise PLCPermissionDenied, "Not allowed to generate a configuration file for that node" - # Get interfaces for this node + # Get interfaces for this node primary = None interfaces = Interfaces(self.api, node['interface_ids']) for interface in interfaces: @@ -66,7 +66,7 @@ class GenerateNodeConfFile(Method): host = parts[0] domain = parts[1] - if regenerate_node_key: + if regenerate_node_key: # Generate 32 random bytes bytes = random.sample(xrange(0, 256), 32) # Base64 encode their string representation