summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
AgeCommit message (Collapse)Author
2014-08-19Merge branch 'master' into cfg_as_objectSaku Ytti
2014-08-18Add model for Cisco small business switchesMatthew Boehlig
Supports 200, 300, 500, and ESW2 series switches
2014-08-16Merge branch 'master' into cfg_as_objectSaku Ytti
2014-08-15Added enable magic for powerconnect model, fixed pagination issuesEric
2014-08-15Add Ubiquiti AirOS modelWill Glynn
2014-08-14Merge branch 'master' into cfg_as_objectSaku Ytti
2014-08-14fix ios-xr promptSaku Ytti
2014-08-13Merge branch 'master' into cfg_as_objectSaku Ytti
2014-08-13fix pre/post blocksSaku Ytti
2014-08-13Remove changing lines from procurve.rbJari Salo
2014-08-08Merge branch 'master' into cfg_as_objectSaku Ytti
2014-08-08refactor cfg as objectSaku Ytti
- now default type is 'nil', which is collapsed to flat config via Outputs#to_cfg - if type is not 'nil' then name is automatically set if not set by model - if name and type is set, separate file is created - if name is not set, but type is set, outputs from type are collapsed as with 'nil' types This model: cmd 'show ip cef' do |out| out.type = 'poop' out.name = false out end cmd 'show process cpu' do |out| out.type = 'poop' out.name = 'my_cpu' out end cmd 'show memory statistics' do |out| out.type = 'poop' out.name = false out end cmd 'show ip bgp summary' do |out| out.type = 'poop' end Would produce git output: [ytti@ytti.fi ~/.config/oxidized]% ls poop bu.ip.fi bu.ip.fi--cpu bu.ip.fi--show_ip_bgp_summary [ytti@ytti.fi ~/.config/oxidized]% bu.ip.fi contains the collapsed stuff bu.ip.fi--cpu is manually named bu.ip.fi--show_ip_bgp_summary is automatically named
2014-08-07Use a more compatible Foundry/Brocade syntax for turning off pagingMatthew Walster
Unfortunately, older Foundry/Brocade hardware doesn't support "terminal length 0" and you have to use the much clunkier "skip-page-display" instead. This especially affects older FastIron era devices.
2014-08-07Keep config as Oxidized::Config instead of hashSaku Ytti
The model will look like this: cmd 'show ip cef' do |out| out.type = 'poop' out end cmd 'show process cpu' do |out| out.type = 'poop' out end cmd 'show memory statistics' do |out| out.type = 'poop' out end I think it's cleaner.
2014-08-07Pass model config as Outputs object instead of strSaku Ytti
These objects have some keys, such as 'type' and 'name', which allows our output model to discriminate on them. If ios.rb contains this: cmd 'show ip cef' do |out| { output: out, type: 'poop' } end cmd 'show process cpu' do |out| { output: out, type: 'poop' } end cmd 'show memory statistics' do |out| { output: out, type: 'poop' } end Our git output looks like this: [ytti@ytti.fi ~/.config/oxidized]% git clone oxidized.git Cloning into 'oxidized'... done. [ytti@ytti.fi ~/.config/oxidized]% git clone poop.git Cloning into 'poop'... done. [ytti@ytti.fi ~/.config/oxidized]% ls poop bu.ip.fi--show_ip_cef bu.ip.fi--show_memory_statistics bu.ip.fi--show_process_cpu [ytti@ytti.fi ~/.config/oxidized]% ls oxidized bu.ip.fi [ytti@ytti.fi ~/.config/oxidized]% Where oxidized repo contains standard config for all unspecified types (type is then 'cfg'), for all specified types instead of collapsing it into single string, we store them in 'type' repo with filename including 'name' of the command.
2014-08-06Added Huawei VRP model support.Jari Salo
2014-08-06Merge branch 'master' of https://github.com/ytti/oxidizedSaku Ytti
2014-08-06small model changesSaku Ytti
- ios show first line of 'show version' - junos display omitted config
2014-08-05Add Alcatel-Lucent ISAM 7302/7330 DSLAM model supportJari Salo
2014-07-24Merge pull request #30 from lysiszegerman/masterytti
ScreenOS support
2014-07-23Drop prompt lines from config, discard changes on exitMarcus Stoegbauer
2014-07-23Brocade Vyatta model addedTomi Hakala
2014-07-22Cisco ASA model addedTomi Hakala
2014-07-21Brocade Fabric OS model cleanupsTomi Hakala
2014-07-21Added Brocade Fabric OS supportTomi Hakala
2014-07-21Added Force10 supportMarcus Stoegbauer
2014-07-14Fix powerconnect modelSaku Ytti
a) put metainformation on top, rancid style b) remove changing data from 'show system'
2014-07-13Change from grit to ruggedSaku Ytti
a) grit is not supported, rugged is b) grit requires git CLI installed, rugged does not c) grit needs monkey patching to work, rugged does not Closes #21 Closes #22
2014-06-11Change dynamic discover of file => class nameSaku Ytti
We needed this, because use of 'def inherited' not idempotent, in Oxidized::Script use case we may need to restart Oxidized, even though it's already loaded, and we won't get class names populated via 'def inherited' anymore. There are quite many optiosn to do this a) filename == class name + no discovery/mapping, very clean - user 'source' must give us model name in exactly right capitalization b) add 'self' at end of files, so eval will return class name + deterministic with arbitrary name - DSL cruft, DSL being light is our main value (can we do this via parent class? I couldn't find way) c) load in new module via Module.module_eval X + module will contain only consts we just created - but which one is the one we want? - if we use eval, load errors won't tell line error But at least now we got rid of 'inherited' methods and not adding too much cruft, hope it's better than before.
2014-06-11move :remove_secret to varsSamer Abdel-Hafez
2014-06-11add secrets removal code + bump versionSamer Abdel-Hafez
2014-05-06require config/vars earlier0.0.56Saku Ytti
- we need config/vars before model - some whitespace changes Bump up gemspec
2014-05-05Introduce node and group level varsAnton Aksola
Variables can now be fed to model from multiple locations. In order of preference: 1) node (from source) 2) group 3) global In a model vars should be accessed via 'vars' helper method though it is not required. Helper method ignores nil values so care needs to taken when designing model behaviour. Support for node level vars is currently available on sql source via 'vars_map' configuration. Following example populates node vars 'enable' and 'somevariable' from sql columns 'var_enable' and 'var_somevariable' sql: adapter: sqlite file: /home/aakso/.config/oxidized/sqrouter.db table: nodes map: name: hostname model: model group: node_group username: username password: password vars_map: enable: var_enablepw somevariable: var_somevariable
2014-04-16run cmd :secret blocks if CFG.remove_secret is setSaku Ytti
Model can inmplement something like cmd :secret do |cfg| cfg.sub! / secret (\d+) (\S+).*/, '\\1 SECRET' cfg end Which is called for all commands if CFG.remove_secret is set
2014-04-16remove web APISaku Ytti
It is now separately in oxidized-web package
2014-04-15Use String subclass in model#cmdSaku Ytti
Will allow convenience methods such as cmd :all do |cfg| cfg.pop.shift end instead of: cmd :all do |cfg| cfg.each_line.to_a[1..-2].join end And what ever convenience configs we come up with
2014-04-15the second to last line isn't always emptySaku Ytti
sh ip bgp | i foo and you won't see empty line before prompt, ergo, we cannot always remove it. But I'm not too surprised JunOS + IOS templates are still mostly exactly the same they were from my testing to see how Oxidized works over year ago, they need rework to be production quality.
2014-04-14depend on AsetusSaku Ytti
Change models to Asetus syntax
2014-04-13IOS prompt now matches in config modeSaku Ytti
2014-04-09add model for ALU TiMOSAnton Aksola
tested on SR and SAS routers
2014-04-09add model for AOS7 (Omniswitch 6900/10k)Anton Aksola
supports virtual chassis for OS6900
2014-04-09fix telnet username promptAnton Aksola
2014-04-07minor fixAnton Aksola
2014-04-07add support for non-vdom-enabled environmentsAnton Aksola
2014-04-07add model for Fortinet FortiOS used in Fortigate firewalls. Should workAnton Aksola
at least from version 5 onwards
2014-04-07add ACOS model for A10 AX and Thunder series0.0.44Anton Aksola
2014-04-07pass command string to :all block for (example) to comment a commandAnton Aksola
that was run
2014-03-28comment expects stingSaku Ytti
2014-03-28added AOSW (AOS Wireless / Aruba) supportSaku Ytti
2014-03-28prokurwa may ask to save config, answer 'no'Saku Ytti