Add support for another SlapOS master.

parent e56e090c
......@@ -444,13 +444,22 @@ class Config:
def userConfig(self):
# XXX-Testme: test each possible scenario
# XXX don't use self.xx but return a dict so that it is stateless
# and easy to test
# XXX rename "get_yes_no" so that we don't have insane cases like
# "if not get_yes_no('...')"
already_configured = getSlaposConfiguration()
self.certificates = get_yes_no("Automatically register new computer to slapos.org?", True)
self.certificates = get_yes_no("Automatically register new computer to a SlapOS Master?", True)
if self.certificates:
if already_configured:
if not get_yes_no("A SlapOS Node configuration has been found. Do you want to overwrite it?", False):
print "Okay, let's start from scratch."
return False
self.master_url = raw_input("""SlapOS Master URL? Empty answer will make it use slapos.org :""")
if self.master_url:
self.master_url_web = raw_input("""SlapOS Master "web" URL? Default is "https://www.slapos.org" :""")
else:
self.master_url_web = ''
self.computer_name = raw_input("Define a unique name for this computer: ")
self.partition_amount = raw_input("""Number of SlapOS partitions for this computer? Default is 20 :""")
if self.partition_amount == '':
......
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