Commit 5b550fad authored by Rafael Monnerat's avatar Rafael Monnerat

slapos.cli.configure_local: Get template locally instead do an http request.

parent 96963291
...@@ -87,11 +87,10 @@ def get_certificate_key_pair(logger, master_url_web, token): ...@@ -87,11 +87,10 @@ def get_certificate_key_pair(logger, master_url_web, token):
return json_dict["certificate"], json_dict["key"] return json_dict["certificate"], json_dict["key"]
def fetch_configuration_template(): def fetch_configuration_template():
# XXX: change to local version. template_path = os.path.join("/".join(__file__.split('/')[:-2]), 'slapos-client.cfg.example')
req = requests.get('http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/slapos-client.cfg.example') with open(template_path, 'r') as fout:
req.raise_for_status() slapos_node_configuration_template = fout.read()
return req.text return slapos_node_configuration_template
def do_configure_client(logger, master_url_web, token, config_path, master_url): def do_configure_client(logger, master_url_web, token, config_path, master_url):
while not token: while not token:
......
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