Sha256: 0d5f9db274bfe00e07ba333d699585f435eab18f541f3cb0471516c1555bd773
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
# Cisco IOS Switches ## Include unsaved changes done on a device (commented) with each configuration. Create the file `~/.config/oxidized/model/ios.rb` with the following contents to extend the IOS model: ```ruby require 'oxidized/model/ios.rb' class IOS cmd 'show archive config diff' do |cfg| # Print diff unless ntp period change or ssl-cert read from file cfg.gsub! /^\n/, '' # Remove empty line cfg.gsub! /^!\n/, '' # Remove line with only ! cfg.gsub! /.*ntp clock-period \d+\n/, '' # Remove line with only "ntp clock-period blabla" cfg.gsub! /\n/, "\\n" # Escape newline cfg.gsub! /crypto pki certificate chain.*certificate .*\.cer\\n/, '' # Remove ssl-cert in start config, as it is read from file, this always differ in running if used. cfg.gsub! /crypto pki certificate chain.*-\s*quit\\n/, '' # Remove ssl-cert from running cfg.gsub! /\\n/, "\n" # Set newline back unless cfg == "!Contextual Config Diffs:\n" # Do not print if only something above was changed comment cfg end end end ``` Back to [Model-Notes](README.md)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.27.0 | docs/Model-Notes/ios.md |