summaryrefslogtreecommitdiff
path: root/lib/oxidized
AgeCommit message (Collapse)Author
2014-08-14fix ios-xr promptSaku Ytti
2014-08-13Remove changing lines from procurve.rbJari Salo
2014-08-11specify rugged versionSaku Ytti
with 0.19.0 (in rubygem-rugged-0.19.0-4.fc20.x86_64) you'll get this: /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/output/git.rb:69:in `create': wrong argument type nil (expected Hash) (TypeError) from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/output/git.rb:69:in `update_repo' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/output/git.rb:33:in `store' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/worker.rb:37:in `process' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/worker.rb:13:in `block in work' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/worker.rb:13:in `each' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/worker.rb:13:in `work' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/core.rb:36:in `run' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/core.rb:29:in `initialize' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/core.rb:11:in `new' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/core.rb:11:in `new' from /usr/local/share/gems/gems/oxidized-0.2.2/lib/oxidized/cli.rb:9:in `run' from /usr/local/share/gems/gems/oxidized-0.2.2/bin/oxidized:9:in `<top (required)>' from /usr/local/bin/oxidized:23:in `load' from /usr/local/bin/oxidized:23:in `<main>'
2014-08-08Support creating session log of telnet/sshSaku Ytti
If you have input: debug: session_log Then session_log-telnet and session_log-ssh will be created showing what the telnet/ssh saw. Helpful in model development.
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-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 ssh close when far end closes disgracefullySaku Ytti
ALU ISAM DSLAM does this
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 resolvingSaku 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-22Merge pull request #28 from thakala/masterytti
Updates
2014-07-22Cisco ASA model addedTomi Hakala
2014-07-21Brocade Fabric OS model cleanupsTomi Hakala
2014-07-21Merge pull request #27 from thakala/masterytti
Added Brocade Fabric OS support
2014-07-21Added Brocade Fabric OS supportTomi Hakala
2014-07-21make convenience methods usableSaku Ytti
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-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-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-14core.rb: Improve error messageRichard Hartmann
2014-07-14Fix powerconnect modelSaku Ytti
a) put metainformation on top, rancid style b) remove changing data from 'show system'
2014-07-14Allow it to work without local existing configSaku Ytti
Even after manually setting author+committer, it still crashed with: Config value 'user.name' was not found [Rugged::ConfigError] Not sure where it would want to use it, after author+committer already are set, but I guess this method is more robust anyhow.
2014-07-13Explain how to disable oxidized-web if load errorSaku Ytti
Ratioinale is, we want to keep it default, but it should be easy for people to understand what to do, if they don't want it. Closes #17
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-07-11reset retry count on successSaku Ytti
2014-07-11add support for retrying failed attemptsSaku Ytti
Looks like this in syslog: Jul 11 21:05:53 ytti oxidized[9820]: 10.10.10.10 raised Errno::ENETUNREACH with msg "Network is unreachable - connect(2) for "10.10.10.10" port 22" Jul 11 21:05:53 ytti oxidized[9820]: 10.10.10.10 raised Errno::ENETUNREACH with msg "Network is unreachable - connect(2) for "10.10.10.10" port 23" Jul 11 21:05:54 ytti oxidized[9820]: 10.10.10.10 status no_connection, retry attempt 1 Jul 11 21:05:54 ytti oxidized[9820]: 10.10.10.10 raised Errno::ENETUNREACH with msg "Network is unreachable - connect(2) for "10.10.10.10" port 22" Jul 11 21:05:54 ytti oxidized[9820]: 10.10.10.10 raised Errno::ENETUNREACH with msg "Network is unreachable - connect(2) for "10.10.10.10" port 23" Jul 11 21:05:55 ytti oxidized[9820]: 10.10.10.10 status no_connection, retry attempt 2 Jul 11 21:05:55 ytti oxidized[9820]: 10.10.10.10 raised Errno::ENETUNREACH with msg "Network is unreachable - connect(2) for "10.10.10.10" port 22" Jul 11 21:05:55 ytti oxidized[9820]: 10.10.10.10 raised Errno::ENETUNREACH with msg "Network is unreachable - connect(2) for "10.10.10.10" port 23" Jul 11 21:05:56 ytti oxidized[9820]: 10.10.10.10 status no_connection, retry attempt 3 Jul 11 21:05:56 ytti oxidized[9820]: 10.10.10.10 raised Errno::ENETUNREACH with msg "Network is unreachable - connect(2) for "10.10.10.10" port 22" Jul 11 21:05:56 ytti oxidized[9820]: 10.10.10.10 raised Errno::ENETUNREACH with msg "Network is unreachable - connect(2) for "10.10.10.10" port 23" Jul 11 21:05:57 ytti oxidized[9820]: 10.10.10.10 status no_connection, retries exhausted, giving up
2014-07-11ignore empty lines in CSV sourceSaku Ytti
Closes #23
2014-07-11Bit friendlier error message on invalid configSaku Ytti
Closes #20 [ytti@ytti.fi ~/tmp/oxidized]% oxidized Error loading config: (<unknown>): mapping values are not s context at line 15 column 7 [ytti@ytti.fi ~/tmp/oxidized]%
2014-07-11support local modelsSaku Ytti
if ~/.config/oxidized/model/ios.rb exists it is used, iinstead of the system-wide model
2014-07-11create config dir, before pointing log file thereSaku Ytti
thanks to @richih
2014-07-09Require OpenStructSaku Ytti
How this works in ruby2.0 normally? What component has loaded this implicitly? Thanks to @RichiH for spotting.
2014-07-09Default to local listening for oxidized-webRichard Hartmann
2014-07-04match node[:name] to ipSaku Ytti
When running Oxidized via oxidized-script you want just one node, and you specify that as Nodes.new(:node=>x) however as router.db usually lacks 'ip' field, and only has 'name' field'. If you have router.db with IP in 'name' field, and you do Nodes.new(:node='192.0.2.1') it won't return anything, as '192.0.2.1' is matched against node[:ip] which does not exist. This change makes IP match against IP and Name.
2014-07-03Fix class name resolutionSaku Ytti
In new method, where we no long explicitly set loaded class name for later resolution we depend on file name being same as class name. However for File output, this is not true, because I didn't want plain File in code to resolve to Oxidized::File, and din't want to always write ::File, File ouput has class name OxFile. This change allows class names to start optionally with string 'Oxidized' if so, they still match.
2014-06-11Fix dynamic loading matchSaku Ytti
We can't use #match, if IOSXR is seen in source list before IOS, then IOS will #match on IOSXR class and wrong model is used for IOS devices. And obviously stupid to use regexp if you don't atbsolutely have to.
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-06-06fix: node#last= didn't handle nilAnton Aksola
temporary fix. Maybe node#last should check the type or we shouldn't use last for the nodes#next in the first place
2014-06-06fix: handle group in output git#fetchAnton Aksola