models

package
v0.2.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2021 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// AttachKindIscsi captures enum value "iscsi"
	AttachKindIscsi string = "iscsi"

	// AttachKindLocal captures enum value "local"
	AttachKindLocal string = "local"

	// AttachKindLoopback captures enum value "loopback"
	AttachKindLoopback string = "loopback"

	// AttachKindRbd captures enum value "rbd"
	AttachKindRbd string = "rbd"
)
View Source
const (

	// AttachLoopbackBaseRoot captures enum value "root"
	AttachLoopbackBaseRoot string = "root"

	// AttachLoopbackBaseMount captures enum value "mount"
	AttachLoopbackBaseMount string = "mount"
)
View Source
const (

	// MountKindAttach captures enum value "attach"
	MountKindAttach string = "attach"

	// MountKindBind captures enum value "bind"
	MountKindBind string = "bind"

	// MountKindNfs captures enum value "nfs"
	MountKindNfs string = "nfs"

	// MountKindOverlay captures enum value "overlay"
	MountKindOverlay string = "overlay"

	// MountKindURI captures enum value "uri"
	MountKindURI string = "uri"
)
View Source
const (

	// MountBindBaseRoot captures enum value "root"
	MountBindBaseRoot string = "root"

	// MountBindBaseMount captures enum value "mount"
	MountBindBaseMount string = "mount"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attach added in v0.2.0

type Attach struct {

	// The device_file is the path to the system device file.
	// Read Only: true
	DeviceFile string `json:"device_file,omitempty"`

	// id
	// Read Only: true
	ID ID `json:"id,omitempty"`

	// Kind specifies the kind of attachment.  Each kind has corresponding kind-specific options.
	//
	// Currently known kinds:
	//
	// iscsi - attach an iscsi lun
	// local - create an attachment reference to an existing block device (specifying a non-block device will fail)
	// loopback - create a loopback device referencing a file in a mount
	// rbd - attach a Ceph/RBD object
	//
	// All kinds may or may not be fully supported by the implementation.
	//
	// Enum: [iscsi local loopback rbd]
	Kind string `json:"kind,omitempty"`

	// local
	Local *AttachLocal `json:"local,omitempty"`

	// loopback
	Loopback *AttachLoopback `json:"loopback,omitempty"`

	// rbd
	Rbd *AttachRbd `json:"rbd,omitempty"`

	// refs
	// Read Only: true
	Refs int64 `json:"refs,omitempty"`
}

Attach Generically address attachments. Attachments are objects that ultimately provide a block device file.

swagger:model attach

func (*Attach) ContextValidate added in v0.2.0

func (m *Attach) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this attach based on the context it is used

func (*Attach) MarshalBinary added in v0.2.0

func (m *Attach) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Attach) UnmarshalBinary added in v0.2.0

func (m *Attach) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Attach) Validate added in v0.2.0

func (m *Attach) Validate(formats strfmt.Registry) error

Validate validates this attach

type AttachLocal added in v0.2.0

type AttachLocal struct {

	// A unix-formatted filesystem path pointing to a block device file.
	// Required: true
	Path *string `json:"path"`
}

AttachLocal `attach_local` describes a block device that is locally present. This can be used to get a reference to a local disk, for instance.

Local only supports finding device files on the local (root) system. It only takes one parameter: the path to the device file.

swagger:model attach_local

func (*AttachLocal) ContextValidate added in v0.2.0

func (m *AttachLocal) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this attach local based on context it is used

func (*AttachLocal) MarshalBinary added in v0.2.0

func (m *AttachLocal) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AttachLocal) UnmarshalBinary added in v0.2.0

func (m *AttachLocal) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AttachLocal) Validate added in v0.2.0

func (m *AttachLocal) Validate(formats strfmt.Registry) error

Validate validates this attach local

type AttachLoopback added in v0.2.0

