summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-07Merge pull request #31 from dotwaffle/foundry-oldytti
Use a more compatible Foundry/Brocade syntax for turning off paging
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-08-05fix typoSaku Ytti
2014-08-05fix ssh close when far end closes disgracefullySaku Ytti
ALU ISAM DSLAM does this
2014-07-26update readme with new modelsSaku Ytti
2014-07-24update gemspec version0.2.2Saku Ytti
2014-07-24update changelogSaku Ytti
2014-07-24Errno::ETIMEDOUT is normal failureSaku Ytti
2014-07-24return false when crash in model/nodeSaku Ytti
Without this, config gets 'true' value, which is not string, and git output will barf.
2014-07-24fix variable reasolving0.2.1Saku Ytti
+ bumpup gemspec
2014-07-24fix variable resolvingSaku Ytti
2014-07-24bump up gemspec version0.2.0Saku Ytti
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-23Merge pull request #29 from thakala/masterytti
Brocade Vyatta model added
2014-07-23Brocade Vyatta model addedTomi Hakala
2014-07-22update changelogSaku Ytti
2014-07-22Merge pull request #28 from thakala/masterytti
Updates
2014-07-22Merge remote branch 'origin'Tomi Hakala
2014-07-22Cisco ASA model addedTomi Hakala
2014-07-22Cisco ASA model addedTomi Hakala
2014-07-22Delete .README.md.swpthakala
2014-07-22Documentation formatting fixesTomi Hakala
2014-07-22Documentation improvements: added list of supported devices and installation ↵Tomi Hakala
instructions for CentOS, OL and RHEL
2014-07-21Brocade Fabric OS model cleanupsTomi Hakala
2014-07-21update changelogSaku Ytti
2014-07-21Merge pull request #27 from thakala/masterytti
Added Brocade Fabric OS support
2014-07-21Added Brocade Fabric OS supportTomi Hakala
2014-07-21update changelogSaku Ytti
2014-07-21make convenience methods usableSaku Ytti
2014-07-21fix README config exampleSaku Ytti
we now support network based SQL and 'file' make little sense in postgres/mysql, changing that to 'database' makes it reusable for both use cases.
2014-07-21Merge pull request #26 from lysiszegerman/masterytti
Added Force10 support
2014-07-21Fix bug in 'vars.rb'0.1.1Saku Ytti
We need to return value of 'r' instead of value of previous evaluation.
2014-07-21Added Force10 supportMarcus Stoegbauer
2014-07-20bump up gemspec0.1.0Saku Ytti
- actually start to follow semantic version - a.b.c a == major, b == minor c == patch - c only for bug-fixes etc - b for non-breaking new features - a for breaking new featires - a == 0 is special, can break anywhere - http://semver.org - add more specific version restrictions for gems
2014-07-20Depend on newer asetus versionSaku Ytti
We are doing this in sql.rb :user => @cfg.sql.user? :password => @cfg.sql.password? As 'asetus' will accept arbitrary chain @cfg.sql.one.two.three it is clear that 'one' or 'two' cannot _ever_ return nil/false, otherwise you cannot create 'three'. So if there isn't value of one/two, instance of 'asetus' is returned, upon which we can build two, and then tree'. one?, two?, three? version existed in old asetus, as strict boolean test @cfg.sql.one? would return true, false or nil In newer version, instead of returning true, it returns actual value.
2014-07-20Return useful error message on missing SQL adapterSaku Ytti
SQL file in configuration renamed to database. Should the generated example file have host+user+password+query?
2014-07-20Merge pull request #25 from lysiszegerman/masterytti
Generic SQL support for source
2014-07-20Added support for custom SQL databases. Works as expected for sqlite, except ↵Marcus Stoegbauer
config option "file" got renamed to "database", added authentication options for other SQL adapters and an optional query argument to overwrite the generic query. config snipplet: sql: adapter: mysql2 user: sqluser password: sekrit host: mysql.local database: inventory table: devices query: SELECT `fqhn` AS `name`, lower(`vendor`) AS `model` FROM `devices` INNER JOIN `devtypes` ON (`devtypes`.`id` = `devices`.`model_id`) WHERE (`aktiv` = 'J') map: name: name model: model
2014-07-17remove secret is under vars, not globalSaku Ytti
2014-07-17Merge branch 'master' of https://github.com/ytti/oxidizedSaku Ytti
2014-07-17bump up gemspec version0.0.65Saku Ytti
2014-07-14Merge pull request #24 from RichiH/patch-5ytti
core.rb: Improve error message