def extra_option_checks():

    if not CONF.database.connection:
        print("No database connection string was specified in configuration",
              file=sys.stderr)
        sys.exit(1)

    if CONF.command.name in ['update', 'delete']:
        if CONF.command.plugin_version and not CONF.command.plugin_name:
            print("The --plugin-version option is not valid "
                  "without --plugin-name", file=sys.stderr)
            sys.exit(-1)

    if CONF.command.name == "update":
        # Options handling probably needs some refactoring in the future.
        # For now, though, we touch the conductor which ultimately touches
        # the plugins.base. Use the "plugins" option there as a default
        # list of plugins to process, since those are the plugins that
        # will be loaded by Sahara
        if not CONF.command.plugin_name:
            if "plugins" in CONF and CONF.plugins:
                LOG.info(_LI("Using plugin list {plugins} from config"
                             ).format(plugins=CONF.plugins))
            else:
                print("No plugins specified with --plugin-name "
                      "or config", file=sys.stderr)
                sys.exit(-1)
dataset/ETHPy150Open openstack/sahara/sahara/db/templates/cli.py/extra_option_checks/original