type AttachLoopback struct {

	// base determines the relative root for the path.  There are two options:
	// `root` means to use the current root (`/`) as the base path.
	// `mount` means to use a mount as the base path. If this is specified, `mount` must be specified as well.
	//
	// Required: true
	// Enum: [root mount]
	Base *string `json:"base"`

	// mount
	Mount *Mount `json:"mount,omitempty"`

	// A unix-formatted filesystem path with `/` relative to the respective base.
	// Required: true
	Path *string `json:"path"`

	// Should the partition table on the looback device be read?
	// Addressing sub-partitions is not yet supported.
	//
	ReadPartitions *bool `json:"readPartitions,omitempty"`
}

AttachLoopback `attach_loopback` describes a loopback device based on an available file. The file can live either on `/` ("root") or a mount, as specified by base. Path specifies the path relative to the base.

swagger:model attach_loopback

func (*AttachLoopback) ContextValidate added in v0.2.0

func (m *AttachLoopback) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this attach loopback based on the context it is used

func (*AttachLoopback) MarshalBinary added in v0.2.0

func (m *AttachLoopback) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AttachLoopback) UnmarshalBinary added in v0.2.0

func (m *AttachLoopback) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AttachLoopback) Validate added in v0.2.0

func (m *AttachLoopback) Validate(formats strfmt.Registry) error

Validate validates this attach loopback

type AttachRbd added in v0.2.0

type AttachRbd struct {

	// The dev_id is the device ID in the rbd subsystem.
	// Read Only: true
	DeviceID int64 `json:"device_id,omitempty"`

	// image
	// Required: true
	// Min Length: 1
	Image *string `json:"image"`

	// monitors
	// Required: true
	Monitors []strfmt.IPv4 `json:"monitors"`

	// options
	Options *RbdOptions `json:"options,omitempty"`

	// pool
	// Required: true
	// Min Length: 1
	Pool *string `json:"pool"`

	// snapshot
	Snapshot string `json:"snapshot,omitempty"`
}

AttachRbd attach_rbd describes an RBD map. To successfully map, at least one monitor, pool and image must be specified. Additionally, you will need options.name and options.secret specified.

swagger:model attach_rbd

func (*AttachRbd) ContextValidate added in v0.2.0

func (m *AttachRbd) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this attach rbd based on the context it is used

func (*AttachRbd) MarshalBinary added in v0.2.0

func (m *AttachRbd) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AttachRbd) UnmarshalBinary added in v0.2.0

func (m *AttachRbd) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AttachRbd) Validate added in v0.2.0

func (m *AttachRbd) Validate(formats strfmt.Registry) error

Validate validates this attach rbd

type Container

type Container struct {

	// command
	// Required: true
	Command *string `json:"command"`

	// id
	ID ID `json:"id,omitempty"`

	// logfile
	// Read Only: true
	Logfile string `json:"logfile,omitempty"`

	// mount
	// Required: true
	Mount *Mount `json:"mount"`

	// name is an optional identifier for the container.  Name must be unique.
	Name Name `json:"name,omitempty"`

	// A list of Linux namespaces to use.
	//
	// Note: This is currently unused.  All containers currently get `mnt` and `pid`.
	//       It's here as a placeholder for future use.
	//
	Namespaces []ContainerNamespace `json:"namespaces"`

	// refs
	// Read Only: true
	Refs int64 `json:"refs,omitempty"`

	// When read, this contains the current container state. On creation, this requests the initial state (valid options: `created` or `running`). The default is `created`.
	//
	State ContainerState `json:"state,omitempty"`

	// When `systemd` is set to `true`, we will assume that this container will run `systemd`, and perform the necessary magic dance to make systemd run inside of the container. The default is `false`.
	//
	Systemd bool `json:"systemd,omitempty"`
}

Container The `container` option describes a minimally namespaced container.

A container is identified by a service-provided unique numeric `pid`.

Optionally, a container can be provided with a `name`. The name must be unique. Containers can be referenced by `name` if provided.

swagger:model container

func (*Container) ContextValidate

func (m *Container) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this container based on the context it is used

func (*Container) MarshalBinary

func (m *Container) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Container) UnmarshalBinary

func (m *Container) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Container) Validate

func (m *Container) Validate(formats strfmt.Registry) error

Validate validates this container

type ContainerNamespace

type ContainerNamespace string

ContainerNamespace Linux namespace

swagger:model container_namespace

