[conf] add values for filescanner
This commit is contained in:
parent
00563c7dc2
commit
b2de277244
1 changed files with 0 additions and 12 deletions
|
@ -5,18 +5,14 @@ from ucloud.common.request import RequestPool
|
||||||
from ucloud.common.vm import VmPool
|
from ucloud.common.vm import VmPool
|
||||||
from ucloud.common.storage_handlers import FileSystemBasedImageStorageHandler, CEPHBasedImageStorageHandler
|
from ucloud.common.storage_handlers import FileSystemBasedImageStorageHandler, CEPHBasedImageStorageHandler
|
||||||
|
|
||||||
from decouple import Config, RepositoryEnv, RepositoryEmpty
|
|
||||||
|
|
||||||
# Replacing decouple inline
|
# Replacing decouple inline
|
||||||
import configparser
|
import configparser
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
log = logging.getLogger("ucloud.config")
|
log = logging.getLogger("ucloud.config")
|
||||||
|
|
||||||
|
|
||||||
conf_name = "ucloud.conf"
|
conf_name = "ucloud.conf"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -34,14 +30,6 @@ try:
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
log.warn("Configuration file not found - using defaults")
|
log.warn("Configuration file not found - using defaults")
|
||||||
|
|
||||||
|
|
||||||
# Try importing config, but don't fail if it does not exist
|
|
||||||
# try:
|
|
||||||
# env_vars = Config(RepositoryEnv('/etc/ucloud/ucloud.conf'))
|
|
||||||
# except FileNotFoundError:
|
|
||||||
# env_vars = Config(RepositoryEmpty())
|
|
||||||
|
|
||||||
|
|
||||||
etcd_wrapper_args = ()
|
etcd_wrapper_args = ()
|
||||||
etcd_wrapper_kwargs = {
|
etcd_wrapper_kwargs = {
|
||||||
'host': config['etcd']['ETCD_URL'],
|
'host': config['etcd']['ETCD_URL'],
|
||||||
|
|
Loading…
Reference in a new issue