-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#550) Add sensu client de-registration #750
Conversation
ed4bd06
to
9d22d3a
Compare
|
We should have some more spec tests for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, though we need spec tests for the init class for the new parameters.
9d22d3a
to
ee3d500
Compare
@ghoneycutt Added some additional spec tests and exercised the change with vagrant in quite a few different ways. I'm confident and satisfied at this point. |
|
This should be good to go for review / merge. |
ee3d500
to
ab09096
Compare
|
Rebased. |
Lots of failing tests... Making another pass at the rebase now. Should be quick. |
ab09096
to
4862f26
Compare
Without this patch the sensu client does not support the deregister and deregistration attributes. These attributes are documented at [deregistration attributes](https://sensuapp.org/docs/latest/reference/clients#deregistration-attributes) This patch adds the `sensu::client_deregister` and `sensu::client_deregistration` class parameters which flow through to the sensu_client_config type and provider. This patch also refactors the sensu_client_config type and provider to operate the same way as the sensu_check type and provider. Specifically, the JSON provider dynamically introspects the set of properties from the type and creates getter and setter methods to output the JSON. Custom attributes are enhanced, if `client_custom = absent` then all custom attributes in the client configuration are removed. Otherwise, the custom attributes are merged on top of any existing custom attributes. When the client config is flushed to /etc/sensu/conf.d/client.json the top level set of keys are sorted. This isn't terribly useful as there is usually just one key, `{"client":{}}`. The value of the client attribute is also sorted, making the output more useful and human readable. Resolves sensu#550
4862f26
to
4a0a33f
Compare
|
OK, rebased for real |
|
Released in v2.27.0 |
Without this patch the sensu client does not support the deregister and
deregistration attributes. These attributes are documented at deregistration
attributes
This patch adds the
sensu::client_deregisterandsensu::client_deregistrationclass parameters which flow through to thesensu_client_config type and provider.
This patch also refactors the sensu_client_config type and provider to operate
the same way as the sensu_check type and provider. Specifically, the JSON
provider dynamically introspects the set of properties from the type and
creates getter and setter methods to output the JSON. Custom attributes are
enhanced, if
client_custom = absentthen all custom attributes in the clientconfiguration are removed. Otherwise, the custom attributes are merged on top
of any existing custom attributes.
Resolves #550