Class ContainerStorageConfig
java.lang.Object
io.github.alersrt.pod4j.openapi.model.ContainerStorageConfig
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-11-19T11:19:05.435500352+07:00[Asia/Barnaul]",
comments="Generator version: 7.7.0")
public class ContainerStorageConfig
extends Object
ContainerStorageConfig contains information on the storage configuration of a container.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddChrootDirectoriesItem(String chrootDirectoriesItem) addDeviceCgroupRuleItem(LinuxDeviceCgroup deviceCgroupRuleItem) addDevicesFromItem(String devicesFromItem) addDevicesItem(LinuxDevice devicesItem) addHostDeviceListItem(LinuxDevice hostDeviceListItem) addImageVolumesItem(ImageVolume imageVolumesItem) addMountsItem(Mount mountsItem) addOverlayVolumesItem(OverlayVolume overlayVolumesItem) addSecretsItem(Secret secretsItem) addVolumesFromItem(String volumesFromItem) addVolumesItem(NamedVolume volumesItem) chrootDirectories(List<String> chrootDirectories) createWorkingDir(Boolean createWorkingDir) deviceCgroupRule(List<LinuxDeviceCgroup> deviceCgroupRule) devices(List<LinuxDevice> devices) devicesFrom(List<String> devicesFrom) booleanstatic ContainerStorageConfigCreate an instance of ContainerStorageConfig given an JSON stringChrootDirs is an additional set of directories that need to be treated as root directories.Create the working directory if it doesn't exist.DeviceCgroupRule are device cgroup rules that allow containers to use additional types of devices.Devices are devices that will be added to the container.DevicesFrom specifies that this container will mount the device(s) from other container(s).HostDeviceList is used to recreate the mounted device on inherited containersgetImage()Image is the image the container will be based on.ImageArch is the user-specified image architecture.ImageOS is the user-specified OS of the image.ImageVariant is the user-specified image variant.ImageVolumeMode indicates how image volumes will be created.Image volumes bind-mount a container-image mount into the container.getInit()Init specifies that an init binary will be mounted into the container, and will be used as PID1.InitPath specifies the path to the init binary that will be added if Init is specified above.getIpcns()Get ipcnsMounts are mounts that will be added to the container.Overlay volumes are named volumes that will be added to the container.RawImageName is the user-specified and unprocessed input referring to a local or a remote image.Rootfs is the path to a directory that will be used as the container's root filesystem.RootfsMapping specifies if there are UID/GID mappings to apply to the rootfs.RootfsOverlay tells if rootfs is actually an overlay on top of base path.RootfsPropagation is the rootfs propagation mode for the container.Secrets are the secrets that will be added to the container Optional.ShmSize is the size of the tmpfs to mount in at /dev/shm, in bytes.ShmSizeSystemd is the size of systemd-specific tmpfs mounts specifically /run, /run/lock, /var/log/journal and /tmp.StorageOpts is the container's storage options Optional.Volatile specifies whether the container storage can be optimized at the cost of not syncing all the dirty files in memory.Volumes are named volumes that will be added to the container.VolumesFrom is a set of containers whose volumes will be added to this container.WorkDir is the container's working directory.inthashCode()hostDeviceList(List<LinuxDevice> hostDeviceList) imageVariant(String imageVariant) imageVolumeMode(String imageVolumeMode) imageVolumes(List<ImageVolume> imageVolumes) overlayVolumes(List<OverlayVolume> overlayVolumes) putStorageOptsItem(String key, String storageOptsItem) rawImageName(String rawImageName) rootfsMapping(String rootfsMapping) rootfsOverlay(Boolean rootfsOverlay) rootfsPropagation(String rootfsPropagation) voidsetChrootDirectories(List<String> chrootDirectories) voidsetCreateWorkingDir(Boolean createWorkingDir) voidsetDeviceCgroupRule(List<LinuxDeviceCgroup> deviceCgroupRule) voidsetDevices(List<LinuxDevice> devices) voidsetDevicesFrom(List<String> devicesFrom) voidsetHostDeviceList(List<LinuxDevice> hostDeviceList) voidvoidsetImageArch(String imageArch) voidsetImageOs(String imageOs) voidsetImageVariant(String imageVariant) voidsetImageVolumeMode(String imageVolumeMode) voidsetImageVolumes(List<ImageVolume> imageVolumes) voidvoidsetInitPath(String initPath) voidvoidvoidsetOverlayVolumes(List<OverlayVolume> overlayVolumes) voidsetRawImageName(String rawImageName) voidvoidsetRootfsMapping(String rootfsMapping) voidsetRootfsOverlay(Boolean rootfsOverlay) voidsetRootfsPropagation(String rootfsPropagation) voidsetSecrets(List<Secret> secrets) voidsetShmSize(Long shmSize) voidsetShmSizeSystemd(Long shmSizeSystemd) voidsetStorageOpts(Map<String, String> storageOpts) voidsetVolatile(Boolean _volatile) voidsetVolumes(List<NamedVolume> volumes) voidsetVolumesFrom(List<String> volumesFrom) voidsetWorkDir(String workDir) shmSizeSystemd(Long shmSizeSystemd) storageOpts(Map<String, String> storageOpts) toJson()Convert an instance of ContainerStorageConfig to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundvolumes(List<NamedVolume> volumes) volumesFrom(List<String> volumesFrom)
-
Field Details
-
SERIALIZED_NAME_CHROOT_DIRECTORIES
- See Also:
-
SERIALIZED_NAME_CREATE_WORKING_DIR
- See Also:
-
SERIALIZED_NAME_DEVICE_CGROUP_RULE
- See Also:
-
SERIALIZED_NAME_DEVICES
- See Also:
-
SERIALIZED_NAME_DEVICES_FROM
- See Also:
-
SERIALIZED_NAME_HOST_DEVICE_LIST
- See Also:
-
SERIALIZED_NAME_IMAGE
- See Also:
-
SERIALIZED_NAME_IMAGE_ARCH
- See Also:
-
SERIALIZED_NAME_IMAGE_OS
- See Also:
-
SERIALIZED_NAME_IMAGE_VARIANT
- See Also:
-
SERIALIZED_NAME_IMAGE_VOLUME_MODE
- See Also:
-
SERIALIZED_NAME_IMAGE_VOLUMES
- See Also:
-
SERIALIZED_NAME_INIT
- See Also:
-
SERIALIZED_NAME_INIT_PATH
- See Also:
-
SERIALIZED_NAME_IPCNS
- See Also:
-
SERIALIZED_NAME_MOUNTS
- See Also:
-
SERIALIZED_NAME_OVERLAY_VOLUMES
- See Also:
-
SERIALIZED_NAME_RAW_IMAGE_NAME
- See Also:
-
SERIALIZED_NAME_ROOTFS
- See Also:
-
SERIALIZED_NAME_ROOTFS_MAPPING
- See Also:
-
SERIALIZED_NAME_ROOTFS_OVERLAY
- See Also:
-
SERIALIZED_NAME_ROOTFS_PROPAGATION
- See Also:
-
SERIALIZED_NAME_SECRETS
- See Also:
-
SERIALIZED_NAME_SHM_SIZE
- See Also:
-
SERIALIZED_NAME_SHM_SIZE_SYSTEMD
- See Also:
-
SERIALIZED_NAME_STORAGE_OPTS
- See Also:
-
SERIALIZED_NAME_VOLATILE
- See Also:
-
SERIALIZED_NAME_VOLUMES
- See Also:
-
SERIALIZED_NAME_VOLUMES_FROM
- See Also:
-
SERIALIZED_NAME_WORK_DIR
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
ContainerStorageConfig
public ContainerStorageConfig()
-
-
Method Details
-
chrootDirectories
-
addChrootDirectoriesItem
-
getChrootDirectories
ChrootDirs is an additional set of directories that need to be treated as root directories. Standard bind mounts will be mounted into paths relative to these directories. Optional.- Returns:
- chrootDirectories
-
setChrootDirectories
-
createWorkingDir
-
getCreateWorkingDir
Create the working directory if it doesn't exist. If unset, it doesn't create it. Optional.- Returns:
- createWorkingDir
-
setCreateWorkingDir
-
deviceCgroupRule
-
addDeviceCgroupRuleItem
-
getDeviceCgroupRule
DeviceCgroupRule are device cgroup rules that allow containers to use additional types of devices.- Returns:
- deviceCgroupRule
-
setDeviceCgroupRule
-
devices
-
addDevicesItem
-
getDevices
Devices are devices that will be added to the container. Optional.- Returns:
- devices
-
setDevices
-
devicesFrom
-
addDevicesFromItem
-
getDevicesFrom
DevicesFrom specifies that this container will mount the device(s) from other container(s). Optional.- Returns:
- devicesFrom
-
setDevicesFrom
-
hostDeviceList
-
addHostDeviceListItem
-
getHostDeviceList
HostDeviceList is used to recreate the mounted device on inherited containers- Returns:
- hostDeviceList
-
setHostDeviceList
-
image
-
getImage
Image is the image the container will be based on. The image will be used as the container's root filesystem, and its environment vars, volumes, and other configuration will be applied to the container. Conflicts with Rootfs. At least one of Image or Rootfs must be specified.- Returns:
- image
-
setImage
-
imageArch
-
getImageArch
ImageArch is the user-specified image architecture. Used to select a different variant from a manifest list. Optional.- Returns:
- imageArch
-
setImageArch
-
imageOs
-
getImageOs
ImageOS is the user-specified OS of the image. Used to select a different variant from a manifest list. Optional.- Returns:
- imageOs
-
setImageOs
-
imageVariant
-
getImageVariant
ImageVariant is the user-specified image variant. Used to select a different variant from a manifest list. Optional.- Returns:
- imageVariant
-
setImageVariant
-
imageVolumeMode
-
getImageVolumeMode
ImageVolumeMode indicates how image volumes will be created. Supported modes are \"ignore\" (do not create), \"tmpfs\" (create as tmpfs), and \"anonymous\" (create as anonymous volumes). The default if unset is anonymous. Optional.- Returns:
- imageVolumeMode
-
setImageVolumeMode
-
imageVolumes
-
addImageVolumesItem
-
getImageVolumes
Image volumes bind-mount a container-image mount into the container. Optional.- Returns:
- imageVolumes
-
setImageVolumes
-
init
-
getInit
Init specifies that an init binary will be mounted into the container, and will be used as PID1. Optional.- Returns:
- init
-
setInit
-
initPath
-
getInitPath
InitPath specifies the path to the init binary that will be added if Init is specified above. If not specified, the default set in the Libpod config will be used. Ignored if Init above is not set. Optional.- Returns:
- initPath
-
setInitPath
-
ipcns
-
getIpcns
Get ipcns- Returns:
- ipcns
-
setIpcns
-
mounts
-
addMountsItem
-
getMounts
Mounts are mounts that will be added to the container. These will supersede Image Volumes and VolumesFrom volumes where there are conflicts. Optional.- Returns:
- mounts
-
setMounts
-
overlayVolumes
-
addOverlayVolumesItem
-
getOverlayVolumes
Overlay volumes are named volumes that will be added to the container. Optional.- Returns:
- overlayVolumes
-
setOverlayVolumes
-
rawImageName
-
getRawImageName
RawImageName is the user-specified and unprocessed input referring to a local or a remote image. Optional, but strongly encouraged to be set if Image is set.- Returns:
- rawImageName
-
setRawImageName
-
rootfs
-
getRootfs
Rootfs is the path to a directory that will be used as the container's root filesystem. No modification will be made to the directory, it will be directly mounted into the container as root. Conflicts with Image. At least one of Image or Rootfs must be specified.- Returns:
- rootfs
-
setRootfs
-
rootfsMapping
-
getRootfsMapping
RootfsMapping specifies if there are UID/GID mappings to apply to the rootfs. Optional.- Returns:
- rootfsMapping
-
setRootfsMapping
-
rootfsOverlay
-
getRootfsOverlay
RootfsOverlay tells if rootfs is actually an overlay on top of base path. Optional.- Returns:
- rootfsOverlay
-
setRootfsOverlay
-
rootfsPropagation
-
getRootfsPropagation
RootfsPropagation is the rootfs propagation mode for the container. If not set, the default of rslave will be used. Optional.- Returns:
- rootfsPropagation
-
setRootfsPropagation
-
secrets
-
addSecretsItem
-
getSecrets
Secrets are the secrets that will be added to the container Optional.- Returns:
- secrets
-
setSecrets
-
shmSize
-
getShmSize
ShmSize is the size of the tmpfs to mount in at /dev/shm, in bytes. Conflicts with ShmSize if IpcNS is not private. Optional.- Returns:
- shmSize
-
setShmSize
-
shmSizeSystemd
-
getShmSizeSystemd
ShmSizeSystemd is the size of systemd-specific tmpfs mounts specifically /run, /run/lock, /var/log/journal and /tmp. Optional- Returns:
- shmSizeSystemd
-
setShmSizeSystemd
-
storageOpts
-
putStorageOptsItem
-
getStorageOpts
StorageOpts is the container's storage options Optional.- Returns:
- storageOpts
-
setStorageOpts
-
_volatile
-
getVolatile
Volatile specifies whether the container storage can be optimized at the cost of not syncing all the dirty files in memory. Optional.- Returns:
- _volatile
-
setVolatile
-
volumes
-
addVolumesItem
-
getVolumes
Volumes are named volumes that will be added to the container. These will supersede Image Volumes and VolumesFrom volumes where there are conflicts. Optional.- Returns:
- volumes
-
setVolumes
-
volumesFrom
-
addVolumesFromItem
-
getVolumesFrom
VolumesFrom is a set of containers whose volumes will be added to this container. The name or ID of the container must be provided, and may optionally be followed by a : and then one or more comma-separated options. Valid options are 'ro', 'rw', and 'z'. Options will be used for all volumes sourced from the container. Optional.- Returns:
- volumesFrom
-
setVolumesFrom
-
workDir
-
getWorkDir
WorkDir is the container's working directory. If unset, the default, /, will be used. Optional.- Returns:
- workDir
-
setWorkDir
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to ContainerStorageConfig
-
fromJson
Create an instance of ContainerStorageConfig given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ContainerStorageConfig
- Throws:
IOException- if the JSON string is invalid with respect to ContainerStorageConfig
-
toJson
Convert an instance of ContainerStorageConfig to an JSON string- Returns:
- JSON string
-