-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
add inventory getconfiguration hook #20751
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -834,6 +834,32 @@ class Hooks | |||||||||
*/ | ||||||||||
public const INVENTORY_GET_PARAMS = 'inventory_get_params'; | ||||||||||
|
||||||||||
/** | ||||||||||
* Register a function to provide an agent with additional requested configuration parameters. | ||||||||||
* Like an deployement plugin need to provide its endpoint for contunuing the dialog | ||||||||||
* | ||||||||||
* The function is called with the following parameters: | ||||||||||
* - 'machineid' => The ID of the machine for which configuration is requested. | ||||||||||
* - 'task' => "Taskname[version]", the task name request | ||||||||||
Comment on lines
+842
to
+843
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
* | ||||||||||
* The hooks must return an array that will be send as a json answer to the request. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
* This array should have an "response" key to be considered valid. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
* If any 'errors' key is provided, we will return an HTTP answer with a 400 error code | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
* An example from the deploy plugin | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
* [ | ||||||||||
* "response" => [ | ||||||||||
* "configValidityPeriod" => 600, | ||||||||||
* "schedule" => [ | ||||||||||
* { | ||||||||||
* "task": "Deploy", | ||||||||||
* "remote": "https:\/\/server\/plugins\/deploy\/" | ||||||||||
* } | ||||||||||
* ] | ||||||||||
* ] | ||||||||||
* ] | ||||||||||
*/ | ||||||||||
public const INVENTORY_GET_CONFIGURATION = 'inventory_get_configuration'; | ||||||||||
|
||||||||||
/** | ||||||||||
* Register a function to be called before the inventory submission is handled. | ||||||||||
* The function is called with the following parameters: | ||||||||||
|
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.