Adds SSL termination information to the load balancer. If SSL
        termination has already been configured, it is updated with the
        supplied settings.
549708
def add_ssl_termination(self, securePort, privatekey, certificate,
            intermediateCertificate=None, enabled=True,
            secureTrafficOnly=False):
        
        return self.manager.add_ssl_termination(self, securePort=securePort,
                privatekey=privatekey, certificate=certificate,
                intermediateCertificate=intermediateCertificate,
                enabled=enabled, secureTrafficOnly=secureTrafficOnly)
807380
def update(self, lb, name=None, algorithm=None, protocol=None,
            halfClosed=None, port=None, timeout=None, httpsRedirect=None):
        
        body = {}
        if name is not None:
            body["name"] = name
        if algorithm is not None:
            body["algorithm"] = algorithm
        if protocol is not None:
            body["protocol"] = protocol
        if halfClosed is not None:
            body["halfClosed"] = halfClosed
        if port is not None:
            body["port"] = port
        if timeout is not None:
            body["timeout"] = timeout
        if httpsRedirect is not None:
            body["httpsRedirect"] = httpsRedirect
        if not body:
            # Nothing passed
            return
        body = {"loadBalancer": body}
        uri = "/loadbalancers/%s" % utils.get_id(lb)
        try:
            resp, resp_body = self.api.method_put(uri, body=body)
        except exc.ClientException as e:
            message = e.message
            details = e.details
            if message and details:
                errmsg = "%s - %s" % (message, details)
            else:
                errmsg = message
            raise exc.InvalidLoadBalancerParameters(errmsg)
        return resp, resp_body
560336
def register_ssl_context(self):
        
        if not empty('ssl', self.config['app']):
            self.ssl_context = self.config['app']['ssl']
        else:
            self.ssl_context = None
764370
public OperationFuture<LoadBalancerPool> update(LoadBalancerPool loadBalancerPool, LoadBalancerPoolConfig config) {
        LoadBalancerPoolMetadata loadBalancerPoolMetadata = findByRef(loadBalancerPool);

        loadBalancerPoolClient.update(
            loadBalancerPoolMetadata.getDataCenterId(),
            loadBalancerPoolMetadata.getLoadBalancerId(),
            loadBalancerPoolMetadata.getId(),
            new LoadBalancerPoolRequest()
                .method(config.getMethod())
                .persistence(config.getPersistence())
        );

        return new OperationFuture<>(
            loadBalancerPool,
            addLoadBalancerNodes(config, loadBalancerPool)
        );
    }
1245234
def update(self, loadbalancer, name=None, algorithm=None, protocol=None,
            halfClosed=None, port=None, timeout=None, httpsRedirect=None):
        
        return self._manager.update(loadbalancer, name=name,
                algorithm=algorithm, protocol=protocol, halfClosed=halfClosed,
                port=port, timeout=timeout, httpsRedirect=httpsRedirect)
903547
public synchronized void addSSLConfigToMap(String alias, SSLConfig sslConfig) throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "addSSLConfigToMap: alias=" + alias);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, sslConfig.toString());
        }

        if (sslConfigMap.containsKey(alias)) {
            sslConfigMap.remove(alias);
            outboundSSL.removeDynamicSelectionsWithSSLConfig(alias);
        }

        if (validationEnabled())
            sslConfig.validateSSLConfig();

        sslConfigMap.put(alias, sslConfig);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "addSSLConfigToMap");

    }
1269792
def update_metadata(self, loadbalancer, metadata, node=None):
        
        # Get the existing metadata
        md = self.get_metadata(loadbalancer, raw=True)
        id_lookup = dict([(itm["key"], itm["id"]) for itm in md])
        metadata_list = []
        # Updates must be done individually
        for key, val in metadata.items():
            try:
                meta_id = id_lookup[key]
                if node:
                    uri = "/loadbalancers/%s/nodes/%s/metadata/%s" % (
                            utils.get_id(loadbalancer), utils.get_id(node),
                            meta_id)
                else:
                    uri = "/loadbalancers/%s/metadata" % utils.get_id(loadbalancer)
                req_body = {"meta": {"value": val}}
                resp, body = self.api.method_put(uri, body=req_body)
            except KeyError:
                # Not an existing key; add to metadata_list
                metadata_list.append({"key": key, "value": val})
        if metadata_list:
            # New items; POST them
            if node:
                uri = "/loadbalancers/%s/nodes/%s/metadata" % (
                        utils.get_id(loadbalancer), utils.get_id(node))
            else:
                uri = "/loadbalancers/%s/metadata" % utils.get_id(loadbalancer)
            req_body = {"metadata": metadata_list}
            resp, body = self.api.method_post(uri, body=req_body)
