Commit c216c90c authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis
Browse files

Fix add_rapi_user method of Master component



..which broke after applying pep8 fixes.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent a7e20ed5
...@@ -377,15 +377,17 @@ class Ganeti(SynnefoComponent): ...@@ -377,15 +377,17 @@ class Ganeti(SynnefoComponent):
class Master(SynnefoComponent): class Master(SynnefoComponent):
def add_rapi_user(self): def add_rapi_user(self):
x = "%s:Ganeti Remote API:%s" % \ user = self.env.env.synnefo_user
(self.env.env.synnefo_user, self.env.env.synnefo_rapi_passwd) passwd = self.env.env.synnefo_rapi_passwd
x = "%s:Ganeti Remote API:%s" % (user, passwd)
commands = [ cmd = """
"echo %s {HA1}$(echo -n %s | openssl md5 | sed 's/^.* //') write" + cat >> /var/lib/ganeti/rapi/users <<EOF
" > /var/lib/ganeti/rapi/users" % (self.env.env.synnefo_user, x), %s {HA1}$(echo -n %s | openssl md5 | sed 's/^.* //') write
] EOF
""" % (self.env.env.synnefo_user, x)
return commands + self.restart() return [cmd] + self.restart()
def add_node(self, node_info): def add_node(self, node_info):
commands = [ commands = [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment