summaryrefslogtreecommitdiff
path: root/lib/oxidized/source
AgeCommit message (Collapse)Author
2018-04-27Rebased from masterNeil Lathwood
2018-04-21the great makeover - standardize layout, alignment, indentationWild Kat
2018-04-11standardize on verbose hash methodsWild Kat
2017-11-23fixed csv source (#1113)Neil Lathwood
2017-11-22fix: GPG bug fix when loading file (#1109)Michael Baker
* GPG bug fix * Update Sources.md * Update README.md
2017-11-10updated to check if node_wantlaf
2017-11-10Added sql support for calling for single hostlaf
2017-11-10Added support for sending single node request to http sourceNeil Lathwood
2017-02-14don't use http auth when no user or pw is in cfgSaku Ytti
fixes #720
2017-02-13don't fail on poor json location specificationSaku Ytti
2017-02-13add support for hierarchical keys in jsonSaku Ytti
requestd in issue #695
2017-01-25Updatembakerbp
2017-01-24Requested changesmbakerbp
2017-01-24GPG support workingmbakerbp
2017-01-24GPG supportmbakerbp
2017-01-24Updatembakerbp
2017-01-24Syntax errormbakerbp
2017-01-24Untested GPG workmbakerbp
2016-11-19Updated config optionsNeil Lathwood
2016-11-19Added option to disable ssl verification checks for http sourceNeil Lathwood
2016-10-12Interpolate also node variables, not just vars mapSaku Ytti
Fixes #583
2016-09-28interpolate node variable valuesSaku Ytti
Empty value was variably considered "" or nil, now it will always be "" string. Now "nil", "false", "true" strings are converted to their respective types nil, false and true. This also means we cannot have verbatim strings by that name, like if your password was "false", you're shit out of luck. If this is the case, we can add some __false__ hack or consider other similar solutions. Fixes #500 Fixes #534 May break stuff with ""/nil changing now, but as it was not consistent to begin with, I find it acceptable. Users now may need to manually enter nil in some fields to regain old behaviour.
2016-01-17Added support for using basic auth in http sourcelaf
2015-11-13better test framework, more specs and Travis CIElvin Efendi
2015-05-07Added support for http as a sourcelaf
2015-04-20expand csv pathSaku Ytti
so that ~/foo/bar works
2014-12-13Skip commentsSaku Ytti
closes #64
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-11ignore empty lines in CSV sourceSaku Ytti
Closes #23
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-05-06require config/vars earlier0.0.56Saku Ytti
- we need config/vars before model - some whitespace changes Bump up gemspec
2014-05-05missing editsAnton Aksola
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-16We rescue 'LoadError' in ManagerSaku Ytti
Let's raise OxidizedError instead for known dependencies
2014-04-15Remove dependency to sequel, sqlite3 and gritSaku Ytti
Not every installation will use git + sql. Try to give helpful error message on missing dependencies.
2014-04-14update to newer asetus version0.0.51Saku Ytti
2014-04-14Use 'asetus' for configuration filesSaku Ytti
Main benefits a) we get support for system wide configs b) we don't use symbols in config file, they're confusing to non-rubyist
2014-02-25Fix crashes on missing configSaku Ytti
We now merge user config with bootstrap config ensuring all configuratio options are set even if not in configuratatin. Allowing us to add new configuration options, without needing for users to touch their existing configuration. All default values are still written to user config when ever CFG.save is called, which means when you change your output/input/source models and configuration is missing, instead of just adding the configuration needed for that particular module, it'll save full config to file. Don't really think that is a bug, but might be something to fix later on with maybe parameter to 'save'. Which would load user config, merge it with 'save' argument level and save user config. But unless someone is bothered by it, I won't do it. This commit fixes #1
2013-04-24Remove Sequel modelSaku Ytti
No point creating the model for one-off use, especially with dodgy dynamic consts
2013-04-24Remove useless aliasesSaku Ytti
2013-04-17Initial commitSaku Ytti
Silly for shit-and-giggles attempt at rancid