fixup

parent 902e5487
...@@ -455,9 +455,9 @@ class Config: ...@@ -455,9 +455,9 @@ class Config:
if not get_yes_no("A SlapOS Node configuration has been found. Do you want to overwrite it?", False): 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." print "Okay, let's start from scratch."
return False return False
self.master_url = raw_input("""SlapOS Master URL? Empty answer will make it use slapos.org :""") self.master_url = raw_input("""SlapOS Master URL? Empty answer will make it use slapos.org Master:""")
if self.master_url: if self.master_url:
self.master_url_web = raw_input("""SlapOS Master "web" URL? Default is "https://www.slapos.org" :""") self.master_url_web = raw_input("""SlapOS Master "web" URL?:""")
else: else:
self.master_url_web = '' self.master_url_web = ''
self.computer_name = raw_input("Define a unique name for this computer: ") self.computer_name = raw_input("Define a unique name for this computer: ")
...@@ -489,8 +489,12 @@ class Config: ...@@ -489,8 +489,12 @@ class Config:
def displayUserConfig(self): def displayUserConfig(self):
# XXX print everything from configuration, not arbitrary members
if self.certificates: if self.certificates:
print "Will register a computer on master" print "Will register a computer on master"
if self.master_url:
print "URL of master: %s" % self.master_url
print "URL \"web\" of master: %s" % self.master_url_web
print "Number of partition: %s" % (self.partition_amount) print "Number of partition: %s" % (self.partition_amount)
print "Computer name: %s" % self.computer_name print "Computer name: %s" % self.computer_name
print "Virtual Machine: %s" % self.virtual print "Virtual Machine: %s" % self.virtual
...@@ -527,10 +531,18 @@ def prepare_from_scratch(config): ...@@ -527,10 +531,18 @@ def prepare_from_scratch(config):
# Prepare Slapos Configuration # Prepare Slapos Configuration
if config.certificates: if config.certificates:
_call(['slapos', 'node', 'register', config.computer_name slapos_register_parameter_list = [
,'--interface-name', 'br0' 'slapos', 'node', 'register', config.computer_name,
,'--ipv6-interface', config.ipv6_interface '--interface-name', 'br0',
,'--partition-number', config.partition_amount]) '--ipv6-interface', config.ipv6_interface,
'--partition-number', config.partition_amount
]
if config.master_url:
slapos_register_parameter_list.extend([
'--master-url', config.master_url,
'--master-url-web', config.master_url_web,
])
_call(slapos_register_parameter_list)
if getSlaposConfiguration(): if getSlaposConfiguration():
if config.need_bridge: if config.need_bridge:
......
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