const (

	// ContainerNamespaceCgroup captures enum value "cgroup"
	ContainerNamespaceCgroup ContainerNamespace = "cgroup"

	// ContainerNamespaceIpc captures enum value "ipc"
	ContainerNamespaceIpc ContainerNamespace = "ipc"

	// ContainerNamespaceNet captures enum value "net"
	ContainerNamespaceNet ContainerNamespace = "net"

	// ContainerNamespaceMnt captures enum value "mnt"
	ContainerNamespaceMnt ContainerNamespace = "mnt"

	// ContainerNamespacePid captures enum value "pid"
	ContainerNamespacePid ContainerNamespace = "pid"

	// ContainerNamespaceTime captures enum value "time"
	ContainerNamespaceTime ContainerNamespace = "time"

	// ContainerNamespaceUser captures enum value "user"
	ContainerNamespaceUser ContainerNamespace = "user"

	// ContainerNamespaceUts captures enum value "uts"
	ContainerNamespaceUts ContainerNamespace = "uts"
)

func NewContainerNamespace added in v0.2.0

func NewContainerNamespace(value ContainerNamespace) *ContainerNamespace

func (ContainerNamespace) ContextValidate

func (m ContainerNamespace) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this container namespace based on context it is used

func (ContainerNamespace) Validate

func (m ContainerNamespace) Validate(formats strfmt.Registry) error

Validate validates this container namespace

type ContainerState

type ContainerState string

ContainerState Valid container states

swagger:model container_state

const (

	// ContainerStateCreated captures enum value "created"
	ContainerStateCreated ContainerState = "created"

	// ContainerStateRunning captures enum value "running"
	ContainerStateRunning ContainerState = "running"

	// ContainerStateStopping captures enum value "stopping"
	ContainerStateStopping ContainerState = "stopping"

	// ContainerStateExited captures enum value "exited"
	ContainerStateExited ContainerState = "exited"

	// ContainerStateDead captures enum value "dead"
	ContainerStateDead ContainerState = "dead"
)

func NewContainerState added in v0.2.0

func NewContainerState(value ContainerState) *ContainerState

func (ContainerState) ContextValidate

func (m ContainerState) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this container state based on context it is used

func (ContainerState) Validate

func (m ContainerState) Validate(formats strfmt.Registry) error

Validate validates this container state

type Error

type Error struct {

	// code
	Code int64 `json:"code,omitempty"`

	// message
	// Required: true
	Message *string `json:"message"`
}

Error error

swagger:model error

func (*Error) ContextValidate

func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type ID

type ID int64

ID An ID is a unique numeric ID that references an object. IDs are not necessarily unique across object types. IDs are generall readOnly and generated internally.

swagger:model id

func (ID) ContextValidate

func (m ID) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this id based on context it is used

func (ID) Validate

func (m ID) Validate(formats strfmt.Registry) error

Validate validates this id

type Mount

type Mount struct {

	// attach
	Attach *MountAttach `json:"attach,omitempty"`

	// bind
	Bind *MountBind `json:"bind,omitempty"`

	// id
	ID ID `json:"id,omitempty"`

	// Kind specifies the kind of mount.  Each kind has corresponding kind-specific options.
	//
	// Currently known kinds:
	//
	// attach - mount a device specified by an attachment.
	// bind - bind mount a local directory
	// nfs - mount an NFS filesystem
	// overlay - overlay mount over an existing mount
	// uri - download a file from a URI and extract it into a ramdisk mount
	//
	// All kinds may or may not be fully supported by the implementation.
	//
	// Enum: [attach bind nfs overlay uri]
	Kind string `json:"kind,omitempty"`

	// mountpoint
	// Read Only: true
	Mountpoint string `json:"mountpoint,omitempty"`

	// nfs
	Nfs *MountNfs `json:"nfs,omitempty"`

	// overlay
	Overlay *MountOverlay `json:"overlay,omitempty"`

	// refs
	// Read Only: true
	Refs int64 `json:"refs,omitempty"`
}

Mount Generically address mounts by kind and ID or definition Either an `mount_id` or a mount definition must be supplied. If both are supplied, the mount definition will be ignored. If `mount_id` is specified, then the kind/id will be used to reference that mount. If no `mount_id` is supplied a defition of type `kind` must be present.

