<s> import logging <EOL> from openstackclient . common import utils <EOL> LOG = logging . getLogger ( __name__ ) <EOL> DEFAULT_WORKFLOW_API_VERSION = '<STR_LIT:2>' <EOL> API_VERSION_OPTION = '<STR_LIT>' <EOL> API_NAME = '<STR_LIT>' <EOL> API_VERSIONS = { <EOL> '<STR_LIT:2>' : '<STR_LIT>' , <EOL> } <EOL> def make_client ( instance ) : <EOL> """<STR_LIT>""" <EOL> version = instance . _api_version [ API_NAME ] <EOL> workflow_client = utils . get_client_class ( <EOL> API_NAME , <EOL> version , <EOL> API_VERSIONS ) <EOL> LOG . debug ( '<STR_LIT>' , workflow_client ) <EOL> if not instance . _url : <EOL> instance . _url = instance . get_endpoint_for_service_type ( <EOL> '<STR_LIT>' , <EOL> interface = '<STR_LIT>' <EOL> ) <EOL> client = workflow_client ( <EOL> mistral_url = instance . _url , <EOL> auth_token = instance . auth_ref . auth_token , <EOL> project_id = instance . auth_ref . project_id , <EOL> user_id = instance . auth_ref . user_id , <EOL> ) <EOL> return client <EOL> def build_option_parser ( parser ) : <EOL> """<STR_LIT>""" <EOL> parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> metavar = '<STR_LIT>' , <EOL> default = utils . env ( <EOL> '<STR_LIT>' , <EOL> default = DEFAULT_WORKFLOW_API_VERSION ) , <EOL> help = '<STR_LIT>' + <EOL> DEFAULT_WORKFLOW_API_VERSION + <EOL> '<STR_LIT>' ) <EOL> return parser </s>
