models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

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

	// MountKindRbd captures enum value "rbd"
	MountKindRbd string = "rbd"
)

Variables

This section is empty.

Functions

This section is empty.

Types

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"`

	// 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 (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 (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 {

	// kind
	// Required: true
	// Enum: [overlay rbd]
	Kind *string `json:"kind"`

	// mount id
	MountID ID `json:"mount_id,omitempty"`

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

	// rbd
	Rbd *MountRbd `json:"rbd,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 MountOverlay

type MountOverlay struct {

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

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

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

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

	// 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 MountRbd

type MountRbd struct {

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

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

	// mount options
	MountOptions []string `json:"mount_options"`

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

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

	// rbd id
	RbdID ID `json:"rbd_id,omitempty"`

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

MountRbd mount_rbd describes an RBD mount. This must have at least and RBD ID associated with it (which becomes the mount's ID), and a provided filesystem type.

Either `rbd_id` or `rbd` must be specified. If both are specified, `rbd` will be ignored.

If `rbd` is specified and `rbd_id` is omitted, the RBD will first be attached, and will be detached on deletion.

swagger:model mount_rbd

func (*MountRbd) ContextValidate

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

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

func (*MountRbd) MarshalBinary

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

MarshalBinary interface implementation

func (*MountRbd) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*MountRbd) Validate

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

Validate validates this mount rbd

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 Rbd

type Rbd struct {

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

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

	// id
	ID ID `json:"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"`

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

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

Rbd 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 rbd

func (*Rbd) ContextValidate

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

ContextValidate validate this rbd based on the context it is used

func (*Rbd) MarshalBinary

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

MarshalBinary interface implementation

func (*Rbd) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Rbd) Validate

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

Validate validates this rbd

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