Пример #1
0
def main():
    service.prepare_service(sys.argv)
    if CONF.action.name == 'create-app-overrides':
        if not CONF.action.path:
            LOG.error("overrides path is required")
        elif not CONF.action.app_name:
            LOG.error("application name is required")
        else:
            CONF.action.func(CONF.action.path,
                             CONF.action.app_name,
                             CONF.action.namespace)
    elif CONF.action.name == 'create-armada-app-overrides':
        if not CONF.action.path:
            LOG.error("overrides path is required")
        elif not CONF.action.app_name:
            LOG.error("application name is required")
        else:
            CONF.action.func(CONF.action.path,
                             CONF.action.app_name,
                             CONF.action.namespace)
    elif CONF.action.name == 'create-chart-overrides':
        try:
            CONF.action.func(CONF.action.path,
                             CONF.action.chart_name,
                             CONF.action.namespace)
        except Exception as e:
            print(e)
Пример #2
0
def main():
    if sanity_coverage.flag_file_exists():
        sanity_coverage.start()
    # Pase config file and command line options, then start logging
    sysinv_service.prepare_service(sys.argv)

    mgr = manager.ConductorManager(CONF.host, manager.MANAGER_TOPIC)
    launcher = service.launch(mgr)
    launcher.wait()
Пример #3
0
def main():
    if sanity_coverage.flag_file_exists():
        sanity_coverage.start()
    # Parse config file and command line options, then start logging
    sysinv_service.prepare_service(sys.argv)

    # beware: connection is based upon host and MANAGER_TOPIC
    mgr = manager.FpgaAgentManager(CONF.host, manager.MANAGER_TOPIC)
    launcher = service.launch(mgr)
    launcher.wait()
Пример #4
0
def main():
    # Parse config file and command line options, then start logging
    service.prepare_service(sys.argv)

    if CONF.action.name in ['update_controller_state']:
        msg = (_("Called '%(action)s'") % {"action": CONF.action.name})
        LOG.info(msg)
        CONF.action.func()
    else:
        LOG.error(
            _("Unknown action: %(action)") % {"action": CONF.action.name})
Пример #5
0
def main():
    if sanity_coverage.flag_file_exists():
        sanity_coverage.start()
    # Parse config file and command line options
    sysinv_service.prepare_service(sys.argv)

    launcher_api = sysinv_api()
    launcher_pxe = sysinv_pxe()

    launcher_api.wait()
    if launcher_pxe:
        launcher_pxe.wait()
Пример #6
0
def main():
    service.prepare_service(sys.argv)
    if CONF.action.name == 'create-app-overrides':

        CONF.action.func(CONF.action.path, CONF.action.app_name,
                         CONF.action.namespace)
    elif CONF.action.name == 'create-armada-app-overrides':
        CONF.action.func(CONF.action.path, CONF.action.app_name,
                         CONF.action.namespace)
    elif CONF.action.name == 'create-chart-overrides':
        try:
            CONF.action.func(CONF.action.path, CONF.action.chart_name,
                             CONF.action.namespace)
        except Exception as e:
            print(e)
Пример #7
0
def main():
    service.prepare_service(sys.argv)

    if CONF.action.name == 'create-host-overrides':
        if not CONF.action.filename:
            LOG.error("filename is required")
        else:
            CONF.action.func(CONF.action.filename)
    elif CONF.action.name == 'local-registry-list':
        if not CONF.action.filename:
            LOG.error("filename is required")
        else:
            CONF.action.func(CONF.action.filename, CONF.action.apps, CONF.action.all_apps)
    else:
        CONF.action.func()
Пример #8
0
def main():
    service.prepare_service(sys.argv)

    if CONF.action.name == 'create-host-overrides':
        if not CONF.action.filename:
            LOG.error("filename is required")
        else:
            CONF.action.func(CONF.action.filename)
    elif CONF.action.name == 'local-registry-list':
        if not CONF.action.filename:
            LOG.error("filename is required")
        else:
            CONF.action.func(CONF.action.filename, CONF.action.apps,
                             CONF.action.all_apps)
    elif CONF.action.name == 'notify':
        success = NOTIFICATION_ACTION_SUCCESS_VALUES[CONF.action.success]
        CONF.action.func(CONF.action.operation, success)
    else:
        CONF.action.func()
def main():
    # Parse config file and command line options, then start logging
    # The mac is to be truncated to 17 characters, which is the proper
    # length of a mac address, in order to handle IPv6 where a DUID
    # is provided instead of a mac address.  The truncated DUID is
    # then equivalent to the mac address.
    sysinv_service.prepare_service(sys.argv)

    LOG = log.getLogger(__name__)

    if CONF.action.name in ['add', 'del', 'old']:
        msg = (_("Called '%(action)s' for mac '%(mac)s' with ip '%(ip)s'") % {
            "action": CONF.action.name,
            "mac": CONF.action.mac[-17:],
            "ip": CONF.action.ip
        })
        LOG.info(msg)
        CONF.action.func(CONF.action.mac[-17:], CONF.action.ip)
    else:
        LOG.error(
            _("Unknown action: %(action)") % {"action": CONF.action.name})
Пример #10
0
def main():
    service.prepare_service(sys.argv)
    if CONF.action.name == 'create-host-config':
        CONF.action.func(CONF.action.path, CONF.action.hostname)
    else:
        CONF.action.func(CONF.action.path)
Пример #11
0
def main():
    service.prepare_service(sys.argv)
    migration.db_sync()