Synchronize the Hue server's database.

    @param servers: Name of Hue Server roles to synchronize. Not required starting with API v10.
    @return: List of submitted commands.
763939
def sync_hue_db(self, *servers):
    

    actual_version = self._get_resource_root().version
    if actual_version < 10:
      return self._role_cmd('hueSyncDb', servers)

    return self._cmd('hueSyncDb', api_version=10)
831985
def complete_server(self, text, line, begidx, endidx):
        '''  '''
        return  [i for i in PsiturkShell.server_commands if i.startswith(text)]
602597
def sync_repos(repo_ids)
      collected = []
      repos = Repository.where(:id => repo_ids).syncable
      repos.each do |repo|
        if latest_task(repo).try(:state) != 'running'
          ForemanTasks.async_task(::Actions::Katello::Repository::Sync, repo)
        end
        collected << format_sync_progress(repo)
      end
      collected
    end
1166219
def update_roles(role_ids)
      @roles = []
      role_ids.each do |id|
        # It is posible for members to have roles that do not exist
        # on the server any longer. See https://github.com/meew0/discordrb/issues/371
        role = @server.role(id)
        @roles << role if role
      end
    end
365844
def root_sync(args, l, config):
    
    from requests.exceptions import ConnectionError

    all_remote_names = [ r.short_name for r in l.remotes ]

    if args.all:
        remotes = all_remote_names
    else:
        remotes = args.refs

    prt("Sync with {} remotes or bundles ".format(len(remotes)))

    if not remotes:
        return

    for ref in remotes:
        l.commit()

        try:
            if ref in all_remote_names: # It's a remote name
                l.sync_remote(l.remote(ref))

            else: # It's a bundle reference

                l.checkin_remote_bundle(ref)

        except NotFoundError as e:
            warn(e)
            continue
        except ConnectionError as e:
            warn(e)
            continue
189655
def find_servers(self, *args, **kwargs):
        
        servers = super(HPNova, self).find_servers(*args, **kwargs)
        return map(fix_hp_addrs, servers)
488399
async def sync_services(self):
        

        services = {}
        servs = await self.list_services()

        for i, serv in enumerate(servs):
            info = await self.service_info(serv)
            status = await self.service_status(serv)
            messages = await self.get_messages(serv)
            headline = await self.get_headline(serv)

            services[serv] = states.ServiceState(info['short_name'], info['long_name'], info['preregistered'], i)
            services[serv].state = status['numeric_status']

            for message in messages:
                services[serv].post_message(message.level, message.message, message.count, message.created)
            if headline is not None:
                services[serv].set_headline(headline.level, headline.message, headline.created)

        return services
828288
public OperationFuture<List<Server>> revertToSnapshot(Server... servers) {
        List<Server> serverList = Arrays.asList(servers);

        List<JobFuture> futures = serverList.stream()
            .map(this::findByRef)
            .flatMap(metadata -> metadata.getDetails().getSnapshots().stream())
            .map(snapshot ->
                baseServerResponse(
                    client.revertToSnapshot(snapshot.getServerId(), snapshot.getId())
                )
                .jobFuture()
            )
            .collect(toList());

        return new OperationFuture<>(
            serverList,
            new ParallelJobsFuture(futures)
        );
    }
502867
function (syncOptions, serverResponses) {
    const syncs = [];
    if (syncOptions.pixelEnabled && serverResponses.length) {
      try {
        serverResponses[0].body.ext.telaria.userSync.forEach(url => syncs.push({type: 'image', url: url}));
      } catch (e) {}
    }
    return syncs;
  }
783314
@Override
  public void getServers(
      GetServersRequest request, StreamObserver<GetServersResponse> responseObserver) {
    ServerList servers = channelz.getServers(request.getStartServerId(), maxPageSize);

    GetServersResponse resp;
    try {
      resp = ChannelzProtoUtil.toGetServersResponse(servers);
    } catch (StatusRuntimeException e) {
      responseObserver.onError(e);
      return;
    }

    responseObserver.onNext(resp);
    responseObserver.onCompleted();
  }
946331
def GetAllServers(alias=None,name_groups=False):
		
		if alias is None:  alias = clc.v1.Account.GetAlias()
		servers = []
		clc.v1.Account.GetLocations()
		for location in clc.LOCATIONS:
			try:
				r = clc.v1.API.Call('post','Server/GetAllServers', {'AccountAlias': alias, 'Location': location }, hide_errors=[5,] )
				if name_groups:  r['Servers'] = clc.v1.Group.NameGroups(r['Servers'],'HardwareGroupUUID')
				if int(r['StatusCode']) == 0:  servers += r['Servers']
			except:
				pass
		return(servers)
22370
def sync(self, rules: list):
        
        self.client = self.connect()
        try:
            server_rules = set(self.server_rules)
            rules = set(rules)
            to_remove_rules = server_rules.difference(rules)
            to_add_rules = rules.difference(server_rules)
            for to_remove_rule in to_remove_rules:
                stdin, stdout, stderr = self.client.exec_command(
                    to_remove_rule.remove_command
                )
                stdout.read()
                stderr.read()
            for to_add_rule in to_add_rules:
                stdin, stdout, stderr = self.client.exec_command(
                    to_add_rule.add_command
                )
                stdout.read()
                stderr.read()

            if len(to_remove_rules) or len(to_add_rules):
                self._write_to_server(rules)
                stdin, stdout, stderr = self.client.exec_command(
                    'ip route flush cache'
                )
                stdout.read()
                stderr.read()
        finally:
            self.client.close()
283672
public OperationFuture<List<Server>> removeSecondaryNetworks(List<Server> servers) {
        List<JobFuture> futures = servers.stream()
            .map(server -> removeSecondaryNetworks(server).jobFuture())
            .collect(toList());

        return new OperationFuture<>(
            servers,
            new ParallelJobsFuture(futures)
        );
    }
825430
def cmd_server_load(self):
        
        servers = defaultdict(int)
        for line in self._valid_lines:
            servers[line.server_name] += 1
        return servers
376968
public OperationFuture<List<Server>> powerOn(Group... groups) {
        return serverService().powerOn(
            getServerSearchCriteria(groups)
        );
    }
53946
public boolean syncServers(NewRelicCache cache)
    {
        boolean ret = true;

        if(apiClient == null)
            throw new IllegalArgumentException("null API client");

        // Get the server configuration using the REST API
        if(cache.isServersEnabled())
        {
            ret = false;

            logger.info("Getting the servers");
            cache.servers().add(apiClient.servers().list());
            cache.setUpdatedAt();

            ret = true;
        }

        return ret;
    }
833694
public OperationFuture<List<Server>> reboot(Group... groups) {
        return serverService().reboot(
            getServerSearchCriteria(groups)
        );
    }