io.cattle.platform.core.model.Account.getUuid()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中io.cattle.platform.core.model.Account.getUuid()方法的一些代码示例,展示了Account.getUuid()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Account.getUuid()方法的具体详情如下:
包路径:io.cattle.platform.core.model.Account
类名称:Account
方法名:getUuid

Account.getUuid介绍

[英]Getter for cattle.account.uuid.
[中]

代码示例

代码示例来源:origin: rancher/cattle

public NetworkMetaData(String name, String uuid, boolean is_default, boolean host_ports,
    Map<String, Object> metadata, String defaultPolicyAction, Object policy, Account account) {
  super();
  this.name = name;
  this.uuid = uuid;
  this.is_default = is_default;
  this.host_ports = host_ports;
  this.metadata = metadata;
  this.default_policy_action = defaultPolicyAction;
  this.policy = policy;
  this.metadata_kind = "network";
  this.environment_uuid = account.getUuid();
}

代码示例来源:origin: rancher/cattle

protected void setEnvironmentLabel(Map<String, Object> labels, Account account) {
  labels.put(SystemLabels.LABEL_ENVIRONMENT_UUID, account.getUuid());
}

代码示例来源:origin: rancher/cattle

public StackMetaData(String stackName, String stackUUID, boolean isSystem, Account account) {
  this.name = stackName;
  this.uuid = stackUUID;
  this.environment_name = account.getName();
  this.environment_uuid = account.getUuid();
  this.system = isSystem;
  this.metadata_kind = "stack";
}

代码示例来源:origin: rancher/cattle

@Override
  public ExternalAccountLink handleResponse(HttpResponse response) throws ClientProtocolException, IOException {
    if (response.getStatusLine().getStatusCode() != 200) {
      return null;
    }
    for (ExternalAccountLink link : jsonMapper.readValue(response.getEntity().getContent(), ExternalAccountLinkData.class).data) {
      List<String> invalidStates = Arrays.asList(CommonStatesConstants.REMOVED, CommonStatesConstants.REMOVING);
      if (invalidStates.contains(link.getState())) {
        continue;
      }
      if (link.getLinkedAccountUuid().equalsIgnoreCase(localAccount.getUuid())) {
        return link;
      }
    }
    return null;
  }
});

代码示例来源:origin: rancher/cattle

@Override
  public ExternalAccountLink handleResponse(HttpResponse response) throws ClientProtocolException, IOException {
    if (response.getStatusLine().getStatusCode() != 200) {
      return null;
    }
    for (ExternalAccountLink link : jsonMapper.readValue(response.getEntity().getContent(), ExternalAccountLinkData.class).data) {
      List<String> invalidStates = Arrays.asList(CommonStatesConstants.REMOVED, CommonStatesConstants.REMOVING);
      if (invalidStates.contains(link.getState())) {
        continue;
      }
      if (link.getLinkedAccountUuid().equalsIgnoreCase(localAccount.getUuid())) {
        return link;
      }
    }
    return null;
  }
});

代码示例来源:origin: rancher/cattle

data.put("linkedRegion", externalRegion.getName());
  data.put("linkedRegionId", externalRegion.getId());
  data.put("linkedAccountUuid", localAccount.getUuid());
  externalLink = RegionUtil.createExternalAccountLink(targetRegion, data, jsonMapper);
} catch (Exception ex) {

代码示例来源:origin: rancher/cattle

@Override
public void fetchEnvironment(final MetaHelperInfo helperInfo, final OutputStream os) {
  Account env = helperInfo.getAccount();
  EnvironmentMetaData data = new EnvironmentMetaData(StringUtils.lowerCase(env.getName()), env.getUuid(), StringUtils.lowerCase(helperInfo.getRegionName()));
  writeToJson(os, data);
}

代码示例来源:origin: rancher/cattle

this.health_check_hosts = healthcheckHosts;
this.environment_uuid = account.getUuid();

代码示例来源:origin: rancher/cattle

@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";
}

代码示例来源:origin: rancher/cattle

this.lb_config = lbConfig;
this.primary_service_name = service.getName();
this.environment_uuid = account.getUuid();
this.state = service.getState();
this.metadata_kind = "service";

代码示例来源:origin: rancher/cattle

/**
 * {@inheritDoc}
 */
@Override
public void from(io.cattle.platform.core.model.Account from) {
  setId(from.getId());
  setName(from.getName());
  setKind(from.getKind());
  setUuid(from.getUuid());
  setDescription(from.getDescription());
  setState(from.getState());
  setCreated(from.getCreated());
  setRemoved(from.getRemoved());
  setRemoveTime(from.getRemoveTime());
  setData(from.getData());
  setExternalId(from.getExternalId());
  setExternalIdType(from.getExternalIdType());
  setHealthState(from.getHealthState());
  setProjectTemplateId(from.getProjectTemplateId());
  setDefaultNetworkId(from.getDefaultNetworkId());
  setVersion(from.getVersion());
  setRevision(from.getRevision());
}

相关文章