This commit is contained in:
ahmadbilalkhalid 2019-09-13 21:47:33 +05:00
parent 4b51537e0e
commit 1272081ddf
5 changed files with 31 additions and 5 deletions

View file

@ -3,7 +3,8 @@ import subprocess as sp
import os
import shutil
from app.helper import clone_common, clone_etcd_wrapper, install_available
from app.helper import install_available
from decouple import config
@click.group()
def api():
@ -39,6 +40,11 @@ def setup(path, auth_name, auth_seed, auth_realm,
f"REALM_ALLOWED={list(realm_allowed)}\n"
f"OTP_SERVER={otp_server}\n"
f"ETCD_URL={etcd_url}\n"
f"VM_PREFIX=/v1/vm\n",
f"HOST_PREFIX=/v1/host\n",
f"IMAGE_PREFIX=/v1/image\n",
f"IMAGE_STORE_PREFIX=/v1/image_store\n",
f"REQUEST_PREFIX=/v1/request\n"
)
f.writelines(content)

View file

@ -28,7 +28,12 @@ def setup(path, base_dir, file_prefix, etcd_url):
content = (
f"BASE_DIR={base_dir}\n"
f"FILE_PREFIX={file_prefix}\n"
f"ETCD_URL={etcd_url}\n"
f"ETCD_URL={etcd_url}\n",
f"VM_PREFIX=/v1/vm\n",
f"HOST_PREFIX=/v1/host\n",
f"IMAGE_PREFIX=/v1/image\n",
f"IMAGE_STORE_PREFIX=/v1/image_store\n",
f"REQUEST_PREFIX=/v1/request\n"
)
f.writelines(content)

View file

@ -34,7 +34,12 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url, without_ceph
f"ssh_pkey={ssh_key_path}\n"
f"ssh_private_key_password={ssh_key_pass}\n"
f"ETCD_URL={etcd_url}\n"
f"WITHOUT_CEPH={without_ceph}\n"
f"WITHOUT_CEPH={without_ceph}\n",
f"VM_PREFIX=/v1/vm\n",
f"HOST_PREFIX=/v1/host\n",
f"IMAGE_PREFIX=/v1/image\n",
f"IMAGE_STORE_PREFIX=/v1/image_store\n",
f"REQUEST_PREFIX=/v1/request\n"
)
f.writelines(content)

View file

@ -28,7 +28,12 @@ def setup(path, base_dir, etcd_url, without_ceph):
content = (
f"BASE_DIR={base_dir}\n"
f"ETCD_URL={etcd_url}\n"
f"WITHOUT_CEPH={without_ceph}"
f"WITHOUT_CEPH={without_ceph}",
f"VM_PREFIX=/v1/vm\n",
f"HOST_PREFIX=/v1/host\n",
f"IMAGE_PREFIX=/v1/image\n",
f"IMAGE_STORE_PREFIX=/v1/image_store\n",
f"REQUEST_PREFIX=/v1/request\n"
)
f.writelines(content)

View file

@ -32,7 +32,12 @@ def setup(path, vm_prefix, host_prefix, request_prefix, etcd_url):
f"VM_PREFIX={vm_prefix}\n"
f"HOST_PREFIX={host_prefix}\n"
f"REQUEST_PREFIX={request_prefix}\n"
f"ETCD_URL={etcd_url}\n"
f"ETCD_URL={etcd_url}\n",
f"VM_PREFIX=/v1/vm\n",
f"HOST_PREFIX=/v1/host\n",
f"IMAGE_PREFIX=/v1/image\n",
f"IMAGE_STORE_PREFIX=/v1/image_store\n",
f"REQUEST_PREFIX=/v1/request\n"
)
f.writelines(content)