swagger:model mount

func (*Mount) ContextValidate

func (m *Mount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this mount based on the context it is used

func (*Mount) MarshalBinary

func (m *Mount) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Mount) UnmarshalBinary

func (m *Mount) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Mount) Validate

func (m *Mount) Validate(formats strfmt.Registry) error

Validate validates this mount

type MountAttach added in v0.2.0

type MountAttach struct {

	// attach
	// Required: true
	Attach *Attach `json:"attach"`

	// fs type
	// Required: true
	FsType *string `json:"fs_type"`

	// these mount options will be passed to the mount syscall. Supported options depend on filesystem type.
	MountOptions []string `json:"mount_options"`
}

MountAttach `mount_attach` describes an attach mount. This must have at least attach ID associated with it, and a provided filesystem type.

Either `attach_id` or `attach` must be specified. If both are specified, `attach` will be ignored.

If `attach` is specified and `attach_id` is omitted, the specified attach will first be attached, and will be detached on deletion.

swagger:model mount_attach

func (*MountAttach) ContextValidate added in v0.2.0

func (m *MountAttach) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this mount attach based on the context it is used

func (*MountAttach) MarshalBinary added in v0.2.0

func (m *MountAttach) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MountAttach) UnmarshalBinary added in v0.2.0

func (m *MountAttach) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MountAttach) Validate added in v0.2.0

func (m *MountAttach) Validate(formats strfmt.Registry) error

Validate validates this mount attach

type MountBind added in v0.2.0

type MountBind struct {

	// base determines the relative root for the path.  There are two options:
	// `root` means to use the current root (`/`) as the base path.
	// `mount` means to use a mount as the base path. If this is specified, `mount` must be specified as well.
	//
	// Required: true
	// Enum: [root mount]
	Base *string `json:"base"`

	// mount
	Mount *Mount `json:"mount,omitempty"`

	// A unix-formatted filesystem path with `/` relative to the respective base.
	// Required: true
	Path *string `json:"path"`

	// perform a recursive bind mount
	Recursive *bool `json:"recursive,omitempty"`

	// mount read-only
	Ro *bool `json:"ro,omitempty"`
}

MountBind `mount_bind` describes a local bind mount. Bind mounts can be relative to another mount, or to /, allowing a way to access local data.

swagger:model mount_bind

func (*MountBind) ContextValidate added in v0.2.0

func (m *MountBind) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this mount bind based on the context it is used

func (*MountBind) MarshalBinary added in v0.2.0

func (m *MountBind) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MountBind) UnmarshalBinary added in v0.2.0

func (m *MountBind) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MountBind) Validate added in v0.2.0

func (m *MountBind) Validate(formats strfmt.Registry) error

Validate validates this mount bind

type MountNfs added in v0.2.0

type MountNfs struct {

	// IP or hostname for remote NFS mount
	// Required: true
	Host *string `json:"host"`

	// Options as specified in nfs(5).  General mount options won't work here.
	// addr= and clientaddr= will be filled out automatically based on host.
	// vers= will be filled by version
	//
	Options []string `json:"options"`

	// The remote path for the NFS mount
	// Required: true
	Path *string `json:"path"`

	// mount read-only
	Ro *bool `json:"ro,omitempty"`

	// NFS version
	Version *string `json:"version,omitempty"`
}

MountNfs `mount_nfs` describes an NFS mount.

swagger:model mount_nfs

func (*MountNfs) ContextValidate added in v0.2.0

func (m *MountNfs) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this mount nfs based on context it is used

func (*MountNfs) MarshalBinary added in v0.2.0

func (m *MountNfs) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MountNfs) UnmarshalBinary added in v0.2.0

func (m *MountNfs) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MountNfs) Validate added in v0.2.0

func (m *MountNfs) Validate(formats strfmt.Registry) error

Validate validates this mount nfs

type MountOverlay

