summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint
Commit message (Collapse)AuthorAgeFilesLines
* Lint/TemplateHelper: Fix parametersAlexander Sulfrian2015-11-181-1/+1
| | | | | | | The HelperModules of the TemplateHelper now expects a second argument with the core, to be able to expire the metadata cache. This is a fix-up for 36b2aa66627a4cc147f982d03688ae9df14bbe08.
* Utils: Generalize safe_module_nameAlexander Sulfrian2015-07-241-3/+4
| | | | | Other plugins that also import user generated python source code, may want to use safe_module_name from TemplateHelper.
* Utils: Generalize is_string from POSIX/FileAlexander Sulfrian2015-07-221-7/+3
| | | | | | is_string from POSIX/File could be used in other situations, too. So we move it to Utils, use it from Lint/MergeFiles and replace a custom is_binary function.
* Lint/MergeFiles: Ignore binary filesAlexander Sulfrian2015-07-211-0/+7
| | | | | Ignore files with binary content, because SequenceMatcher seems to have problems and sometimes detect files with different content as identically.
* Merge branch 'maint'Alexander Sulfrian2015-06-121-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: debian/changelog doc/conf.py misc/bcfg2-selinux.spec misc/bcfg2.spec osx/Makefile osx/macports/Portfile solaris-ips/MANIFEST.bcfg2-server.header solaris-ips/MANIFEST.bcfg2.header solaris-ips/Makefile solaris-ips/pkginfo.bcfg2 solaris-ips/pkginfo.bcfg2-server solaris/Makefile solaris/pkginfo.bcfg2 solaris/pkginfo.bcfg2-server src/lib/Bcfg2/Client/Tools/APT.py src/lib/Bcfg2/Client/Tools/FreeBSDInit.py src/lib/Bcfg2/Client/Tools/__init__.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Reporting/Collector.py src/lib/Bcfg2/Reporting/templates/base.html src/lib/Bcfg2/Server/CherrypyCore.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/__init__.py src/lib/Bcfg2/Server/Lint/Validate.py src/lib/Bcfg2/Server/Lint/__init__.py src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/__init__.py src/lib/Bcfg2/Server/Plugins/GroupPatterns.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/Packages/Source.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/SSHbase.py src/lib/Bcfg2/Server/Plugins/SSLCA.py src/lib/Bcfg2/version.py src/sbin/bcfg2-info src/sbin/bcfg2-test testsuite/requirements.txt
| * Fix pylint errorsChris St. Pierre2015-02-253-27/+31
| | | | | | | | | | | | | | | | | | This also pins pylint to <= 0.28 so we don't have to keep playing whack-a-mole with it. Also removes unnecessary suppression of apt warnings. This is no longer necessary in 12.04, so should be safe to remove. If you're on Ubuntu < 12.04, upgrade for heaven's sake.
* | Remove blanket excepts from plugins and lintChris St. Pierre2015-02-182-4/+5
| | | | | | | | | | | | | | | | | | | | This removes most blanket except: clauses from all plugins, including the base plugin libraries, and bcfg2-lint. The few that remain should all be necessary. Most of the changes were quite minor, but this did require some restructuring of the CfgPrivateKeyCreator; as a result, the tests for that module were rewritten.
* | Pylint fixes for pylint 0.28Chris St. Pierre2015-02-174-37/+40
| | | | | | | | | | This also pins Pylint to 0.28 or older so that we don't have to do this again. At some point we should look at upgrading to Pylint 1.x.
* | Lint: fix default value for lint_pluginsAlexander Sulfrian2014-10-309-30/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a bit tricky because we need the enabled server plugins for the default value. To have these available before parsing lint_plugins the server plugins needs to be parsed during early parsing mode. Additional there are lint plugins that has no matching server plugin. To identify them, this adds a reference from the lint plutins to the name of the matching server plugins in the member variable __serverplugin__. If this variable is None the plugin is always used. If a lint plugin could not be imported (maybe because of a missing dependency) the plugin is ignored and not considered as a default value.
* | Lint: handle KeyboardInterupt during fam eventsAlexander Sulfrian2014-10-301-2/+2
| | | | | | | | | | | | | | If a KeyboardInterupt occurs during block_for_fam_events core.shutdown() has to be called. block_For_fam_events will start the fam thread and if shutdown is not called the main thread will stop on an exception and python will wait until the fam thread stops (never).
* | Lint/Comments: add missing optionsAlexander Sulfrian2014-10-301-1/+9
| |
* | Lint/Comments: fix typo in optionsAlexander Sulfrian2014-10-301-2/+2
| |
* | Lint: remove executable bit from source filesAlexander Sulfrian2014-10-302-0/+0
| |
* | Lint/TemplateAbuse: we need the <Info> elementAlexander Sulfrian2014-10-301-1/+1
| |
* | Lint/TemplateAbuse: fix access to FileInfo xml dataAlexander Sulfrian2014-10-302-2/+2
| |
* | Lint/Validate: fix default schema pathAlexander Sulfrian2014-10-291-1/+1
| |
* | Fix docstringGordon Messmer2014-09-121-1/+1
| |
* | Another lint whitespace fix.Gordon Messmer2014-09-111-1/+1
| |
* | Fix lint warnings.Gordon Messmer2014-09-111-1/+2
| |
* | First pass at Jinja2 support for Cfg.Gordon Messmer2014-09-113-2/+57
| |
* | doc: Fix 1.4.0pre1 release notesSol Jerome2014-06-161-2/+2
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Merge branch 'maint'Chris St. Pierre2014-04-251-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: misc/bcfg2.spec src/lib/Bcfg2/Client/Client.py src/lib/Bcfg2/Client/Tools/APK.py src/lib/Bcfg2/Client/Tools/MacPorts.py src/lib/Bcfg2/Client/Tools/Pacman.py src/lib/Bcfg2/Client/Tools/YUM.py src/lib/Bcfg2/Server/Admin/Minestruct.py src/lib/Bcfg2/Server/Admin/Pull.py src/lib/Bcfg2/Server/Admin/Viz.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgPrivateKeyCreator.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-info src/sbin/bcfg2-lint src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProperties.py
* | Merge branch 'maint' into masterSol Jerome2014-04-163-3/+64
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com> Conflicts: doc/appendix/guides/import-existing-ssh-keys.txt misc/bcfg2.spec src/lib/Bcfg2/Client/Tools/VCS.py src/lib/Bcfg2/Client/Tools/YUM.py src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Reporting/Collector.py src/lib/Bcfg2/Reporting/Storage/DjangoORM.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/FileMonitor/__init__.py src/lib/Bcfg2/Server/Lint/RequiredAttrs.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-reports src/sbin/bcfg2-yum-helper testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestAugeas.py
| * bcfg2-lint: Verify abstract Package tagsChris St. Pierre2014-02-231-0/+10
| |
| * support python 2.4 for default ACL checking in LintRichard Connon2014-02-181-6/+7
| |
| * Working lint check for invalid default ACLsRichard Connon2014-02-141-29/+18
| |
| * Correct XML source for bundles in default ACL LintRichard Connon2014-02-141-1/+1
| |
| * Lint checking for invalid default ACLsRichard Connon2014-02-141-1/+32
| |
| * fixed pylint testsChris St. Pierre2014-01-301-1/+2
| |
| * load correct JSON library on py2.4Chris St. Pierre2014-01-291-1/+2
| |
| * bcfg2-lint: expand wildcard xincludes when validating XMLChris St. Pierre2013-12-311-0/+29
| |
* | bcfg2-lint: verify Path tags in RequiredAttrsChris St. Pierre2014-02-261-0/+10
| |
* | bcfg2-lint: Fixed TemplateHelper lint pluginChris St. Pierre2014-01-071-3/+5
| |
* | bcfg2-lint: new Crypto plugin checks for data that should be encrypted but isn'tChris St. Pierre2014-01-071-0/+61
| |
* | bcfg2-lint: fixed automatically loading server plugin lint pluginsChris St. Pierre2014-01-071-5/+5
| |
* | Merge branch 'maint'Chris St. Pierre2013-12-093-3/+158
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/appendix/guides/fedora.txt misc/bcfg2.spec schemas/types.xsd src/lib/Bcfg2/Encryption.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Client.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Lint/Validate.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Bundler.py src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py src/lib/Bcfg2/Server/Plugins/Probes.py src/sbin/bcfg2-crypt testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgEncryptedGenerator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestProbes.py testsuite/common.py testsuite/install.sh
| * bcfg2-lint: New ValidateJSON pluginChris St. Pierre2013-12-091-0/+70
| | | | | | | | | | This plugin validates the JSON files that can be used by Properties and Ohai.
| * bcfg2-lint: New TemplateAbuse plugin detects templated scriptsChris St. Pierre2013-12-091-0/+75
| | | | | | | | | | | | | | | | TemplateAbuse detects templated scripts (either files that end with a known extension, or that start with a shebang line) and executables (based off of their permissions in info.xml) and warns about them, since templating scripts is dicey at best, and almost always better done by templating a config file for the script to read instead.
| * bcfg2-lint: resolve XIncludes when parsing XML for validationChris St. Pierre2013-11-181-3/+12
| |
* | bcfg2-lint: better checks for TemplateHelper __default__ stuffChris St. Pierre2013-11-111-1/+15
| | | | | | | | | | | | | | * Check to ensure that no symbols use reserved words, which are different for __default__ than for __export__ * Check to ensure that symbols aren't listed in both __default__ and __export__
* | fixed misc. unit testsChris St. Pierre2013-10-281-0/+3
| |
* | Merge branch 'maint'Chris St. Pierre2013-10-282-0/+30
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: doc/development/lint.txt misc/bcfg2.spec src/lib/Bcfg2/Reporting/Collector.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Plugins/Metadata.py src/lib/Bcfg2/Server/models.py testsuite/install.sh
| * New plugin: AWSTagsChris St. Pierre2013-09-261-0/+1
| | | | | | | | | | AWSTags allows querying tags from EC2, and setting groups based on the tag names or values.
* | bcfg2-lint: allow specifying no lint pluginsChris St. Pierre2013-10-091-1/+1
| |
* | Merge branch 'maint'Chris St. Pierre2013-09-231-9/+29
|\| | | | | | | | | | | | | Conflicts: src/lib/Bcfg2/Server/Plugins/GroupLogic.py src/lib/Bcfg2/Server/Plugins/Metadata.py tools/posixusers_baseline.py
* | Merge branch 'maint'Chris St. Pierre2013-09-091-2/+18
|\| | | | | | | | | Conflicts: src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
* | bcfg2-lint: Fixed bugs in MergeFiles, added check for identical filesChris St. Pierre2013-09-091-21/+56
| |
* | bcfg2-lint: fixed old Cfg API call in Cfg pluginChris St. Pierre2013-09-091-1/+1
| |
* | bcfg2-lint: Fixed name of TemplateHelper lint pluginChris St. Pierre2013-09-091-1/+1
| |
* | Pylint/PEP8 fixesSol Jerome2013-09-067-14/+15
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>