def _api_version(profile=None, **connection_args):
 global _TENANT_ID
 global _OS_IDENTITY_API_VERSION
 try:
  if (float(__salt__['keystone.api_version'](profile=profile, **connection_args).strip('v')) >= 3):
   _TENANT_ID = 'project_id'
   _OS_IDENTITY_API_VERSION = 3
 except KeyError:
  pass

def _api_version ( profile = None , ** connection_args ) : global _TENANT_ID global _OS_IDENTITY_API_VERSION try : if ( float ( __salt__ [ 'keystone.api_version' ] ( profile = profile , ** connection_args ) . strip ( 'v' ) ) >= 3 ) : _TENANT_ID = 'project_id' _OS_IDENTITY_API_VERSION = 3 except KeyError : pass
sets global variables _os_identity_api_version and _tenant_id depending on api version .