type MountOverlay struct {

	// This is an array of mount specifications to be used (in order) as lower mounts for the overlay.
	// Required: true
	Lower []*Mount `json:"lower"`

	// currently, upperdir is always a directory in mountDir
	// Read Only: true
	Upperdir string `json:"upperdir,omitempty"`

	// workdir
	// Read Only: true
	Workdir string `json:"workdir,omitempty"`
}

MountOverlay `mount_overlay` describes an Overlayfs mount. All mount points must be RBD ID's. At very least, `lower` must be specified. If `upper` length is zero, no `upper` mounts will be used. `workdir` will be assigned automatically.

If the mounts specified in `lower` are specifications and not ID references, they will be recursively mounted/attached.

Overlay mounts are identified by their uppermost `lower` ID.

swagger:model mount_overlay

func (*MountOverlay) ContextValidate

func (m *MountOverlay) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this mount overlay based on the context it is used

func (*MountOverlay) MarshalBinary

func (m *MountOverlay) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MountOverlay) UnmarshalBinary

func (m *MountOverlay) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MountOverlay) Validate

func (m *MountOverlay) Validate(formats strfmt.Registry) error

Validate validates this mount overlay

type Name

type Name string

Name A name is a unique, user-provided identifier for an object.

A name must consist of numbers, letters, and the symbols in the set { `.`, `-`, `_`}.

swagger:model name

func (Name) ContextValidate

func (m Name) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this name based on context it is used

func (Name) Validate

func (m Name) Validate(formats strfmt.Registry) error

Validate validates this name

type RbdOptions

type RbdOptions struct {

	// abort on full
	AbortOnFull bool `json:"abort_on_full,omitempty"`

	// alloc size
	AllocSize int64 `json:"alloc_size,omitempty"`

	// ceph requires signatures
	CephRequiresSignatures bool `json:"ceph_requires_signatures,omitempty"`

	// cephx sign messages
	CephxSignMessages bool `json:"cephx_sign_messages,omitempty"`

	// crc
	Crc bool `json:"crc,omitempty"`

	// exclusive
	Exclusive bool `json:"exclusive,omitempty"`

	// force
	Force bool `json:"force,omitempty"`

	// fsid
	Fsid string `json:"fsid,omitempty"`

	// ip
	// Pattern: ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$
	// Format: ipv4
	IP strfmt.IPv4 `json:"ip,omitempty"`

	// lock on read
	LockOnRead bool `json:"lock_on_read,omitempty"`

	// lock timeout
	LockTimeout int64 `json:"lock_timeout,omitempty"`

	// mount timeout
	MountTimeout int64 `json:"mount_timeout,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// namespace
	Namespace string `json:"namespace,omitempty"`

	// noceph requires signatures
	NocephRequiresSignatures bool `json:"noceph_requires_signatures,omitempty"`

	// nocephx sign messages
	NocephxSignMessages bool `json:"nocephx_sign_messages,omitempty"`

	// nocrc
	Nocrc bool `json:"nocrc,omitempty"`

	// noshare
	Noshare bool `json:"noshare,omitempty"`

	// notcp nodelay
	NotcpNodelay bool `json:"notcp_nodelay,omitempty"`

	// notrim
	Notrim bool `json:"notrim,omitempty"`

	// osd idle ttl
	OsdIdleTTL int64 `json:"osd_idle_ttl,omitempty"`

	// osdkeepalive
	Osdkeepalive int64 `json:"osdkeepalive,omitempty"`

	// queue depth
	QueueDepth int64 `json:"queue_depth,omitempty"`

	// ro
	Ro bool `json:"ro,omitempty"`

	// rw
	Rw bool `json:"rw,omitempty"`

	// secret
	Secret string `json:"secret,omitempty"`

	// share
	Share bool `json:"share,omitempty"`

	// tcp nodelay
	TCPNodelay bool `json:"tcp_nodelay,omitempty"`
}

RbdOptions rbd options

swagger:model rbd_options

func (*RbdOptions) ContextValidate

func (m *RbdOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this rbd options based on context it is used

func (*RbdOptions) MarshalBinary

func (m *RbdOptions) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RbdOptions) UnmarshalBinary

func (m *RbdOptions) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RbdOptions) Validate

func (m *RbdOptions) Validate(formats strfmt.Registry) error

Validate validates this rbd options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL