Ejemplo n.º 1
0
def get_logger():
    global LOGGER
    if LOGGER is None:
        log_conf = config.get_config()['log']
        LOGGER = VirtualBMCLogger(debug=log_conf['debug'],
                                  logfile=log_conf['logfile'])

    return LOGGER
Ejemplo n.º 2
0
def get_logger():
    global LOGGER
    if LOGGER is None:
        log_conf = config.get_config()['log']
        LOGGER = VirtualBMCLogger(debug=log_conf['debug'],
                                  logfile=log_conf['logfile'])

    return LOGGER
Ejemplo n.º 3
0
import time

from cliff.app import App
from cliff.command import Command
from cliff.commandmanager import CommandManager
from cliff.lister import Lister

import zmq

import virtualbmc
from virtualbmc.cmd import vbmcd
from virtualbmc import config as vbmc_config
from virtualbmc.exception import VirtualBMCError
from virtualbmc import log

CONF = vbmc_config.get_config()

LOG = log.get_logger()


class ZmqClient(object):
    """Client part of the VirtualBMC system.

    The command-line client tool communicates with the server part
    of the VirtualBMC system by exchanging JSON-encoded messages.

    Client builds requests out of its command-line options which
    include the command (e.g. `start`, `list` etc) and command-specific
    options.

    Server response is a JSON document which contains at least the