

def setup(self, api_version='1.1'):
    from novaclient import client
    (options, args) = self.nova.parser.parse_known_args(self.base_argv)
    if options.help:
        options.command = None
        self.nova.do_help(options)
        sys.exit(2)
    auth_token = None
    if (options.os_auth_token and options.os_endpoint):
        auth_token = options.os_auth_token
    if options.os_compute_api_version:
        api_version = options.os_compute_api_version
    client = client.get_client_class(api_version)(options.os_username, options.os_password, options.os_tenant_name, tenant_id=options.os_tenant_id, auth_token=auth_token, auth_url=options.os_auth_url, region_name=options.os_region_name, cacert=options.os_cacert, insecure=options.insecure, timeout=options.timeout)
    return (options, api_version, client)

dataset/ETHPy150Open openstack/monitoring-for-openstack/oschecks/utils.py Nova.setup/VarMisuse@172/232 `args`->`api_version`