Class: GaiaOS
- Inherits:
-
Oxidized::Model
- Object
- Oxidized::Model
- GaiaOS
- Defined in:
- lib/oxidized/model/gaiaos.rb
Constant Summary
Constants inherited from Oxidized::Model
Oxidized::Model::METADATA_DEFAULT
Instance Attribute Summary
Attributes inherited from Oxidized::Model
Instance Method Summary collapse
Methods inherited from Oxidized::Model
cfg, #cfg, cfgs, clean, cmd, #cmd, cmds, comment, #comment, #expect, expect, expects, #expects, #get, inherited, #interpolate_string, metadata, #metadata, #output, post, pre, prompt, #prompt, #screenscrape, #send, #xmlcomment
Methods included from Oxidized::Config::Vars
Instance Method Details
#multiple_context ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oxidized/model/gaiaos.rb', line 56 def multiple_context logger.debug 'Multi context tasks' cmd 'show virtual-system all' do |systems| vs_items = systems.scan(/^(?<VSID>\d+)\s+(?<VSNAME>.*[^\s])/) allcfg = '' vs_items.each do |item| allcfg += "\n\n\n#--------======== [ VS #{item[0]} - #{item[1]} ] ========--------\n\n" allcfg += "set virtual-system #{item[0]}\n\n" cmd "set virtual-system #{item[0]}" do |vs| logger.debug vs cmd 'show configuration' do |vscfg| vscfg.gsub! /^# Exported by \S+ on .*/, '# ' allcfg += vscfg end end end allcfg end end |
#single_context ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/oxidized/model/gaiaos.rb', line 48 def single_context logger.debug 'Single context tasks' cmd 'show configuration' do |cfg| cfg.gsub! /^# Exported by \S+ on .*/, '# ' cfg end end |