Method to update asns

        :param asns: List containing asns desired to updated
        :return: None
433487
def update(self, asns):
        

        data = {'asns': asns}
        asns_ids = [str(env.get('id')) for env in asns]

        return super(ApiV4As, self).put('api/v4/as/%s/' %
                                               ';'.join(asns_ids), data)
16993
def _update(self, **kwargs):
        
        updated = False
        if 'proxy_server' in kwargs:
            proxy_server = kwargs.get('proxy_server')
            if not proxy_server and self._inspected_service_ref:
                self.protocol_agent_values.pop('inspected_service_ref', None)
                updated = True
            elif isinstance(proxy_server, ProxyServer):
                # Need the inspected service reference for the protocol
                enabled_services = {svc.name:svc.href for svc in proxy_server.inspected_services}
                
                if self.protocol_agent.name not in enabled_services:
                    raise MissingDependency('The specified ProxyServer %r does not enable '
                        'the required protocol %s' % (proxy_server.name, self.protocol_agent.name))
                
                if self._inspected_service_ref != enabled_services.get(self.protocol_agent.name):
                    self.protocol_agent_values['inspected_service_ref'] = enabled_services.get(
                        self.protocol_agent.name)
                    updated = True
        return updated
812675
def _update(self, datapoints):
        
        if len(datapoints) == 1:
            timestamp, value = datapoints[0]
            whisper.update(self.path, value, timestamp)
        else:
            whisper.update_many(self.path, datapoints)
1168096
def update_nsval(
        self, *, nsval: str = None, ns: str = None, val: str = None
    ) -> None:
        

        if not (ns and val) and nsval:
            (ns, val) = nsval.split(":", 1)
        elif not (ns and val) and not nsval:
            log.error("Did not update NSArg - no ns:val or nsval provided")

        self.namespace = ns
        self.value = val
453240
def update(self, environments):
        

        data = {'environments': environments}
        environments_ids = [str(env.get('id')) for env in environments]

        return super(ApiEnvironment, self).put('api/v3/environment/%s/' %
                                               ';'.join(environments_ids), data)
1084605
def update(self, friendly_name=values.unset):
        
        return self._proxy.update(friendly_name=friendly_name, )
1079785
def update(sc, filename, asset_id):
    '''
    
    '''
    addresses = []
    with open(filename) as hostfile:
        for line in hostfile.readlines():
            addresses.append(line.strip('\n'))
    sc.asset_update(asset_id, dns=addresses)
800118
def update(self, interfaces=None):
        

        data = {'interfaces': interfaces}

        return super(ApiInterfaceRequest, self).put('api/v3/interface/', data)
236902
def update_subnet(self, subnet, name=None):
        '''
        
        '''
        subnet_id = self._find_subnet_id(subnet)
        return self.network_conn.update_subnet(
            subnet=subnet_id, body={'subnet': {'name': name}})
967497
def server_update(
    endpoint_id,
    server_id,
    subject,
    port,
    scheme,
    hostname,
    incoming_data_ports,
    outgoing_data_ports,
):
    
    client = get_client()

    server_doc = assemble_generic_doc(
        "server", subject=subject, port=port, scheme=scheme, hostname=hostname
    )

    # n.b. must be done after assemble_generic_doc(), as that function filters
    # out `None`s, which we need to be able to set for `'unspecified'`
    if incoming_data_ports:
        server_doc.update(
            incoming_data_port_start=incoming_data_ports[0],
            incoming_data_port_end=incoming_data_ports[1],
        )
    if outgoing_data_ports:
        server_doc.update(
            outgoing_data_port_start=outgoing_data_ports[0],
            outgoing_data_port_end=outgoing_data_ports[1],
        )

    res = client.update_endpoint_server(endpoint_id, server_id, server_doc)
    formatted_print(res, text_format=FORMAT_TEXT_RAW, response_key="message")
1303442
def _update(self, data: TransDict, *args, **kwargs):
        

        for l in self.listeners:
            l(data, *args, **kwargs)
