summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'add-directory-ignore'Alexander Sulfrian2022-01-161-1/+3
|\
| * Server: Ignore directories containing a .bcfg2-ignore fileAlexander Sulfrian2015-04-181-1/+3
| | | | | | | | | | | | | | | | | | | | The DirectoryBacked helper now does not recurse into directories that contains a .bcfg2-ignore file. This makes it possible to ignore some directories for most plugins (Bundler, Defaults, Pkgmgr, Properties, PuppetENC, TemplateHelper, Trigger). You can store for example a python module used by a TemplateHelper in the same directory, without getting strange error messages while TemplateHelper is trying to import each single file of this module.
* | Server/Plugin: CallableDict is an OnDemandDict without cachingAlexander Sulfrian2017-03-211-16/+46
| | | | | | | | | | | | Add a CallableDict (like OnDemandDict, but without caching the results) to have a dict-like class, that can be cached with the client metadata without caching the dynamic values.
* | Server/Plugin: Support functions and values for OnDemandDictAlexander Sulfrian2017-03-211-4/+9
| | | | | | | | Now you can also specify simple values for the OnDemandDict.
* | Server/Plugin: Move OnDemandDict to helpersAlexander Sulfrian2017-03-211-1/+47
| | | | | | | | The OnDemandDict could be used by different plugins.
* | Rules: New options replace_name to replace %{name} in attributesAlexander Sulfrian2015-08-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | If you use the regex feature of Rules/Defaults you may need the real name of the matched entry in an attribute (for example home of POSIXUser). You can now enable replace_name for rules or defaults and %{name} will be replaces in the attribues of the Element before adding them to the target entry. This allows you to write something like that in Defaults to assing a default home directory somewhere else to all users with unset home: <POSIXUser name='.*' home='/somewhere/%{name}'/>
* | PrioDir: Only set text content, if something is availableAlexander Sulfrian2015-07-211-1/+2
| | | | | | | | | | | | This is used for the Rules and Defaults plugins. Without this patch all text content that was there before (for example file content bound by Cfg) is lost, for all entries specified in Defaults.
* | Merge branch 'maint'Alexander Sulfrian2015-06-121-1/+0
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-5/+0
| | | | | | | | | | | | | | | | | | 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-8/+12
| | | | | | | | | | | | | | | | | | | | 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-171-3/+0
| | | | | | | | | | 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.
* | Server/Plugin/helpers: remove track_statisticsAlexander Sulfrian2014-12-131-36/+0
| | | | | | | | Bcfg2.Server.Statistics.track_statistics was identical.
* | InfoXML: <Path> filter should match on realpathAlexander Sulfrian2014-10-141-1/+1
| | | | | | | | | | | | | | When using altsrc the name of real file created on the client is now in the realname attribute of the entry. The <Path> filter in the info.xml should match theses if available to set different permissions for the different files created by one template with altsrc.
* | Merge branch 'maint'Sol Jerome2014-06-101-1/+7
|\| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com> Conflicts: doc/server/plugins/structures/bundler/index.txt src/lib/Bcfg2/Server/Admin/Init.py src/lib/Bcfg2/Server/Plugins/GroupLogic.py src/lib/Bcfg2/Server/Plugins/Properties.py src/lib/Bcfg2/Server/Plugins/Reporting.py
| * XMLFileBacked: Watch XIncluded files that do not existChris St. Pierre2014-05-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes a best effort to watch XIncluded files that do not exist. Assume that you have XIncluded ``foo.xml``, the following (currently) fails: mv foo.xml /tmp mv /tmp/foo.xml . Bcfg2 processes the deletion event, and stops watching ``foo.xml``; consequently, it receives no creation event when you put ``foo.xml`` back. This does not fix the situation where you add a new file that is matched by a wildcard XInclude, which turns out to be much more difficult, and will likely require a significant restructuring of how wildcard XIncludes are processed. (I.e., we'll need to place a monitor on the directory or directories where the wildcard XInclude is looking, and then filter events according to the wildcard.)
* | Merge branch 'maint'Chris St. Pierre2014-04-251-13/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * cleared pylint error on PluginDatabaseModel metadata optionsChris St. Pierre2014-03-031-1/+2
| |
| * helpers: better error message when failing to read FileBackedChris St. Pierre2014-02-251-1/+2
| |
| * Metadata: reread client list from databaseChris St. Pierre2014-02-231-0/+4
| | | | | | | | | | | | | | | | This fixes two related bugs: One causes Metadata to use an out-of-date cached list of clients when a client is deleted or added with bcfg2-admin; the other causes child worker processes to use an out-of-date cached list of clients when a client is added with a Bcfg2 run when the multiprocessing core is in use.
* | Merge branch 'maint'Chris St. Pierre2013-12-091-6/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * XMLSrc: Load XML in one step instead of separate read and parseChris St. Pierre2013-12-091-9/+2
| |
| * testsuite: fixed unit tests for database fixesChris St. Pierre2013-11-251-4/+5
| |
| * Core: Avoid starting server if database is enabled but cannot be usedChris St. Pierre2013-11-251-4/+13
| | | | | | | | | | | | | | Plugins that use the database often act quite differently depending on whether or not the database is enabled. If we start the server without the database (e.g., the connection failed), then Very Strange Things can happen.
* | Plugins: Added TemplateDataProvider plugin interfaceChris St. Pierre2013-10-302-15/+106
| | | | | | | | | | | | | | This lets you provide variables to the top-level namespace of templates in a more seamless way than through a Connector plugin. It's mostly useful for TemplateHelper for now, but may find other uses in the future.
* | Plugins: refactored out unnecessary datastore constructor argumentChris St. Pierre2013-10-293-14/+12
| |
* | Merge branch 'maint'Chris St. Pierre2013-09-161-11/+8
|\| | | | | | | | | | | Conflicts: src/lib/Bcfg2/Server/Plugins/Cfg/CfgPublicKeyCreator.py testsuite/Testsrc/Testlib/TestServer/TestPlugins/TestCfg/TestCfgPrivateKeyCreator.py
| * XMLFileBacked: removed unused variableChris St. Pierre2013-09-111-1/+1
| |
| * XMLFileBacked: Fixed multiple identical XIncludes in one fileChris St. Pierre2013-09-111-12/+9
| |
* | Pylint/PEP8 fixesSol Jerome2013-09-061-1/+1
| | | | | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Merge branch 'maint'Chris St. Pierre2013-09-051-1/+23
|\| | | | | | | | | | | Conflicts: src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/Plugins/GroupLogic.py
| * Allow Connector to create new groupsChris St. Pierre2013-09-051-1/+23
| | | | | | | | | | Connector plugins can now create new groups, including the full range of options on those groups (profile, public, category, etc.).
| * XMLFileBacked: Monitor XIncludes whenever a FAM is availableChris St. Pierre2013-09-041-3/+4
| | | | | | | | | | | | | | | | | | | | This monitors XIncluded files even if should_monitor=False, since the object monitoring the base file will not monitor XIncludes. This ensures that XIncluded files are properly monitored whenever possible, particularly for Bundler and Properties. This is a partial backport of 5b66845 -- as much of a backport as is possible without a module-level FAM object.
* | XMLFileBacked: always watch xincludesChris St. Pierre2013-08-301-5/+2
| | | | | | | | | | | | | | | | | | In Bcfg2 1.3, XInclude'd files only got FAM watches if the parent file was monitoring itself, and it got a FAM object passed to it. This led to some ugly workarounds, and bugs -- you couldn't easily use XInclude in Properties or Bundler, for instance, and have changes recognized. Since FAM objects are now module-level, we can always monitor XInclude'd files.
* | Rewrote arbitrary data cache systemChris St. Pierre2013-08-162-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | The caching facilities in Bcfg2.Server.Cache provided basically no features. This rewrites that to allow for much more powerful cache expiration, with a particular focus on interoperation between different components and plugins to let caches be expired as necessary. (E.g., the Probes plugin can expire the Metadata cache.) This does not affect any of the file data cached by Bcfg2, only the caches that are populated with arbitrary data (Metadata, Packages, Probes, etc.).
* | PrioDir: Fixed event handlerChris St. Pierre2013-08-141-7/+6
| |
* | testsuite: fixed unit tests for new SSLCA stuffChris St. Pierre2013-08-131-1/+4
| |
* | testsuite: fixed more unit testsChris St. Pierre2013-08-121-1/+1
| |
* | testsuite: fixed most pylint complaintsChris St. Pierre2013-08-092-1/+2
| |
* | testsuite: Fixed base plugin testsChris St. Pierre2013-08-091-1/+2
| |
* | Merge branch 'options-rewrite'Chris St. Pierre2013-08-084-179/+115
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/lib/Bcfg2/Client/Frame.py src/lib/Bcfg2/Options.py src/lib/Bcfg2/Server/Admin/Init.py src/lib/Bcfg2/Server/Admin/Xcmd.py src/lib/Bcfg2/Server/BuiltinCore.py src/lib/Bcfg2/Server/Core.py src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/base.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Packages/__init__.py src/lib/Bcfg2/Server/SSLServer.py src/lib/Bcfg2/Utils.py src/lib/Bcfg2/settings.py src/sbin/bcfg2-crypt src/sbin/bcfg2-info src/sbin/bcfg2-lint src/sbin/bcfg2-test src/sbin/bcfg2-yum-helper tools/bcfg2-profile-templates.py
| * | Options: migrated plugins to new options parserChris St. Pierre2013-06-274-137/+83
| | |
* | | Merge branch 'maint'Chris St. Pierre2013-08-082-3/+39
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/appendix/files/mysql.txt doc/getting_started/index.txt doc/server/plugins/structures/bundler/kernel.txt src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/interfaces.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Probes.py src/lib/Bcfg2/Server/Plugins/SSHbase.py
| * | Plugin: added missing docstringChris St. Pierre2013-08-071-0/+11
| | |
| * | MultiprocessingCore: added a way to dispatch RMI calls to child processesChris St. Pierre2013-08-071-0/+18
| | |
| * | Plugin: added new Caching interfaceChris St. Pierre2013-08-071-0/+8
| | | | | | | | | | | | | | | | | | | | | This gives a single unified interface for expiring caches, no matter the plugin. This will be particularly useful with the MultiprocessingCore, as certain calls must be dispatched to child processes to expire their caches.
| * | Plugin: quiet down set_debug, but keep it usefulChris St. Pierre2013-08-061-3/+2
| | |
* | | Plugin/helpers: Remove duplicate _include_testsSol Jerome2013-06-281-14/+0
| |/ |/| | | | | Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
* | Merge branch 'maint'Chris St. Pierre2013-06-272-1/+9
|\| | | | | | | | | | | | | | | | | Conflicts: doc/server/plugins/generators/cfg.txt doc/server/plugins/generators/tcheetah.txt src/lib/Bcfg2/Server/Admin/Xcmd.py src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
| * do not create data directories for plugins that don't need themChris St. Pierre2013-06-132-1/+9
| |