From b5810882e8c6b1e6b76a8239f70a129d415ecee6 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 20 Apr 2011 09:41:07 -0400 Subject: Rewrote bcfg2-repo-validate as bcfg2-lint, which uses a plugin interface to be lots more flexible and extensible. Added several more tests. If bcfg2-lint is run as bcfg2-repo-validate, it roughly emulates the functionality of that program. TODO: Need to figure out correct way to symlink bcfg2-repo-validate to bcfg2-lint on install. --- examples/bcfg2-lint.conf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/bcfg2-lint.conf (limited to 'examples/bcfg2-lint.conf') diff --git a/examples/bcfg2-lint.conf b/examples/bcfg2-lint.conf new file mode 100644 index 000000000..5c7641d4a --- /dev/null +++ b/examples/bcfg2-lint.conf @@ -0,0 +1,20 @@ +[main] +plugins=Duplicates,InfoXML,Bundles,Headers,RequiredAttrs,Validate + +[InfoXML] +require = owner,group,perms,paranoid +require_paranoid = True + +[Comments] +global_keywords = Id +sgenshi_comments = Properties,Probes,Description +properties_comments = Template,Format +tgenshi_comments = Maintainer,Properties,Probes,Description +cfg_comments = +cfg_keywords = +probe_comments = Maintainer,Purpose,Groups,Other Output + +[Validate] +schema=/home/stpierre/devel/bcfg2/schema +repo=/home/stpierre/bcfg2/trunk +properties_schema=warn -- cgit v1.2.3-1-g7c22 From 6da7d24710fe67c80c4a71f227cd01675eebca88 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 21 Apr 2011 08:50:06 -0400 Subject: Lots of cleanup for bcfg2-repo-validate rewrite: * Changed all references to bcfg2-repo-validate in the documentation to bcfg2-lint * Wrote man pages for bcfg2-lint and bcfg2-lint.conf * Cleaned up straggling references to bcfg2-repo-validate in Makefiles, spec files, and the POSIX tool * A few minor bug fixes --- examples/bcfg2-lint.conf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples/bcfg2-lint.conf') diff --git a/examples/bcfg2-lint.conf b/examples/bcfg2-lint.conf index 5c7641d4a..1d3a82160 100644 --- a/examples/bcfg2-lint.conf +++ b/examples/bcfg2-lint.conf @@ -2,7 +2,7 @@ plugins=Duplicates,InfoXML,Bundles,Headers,RequiredAttrs,Validate [InfoXML] -require = owner,group,perms,paranoid +required_attrs = owner,group,perms,paranoid require_paranoid = True [Comments] @@ -15,6 +15,5 @@ cfg_keywords = probe_comments = Maintainer,Purpose,Groups,Other Output [Validate] -schema=/home/stpierre/devel/bcfg2/schema -repo=/home/stpierre/bcfg2/trunk +schema=/usr/share/bcfg2/schema properties_schema=warn -- cgit v1.2.3-1-g7c22 From 66642f84fd71e9230245b11718bf9a7e96ba0c7f Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 25 Apr 2011 08:40:26 -0400 Subject: changed [main] section of bcfg2-lint.conf to [lint] to make it possible to combine config files get full stack trace from failed plugins for easier troubleshooting --- examples/bcfg2-lint.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/bcfg2-lint.conf') diff --git a/examples/bcfg2-lint.conf b/examples/bcfg2-lint.conf index 1d3a82160..dbb69dbb2 100644 --- a/examples/bcfg2-lint.conf +++ b/examples/bcfg2-lint.conf @@ -1,4 +1,4 @@ -[main] +[lint] plugins=Duplicates,InfoXML,Bundles,Headers,RequiredAttrs,Validate [InfoXML] -- cgit v1.2.3-1-g7c22 From 17b8ceb17e0ee775a667d2f92b2b192e567b2df6 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 25 Apr 2011 10:45:41 -0400 Subject: Various bcfg2-lint fixes: * check for all plugins before referencing them, since in --stdin mode even plugins like Bundler may not be instantiated * formatting fixes * made Bundles plugin work with or without genshi installed * fixed name of plugin in example bcfg2-lint.conf --- examples/bcfg2-lint.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/bcfg2-lint.conf') diff --git a/examples/bcfg2-lint.conf b/examples/bcfg2-lint.conf index dbb69dbb2..96b86af3b 100644 --- a/examples/bcfg2-lint.conf +++ b/examples/bcfg2-lint.conf @@ -1,5 +1,5 @@ [lint] -plugins=Duplicates,InfoXML,Bundles,Headers,RequiredAttrs,Validate +plugins=Duplicates,InfoXML,Bundles,Comments,RequiredAttrs,Validate [InfoXML] required_attrs = owner,group,perms,paranoid -- cgit v1.2.3-1-g7c22 From 23ae3d201af82292ad4e939569a50f2e32c689a3 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 5 May 2011 08:16:51 -0400 Subject: made bcfg2-lint error handling configurable on a much more granular level --- examples/bcfg2-lint.conf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'examples/bcfg2-lint.conf') diff --git a/examples/bcfg2-lint.conf b/examples/bcfg2-lint.conf index 96b86af3b..abf969496 100644 --- a/examples/bcfg2-lint.conf +++ b/examples/bcfg2-lint.conf @@ -1,9 +1,16 @@ [lint] plugins=Duplicates,InfoXML,Bundles,Comments,RequiredAttrs,Validate +[errors] +no-infoxml=error +paranoid-false=error +properties-schema-not-found=silent +inconsistent-bundle-name=error +keywords-not-found=error +comments-not-found=error + [InfoXML] required_attrs = owner,group,perms,paranoid -require_paranoid = True [Comments] global_keywords = Id @@ -16,4 +23,3 @@ probe_comments = Maintainer,Purpose,Groups,Other Output [Validate] schema=/usr/share/bcfg2/schema -properties_schema=warn -- cgit v1.2.3-1-g7c22