if (host.getName() != null) { status.put(host.getName(), "Pulling"); Host host = entry.getKey(); ListenableFuture<? extends Event> future = entry.getValue(); progress.checkPoint("Pulling " + image + " on " + host.getName()); try { AsyncUtils.get(future); Host host = entry.getKey(); ListenableFuture<? extends Event> future = entry.getValue(); progress.checkPoint("Finishing pull " + image + " on " + host.getName()); AsyncUtils.get(future); pullTask = setStatus(pullTask, status, host, "Done");
@SuppressWarnings("unchecked") public HostMetaData(String agent_ip, Host host, Account account) { super(); this.agent_ip = agent_ip; String hostname = DataAccessor.fieldString(host, "hostname"); this.name = StringUtils.isEmpty(host.getName()) ? hostname: host.getName(); this.hostname = hostname; this.state = host.getState(); this.agent_state = host.getAgentState(); this.labels = (Map<String, String>) DataAccessor.fields(host) .withKey(InstanceConstants.FIELD_LABELS) .withDefault(Collections.EMPTY_MAP).as(Map.class); this.uuid = host.getUuid(); this.hostId = host.getId(); this.local_storage_mb = host.getLocalStorageMb(); this.memory = host.getMemory(); this.milli_cpu = host.getMilliCpu(); this.environment_uuid = account.getUuid(); this.metadata_kind = "host"; }
public void from(io.cattle.platform.core.model.Host from) { setId(from.getId()); setName(from.getName()); setAccountId(from.getAccountId()); setKind(from.getKind());