本文整理了Java中io.cattle.platform.core.model.Instance.getNativeContainer()
方法的一些代码示例,展示了Instance.getNativeContainer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instance.getNativeContainer()
方法的具体详情如下:
包路径:io.cattle.platform.core.model.Instance
类名称:Instance
方法名:getNativeContainer
[英]Getter for cattle.instance.native_container
.
[中]cattle.instance.native_container
的Getter。
代码示例来源:origin: rancher/cattle
@SuppressWarnings({ "unchecked" })
protected void nativeDockerBackPopulate(Instance instance) {
Map<String, Object> inspect = (Map<String, Object>)instance.getData().get(FIELD_DOCKER_INSPECT);
if (inspect == null || instance.getNativeContainer() == null || !instance.getNativeContainer().booleanValue()) {
return;
}
transformer.transform(inspect, instance);
objectManager.persist(instance);
}
代码示例来源:origin: rancher/cattle
private String migrateVolume(Instance instance, Volume volume, String behavior) {
if (!VOLUME_CLEANUP_STRATEGY_NONE.equals(behavior) || !instance.getNativeContainer()) {
return behavior;
}
if (volume.getUri() == null || !volume.getUri().startsWith(VolumeConstants.FILE_PREFIX)) {
return behavior;
}
behavior = VOLUME_CLEANUP_STRATEGY_UNNAMED;
if (!DataAccessor.fieldBool(volume, VolumeConstants.FIELD_DOCKER_IS_NATIVE)) {
objectManager.setFields(volume, VolumeConstants.FIELD_DOCKER_IS_NATIVE, true);
}
return behavior;
}
代码示例来源:origin: rancher/cattle
&& needToRemoveLabel(instance.getNativeContainer(), ObjectUtils.toString(labels.get(DockerInstanceConstants.FIELD_NETWORK_MODE)))) {
labels.remove(SystemLabels.LABEL_RANCHER_NETWORK);
if (network == null && StringUtils.isNotBlank(mode) && !instance.getNativeContainer()) {
objectProcessManager.scheduleProcessInstance(InstanceConstants.PROCESS_REMOVE, instance, null);
throw new ExecutionException(String.format("Failed to find network for networkMode %s", mode),
代码示例来源:origin: rancher/cattle
@Override
public Volume doWithLock() {
Volume volume = dockerDao.createDockerVolumeInPool(instance.getAccountId(), dVol.getName(), dVol.getUri(), dVol.getExternalId(),
dVol.getDriver(), storagePool, dVol.isBindMount(), instance.getNativeContainer());
return volume;
}
});
代码示例来源:origin: rancher/cattle
setRegistryCredentialId(from.getRegistryCredentialId());
setExternalId(from.getExternalId());
setNativeContainer(from.getNativeContainer());
setNetworkContainerId(from.getNetworkContainerId());
setHealthState(from.getHealthState());
内容来源于网络,如有侵权,请联系作者删除!