github.com/mwhudson/juju@v0.0.0-20160512215208-90ff01f3497f/storage/filesystem.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package storage
     5  
     6  import "github.com/juju/names"
     7  
     8  // Filesystem identifies and describes a filesystem, either local or remote
     9  // (NFS, Ceph etc).
    10  type Filesystem struct {
    11  	// Tag is a unique name assigned by Juju to the filesystem.
    12  	Tag names.FilesystemTag
    13  
    14  	// Volume is the tag of the volume that backs the filesystem, if any.
    15  	Volume names.VolumeTag
    16  
    17  	FilesystemInfo
    18  }
    19  
    20  // Filesystem describes a filesystem, either local or remote (NFS, Ceph etc).
    21  type FilesystemInfo struct {
    22  	// FilesystemId is a unique provider-supplied ID for the filesystem.
    23  	// FilesystemId is required to be unique for the lifetime of the
    24  	// filesystem, but may be reused.
    25  	FilesystemId string
    26  
    27  	// Size is the size of the filesystem, in MiB.
    28  	Size uint64
    29  }
    30  
    31  // FilesystemAttachment describes machine-specific filesystem attachment information,
    32  // including how the filesystem is exposed on the machine.
    33  type FilesystemAttachment struct {
    34  	// Filesystem is the unique tag assigned by Juju for the filesystem
    35  	// that this attachment corresponds to.
    36  	Filesystem names.FilesystemTag
    37  
    38  	// Machine is the unique tag assigned by Juju for the machine that
    39  	// this attachment corresponds to.
    40  	Machine names.MachineTag
    41  
    42  	FilesystemAttachmentInfo
    43  }
    44  
    45  // FilesystemAttachmentInfo describes machine-specific filesystem attachment
    46  // information, including how the filesystem is exposed on the machine.
    47  type FilesystemAttachmentInfo struct {
    48  	// Path is the path at which the filesystem is mounted on the machine
    49  	// that this attachment corresponds to.
    50  	Path string
    51  
    52  	// ReadOnly indicates that the filesystem is mounted read-only.
    53  	ReadOnly bool
    54  }