Пример #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
Пример #2
0
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

import argparse
import os
import sys
import tempfile

import vbmc4vsphere
from vbmc4vsphere import config as vbmc_config
from vbmc4vsphere import control, log, utils

LOG = log.get_logger()

CONF = vbmc_config.get_config()


def main(argv=sys.argv[1:]):
    parser = argparse.ArgumentParser(
        prog="VirtualBMC server",
        description="A virtual BMC server for controlling virtual instances",
    )
    parser.add_argument("--version",
                        action="version",
                        version=vbmc4vsphere.__version__)
    parser.add_argument("--foreground",
                        action="store_true",
                        default=False,
                        help="Do not daemonize")