def _auth(profile=None): ''' Set up neutron credentials ''' if profile: credentials = __salt__['config.option'](profile) user = credentials['keystone.user'] password = credentials['keystone.password'] tenant = credentials['keystone.tenant'] auth_url = credentials['keystone.auth_url'] region_name = credentials.get('keystone.region_name', None) service_type = credentials['keystone.service_type'] else: user = __salt__['config.option']('keystone.user') password = __salt__['config.option']('keystone.password') tenant = __salt__['config.option']('keystone.tenant') auth_url = __salt__['config.option']('keystone.auth_url') region_name = __salt__['config.option']('keystone.region_name') service_type = __salt__['config.option']('keystone.service_type') kwargs = { 'username': user, 'password': password, 'tenant_name': tenant, 'auth_url': auth_url, 'region_name': region_name, 'service_type': service_type } return suoneu.SaltNeutron(**kwargs)
def _auth(profile=None): """ Set up neutron credentials """ if profile: credentials = __salt__["config.option"](profile) user = credentials["keystone.user"] password = credentials["keystone.password"] tenant = credentials["keystone.tenant"] auth_url = credentials["keystone.auth_url"] region_name = credentials.get("keystone.region_name", None) service_type = credentials.get("keystone.service_type", "network") os_auth_system = credentials.get("keystone.os_auth_system", None) use_keystoneauth = credentials.get("keystone.use_keystoneauth", False) verify = credentials.get("keystone.verify", True) else: user = __salt__["config.option"]("keystone.user") password = __salt__["config.option"]("keystone.password") tenant = __salt__["config.option"]("keystone.tenant") auth_url = __salt__["config.option"]("keystone.auth_url") region_name = __salt__["config.option"]("keystone.region_name") service_type = __salt__["config.option"]("keystone.service_type") os_auth_system = __salt__["config.option"]("keystone.os_auth_system") use_keystoneauth = __salt__["config.option"]( "keystone.use_keystoneauth") verify = __salt__["config.option"]("keystone.verify") if use_keystoneauth is True: project_domain_name = credentials["keystone.project_domain_name"] user_domain_name = credentials["keystone.user_domain_name"] kwargs = { "username": user, "password": password, "tenant_name": tenant, "auth_url": auth_url, "region_name": region_name, "service_type": service_type, "os_auth_plugin": os_auth_system, "use_keystoneauth": use_keystoneauth, "verify": verify, "project_domain_name": project_domain_name, "user_domain_name": user_domain_name, } else: kwargs = { "username": user, "password": password, "tenant_name": tenant, "auth_url": auth_url, "region_name": region_name, "service_type": service_type, "os_auth_plugin": os_auth_system, } return suoneu.SaltNeutron(**kwargs)
def _auth(profile=None): ''' Set up neutron credentials ''' if profile: credentials = __salt__['config.option'](profile) user = credentials['keystone.user'] password = credentials['keystone.password'] tenant = credentials['keystone.tenant'] auth_url = credentials['keystone.auth_url'] region_name = credentials.get('keystone.region_name', None) service_type = credentials.get('keystone.service_type', 'network') os_auth_system = credentials.get('keystone.os_auth_system', None) use_keystoneauth = credentials.get('keystone.use_keystoneauth', False) verify = credentials.get('keystone.verify', True) else: user = __salt__['config.option']('keystone.user') password = __salt__['config.option']('keystone.password') tenant = __salt__['config.option']('keystone.tenant') auth_url = __salt__['config.option']('keystone.auth_url') region_name = __salt__['config.option']('keystone.region_name') service_type = __salt__['config.option']('keystone.service_type') os_auth_system = __salt__['config.option']('keystone.os_auth_system') use_keystoneauth = __salt__['config.option']( 'keystone.use_keystoneauth') verify = __salt__['config.option']('keystone.verify') if use_keystoneauth is True: project_domain_name = credentials['keystone.project_domain_name'] user_domain_name = credentials['keystone.user_domain_name'] kwargs = { 'username': user, 'password': password, 'tenant_name': tenant, 'auth_url': auth_url, 'region_name': region_name, 'service_type': service_type, 'os_auth_plugin': os_auth_system, 'use_keystoneauth': use_keystoneauth, 'verify': verify, 'project_domain_name': project_domain_name, 'user_domain_name': user_domain_name } else: kwargs = { 'username': user, 'password': password, 'tenant_name': tenant, 'auth_url': auth_url, 'region_name': region_name, 'service_type': service_type, 'os_auth_plugin': os_auth_system } return suoneu.SaltNeutron(**kwargs)
def _auth(profile=None): ''' Set up neutron credentials ''' credentials = __salt__['config.option'](profile) kwargs = { 'username': credentials['keystone.user'], 'password': credentials['keystone.password'], 'tenant_name': credentials['keystone.tenant'], 'auth_url': credentials['keystone.auth_url'], 'region_name': credentials.get('keystone.region_name', None), 'service_type': credentials['keystone.service_type'], } return suoneu.SaltNeutron(**kwargs)
def _auth(profile=None): """ Set up neutron credentials """ credentials = __salt__["config.option"](profile) kwargs = { "username": credentials["keystone.user"], "password": credentials["keystone.password"], "tenant_name": credentials["keystone.tenant"], "auth_url": credentials["keystone.auth_url"], "region_name": credentials.get("keystone.region_name", None), "service_type": credentials["keystone.service_type"], } return suoneu.SaltNeutron(**kwargs)