def connect_to_cloud_loadbalancers(region=None): """Creates a client for working with cloud loadbalancers.""" region = safe_region(region) ep = _get_service_endpoint("load_balancer", region) cloud_loadbalancers = CloudLoadBalancerClient(identity.username, identity.api_key, region_name=region, management_url=ep, auth_token=identity.token, http_log_debug=_http_debug, tenant_id=identity.tenant_id, service_type="rax:load-balancer") cloud_loadbalancers.user_agent = _make_agent_name(cloud_loadbalancers.user_agent) return cloud_loadbalancers
def connect_to_cloud_loadbalancers(region=None): """Creates a client for working with cloud loadbalancers.""" region = _safe_region(region) ep = _get_service_endpoint("load_balancer", region) cloud_loadbalancers = CloudLoadBalancerClient(region_name=region, management_url=ep, http_log_debug=_http_debug, service_type="rax:load-balancer") agt = cloud_loadbalancers.user_agent cloud_loadbalancers.user_agent = _make_agent_name(agt) return cloud_loadbalancers