move settings under uncloud.common

This commit is contained in:
ahmadbilalkhalid 2020-01-06 12:25:59 +05:00
parent ef0f13534a
commit 6086fec633
19 changed files with 28 additions and 18 deletions

View file

@ -1,7 +1,7 @@
import os
from uncloud.shared import shared
from uncloud.settings import settings
from uncloud.common.settings import settings
class Optional:

View file

@ -4,7 +4,7 @@ import os
from uuid import uuid4
from uncloud.shared import shared
from uncloud.settings import settings
from uncloud.common.settings import settings
data = {
'is_public': True,

View file

@ -8,7 +8,7 @@ import requests
from pyotp import TOTP
from uncloud.shared import shared
from uncloud.settings import settings
from uncloud.common.settings import settings
logger = logging.getLogger(__name__)

View file

@ -13,7 +13,7 @@ from werkzeug.exceptions import HTTPException
from uncloud.common import counters
from uncloud.common.vm import VMStatus
from uncloud.common.request import RequestEntry, RequestType
from uncloud.settings import settings
from uncloud.common.settings import settings
from uncloud.shared import shared
from . import schemas
from .helper import generate_mac, mac2ipv6

View file

@ -22,7 +22,7 @@ import bitmath
from uncloud.common.host import HostStatus
from uncloud.common.vm import VMStatus
from uncloud.shared import shared
from uncloud.settings import settings
from uncloud.common.settings import settings
from . import helper, logger
from .common_fields import Field, VmUUIDField
from .helper import check_otp, resolve_vm_name

View file

@ -5,7 +5,7 @@ import binascii
from pyotp import TOTP
from os.path import join as join_path
from uncloud.settings import settings
from uncloud.common.settings import settings
def get_otp_parser():

View file

@ -1,8 +1,6 @@
import subprocess as sp
import random
import logging
import socket
from contextlib import closing
logger = logging.getLogger(__name__)

View file

@ -7,7 +7,7 @@ from abc import ABC
from . import logger
from os.path import join as join_path
from uncloud.settings import settings as config
from uncloud.common.settings import settings as config
class ImageStorageHandler(ABC):

View file

@ -1,7 +1,7 @@
import os
import argparse
from uncloud.settings import settings
from uncloud.common.settings import settings
from uncloud.shared import shared
arg_parser = argparse.ArgumentParser('configure', add_help=False)

12
uncloud/docs/README.md Normal file
View file

@ -0,0 +1,12 @@
# uncloud docs
## Requirements
1. Python3
2. Sphinx
## Usage
Run `make build` to build docs.
Run `make clean` to remove build directory.
Run `make publish` to push build dir to https://ungleich.ch/ucloud/

View file

@ -9,7 +9,7 @@ import bitmath
from uuid import uuid4
from . import logger
from uncloud.settings import settings
from uncloud.common.settings import settings
from uncloud.shared import shared

View file

@ -6,7 +6,7 @@ from uuid import uuid4
from uncloud.common.request import RequestEntry, RequestType
from uncloud.shared import shared
from uncloud.settings import settings
from uncloud.common.settings import settings
from uncloud.common.vm import VMStatus
from uncloud.vmm import VMM
from os.path import join as join_path

View file

@ -17,7 +17,7 @@ from uncloud.common.network import create_dev, delete_network_interface
from uncloud.common.schemas import VMSchema, NetworkSchema
from uncloud.host import logger
from uncloud.shared import shared
from uncloud.settings import settings
from uncloud.common.settings import settings
from uncloud.vmm import VMM
from marshmallow import ValidationError

View file

@ -4,7 +4,7 @@ import argparse
import subprocess as sp
from os.path import join as join_path
from uncloud.settings import settings
from uncloud.common.settings import settings
from uncloud.shared import shared
from uncloud.imagescanner import logger

View file

@ -5,7 +5,7 @@ from flask import Flask, request
from flask_restful import Resource, Api
from werkzeug.exceptions import HTTPException
from uncloud.settings import settings
from uncloud.common.settings import settings
from uncloud.shared import shared
app = Flask(__name__)

View file

@ -7,7 +7,7 @@ from uncloud.common.host import HostStatus
from uncloud.common.request import RequestEntry, RequestType
from uncloud.common.vm import VMStatus
from uncloud.shared import shared
from uncloud.settings import settings
from uncloud.common.settings import settings
def accumulated_specs(vms_specs):

View file

@ -8,7 +8,7 @@ import argparse
from uncloud.common.request import RequestEntry, RequestType
from uncloud.shared import shared
from uncloud.settings import settings
from uncloud.common.settings import settings
from .helper import (dead_host_mitigation, dead_host_detection, assign_host, NoSuitableHostFound)
from . import logger

View file

@ -1,4 +1,4 @@
from uncloud.settings import settings
from uncloud.common.settings import settings
from uncloud.common.vm import VmPool
from uncloud.common.host import HostPool
from uncloud.common.request import RequestPool