org.ovirt.engine.core.compat.Guid.toString()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(117)

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

Guid.toString介绍

暂无

代码示例

代码示例来源:origin: oVirt/ovirt-engine

private org.ovirt.engine.core.common.businessentities.network.Network getNetwork() {
  List<org.ovirt.engine.core.common.businessentities.network.Network> networks = parent.getNetworks();
  for (org.ovirt.engine.core.common.businessentities.network.Network entity : networks) {
    if (entity.getId().toString().equals(id)) {
      return entity;
    }
  }
  return null;
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
public StorageConnection get() {
  return performGet(QueryType.GetStorageServerConnectionById,
      new StorageServerConnectionQueryParametersBase(guid.toString()));
}

代码示例来源:origin: oVirt/ovirt-engine

private Quota getQuota() {
  return getEntity(
    Quota.class,
    QueryType.GetQuotaByQuotaId,
    new IdQueryParameters(quotaId),
    quotaId.toString()
  );
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
  public org.ovirt.engine.core.common.businessentities.storage.Disk resolve(Guid id) throws BackendFailureException {
    return getEntity(
      org.ovirt.engine.core.common.businessentities.storage.Disk.class,
      QueryType.GetDiskByDiskId,
      new IdQueryParameters(id),
      id.toString(),
      true
    );
  }
}

代码示例来源:origin: oVirt/ovirt-engine

private List<Provider> getBackendCollection() {
  List<Provider> externalNetworkProviders = new ArrayList<>();
  VDS host = getEntity(VDS.class, QueryType.GetVdsByVdsId, new IdQueryParameters(hostId), hostId.toString(),
      true);
  Guid externalNetworkProviderId = host.getOpenstackNetworkProviderId();
  if (externalNetworkProviderId != null) {
    externalNetworkProviders.add(getEntity(Provider.class, QueryType.GetProviderById,
            new IdQueryParameters(externalNetworkProviderId), externalNetworkProviderId.toString()));
  }
  return externalNetworkProviders;
}

代码示例来源:origin: oVirt/ovirt-engine

private Quota getQuota() {
    return getEntity(
      Quota.class,
      QueryType.GetQuotaByQuotaId,
      new IdQueryParameters(quotaId),
      quotaId.toString()
    );
  }
}

代码示例来源:origin: oVirt/ovirt-engine

private org.ovirt.engine.core.common.scheduling.AffinityGroup getGroup() {
    return getEntity(
      org.ovirt.engine.core.common.scheduling.AffinityGroup.class,
      QueryType.GetAffinityGroupById,
      new IdQueryParameters(groupId),
      groupId.toString()
    );
  }
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
protected Tag addParents(Tag tag) {
  Template template = new Template();
  template.setId(templateId.toString());
  tag.setTemplate(template);
  return tag;
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
public Cdrom addParents(Cdrom entity) {
  Vm vm = new Vm();
  vm.setId(vmId.toString());
  entity.setVm(vm);
  return entity;
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
public NetworkFilterParameter addParents(NetworkFilterParameter parameter) {
  Vm vm = new Vm();
  vm.setId(vmId.toString());
  Nic nic = new Nic();
  nic.setId(nicId.toString());
  nic.setVm(vm);
  parameter.setNic(nic);
  return parameter;
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
  public Disk addParents(Disk disk) {
    disk.setTemplate(new Template());
    disk.getTemplate().setId(templateId.toString());
    return disk;
  }
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
  public DiskVmElement resolve(VmDeviceId id) throws BackendFailureException {
    VmDeviceId vmDeviceId = new VmDeviceId(diskId, vmId);
    return getEntity(
        DiskVmElement.class,
        QueryType.GetDiskVmElementById,
        new VmDeviceIdQueryParameters(vmDeviceId),
        vmDeviceId.getDeviceId().toString(),
        true
    );
  }
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
public VirtualNumaNode addParents(VirtualNumaNode node) {
  node.setVm(new Vm());
  node.getVm().setId(parentId.toString());
  return node;
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
protected Disk addParents(Disk disk) {
  StorageDomain storageDomain = new StorageDomain();
  storageDomain.setId(storageDomainId.toString());
  StorageDomains storageDomains = new StorageDomains();
  storageDomains.getStorageDomains().add(storageDomain);
  disk.setStorageDomain(storageDomain);
  disk.setStorageDomains(storageDomains);
  return disk;
}

代码示例来源:origin: oVirt/ovirt-engine

private AddManagedBlockStorageDomainParameters getManagedBlockStorageAddParams(StorageDomainStatic entity,
    Properties driverOptions,
    Properties driverSensitiveOptions) {
  AddManagedBlockStorageDomainParameters params = new AddManagedBlockStorageDomainParameters();
  Map<String, Object> driverOptionsMap = new HashMap<>(CustomPropertiesParser.toObjectsMap(driverOptions));
  driverOptionsMap.put(AddManagedBlockStorageDomainParameters.VOLUME_BACKEND_NAME, entity.getName());
  params.setDriverOptions(driverOptionsMap);
  params.setSriverSensitiveOptions(CustomPropertiesParser.toObjectsMap(driverSensitiveOptions));
  entity.setStorage(Guid.Empty.toString());
  params.setStorageDomain(entity);
  return params;
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
protected StorageDomain addParents(StorageDomain storageDomain) {
  // This is for backwards compatibility and will be removed in the future:
  storageDomain.setDataCenter(new DataCenter());
  storageDomain.getDataCenter().setId(dataCenterId.toString());
  // Find all the data centers that this storage domain is attached to and add references to them:
  StorageDomainHelper.addAttachedDataCenterReferences(this, storageDomain);
  return storageDomain;
}

代码示例来源:origin: oVirt/ovirt-engine

protected void setJobLink(final Action action, ActionReturnValue actionResult) {
  Job job = new Job();
  job.setId(actionResult.getJobId().toString());
  LinkHelper.addLinks(job, null, false);
  action.setJob(job);
}

代码示例来源:origin: oVirt/ovirt-engine

@Override
public Cdrom get() {
  GetVmTemplateParameters parameters = new GetVmTemplateParameters(templateId);
  VmTemplate entity = getEntity(
    VmTemplate.class,
    QueryType.GetVmTemplate,
    parameters,
    templateId.toString(),
    true
  );
  return addLinks(populate(map(entity), entity));
}

代码示例来源:origin: oVirt/ovirt-engine

private void updateIncomingId(QuotaStorageLimit incoming, Quota entity) {
  if (incoming.isSetStorageDomain() && incoming.getStorageDomain().isSetId()) {
    incoming.setId(incoming.getStorageDomain().getId());
  } else {
    incoming.setId(entity.getId().toString());
  }
}

代码示例来源:origin: oVirt/ovirt-engine

private void updateIncomingId(QuotaClusterLimit incoming, Quota entity) {
  if (incoming.isSetCluster() && incoming.getCluster().isSetId()) {
    incoming.setId(incoming.getCluster().getId());
  } else {
    incoming.setId(entity.getId().toString());
  }
}

相关文章