Update the network

@param networkList network list
@param config update config
@return OperationFuture wrapper for network list
519484
public OperationFuture<List<Network>> update(List<Network> networkList, UpdateNetworkConfig config) {
        networkList.forEach(network -> update(network, config));

        return new OperationFuture<>(networkList, new NoWaitingJobFuture());
    }
1067656
def update(self, callback=None, errback=None, **kwargs):
        
        if not self.data:
            raise NetworkException('Network not loaded')

        def success(result, *args):
            self.data = result
            self.id = result['id']
            self.name = result['name']
            self.report = self._rest.report(self.id)
            if callback:
                return callback(self)
            else:
                return self

        return self._rest.update(self.id, callback=success, errback=errback,
                                 **kwargs)
772746
private void handleUpdate(final NetworkContext context) {
    log.debug(String.format("%s - Network configuration updated in cluster: %s", NetworkManager.this, cluster.address()));
    log.debug(String.format("%s - Scheduling network update task", NetworkManager.this));
    tasks.runTask(new Handler<Task>() {
      @Override
      public void handle(final Task task) {
        // Any time the network is being reconfigured, unready the network.
        // This will cause components to pause during the reconfiguration.
        unready(new Handler<AsyncResult<Void>>() {
          @Override
          public void handle(AsyncResult<Void> result) {
            if (result.failed()) {
              log.error(result.cause());
              task.complete();
            } else {
              if (currentContext != null) {
                final NetworkContext runningContext = currentContext;
                currentContext = context;
                

                // We have to update all instance contexts before deploying
                // any new components in order to ensure connections are
                // available for startup.
                log.info(String.format("%s - Updating network in cluster: %s", NetworkManager.this, address));
                log.debug(String.format("%s - Network:%n%s", NetworkManager.this, currentContext.toString(true)));
                updateNetwork(currentContext, new Handler<AsyncResult<Void>>() {
                  @Override
                  public void handle(AsyncResult<Void> result) {
                    if (result.failed()) {
                      log.warn(result.cause());
                      task.complete();
                    } else {
                      undeployRemovedComponents(currentContext, runningContext, new Handler<AsyncResult<Void>>() {
                        @Override
                        public void handle(AsyncResult<Void> result) {
                          if (result.failed()) {
                            log.warn(result.cause());
                            task.complete();
                          } else {
                            deployAddedComponents(currentContext, runningContext, new Handler<AsyncResult<Void>>() {
                              @Override
                              public void handle(AsyncResult<Void> result) {
                                task.complete();
                                if (result.failed()) {
                                  log.warn(result.cause());
                                }
                              }
                            });
                          }
                        }
                      });
                    }
                  }
                });
              }
              else {
                // Just deploy the entire network if it wasn't already deployed.
                currentContext = context;
                log.info(String.format("%s - Deploying network in cluster: %s", NetworkManager.this, address));
                log.debug(String.format("%s - Network:%n%s", NetworkManager.this, currentContext.toString(true)));
                deployNetwork(context, new Handler<AsyncResult<NetworkContext>>() {
                  @Override
                  public void handle(AsyncResult<NetworkContext> result) {
                    task.complete();
                    if (result.failed()) {
                      log.warn(result.cause());
                    } else {
                      log.info(String.format("%s - Successfully deployed network", NetworkManager.this));
                    }
                  }
                });
              }
            }
          }
        });
      }
    });
  }
756348
public UpdateResponse updateFlowConfig(FlowId flowId, FlowConfig flowConfig) throws FlowConfigLoggedException {
    return updateFlowConfig(flowId, flowConfig, true);
  }
535126
public OperationFuture<List<FirewallPolicy>> update(
            List<FirewallPolicy> firewallPolicyList,
            FirewallPolicyConfig config
    ) {
        firewallPolicyList.forEach(firewallPolicy -> update(firewallPolicy, config));

        return new OperationFuture<>(
            firewallPolicyList,
            new NoWaitingJobFuture()
        );
    }
146325
public OperationFuture<Group> create(GroupConfig groupConfig) {
        checkNotNull(groupConfig, "GroupConfig must be not null");
        checkNotNull(groupConfig.getName(), "Name of GroupConfig must be not null");
        checkNotNull(groupConfig.getParentGroup(), "ParentGroup of GroupConfig must be not null");

        GroupMetadata group = client.createGroup(
                converter.createGroupRequest(groupConfig, idByRef(groupConfig.getParentGroup()),
                    groupConfig.getCustomFields() == null || groupConfig.getCustomFields().size() == 0 ?
                        null : client.getCustomFields()
                ));

        return new OperationFuture<>(
            Group.refById(group.getId()),
            new NoWaitingJobFuture()
        );
    }
469811
void reload(NetworkConfig config)
	{
		try
		{
			log.trace("Load config data from " + config.path + " into " + config);
			final ConfigPropertyData read = configService.read(config.path, configInstanceId, config.getLastRevision());

			// Abort if the server returns no config - we have the latest revision
			if (read == null || read.properties == null || read.properties.isEmpty())
				return;

			for (ConfigPropertyValue property : read.properties)
			{
				config.properties.set(property.getName(), property.getValue());
			}

			config.setLastRevision(read.revision);
		}
		catch (Throwable t)
		{
			log.warn("Error loading config from path " + config.path, t);
		}
	}