1349390
private void configureTLS(URL url, URLConnection conn) {
        if ("https".equals(url.getProtocol())) {
            try {
                final HttpsURLConnection secCon = (HttpsURLConnection) conn;
                final SSLSocketFactoryEx factory = new SSLSocketFactoryEx(settings);
                secCon.setSSLSocketFactory(factory);
            } catch (NoSuchAlgorithmException ex) {
                LOGGER.debug("Unsupported algorithm in SSLSocketFactoryEx", ex);
            } catch (KeyManagementException ex) {
                LOGGER.debug("Key management exception in SSLSocketFactoryEx", ex);
            }
        }
    }
1301803
def cli(env, identifier, allocation, port, routing_type, routing_method):
    """"""

    mgr = SoftLayer.LoadBalancerManager(env.client)

    _, loadbal_id = loadbal.parse_id(identifier)

    mgr.add_service_group(loadbal_id,
                          allocation=allocation,
                          port=port,
                          routing_type=routing_type,
                          routing_method=routing_method)

    env.fout('Load balancer service group is being added!')
1066995
private void addShutdownHook() {
    ServiceManager manager = this.serviceManager;
    Runtime.getRuntime().addShutdownHook(new Thread() {
      public void run() {
        // Give the services 5 seconds to stop to ensure that we are responsive to shutdown
        // requests.
        try {
          manager.stopAsync().awaitStopped(5, TimeUnit.SECONDS);
        } catch (TimeoutException timeout) {
          // stopping timed out
        }
      }
    });
  }
712178
public void finalizeConfig() {
        // See if not set by configuration, if there are defaults
        // in order from the Endpoint, Service, or Bus.

        configureConduitFromEndpointInfo(this, endpointInfo);
        logConfig();

        if (getClient().getDecoupledEndpoint() != null) {
            this.endpointInfo.setProperty("org.apache.cxf.ws.addressing.replyto",
                                          getClient().getDecoupledEndpoint());
        }
    }
702361
static void addToRecentConnectionSettings(Hashtable settings,
            ConnectionSetting newSetting) throws IOException {
        settings.put(newSetting.getName(), newSetting);
        ConnectionDialogCommon.storeRecentConnectionSettings(settings);
    }
782658
def cli(env, identifier):
    """"""
    mgr = SoftLayer.LoadBalancerManager(env.client)

    loadbal_id, group_id = loadbal.parse_id(identifier)

    mgr.reset_service_group(loadbal_id, group_id)
    env.fout('Load balancer service group connections are being reset!')
802001
private void addLoadBalancerListener() {
        if (!(lbContext.getLoadBalancer() instanceof BaseLoadBalancer)) {
            return;
        }
        
        ((BaseLoadBalancer) lbContext.getLoadBalancer()).addServerListChangeListener(new ServerListChangeListener() {
            @Override
            public void serverListChanged(List<Server> oldList, List<Server> newList) {
                Set<Server> removedServers = new HashSet<Server>(oldList);
                removedServers.removeAll(newList);
                for (Server server: rxClientCache.keySet()) {
                    if (removedServers.contains(server)) {
                        // this server is no longer in UP status
                        removeClient(server);
                    }
                }
            }
        });
    }
23125
function addUserSSLConfig(config) {
  if (config.https === true) {
    try {
      config.https = {
        cert: readFileSync(getSSLPath(config.host, SERVER_CERT_FILENAME)),
        key: readFileSync(getSSLPath(config.host, SERVER_KEY_FILENAME))
      };
    } catch (e) {}
  }

  return config;
}
660845
synchronized static void setFactoryImplementation() {
        if (initialized)
            return;
        initialized = true;
        String authConfigProvider = Security.getProperty(AuthConfigFactory.DEFAULT_FACTORY_SECURITY_PROPERTY);
        if (authConfigProvider == null || authConfigProvider.isEmpty()) {
            Tr.info(tc, "JASPI_DEFAULT_AUTH_CONFIG_FACTORY", new Object[] { JASPI_PROVIDER_REGISTRY });
            Security.setProperty(AuthConfigFactory.DEFAULT_FACTORY_SECURITY_PROPERTY, JASPI_PROVIDER_REGISTRY);
        } else if (!authConfigProvider.equals(JASPI_PROVIDER_REGISTRY)) {
            Tr.info(tc, "JASPI_AUTH_CONFIG_FACTORY", new Object[] { authConfigProvider });
        }
    }
733459
private static SslHandler configureSslHandler(SslHandler sslHandler) {
        // Set endpoint identification algorithm so that JDK's default X509TrustManager implementation
        // performs host name checks. Without this, the X509TrustManager implementation will never raise
        // a CertificateException even if the domain name or IP address mismatches.
        final SSLEngine engine = sslHandler.engine();
        final SSLParameters params = engine.getSSLParameters();
        params.setEndpointIdentificationAlgorithm("HTTPS");
        engine.setSSLParameters(params);
        return sslHandler;
    }