Merge remote-tracking branch 'origin/master'
* origin/master: (22 commits) Converting booleans to symbols Removed old node_group provider Basic functionality for puppetclassify provider Submitting all values for rbac_user Use default parent for uses on Using data in Rbac.rest method helper Changed example to 'PE MCollective' Formatted docs Added PE groups doc Can specify parent with string name Autorequire parent node group Can use string name for parent ID Added helpers to nc_api Moved common rest functionality to rest_helper Added helpers stuff Moved data_hash and get_args to a helper class Added some methods for rbac_user RBAC querying Updated 303 message to make sense for environments and groups Added rescue if classifier.yaml isn't there ...
Clarify the state of this module, that is is unmaintained and not currently supported.
Previous to this commit, a flush would take place regardless if the create method was setting parameters. Since the create method does not set any values in the @property_flush hash, the flush fails. The flush, however, is unnecessary. This commit sets a @noflush instance variable in the create method that the flush method uses to determine whether or not to run.
Do not munge array values for rules
Previous to this commit, the node_group type would munge the array values for rules. However, this ended up having the side effect of combining every rule for every previously parsed node_group type. Munging the array values in unecessary as :array_matching => :all can be used in the property definition. This commit removes the munging in favor of using :array_matching
Add support for rbac_user passwords
Previous to this commit, passwords could not be set for new RBAC users despite being supported in the API. This commit adds support for setting passwords, but only when users are created. Updating passwords for existing accounts is not supported
Support certname lookup for RBAC URL
Previous to this commit, the RBAC DNS name was hard coded to puppet. For environemnts where that's not the DNS hostname of the puppet master, this fails. This commit grabs the certname setting from the Puppet config and assumes that's the correct DNS name to use since Puppet is likely not functioning if that's not the hostname. This restricts the solution to working on the master for monolithic installs. There have to be better solutions available, however. I haven't found where to lookup the URL configuration for the RBAC service.
Merge pull request #8 from ccaum/support_hostname_rbac_url
Support certname lookup for RBAC URL
Merge pull request #7 from ccaum/support_passwords
Add support for rbac_user passwords
Merge pull request #6 from ccaum/fix_rules_munging_and_flushing
Fix rules updates and node_group creates
Merge pull request #9 from turbodog/patch-1
Noted requiremented for puppetclassify
Guard Puppetclassify usage with a Puppet feature
The `node_group` resource requires the Puppetclassify gem to be installed. However, `node_group` could not be used in a catalog that also installs the required gem as autoloading the provider would cause a failed attempt to load the gem. This patch properly guards the use of Puppetclassify by adding `:puppetclassify` to `Puppet.features` and using the feature to confine the provider. The provider class has also been re-factored to store the shared PuppetClassifier instance in a class variable instead of using a global variable.
Fix override_environment parameter
There is some "usability" logic for the `override_environment` parameter that maps the parameter value to `environment_trumps` during group creation requests. However, the logic was inverted and would perform a switch to `override_environment` if a non-existent `environment_trumps` parameter was in use. This caused group creation to fail as the Classifier API would reject the `override_environment` parameter. This patch fixes the faulty logic and cleans up some redundant statements.
Merge pull request #10 from Sharpie/add-feature-guard
Guard Puppetclassify usage with a Puppet feature
Merge pull request #11 from Sharpie/fix-environment-override
Fix override_environment parameter
Removing the rbac types/providers
These types and providers are in development and not ready for release.
Merge pull request #15 from jolshevski/move_rbac_types
Move RBAC Types/Providers to Dev Branch
Allow colons in node group names
A colon is a valid character there. Prior to this, the node_group resource would fail for groups with a colon in their name because the validation regex did not allow for a colon. This is especially relevant when node group names match a class name, such as a 'role' class with colons for namespacing.
Merge pull request #16 from joshbeard/group_names_with_colon
Allow colons in node group names
This commit adds a Gemfile with testing dependencies, Rakefile which includes the puppetlabs_spec_helper tasks, and travis build config.
This commit adds high level integration tests covering all types/providers, and unit tests for select edges. The idea here being that the integration tests span from input validation to API call, so we can refactor the module freely without worrying about breaking core functionality, or false positives from brittle tests.
Correcting type validation behavior
The node classifier service doesn't place any constrains on the contents of the string provided for a node group's name. I'm removing the unnecessary validation from the type. Additionally, the environment attribute should support the agent-specified keyword, which falls out of the allowed convention. I'm also updating the regex to the same used internally. See the previous commit for the unit tests which unearthed there incorrect behaviors: 5adb238
Merge pull request #12 from jolshevski/fixes/tests
Bug Fixes / Automated Testing
Merge pull request #17 from smbambling/master
Updating docs to pass show passing a boolean value for override_envir…