[GITLAB] - UPGRADE TO v12 on Wednesday the 18th of December at 11.30AM

Commit 105bbd97 authored by Daniele Venzano's avatar Daniele Venzano

Change imports to point to the unified configuration module

parent 6533c4ce
......@@ -21,19 +21,18 @@ import logging
import time
import zoe_lib.applications
from zoe_lib.sql_manager import Execution, Service
import zoe_lib.config as config
from zoe_lib.configargparse import ArgumentParser, FileType
import zoe_master.config as config
from zoe_master.zapp_to_docker import execution_to_containers, terminate_execution
from zoe_lib.sql_manager import Execution, Service
from zoe_master.execution_manager import _digest_application_description
from zoe_master.zapp_to_docker import execution_to_containers, terminate_execution
log = logging.getLogger("main")
LOG_FORMAT = '%(asctime)-15s %(levelname)s %(name)s (%(threadName)s): %(message)s'
config_paths = [
'zoe-master.conf',
'/etc/zoe/zoe-master.conf'
'zoe.conf',
'/etc/zoe/zoe.conf'
]
......
......@@ -16,7 +16,7 @@
import logging
import re
from zoe_api.config import get_conf
from zoe_lib.config import get_conf
import zoe_api.master_api
import zoe_lib.sql_manager
import zoe_lib.applications
......
......@@ -17,7 +17,7 @@ import logging
import ldap
import zoe_api.auth.base
from zoe_api.config import get_conf
from zoe_lib.config import get_conf
log = logging.getLogger(__name__)
......
......@@ -17,7 +17,7 @@ import psycopg2
import psycopg2.extras
import zoe_api.exceptions
from zoe_api.config import get_conf
from zoe_lib.config import get_conf
SQL_SCHEMA_VERSION = 0 # ---> Increment this value every time the schema changes !!! <---
......
......@@ -20,7 +20,7 @@ from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop, PeriodicCallback
import zoe_api.config as config
import zoe_lib.config as config
import zoe_api.db_init
import zoe_api.api_endpoint
import zoe_api.rest_api
......
......@@ -17,7 +17,7 @@ import logging
import zmq
import zoe_api.config as config
import zoe_lib.config as config
log = logging.getLogger(__name__)
......
......@@ -15,10 +15,10 @@
from flask_restful import Resource
from zoe_lib.version import ZOE_API_VERSION, ZOE_APPLICATION_FORMAT_VERSION, ZOE_VERSION
from zoe_master.config import get_conf
from zoe_api.rest_api.utils import catch_exceptions
import zoe_api.api_endpoint
from zoe_api.rest_api.utils import catch_exceptions
from zoe_lib.config import get_conf
from zoe_lib.version import ZOE_API_VERSION, ZOE_APPLICATION_FORMAT_VERSION, ZOE_VERSION
class InfoAPI(Resource):
......
......@@ -17,10 +17,8 @@ import re
from random import randint
import json
from flask import render_template, request
from zoe_lib.services import ZoeServiceAPI
from flask import render_template, request, g
import zoe_api.config as config
import zoe_api.api_endpoint
from zoe_api.web.utils import get_auth, catch_exceptions
......
......@@ -13,8 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
from zoe_lib.configargparse import ArgumentParser, Namespace
logging.getLogger('kazoo').setLevel(logging.WARNING)
logging.getLogger('requests').setLevel(logging.WARNING)
logging.getLogger('urllib3').setLevel(logging.WARNING)
logging.getLogger('docker').setLevel(logging.INFO)
config_paths = [
'zoe.conf',
'/etc/zoe/zoe.conf'
......
......@@ -18,7 +18,8 @@ import datetime
import psycopg2
import psycopg2.extras
from zoe_master.config import get_conf
from zoe_lib.config import get_conf
from zoe_lib.swarm_client import SwarmClient
psycopg2.extensions.register_adapter(dict, psycopg2.extras.Json)
......
......@@ -17,9 +17,9 @@
import logging
from zoe_master.scheduler import ZoeScheduler
import zoe_master.config as config
import zoe_lib.config as config
from zoe_master.master_api import APIManager
from zoe_master.scheduler import ZoeScheduler
# from zoe_master.stats_manager import StatsManager
from zoe_master.workspace.filesystem import ZoeFSWorkspace
from zoe_master.execution_manager import restart_resubmit_scheduler
......
......@@ -15,9 +15,8 @@
import logging
import zoe_lib.config as config
from zoe_lib.sql_manager import Execution
import zoe_master.config as config
from zoe_master.scheduler import ZoeScheduler
log = logging.getLogger(__name__)
......
......@@ -18,12 +18,11 @@ import time
import zmq
from zoe_master.exceptions import ZoeException
import zoe_lib.config as config
import zoe_lib.sql_manager
from zoe_lib.swarm_client import SwarmClient
import zoe_master.config as config
import zoe_master.execution_manager
from zoe_lib.swarm_client import SwarmClient
from zoe_master.exceptions import ZoeException
log = logging.getLogger(__name__)
......
......@@ -13,12 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
import threading
import time
import logging
from zoe_lib.config import get_conf
from zoe_lib.swarm_client import SwarmClient
from zoe_master.config import get_conf
log = logging.getLogger(__name__)
......
......@@ -14,11 +14,10 @@
# limitations under the License.
import pytest
import json
from zoe_master.config import load_configuration, get_conf
from zoe_master.state.manager import StateManager
from zoe_master.state.blobs.fs import FSBlobs
from zoe_master.state.manager import StateManager
from zoe_lib.config import load_configuration, get_conf
class TestConf:
......
......@@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os.path
import logging
import os.path
import zoe_lib.config as config
import zoe_master.workspace.base
import zoe_master.config as config
log = logging.getLogger(__name__)
......
......@@ -15,11 +15,11 @@
import logging
import zoe_master.workspace.base
from zoe_lib.config import get_conf, singletons
from zoe_lib.sql_manager import Execution, Service
from zoe_master.exceptions import ZoeStartExecutionRetryException, ZoeStartExecutionFatalException, ZoeException
from zoe_master.config import get_conf, singletons
from zoe_lib.swarm_client import DockerContainerOptions, SwarmClient
import zoe_master.workspace.base
from zoe_master.exceptions import ZoeStartExecutionRetryException, ZoeStartExecutionFatalException, ZoeException
log = logging.getLogger(__name__)
......
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