github.com/mhilton/juju-juju@v0.0.0-20150901100907-a94dd2c73455/storage/blockdevice.go (about)

     1  // Copyright 2014 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package storage
     5  
     6  // BlockDevice describes a block device discovered on a machine.
     7  type BlockDevice struct {
     8  	// DeviceName is the block device's OS-specific name (e.g. "sdb").
     9  	DeviceName string `yaml:"devicename,omitempty"`
    10  
    11  	// Label is the label for the filesystem on the block device.
    12  	//
    13  	// This will be empty if the block device does not have a filesystem,
    14  	// or if the filesystem is not yet known to Juju.
    15  	Label string `yaml:"label,omitempty"`
    16  
    17  	// UUID is a unique identifier for the filesystem on the block device.
    18  	//
    19  	// This will be empty if the block device does not have a filesystem,
    20  	// or if the filesystem is not yet known to Juju.
    21  	//
    22  	// The UUID format is not necessarily uniform; for example, LVM UUIDs
    23  	// differ in format to the standard v4 UUIDs.
    24  	UUID string `yaml:"uuid,omitempty"`
    25  
    26  	// HardwareId is the block device's hardware ID, which is composed of
    27  	// a serial number, vendor and model name. Not all block devices have
    28  	// these properties, so HardwareId may be empty. This is used to identify
    29  	// a block device if it is available, in preference to UUID or device
    30  	// name, as the hardware ID is immutable.
    31  	HardwareId string `yaml:"hardwareid,omitempty"`
    32  
    33  	// BusAddress is the bus address: where the block device is attached
    34  	// to the machine. This is currently only populated for disks attached
    35  	// to the SCSI bus.
    36  	//
    37  	// The format for this is <bus>@<bus-specific-address> as according to
    38  	// "lshw -businfo". For example, for a SCSI disk with Host=1, Bus=2,
    39  	// Target=3, Lun=4, we populate this field with "scsi@1:2.3.4".
    40  	BusAddress string `yaml:"busaddress,omitempty"`
    41  
    42  	// Size is the size of the block device, in MiB.
    43  	Size uint64 `yaml:"size"`
    44  
    45  	// FilesystemType is the type of the filesystem present on the block
    46  	// device, if any.
    47  	FilesystemType string `yaml:"fstype,omitempty"`
    48  
    49  	// InUse indicates that the block device is in use (e.g. mounted).
    50  	InUse bool `yaml:"inuse"`
    51  
    52  	// MountPoint is the path at which the block devices is mounted.
    53  	MountPoint string `yaml:"mountpoint,omitempty"`
    54  }