Class: GaiaOS
- Inherits:
-
Oxidized::Model
- Object
- Oxidized::Model
- GaiaOS
- Defined in:
- lib/oxidized/model/gaiaos.rb
Instance Attribute Summary
Attributes inherited from Oxidized::Model
Instance Method Summary collapse
Methods inherited from Oxidized::Model
cfg, #cfg, cfgs, cmd, #cmd, cmds, comment, #comment, expect, #expect, expects, #expects, #get, inherited, #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 Oxidized.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| Oxidized.logger.debug vs cmd 'show configuration' do |vscfg| vscfg.gsub! /^# Exported by \S+ on .*/, '# ' allcfg += vscfg end end end allcfg end end |