Set the ports on this cloud.

        :param ports: ports info
172553
def ports_mapping(self, ports):
        

        if ports != self._ports_mapping:
            if len(self._nios) > 0:
                raise NodeError("Can't modify a cloud already connected.")

            port_number = 0
            for port in ports:
                port["port_number"] = port_number
                port_number += 1

            self._ports_mapping = ports
1139360
public AerospikeDeepJobConfig<T> port(Integer[] ports) {
        this.portList.addAll(Arrays.asList(ports));
        return this;
    }
1263936
def create(self, port, qos_policy):
        
        LOG.info("Setting QoS policy %(qos_policy)s on port %(port)s",
                 dict(qos_policy=qos_policy, port=port))

        policy_data = self._get_policy_values(qos_policy)
        self._utils.set_port_qos_rule(port["port_id"], policy_data)
489466
def _log_board_ports(self, ports):
        
        ports = sorted(ports, key=lambda port: (port.tile_id, port.direction))
        self._logln('ports: {0}'.format(' '.join('{}({} {})'.format(p.type.value, p.tile_id, p.direction)
                                                for p in ports)))
773180
def update_subports(self, port):
        
        trunk_details = port.get('trunk_details')
        subports = trunk_details['sub_ports']

        host_id = port.get(bc.dns.DNSNAME)
        context = bc.get_context()
        el_context = context.elevated()

        for subport in subports:
            bc.get_plugin().update_port(el_context, subport['port_id'],
                {'port':
                 {bc.portbindings.HOST_ID: host_id,
                  'device_owner': bc.trunk_consts.TRUNK_SUBPORT_OWNER}})

        # Set trunk to ACTIVE status.
        trunk_obj = bc.trunk_objects.Trunk.get_object(
            el_context, id=trunk_details['trunk_id'])
        trunk_obj.update(status=bc.trunk_consts.ACTIVE_STATUS)
338994
def stop_transmit(self, *ports):
        

        port_list = self.set_ports_list(*ports)
        self.api.call_rc('ixStopTransmit {}'.format(port_list))
        time.sleep(0.2)
678801
public void setConnections(java.util.Collection<Connection> connections) {
        if (connections == null) {
            this.connections = null;
            return;
        }

        this.connections = new java.util.ArrayList<Connection>(connections);
    }
477620
def set_aws_clients(self, clients):
    
    if type(clients) is not dict:
      raise TypeError("clients must be a dict")
    self._aws_clients = clients
264497
def set_address(self, host, port):
        """"""
        self.host = host
        self.port = port
554506
def add_port(self, port):
        
        self.ports.append(port)
        if port.io_type not in self.port_seqs:
            self.port_seqs[port.io_type] = 0
        self.port_seqs[port.io_type] += 1
        port.sequence = self.port_seqs[port.io_type]
        return self
604063
def local_bind_ports(self):
        
        self._check_is_started()
        return [_server.local_port for _server in self._server_list if
                _server.local_port is not None]
1305064
def add_trunk_ports(self):
        
        ports = self.attributes.get("{}Enable Full Trunk Ports".format(self.namespace_prefix), None)
        return self._parse_ports(ports=ports)
604438
def set_rtscts(self, enable):
        ''''''
        try:
            self.port.setRtsCts(enable)
        except Exception:
            self.port.rtscts = enable
        self.rtscts = enable
359750
def metadata_ports_to_k8s_ports(ports):
    

    exposed_ports = []

    for port in ports:
        splits = port.split("/", 1)
        port = int(splits[0])
        protocol = splits[1].upper() if len(splits) > 1 else None
        exposed_ports.append(client.V1ServicePort(port=port, protocol=protocol))

    return exposed_ports
727893
def open_ports(start, end, protocol="TCP"):
    """"""
    _args = ['open-port']
    _args.append('{}-{}/{}'.format(start, end, protocol))
    subprocess.check_call(_args)
1108304
public void setPort(int port) {
    options.get(PORT).setValue(PORT.sanitize(String.valueOf(port)));
  }
81316
def setlocation(self, url, names=None):
        
        for p in self.ports:
            for m in p.methods.values():
                if names is None or m.name in names:
                    m.location = url