754823
public OperationFuture<Network> release(Network network, DataCenter dataCenter) {
        DataCenterMetadata dataCenterMetadata = dataCenterService.findByRef(dataCenter);
        NetworkMetadata networkMetadata = findByRef(network);

        networkClient.release(
            networkMetadata.getId(),
            dataCenterMetadata.getId()
        );

        return new OperationFuture<>(network, new NoWaitingJobFuture());
    }
583242
func (o HostNetworkSystem) UpdateNetworkConfig(ctx context.Context, config types.HostNetworkConfig, changeMode string) (*types.HostNetworkConfigResult, error) {
	req := types.UpdateNetworkConfig{
		This:       o.Reference(),
		Config:     config,
		ChangeMode: changeMode,
	}

	res, err := methods.UpdateNetworkConfig(ctx, o.c, &req)
	if err != nil {
		return nil, err
	}

	return &res.Returnval, nil
}
760665
void updateProviders(ConsumerConfig config, List<Instance> instances) {
        if (LOGGER.isInfoEnabled(config.getAppName())) {
            LOGGER.infoWithApp(config.getAppName(),
                "Receive update provider: serviceName={}, size={}, data={}", config.getInterfaceId(), instances.size(),
                instances);
        }
        List<ProviderInfoListener> providerInfoListeners = providerListenerMap.get(config);
        if (CommonUtils.isNotEmpty(providerInfoListeners)) {
            List<ProviderInfo> providerInfos = NacosRegistryHelper.convertInstancesToProviders(instances);
            List<ProviderInfo> matchProviders = RegistryUtils.matchProviderInfos(config, providerInfos);

            for (ProviderInfoListener providerInfoListener : providerInfoListeners) {
                providerInfoListener
                    .updateAllProviders(Collections.singletonList(new ProviderGroup().addAll(matchProviders)));
            }
        }
    }
392501
public static NetworkConfig fromJsonObject(JsonObject jsonConfig) throws InvalidArgumentException, NetworkConfigurationException {

        // Sanity check
        if (jsonConfig == null) {
            throw new InvalidArgumentException("jsonConfig must be specified");
        }

        if (logger.isTraceEnabled()) {
            logger.trace(format("NetworkConfig.fromJsonObject: %s", jsonConfig.toString()));
        }

        return NetworkConfig.load(jsonConfig);
    }
704659
public void updateConfig(String appName, Map<String, String> config) {
        connection.execute(new ConfigUpdate(appName, config), apiKey);
    }
954988
public Future<T> doConfigurationUpdate(final ConfigurationRequest<T> configurationRequest) {
        Util.notNull(configurationRequest, "ConfigurationRequest passed to ConfigurationHandler");
        return executorService.submit(new Callable<T>() {
            public T call() throws Exception {
                try {
                    T conf = configurationRequest.invoke();
                    updateListenersWithNewConfiguration(conf);
                    return conf;
                } catch (Exception e) {
                    updateListenersWithFailure(e);
                    throw e;
                }
            }
        });
    }
749174
public OperationFuture<Server> modify(Server server, ModifyServerConfig modifyServerConfig) {
        List<ModifyServerRequest> request = serverConverter.buildModifyServerRequest(modifyServerConfig,
            modifyServerConfig.getCustomFields().isEmpty() ? null : client.getCustomFields());

        Link response = client.modify(idByRef(server), request);

        OperationFuture<Server> modifyServerFuture;

        if (response == null) {
            modifyServerFuture = new OperationFuture<>(
                server,
                new NoWaitingJobFuture()
            );
        } else {
            modifyServerFuture = new OperationFuture<>(
                server,
                response.getId(),
                queueClient
            );
        }

        if (modifyServerConfig.getMachineConfig() != null &&
            modifyServerConfig.getMachineConfig().getAutoscalePolicy() != null) {

            return new OperationFuture<>(
                server,
                new ParallelJobsFuture(
                    modifyServerFuture.jobFuture(),
                    autoscalePolicyServiceSupplier.get().setAutoscalePolicyOnServer(
                        modifyServerConfig.getMachineConfig().getAutoscalePolicy(), server
                    ).jobFuture()
                )
            );
        }

        return modifyServerFuture;
    }
1105505
public static base_responses update(nitro_service client, snmpmanager resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			snmpmanager updateresources[] = new snmpmanager[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new snmpmanager();
				updateresources[i].ipaddress = resources[i].ipaddress;
				updateresources[i].netmask = resources[i].netmask;
				updateresources[i].domainresolveretry = resources[i].domainresolveretry;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
1237504
public OperationFuture<Server> modifyPublicIp(Server server, String publicIp, ModifyPublicIpConfig config) {
        checkNotNull(config, "PublicIpConfig must be not null");
        checkNotNull(publicIp, "public ip must not be null");

        Link response = client.modifyPublicIp(idByRef(server),
            publicIp,
            publicIpConverter.createPublicIpRequest(config)
        );

        return new OperationFuture<>(
            server,
            response.getId(),
            queueClient
        );
    }
962267
public OperationFuture<List<LoadBalancer>> update(
            List<LoadBalancer> loadBalancerList,
            LoadBalancerConfig config
    ) {
        loadBalancerList.forEach(loadBalancer -> update(loadBalancer, config));

        return new OperationFuture<>(
            loadBalancerList,
            new NoWaitingJobFuture()
        );
    }