Ejemplo n.º 1
0
from settings import *
from on_http_api2_0 import Configuration, ApiClient

config = Configuration() 
config.host = 'http://{0}:{1}/api/2.0'.format(HOST_IP,HOST_PORT)
config.verify_ssl = False
config.api_client = ApiClient(host=config.host)
config.debug = False
config.logger_format = LOGFORMAT
for key,elem in config.logger.iteritems():
    elem.setLevel(LOGLEVELS[LOGGER_LVL])

Ejemplo n.º 2
0
from settings import *
from on_http_api2_0 import Configuration, ApiClient

config = Configuration()
config.host = 'http://{0}:{1}'.format(HOST_IP, HOST_PORT)
config.host_authed = 'https://{0}:{1}'.format(HOST_IP, HOST_PORT_AUTH)
config.api_root = '/api/2.0'
config.verify_ssl = False
config.api_client = ApiClient(host=config.host + config.api_root)
config.auth_enabled = False
config.debug = False
config.logger_format = LOGFORMAT
for key, elem in config.logger.iteritems():
    elem.setLevel(LOGLEVELS[LOGGER_LVL])



Ejemplo n.º 3
0
from settings import *
from on_http_api2_0 import Configuration, ApiClient

config = Configuration()
config.host = 'http://{0}:{1}/api/2.0'.format(HOST_IP, HOST_PORT)
config.verify_ssl = False
config.api_client = ApiClient(host=config.host)
config.debug = False
config.logger_format = LOGFORMAT
for key, elem in config.logger.iteritems():
    elem.setLevel(LOGLEVELS[LOGGER_LVL])
Ejemplo n.º 4
0
    },
    'glance': {
        'os_username': '******',
        'os_password': '******',
        'os_auth_url': 'localhost:5000/v2.0',
        'glance_url': 'http://localhost:9292',
        'os_tenant_name': 'admin',
        'insecure': False
    }
}

try:
    with open("config/config.yml", 'r') as ymlfile:
        config = yaml.load(ymlfile)
except Exception as err:
    print ('failed to read config file: {0}'.format(err))

logging.basicConfig(level=LOGLEVELS[config['shovel']['logLevel']], format=LOGFORMAT)

# RackHD

rackhd = config['rackhd']
rackhd_config = Configuration()
rackhd_config.host = rackhd['host'] + ':' + str(rackhd['port']) + '/' + rackhd['api']
rackhd_config.verify_ssl = rackhd['verify_ssl']
rackhd_config.api_client = ApiClient(host=rackhd_config.host)
rackhd_config.debug = rackhd['debug']