550457
def update_dns(config, record, sa_version):
    ""
    try:
        domain = config.get('domain_name', 'sa.baruwa.com.')
        dns_key = config.get('domain_key')
        dns_ip = config.get('domain_ip', '127.0.0.1')
        keyring = tsigkeyring.from_text({domain: dns_key})
        transaction = update.Update(
            domain,
            keyring=keyring,
            keyalgorithm=tsig.HMAC_SHA512)
        txtrecord = '%s.%s' % (sa_version, domain)
        transaction.replace(txtrecord, 120, 'txt', record)
        query.tcp(transaction, dns_ip)
        return True
    except DNSException, msg:
        raise SaChannelUpdateDNSError(msg)
1243418
def update(self):
        
        self.frontends = []
        self.backends = []
        self.listeners = []

        csv = [ l for l in self._fetch().strip(' #').split('\n') if l ]
        if self.failed:
            return

        #read fields header to create keys
        self.fields = [ f for f in csv.pop(0).split(',') if f ]
    
        #add frontends and backends first
        for line in csv:
            service = HAProxyService(self.fields, line.split(','), self.name)

            if service.svname == 'FRONTEND':
                self.frontends.append(service)
            elif service.svname == 'BACKEND':
                service.listeners = []
                self.backends.append(service)
            else:
                self.listeners.append(service)
    
        #now add listener  names to corresponding backends
        for listener in self.listeners:
            for backend in self.backends:
                if backend.iid == listener.iid:
                    backend.listeners.append(listener)

        self.last_update = datetime.utcnow()
672268
def _update(self, **kwargs):
        
        if 'value' in kwargs and self.protocol_agent_values.get('value') != \
            kwargs.get('value'):
            self.protocol_agent_values.update(value=kwargs['value'])
            return True
        return False
415356
def _update_rs_with_primary_from_member(
        sds,
        replica_set_name,
        server_description):
    
    assert replica_set_name is not None

    if replica_set_name != server_description.replica_set_name:
        sds.pop(server_description.address)
    elif (server_description.me and
          server_description.address != server_description.me):
        sds.pop(server_description.address)

    # Had this member been the primary?
    return _check_has_primary(sds)
670535
def servers_update_addresses(request, servers, all_tenants=False):
    

    # NOTE(e0ne): we don't need to call neutron if we have no instances
    if not servers:
        return

    # Get all (filtered for relevant servers) information from Neutron
    try:
        # NOTE(e0ne): we need tuple here to work with @memoized decorator.
        # @memoized works with hashable arguments only.
        ports = list_resources_with_long_filters(
            port_list, 'device_id',
            tuple([instance.id for instance in servers]),
            request=request)
        fips = FloatingIpManager(request)
        if fips.is_supported():
            floating_ips = list_resources_with_long_filters(
                fips.list, 'port_id', tuple([port.id for port in ports]),
                all_tenants=all_tenants)
        else:
            floating_ips = []
        # NOTE(e0ne): we need frozenset here to work with @memoized decorator.
        # @memoized works with hashable arguments only
        networks = list_resources_with_long_filters(
            network_list, 'id', frozenset([port.network_id for port in ports]),
            request=request)
    except neutron_exc.NotFound as e:
        LOG.error('Neutron resource does not exist. %s', e)
        return
    except Exception as e:
        LOG.error('Unable to connect to Neutron: %s', e)
        error_message = _('Unable to connect to Neutron.')
        messages.error(request, error_message)
        return

    # Map instance to its ports
    instances_ports = collections.defaultdict(list)
    for port in ports:
        instances_ports[port.device_id].append(port)

    # Map port to its floating ips
    ports_floating_ips = collections.defaultdict(list)
    for fip in floating_ips:
        ports_floating_ips[fip.port_id].append(fip)

    # Map network id to its name
    network_names = dict((network.id, network.name_or_id)
                         for network in networks)

    for server in servers:
        try:
            addresses = _server_get_addresses(
                request,
                server,
                instances_ports,
                ports_floating_ips,
                network_names)
        except Exception as e:
            LOG.error(six.text_type(e))
        else:
            server.addresses = addresses
1146399
def tls_session_update(self, msg_str):
        
        self.tls_session.handshake_messages.append(msg_str)
        self.tls_session.handshake_messages_parsed.append(self)