Class: HmxClient::Command::Partition
- Defined in:
- lib/hmx/command/partition.rb
Overview
Create new partitions in HMX based on the current partition
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create ⇒ Object
partition:create.
-
#index ⇒ Object
partition.
-
#switch ⇒ Object
partition:switch.
Methods inherited from Base
#hmx, #initialize, #loadConfig!, namespace, #removeConfig, #storeConfig, #writeConfig
Methods included from Helpers
#display, #display_row, #display_tab, #display_table, #error, #getFromUser, #longest
Constructor Details
This class inherits a constructor from HmxClient::Command::Base
Instance Method Details
#create ⇒ Object
partition:create
Create a new partition based on this partition
23 24 25 26 27 |
# File 'lib/hmx/command/partition.rb', line 23 def create target = args.shift; style = args.shift; partition = hmx.doClonePartition([target, style]); end |
#index ⇒ Object
partition
List the partitions on this system (requires administrative privileges)
13 14 15 16 17 18 |
# File 'lib/hmx/command/partition.rb', line 13 def index partitions = hmx.doGetPartitions([]); partitions.each do | p | puts p['name']; end end |
#switch ⇒ Object
partition:switch
Switch the context of this hmx configuration to a new partition This is basically a synonym of config:add partition=
33 34 35 36 |
# File 'lib/hmx/command/partition.rb', line 33 def switch storeConfig("partition".to_sym, args.shift); puts "Done" end |