Class: MintPress::Infrastructure::OvirtStorage
- Inherits:
-
BlockDevice
- Object
- MountPoint
- BlockDevice
- MintPress::Infrastructure::OvirtStorage
- Includes:
- Mixins::GenericProvider, Mixins::Properties
- Defined in:
- src/mintpress-infrastructure-ovirt/lib/mintpress-infrastructure-ovirt/ovirt_storage.rb
Direct Known Subclasses
Properties (Read/Write)
-
#ovirt_username ⇒ String (Default Value: Proc.new { host.ovirt_username })
Property Attributes- default ⇒ Proc.new { host.ovirt_username }
11
# File 'src/mintpress-infrastructure-ovirt/lib/mintpress-infrastructure-ovirt/ovirt_storage.rb', line 11 property :ovirt_username, type: String, default: Proc.new { host.ovirt_username }
-
#ovirt_password ⇒ String (Default Value: Proc.new { host.ovirt_password })
Property Attributes- default ⇒ Proc.new { host.ovirt_password }
12
# File 'src/mintpress-infrastructure-ovirt/lib/mintpress-infrastructure-ovirt/ovirt_storage.rb', line 12 property :ovirt_password, type: String, default: Proc.new { host.ovirt_password }
-
#ovirt_api_endpoint ⇒ String (Default Value: Proc.new { host.ovirt_api_endpoint })
Property Attributes- default ⇒ Proc.new { host.ovirt_api_endpoint }
13
# File 'src/mintpress-infrastructure-ovirt/lib/mintpress-infrastructure-ovirt/ovirt_storage.rb', line 13 property :ovirt_api_endpoint, type: String, default: Proc.new { host.ovirt_api_endpoint }
-
#ovirt_ca_file ⇒ String (Default Value: Proc.new { host.ovirt_ca_file})
Property Attributes- default ⇒ Proc.new { host.ovirt_ca_file}
14
# File 'src/mintpress-infrastructure-ovirt/lib/mintpress-infrastructure-ovirt/ovirt_storage.rb', line 14 property :ovirt_ca_file, type: String, default: Proc.new { host.ovirt_ca_file}
-
#storage_domain ⇒ String (Default Value: Proc.new { find_default_storage_domain })
Property Attributes- required ⇒ true
- default ⇒ Proc.new { find_default_storage_domain }
15
# File 'src/mintpress-infrastructure-ovirt/lib/mintpress-infrastructure-ovirt/ovirt_storage.rb', line 15 property :storage_domain, type: String, required: true, default: Proc.new { find_default_storage_domain }
-
#disk_type ⇒ String (Default Value: Proc.new { find_root_disk_type })
Property Attributes- default ⇒ Proc.new { find_root_disk_type }
- allowed_values ⇒ ['virtio_scsi','virtio','spapr_vscsi','sata','ide']
16
# File 'src/mintpress-infrastructure-ovirt/lib/mintpress-infrastructure-ovirt/ovirt_storage.rb', line 16 property :disk_type, type: String, default: Proc.new { find_root_disk_type }, allowed_values: ['virtio_scsi','virtio','spapr_vscsi','sata','ide']
-
#device_node ⇒ String (Default Value: Proc.new { get_device_node })
Property Attributes- default ⇒ Proc.new { get_device_node }
17
# File 'src/mintpress-infrastructure-ovirt/lib/mintpress-infrastructure-ovirt/ovirt_storage.rb', line 17 property :device_node, type: String, default: Proc.new { get_device_node }
-
#name ⇒ String
Property Attributes16
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 16 property :name, type: String
-
#storage_name ⇒ String (Default Value: Proc.new { r = self.name
if host.keys.length == 1
r = [host.values[0].name,self.name].join('-')
end
r })
The name of the block device in the storage system - this defaults to "hostname-block_device_name"
Property Attributes- default ⇒ Proc.new { r = self.name if host.keys.length == 1 r = [host.values[0].name,self.name].join('-') end r }
18 19 20 21 22 23 24 25 26
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 18 property :storage_name, type: String, default: Proc.new { r = self.name if host.keys.length == 1 r = [host.values[0].name,self.name].join('-') end r }
-
#is_netdev ⇒ [TrueClass, FalseClass] (Default Value: false)
Is this at the other end of a network - for example, iscsi? Defaults to false, unless this is iscsi in which case it defaults to true
Property Attributes- default ⇒ false
31
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 31 property :is_netdev, type: [TrueClass, FalseClass], default: false
-
#storage_group ⇒ String (Default Value: Proc.new { parent.name })
The disk group on the storage - if not specified, this will default to the name of the parent. Note that not all systems utilize this (AWS, for example, does not)
Property Attributes- default ⇒ Proc.new { parent.name }
35
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 35 property :storage_group, type: String, default: Proc.new { parent.name }
-
#storage_class ⇒ String (Default Value: 'Default')
This allows child classes to 'guess' an appropraite IO type Offline - For offline-ish backups. This maps to AWS Glacier and similar backup storage, where access my take real time Capacity - This maps to a 'default' slow type that is usually spinning disk Throughput - This maps to a type which _only_ cares about throughput, but not IOPS Latency - This maps to a low latency disk type Default - whatever the 'default' disk for this platform is Note that this _can_ be overridden with extra allowed_values in child classes to specify exact disks, but this is discouraged! FIXME: This list will almost certainly change as JJ does more mapping!
Property Attributes- allowed_values ⇒ ['Offline', 'Capacity', 'Throughput', 'Latency', 'Default']
- default ⇒ 'Default'
49
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 49 property :storage_class, type: String, allowed_values: ['Offline', 'Capacity', 'Throughput', 'Latency', 'Default'], default: 'Default'
-
#size_mb ⇒ Integer
How large, in megabytes, should this device be?
Property Attributes52
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 52 property :size_mb, type: Integer
-
#mount_point ⇒ String
Where should it be mounted on the filesystem?
Property Attributes54
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 54 property :mount_point, type: String
-
#virtual_name ⇒ String (Default Value: Proc.new { self.name })
This is the name given to an LVM or requiavlent
Property Attributes- default ⇒ Proc.new { self.name }
57
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 57 property :virtual_name, type: String, default: Proc.new { self.name }
-
#shared ⇒ [TrueClass, FalseClass] (Default Value: false)
Does this need to be created as a sharable volume? Note that some storage providers WILL reject this!
Property Attributes- default ⇒ false
61
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 61 property :shared, type: [TrueClass, FalseClass], default: false
-
#volume_managed ⇒ [TrueClass, FalseClass] (Default Value: true)
Do we use the platform's advanced volume manager (LVM on linux), or are these "raw" volumes?
Property Attributes- default ⇒ true
64
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 64 property :volume_managed, type: [TrueClass, FalseClass], default: true
-
#filesystem ⇒ String (Default Value: 'default')
'default' will take the default for the installed target platform - YMMV ;) For now, i've stubbed out allowed_values because of things like oracleasm being able to consume this!
Property Attributes- default ⇒ 'default'
68
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 68 property :filesystem, type: String, default: 'default'
-
#device_node ⇒ String (Default Value: Proc.new { self.parent.allocate_block_device(self) })
If this is left blank, one will be allocated for you This probably does NOT work on mutli-attachments for now, but hopefully this also isn't required in those cases!
Property Attributes- default ⇒ Proc.new { self.parent.allocate_block_device(self) }
73
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 73 property :device_node, type: String, default: Proc.new { self.parent.allocate_block_device(self) }
-
#thin_provision ⇒ [TrueClass, FalseClass]
If this is unset, it will use the platform default
Property Attributes83
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 83 property :thin_provision, type: [TrueClass, FalseClass]
-
#create_partition ⇒ [TrueClass, FalseClass] (Default Value: false)
Should we create a partition? This defaults to false, since dedicated block device partitions are pain if you later want to resize the disk or such like
Property Attributes- default ⇒ false
87
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 87 property :create_partition, type: [TrueClass, FalseClass], default: false
-
#use_gpt ⇒ [TrueClass, FalseClass] (Default Value: true)
If we do create a partition, should it be GPT? Default is true
Property Attributes- default ⇒ true
90
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 90 property :use_gpt, type: [TrueClass, FalseClass], default: true
-
#host ⇒ Hash of ⇒ MintPress::Infrastructure::Host
Which host is this storage attached to?
Property Attributes96
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 96 property :host, type: MintPress::Infrastructure::Host, hash: true
-
#enable_clustered_file_system ⇒ [TrueClass, FalseClass] (Default Value: false)
'Set this to true if you want a clustered file system like, ocfs2, gfs etc.'
Property Attributes- default ⇒ false
100
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 100 property :enable_clustered_file_system, type: [TrueClass, FalseClass], default: false, description: 'Set this to true if you want a clustered file system like, ocfs2, gfs etc.'
-
#clustered_file_system_type ⇒ String (Default Value: 'ocfs2')
'Type of clustered file system to configure if [enable_clustering] is set to true.'
Property Attributes- default ⇒ 'ocfs2'
102
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 102 property :clustered_file_system_type, type: String, default: 'ocfs2', description: 'Type of clustered file system to configure if [enable_clustering] is set to true.'
-
#cluster_name ⇒ String (Default Value: "#{self.clustered_file_system_type}cluster")
'Name of the cluster, can only be alpha numeric.'
Property Attributes- default ⇒ "#{self.clustered_file_system_type}cluster"
104
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 104 property :cluster_name, type: String, default: "#{self.clustered_file_system_type}cluster", description: 'Name of the cluster, can only be alpha numeric.'
-
#skip_iscsi_prep ⇒ [TrueClass, FalseClass] (Default Value: false)
'Flag to execute iscsi commands. Required for OCI paravirt attachments.'
Property Attributes- default ⇒ false
106
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 106 property :skip_iscsi_prep, type: [TrueClass, FalseClass], default: false, description: 'Flag to execute iscsi commands. Required for OCI paravirt attachments.'
-
#name ⇒ String
Property Attributes10
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 10 property :name, type: String
-
#mount_point ⇒ String
Path to mount the filesystem on the target
Property Attributes12
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 12 property :mount_point, type: String
-
#device_node ⇒ String
Device node to mount - '/dev/sda5' or '/dev/large_vg/large_lvol' for example
Property Attributes14
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 14 property :device_node, type: String
-
#filesystem ⇒ String
Filesystem type - for example, ext4, xfs, nfs
Property Attributes16
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 16 property :filesystem, type: String
-
#persistant ⇒ [TrueClass, FalseClass] (Default Value: true)
Should it persist in /etc/fstab?
Property Attributes- default ⇒ true
18
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 18 property :persistant, default: true, type: [TrueClass, FalseClass]
-
#pass ⇒ Integer (Default Value: 2)
Pass for fstab entry
Property Attributes- default ⇒ 2
20
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 20 property :pass, type: Integer, default: 2
-
#dump ⇒ Integer (Default Value: Proc.new { self.pass })
Dump setting for fstab entry
Property Attributes- default ⇒ Proc.new { self.pass }
22
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 22 property :dump, type: Integer, default: Proc.new { self.pass }
-
#options ⇒ Array of ⇒ String (Default Value: 'defaults')
Filesystem options for fstab
Property Attributes- default ⇒ 'defaults'
24
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 24 property :options, type: String, array: true, default: 'defaults'
-
#host ⇒ Hash of ⇒ MintPress::Infrastructure::Host
The hosts to which this mountpoint applies
Property Attributes26
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 26 property :host, type: MintPress::Infrastructure::Host, hash: true
-
#is_netdev ⇒ [TrueClass, FalseClass] (Default Value: false)
Is this at the other end of a network? Defaults to 'false', unless the class is iscsi in which case it defaults to 'true'
Property Attributes- default ⇒ false
29
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/mount.rb', line 29 property :is_netdev, type: [TrueClass, FalseClass], default: false
Properties (Read Only)
-
#implemented_providers ⇒ Array of ⇒ String
'List of infrastructure providers that this class can work with'
Property Attributes- read_only ⇒ true
93
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/block_storage.rb', line 93 property :implemented_providers, type: String, array: true, read_only: true, description: 'List of infrastructure providers that this class can work with'
Constant Summary
Constants included from MintLogger
MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN
Instance Attribute Summary
Attributes included from Mixins::Properties
#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root
Instance Method Summary collapse
- #attach ⇒ Object
- #attached? ⇒ Boolean
- #client ⇒ Object
-
#create ⇒ Object
We don't create ovirt storage for now without a host...
- #destroy ⇒ Object
- #detach ⇒ Object
- #disk_attachment_service ⇒ Object
- #exists? ⇒ Boolean
- #find_default_storage_domain ⇒ Object
- #find_root_disk_type ⇒ Object
-
#get_device_node ⇒ Object
This gets the device from the host via the UUID returned from the API.
-
#get_disk ⇒ Object
Get the disk from the Ovirt service.
-
#initialize(opts = {}) ⇒ OvirtStorage
constructor
A new instance of OvirtStorage.
- #is_uuid?(uuid) ⇒ Boolean
Methods included from Mixins::GenericProvider
included, #register_provider, #register_sub_provider
Methods included from MintLogger::Utils::Common
#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send
Methods included from Mixins::Properties
#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref
Methods inherited from BlockDevice
#force_kill, #prepare, #unprepare
Methods inherited from MountPoint
#mount, #mounted?, #unmount, #unpersist