razor-client 1.7.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.md +12 -0
- data/bin/razor +19 -23
- data/lib/razor/cli/command.rb +3 -3
- data/lib/razor/cli/navigate.rb +55 -1
- data/lib/razor/cli/parse.rb +15 -11
- data/lib/razor/cli/version.rb +1 -1
- data/spec/cli/command_spec.rb +10 -1
- data/spec/cli/navigate_spec.rb +52 -4
- data/spec/cli/parse_spec.rb +1 -2
- data/spec/fixtures/sample_api +1 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/accept-language_header/should_allow_other_accept-language_headers.yml +10 -8
- data/spec/fixtures/vcr/Razor_CLI_Navigate/accept-language_header/should_set_the_accept-language_header.yml +10 -8
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_in_string.yml +110 -91
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_single-dash_with_single_character_flag.yml +71 -51
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml +328 -271
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_not_allow_double-dash_with_single_character_flag.yml +52 -40
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_not_allow_single-dash_with_multiple_character_flag.yml +49 -37
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml +53 -135
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml +53 -135
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml +53 -135
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml +53 -135
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml +53 -135
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml +53 -135
- data/spec/fixtures/vcr/Razor_CLI_Navigate/positional_arguments/should_allow_the_use_of_positional_arguments.yml +229 -163
- data/spec/fixtures/vcr/Razor_CLI_Navigate/positional_arguments/should_fail_with_too_many_positional_arguments.yml +49 -37
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml +25 -13
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml +14 -8
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_bad_JSON.yml +52 -40
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml +105 -90
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_an_array_into_an_existing_array.yml +549 -446
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_as_an_array.yml +549 -446
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_into_an_existing_array.yml +549 -446
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml +71 -51
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object_with_unicode.yml +144 -100
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_array_then_hash_.yml +52 -40
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_hash_then_array_.yml +52 -40
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml +54 -43
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_limit.yml +25 -13
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_start.yml +25 -13
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_not_fail_when_query_returns_details_for_one_item.yml +78 -44
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_store_query_without_query_parameters.yml +130 -74
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_throw_an_error_if_the_query_parameter_is_not_in_the_API.yml +14 -8
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_throw_an_error_if_the_query_parameter_is_not_in_the_API_from_a_single_item.yml +66 -38
- data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml +12 -8
- data/spec/spec_helper.rb +4 -1
- data/spec/testing.md +25 -1
- metadata +73 -71
@@ -12,7 +12,11 @@ http_interactions:
|
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
14
|
User-Agent:
|
15
|
-
-
|
15
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
16
|
+
Accept-Language:
|
17
|
+
- en_US,en
|
18
|
+
Host:
|
19
|
+
- localhost:8150
|
16
20
|
response:
|
17
21
|
status:
|
18
22
|
code: 200
|
@@ -23,109 +27,16 @@ http_interactions:
|
|
23
27
|
X-Content-Type-Options:
|
24
28
|
- nosniff
|
25
29
|
Content-Type:
|
26
|
-
- application/json;charset=utf-8
|
27
|
-
Content-Length:
|
28
|
-
- '5650'
|
29
|
-
Date:
|
30
|
-
- Mon, 09 Mar 2015 19:54:34 GMT
|
31
|
-
body:
|
32
|
-
encoding: US-ASCII
|
33
|
-
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"}],"version":{"server":"v0.16.1-18-gd3acc7a-dirty"}}'
|
34
|
-
http_version:
|
35
|
-
recorded_at: Mon, 09 Mar 2015 19:54:34 GMT
|
36
|
-
- request:
|
37
|
-
method: get
|
38
|
-
uri: http://localhost:8150/api/commands/update-tag-rule
|
39
|
-
body:
|
40
|
-
encoding: US-ASCII
|
41
|
-
string: ''
|
42
|
-
headers:
|
43
|
-
Accept:
|
44
30
|
- application/json
|
45
|
-
Accept-Encoding:
|
46
|
-
- gzip, deflate
|
47
|
-
User-Agent:
|
48
|
-
- Ruby
|
49
|
-
response:
|
50
|
-
status:
|
51
|
-
code: 200
|
52
|
-
message: OK
|
53
|
-
headers:
|
54
|
-
Server:
|
55
|
-
- Apache-Coyote/1.1
|
56
|
-
Etag:
|
57
|
-
- '"server-version-v0.16.1-18-gd3acc7a-dirty"'
|
58
|
-
X-Content-Type-Options:
|
59
|
-
- nosniff
|
60
|
-
Content-Type:
|
61
|
-
- application/json;charset=utf-8
|
62
31
|
Content-Length:
|
63
|
-
- '
|
32
|
+
- '7110'
|
64
33
|
Date:
|
65
|
-
- Mon,
|
34
|
+
- Mon, 23 Apr 2018 19:48:35 GMT
|
66
35
|
body:
|
67
|
-
encoding:
|
68
|
-
string: '{"name":"update-tag-rule","
|
69
|
-
for an existing tag","description":"This will change the rule of the given
|
70
|
-
tag to the new rule. The tag will be\nreevaluated against all nodes and each
|
71
|
-
node''s tag attribute will be updated to\nreflect whether the tag now matches
|
72
|
-
or not, i.e., the tag will be added\nto/removed from each node''s tag as appropriate.\n\nIf
|
73
|
-
the tag is used by any policies, the update will only be performed if the\noptional
|
74
|
-
parameter `force` is set to `true`. Otherwise, it will fail.","schema":"#
|
75
|
-
Access Control\n\nThis command''s access control pattern: `commands:update-tag-rule:%{name}`\n\nWords
|
76
|
-
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
77
|
-
name of the object being modified, or some other critical detail, these\nallow
|
78
|
-
roles to be granted partial access to modify the system.\n\nFor more detail
|
79
|
-
on how the permission strings are structured and work, you can\nsee the [Shiro
|
80
|
-
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
81
|
-
check applied to it, before the command is authorized.\n\nThese checks only
|
82
|
-
apply if security is enabled in the Razor configuration\nfile; on this server
|
83
|
-
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
84
|
-
Attributes\n\n * name\n - The tag for which to change the rule.\n - This
|
85
|
-
attribute is required.\n - It must be of type string.\n - It must match
|
86
|
-
the name of an existing tag.\n\n * rule\n - The new rule to apply to the
|
87
|
-
tag.\n - This attribute is required.\n - It must be of type array.\n\n
|
88
|
-
* force\n - By default this command will fail if the tag is in use by an
|
89
|
-
existing\n policy. This flag allows you to override that, and force the
|
90
|
-
change to\n apply despite the tag being in use.\n \n This will
|
91
|
-
not change policy binding of nodes, which may lead to some\n counter-intuitive
|
92
|
-
results such as a node that does *not* match policy\n tags being bound
|
93
|
-
to the policy.\n - It must be of type boolean.\n","examples":{"api":"An
|
94
|
-
example of updating a tag rule, and forcing reevaluation:\n\n{\n \"name\":
|
95
|
-
\"small\",\n \"rule\": [\"<=\", [\"fact\", \"processorcount\"], \"2\"],\n \"force\":
|
96
|
-
true\n}","cli":"An example of updating a tag rule, and forcing reevaluation:\n\nrazor
|
97
|
-
update-tag-rule --name small --force \\\n --rule ''[\"<=\", [\"fact\",
|
98
|
-
\"processorcount\"], \"2\"]''"},"full":"# SYNOPSIS\nUpdate the matching rule
|
99
|
-
for an existing tag\n\n# DESCRIPTION\nThis will change the rule of the given
|
100
|
-
tag to the new rule. The tag will be\nreevaluated against all nodes and each
|
101
|
-
node''s tag attribute will be updated to\nreflect whether the tag now matches
|
102
|
-
or not, i.e., the tag will be added\nto/removed from each node''s tag as appropriate.\n\nIf
|
103
|
-
the tag is used by any policies, the update will only be performed if the\noptional
|
104
|
-
parameter `force` is set to `true`. Otherwise, it will fail.\n# Access Control\n\nThis
|
105
|
-
command''s access control pattern: `commands:update-tag-rule:%{name}`\n\nWords
|
106
|
-
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
107
|
-
name of the object being modified, or some other critical detail, these\nallow
|
108
|
-
roles to be granted partial access to modify the system.\n\nFor more detail
|
109
|
-
on how the permission strings are structured and work, you can\nsee the [Shiro
|
110
|
-
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
111
|
-
check applied to it, before the command is authorized.\n\nThese checks only
|
112
|
-
apply if security is enabled in the Razor configuration\nfile; on this server
|
113
|
-
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
114
|
-
Attributes\n\n * name\n - The tag for which to change the rule.\n - This
|
115
|
-
attribute is required.\n - It must be of type string.\n - It must match
|
116
|
-
the name of an existing tag.\n\n * rule\n - The new rule to apply to the
|
117
|
-
tag.\n - This attribute is required.\n - It must be of type array.\n\n
|
118
|
-
* force\n - By default this command will fail if the tag is in use by an
|
119
|
-
existing\n policy. This flag allows you to override that, and force the
|
120
|
-
change to\n apply despite the tag being in use.\n \n This will
|
121
|
-
not change policy binding of nodes, which may lead to some\n counter-intuitive
|
122
|
-
results such as a node that does *not* match policy\n tags being bound
|
123
|
-
to the policy.\n - It must be of type boolean.\n\n# EXAMPLES\n\n An example
|
124
|
-
of updating a tag rule, and forcing reevaluation:\n \n {\n \"name\":
|
125
|
-
\"small\",\n \"rule\": [\"<=\", [\"fact\", \"processorcount\"], \"2\"],\n \"force\":
|
126
|
-
true\n }\n"},"schema":{"name":{"type":"string"},"rule":{"type":"array"},"force":{"type":"boolean"}}}'
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-broker","id":"http://localhost:8150/api/commands/update-policy-broker"},{"name":"update-policy-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-node-metadata","id":"http://localhost:8150/api/commands/update-policy-node-metadata"},{"name":"update-policy-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-repo","id":"http://localhost:8150/api/commands/update-policy-repo"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"},{"name":"config","rel":"http://api.puppetlabs.com/razor/v1/collections/config","id":"http://localhost:8150/api/collections/config"}],"version":{"server":"v1.8.0-dirty"}}'
|
127
38
|
http_version:
|
128
|
-
recorded_at: Mon,
|
39
|
+
recorded_at: Mon, 23 Apr 2018 19:48:35 GMT
|
129
40
|
- request:
|
130
41
|
method: get
|
131
42
|
uri: http://localhost:8150/api/commands/update-tag-rule
|
@@ -138,7 +49,11 @@ http_interactions:
|
|
138
49
|
Accept-Encoding:
|
139
50
|
- gzip, deflate
|
140
51
|
User-Agent:
|
141
|
-
-
|
52
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
53
|
+
Accept-Language:
|
54
|
+
- en_US,en
|
55
|
+
Host:
|
56
|
+
- localhost:8150
|
142
57
|
response:
|
143
58
|
status:
|
144
59
|
code: 200
|
@@ -147,17 +62,17 @@ http_interactions:
|
|
147
62
|
Server:
|
148
63
|
- Apache-Coyote/1.1
|
149
64
|
Etag:
|
150
|
-
- '"server-version-
|
65
|
+
- '"server-version-v1.8.0-dirty"'
|
151
66
|
X-Content-Type-Options:
|
152
67
|
- nosniff
|
153
68
|
Content-Type:
|
154
|
-
- application/json
|
69
|
+
- application/json
|
155
70
|
Content-Length:
|
156
|
-
- '
|
71
|
+
- '5021'
|
157
72
|
Date:
|
158
|
-
- Mon,
|
73
|
+
- Mon, 23 Apr 2018 19:48:35 GMT
|
159
74
|
body:
|
160
|
-
encoding:
|
75
|
+
encoding: UTF-8
|
161
76
|
string: '{"name":"update-tag-rule","help":{"summary":"Update the matching rule
|
162
77
|
for an existing tag","description":"This will change the rule of the given
|
163
78
|
tag to the new rule. The tag will be\nreevaluated against all nodes and each
|
@@ -176,23 +91,26 @@ http_interactions:
|
|
176
91
|
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
177
92
|
Attributes\n\n * name\n - The tag for which to change the rule.\n - This
|
178
93
|
attribute is required.\n - It must be of type string.\n - It must match
|
179
|
-
the name of an existing tag.\n\n * rule\n -
|
180
|
-
tag.\n - This attribute is required.\n -
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
to the policy.\n - It
|
187
|
-
example of updating a tag
|
188
|
-
\
|
189
|
-
true\n}","cli":"An
|
190
|
-
|
191
|
-
\"
|
192
|
-
|
193
|
-
tag
|
194
|
-
|
195
|
-
|
94
|
+
the name of an existing tag.\n - Its argument position is 0.\n\n * rule\n -
|
95
|
+
The new rule to apply to the tag.\n - This attribute is required.\n -
|
96
|
+
It must be of type array.\n - Its argument position is 1.\n\n * force\n -
|
97
|
+
By default this command will fail if the tag is in use by an existing\n policy. This
|
98
|
+
flag allows you to override that, and force the change to\n apply despite
|
99
|
+
the tag being in use.\n \n This will not change policy binding of
|
100
|
+
nodes, which may lead to some\n counter-intuitive results such as a node
|
101
|
+
that does *not* match policy\n tags being bound to the policy.\n - It
|
102
|
+
must be of type boolean.\n","examples":{"api":"An example of updating a tag
|
103
|
+
rule, and forcing reevaluation:\n\n{\n \"name\": \"small\",\n \"rule\":
|
104
|
+
[\"<=\", [\"fact\", \"processorcount\"], \"2\"],\n \"force\": true\n}","cli":"An
|
105
|
+
example of updating a tag rule, and forcing reevaluation:\n\n razor update-tag-rule
|
106
|
+
--name small --force \\\n --rule ''[\"<=\", [\"fact\", \"processorcount\"],
|
107
|
+
\"2\"]''\n\nWith positional arguments, this can be shortened:\n\n razor
|
108
|
+
update-tag-rule small ''[[\"<=\", [\"fact\", \"processorcount\"], \"2\"]]''
|
109
|
+
\\\n --force"},"full":"# SYNOPSIS\nUpdate the matching rule for an
|
110
|
+
existing tag\n\n# DESCRIPTION\nThis will change the rule of the given tag
|
111
|
+
to the new rule. The tag will be\nreevaluated against all nodes and each node''s
|
112
|
+
tag attribute will be updated to\nreflect whether the tag now matches or not,
|
113
|
+
i.e., the tag will be added\nto/removed from each node''s tag as appropriate.\n\nIf
|
196
114
|
the tag is used by any policies, the update will only be performed if the\noptional
|
197
115
|
parameter `force` is set to `true`. Otherwise, it will fail.\n# Access Control\n\nThis
|
198
116
|
command''s access control pattern: `commands:update-tag-rule:%{name}`\n\nWords
|
@@ -206,17 +124,17 @@ http_interactions:
|
|
206
124
|
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
207
125
|
Attributes\n\n * name\n - The tag for which to change the rule.\n - This
|
208
126
|
attribute is required.\n - It must be of type string.\n - It must match
|
209
|
-
the name of an existing tag.\n\n * rule\n -
|
210
|
-
tag.\n - This attribute is required.\n -
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
of updating a tag rule,
|
218
|
-
\
|
219
|
-
true\n }\n"},"schema":{"name":{"type":"string"},"rule":{"type":"array"},"force":{"type":"boolean"}}}'
|
127
|
+
the name of an existing tag.\n - Its argument position is 0.\n\n * rule\n -
|
128
|
+
The new rule to apply to the tag.\n - This attribute is required.\n -
|
129
|
+
It must be of type array.\n - Its argument position is 1.\n\n * force\n -
|
130
|
+
By default this command will fail if the tag is in use by an existing\n policy. This
|
131
|
+
flag allows you to override that, and force the change to\n apply despite
|
132
|
+
the tag being in use.\n \n This will not change policy binding of
|
133
|
+
nodes, which may lead to some\n counter-intuitive results such as a node
|
134
|
+
that does *not* match policy\n tags being bound to the policy.\n - It
|
135
|
+
must be of type boolean.\n\n# EXAMPLES\n\n An example of updating a tag rule,
|
136
|
+
and forcing reevaluation:\n \n {\n \"name\": \"small\",\n \"rule\":
|
137
|
+
[\"<=\", [\"fact\", \"processorcount\"], \"2\"],\n \"force\": true\n }\n"},"schema":{"name":{"type":"string","position":0},"rule":{"type":"array","position":1},"force":{"type":"boolean"}}}'
|
220
138
|
http_version:
|
221
|
-
recorded_at: Mon,
|
222
|
-
recorded_with: VCR
|
139
|
+
recorded_at: Mon, 23 Apr 2018 19:48:35 GMT
|
140
|
+
recorded_with: VCR 4.0.0
|
@@ -12,7 +12,11 @@ http_interactions:
|
|
12
12
|
Accept-Encoding:
|
13
13
|
- gzip, deflate
|
14
14
|
User-Agent:
|
15
|
-
-
|
15
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
16
|
+
Accept-Language:
|
17
|
+
- en_US,en
|
18
|
+
Host:
|
19
|
+
- localhost:8150
|
16
20
|
response:
|
17
21
|
status:
|
18
22
|
code: 200
|
@@ -25,14 +29,14 @@ http_interactions:
|
|
25
29
|
Content-Type:
|
26
30
|
- application/json
|
27
31
|
Content-Length:
|
28
|
-
- '
|
32
|
+
- '7110'
|
29
33
|
Date:
|
30
|
-
-
|
34
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
31
35
|
body:
|
32
|
-
encoding:
|
33
|
-
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"}],"version":{"server":"v1.
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-broker","id":"http://localhost:8150/api/commands/update-policy-broker"},{"name":"update-policy-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-node-metadata","id":"http://localhost:8150/api/commands/update-policy-node-metadata"},{"name":"update-policy-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-repo","id":"http://localhost:8150/api/commands/update-policy-repo"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"},{"name":"config","rel":"http://api.puppetlabs.com/razor/v1/collections/config","id":"http://localhost:8150/api/collections/config"}],"version":{"server":"v1.8.0-dirty"}}'
|
34
38
|
http_version:
|
35
|
-
recorded_at:
|
39
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
36
40
|
- request:
|
37
41
|
method: get
|
38
42
|
uri: http://localhost:8150/api/commands/create-broker
|
@@ -45,7 +49,11 @@ http_interactions:
|
|
45
49
|
Accept-Encoding:
|
46
50
|
- gzip, deflate
|
47
51
|
User-Agent:
|
48
|
-
-
|
52
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
53
|
+
Accept-Language:
|
54
|
+
- en_US,en
|
55
|
+
Host:
|
56
|
+
- localhost:8150
|
49
57
|
response:
|
50
58
|
status:
|
51
59
|
code: 200
|
@@ -54,17 +62,17 @@ http_interactions:
|
|
54
62
|
Server:
|
55
63
|
- Apache-Coyote/1.1
|
56
64
|
Etag:
|
57
|
-
- '"server-version-v1.
|
65
|
+
- '"server-version-v1.8.0-dirty"'
|
58
66
|
X-Content-Type-Options:
|
59
67
|
- nosniff
|
60
68
|
Content-Type:
|
61
69
|
- application/json
|
62
70
|
Content-Length:
|
63
|
-
- '
|
71
|
+
- '5560'
|
64
72
|
Date:
|
65
|
-
-
|
73
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
66
74
|
body:
|
67
|
-
encoding:
|
75
|
+
encoding: UTF-8
|
68
76
|
string: '{"name":"create-broker","help":{"summary":"Create a new broker configuration
|
69
77
|
for hand-off of installed nodes","description":"Create a new broker configuration. Brokers
|
70
78
|
are responsible for handing a node\noff to a config management system, such
|
@@ -83,30 +91,33 @@ http_interactions:
|
|
83
91
|
within Razor.\n This is the name that you supply to, eg, `create-policy`
|
84
92
|
to specify\n which broker the node will be handed off via after installation.\n -
|
85
93
|
This attribute is required.\n - It must be of type string.\n - It must
|
86
|
-
be between 1 and 250 in length.\n\n * broker_type\n -
|
87
|
-
which this broker is created. The available\n broker
|
88
|
-
are:\n - chef\n -
|
89
|
-
|
90
|
-
the name of an existing broker type.\n
|
91
|
-
|
94
|
+
be between 1 and 250 in length.\n - Its argument position is 0.\n\n * broker_type\n -
|
95
|
+
The broker type from which this broker is created. The available\n broker
|
96
|
+
types on your server are:\n - chef\n - legacy-puppet\n - noop\n -
|
97
|
+
puppet-pe\n - puppet\n - This attribute is required.\n - It must be
|
98
|
+
of type string.\n - It must match the name of an existing broker type.\n -
|
99
|
+
Its argument position is 1.\n\n * configuration\n - The configuration for
|
100
|
+
the broker. The acceptable values here are\n determined by the `broker_type`
|
92
101
|
selected. In general this has\n settings like which server to contact,
|
93
102
|
and other configuration\n related to handing on the newly installed system
|
94
103
|
to the final\n configuration management system.\n \n This attribute
|
95
104
|
can be abbreviated as `c` for convenience.\n - It must be of type object.\n","examples":{"api":"Creating
|
96
105
|
a simple Puppet broker:\n\n{\n \"name\": \"puppet\",\n \"configuration\":
|
97
106
|
{\n \"server\": \"puppet.example.org\",\n \"environment\": \"production\"\n },\n \"broker_type\":
|
98
|
-
\"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\
|
99
|
-
--name puppet -c server=puppet.example.org \\\n
|
100
|
-
--broker-type puppet
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
107
|
+
\"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\n razor create-broker
|
108
|
+
--name puppet -c server=puppet.example.org \\\n -c environment=production
|
109
|
+
--broker-type puppet\n\nWith positional arguments, this can be shortened::\n\n razor
|
110
|
+
create-broker puppet puppet -c server=puppet.example.org \\\n -c environment=production"},"full":"#
|
111
|
+
SYNOPSIS\nCreate a new broker configuration for hand-off of installed nodes\n\n#
|
112
|
+
DESCRIPTION\nCreate a new broker configuration. Brokers are responsible for
|
113
|
+
handing a node\noff to a config management system, such as Puppet or Chef. In
|
114
|
+
cases where you\nhave no configuration management system, you can use the
|
115
|
+
`noop` broker.\n# Access Control\n\nThis command''s access control pattern:
|
116
|
+
`commands:create-broker:%{name}`\n\nWords surrounded by `%{...}` are substitutions
|
117
|
+
from the input data: typically\nthe name of the object being modified, or
|
118
|
+
some other critical detail, these\nallow roles to be granted partial access
|
119
|
+
to modify the system.\n\nFor more detail on how the permission strings are
|
120
|
+
structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
110
121
|
pattern is expanded\nand then a permission check applied to it, before the
|
111
122
|
command is authorized.\n\nThese checks only apply if security is enabled in
|
112
123
|
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
@@ -115,12 +126,13 @@ http_interactions:
|
|
115
126
|
is the name that you supply to, eg, `create-policy` to specify\n which
|
116
127
|
broker the node will be handed off via after installation.\n - This attribute
|
117
128
|
is required.\n - It must be of type string.\n - It must be between 1 and
|
118
|
-
250 in length.\n\n * broker_type\n - The
|
119
|
-
is created. The available\n broker
|
120
|
-
|
121
|
-
|
122
|
-
an existing broker type.\n
|
123
|
-
|
129
|
+
250 in length.\n - Its argument position is 0.\n\n * broker_type\n - The
|
130
|
+
broker type from which this broker is created. The available\n broker
|
131
|
+
types on your server are:\n - chef\n - legacy-puppet\n - noop\n -
|
132
|
+
puppet-pe\n - puppet\n - This attribute is required.\n - It must be
|
133
|
+
of type string.\n - It must match the name of an existing broker type.\n -
|
134
|
+
Its argument position is 1.\n\n * configuration\n - The configuration for
|
135
|
+
the broker. The acceptable values here are\n determined by the `broker_type`
|
124
136
|
selected. In general this has\n settings like which server to contact,
|
125
137
|
and other configuration\n related to handing on the newly installed system
|
126
138
|
to the final\n configuration management system.\n \n This attribute
|
@@ -129,7 +141,7 @@ http_interactions:
|
|
129
141
|
{\n \"server\": \"puppet.example.org\",\n \"environment\":
|
130
142
|
\"production\"\n },\n \"broker_type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string","position":0},"broker_type":{"type":"string","aliases":["broker-type"],"position":1},"configuration":{"type":"object","aliases":["c"]}}}'
|
131
143
|
http_version:
|
132
|
-
recorded_at:
|
144
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
133
145
|
- request:
|
134
146
|
method: post
|
135
147
|
uri: http://localhost:8150/api/commands/create-broker
|
@@ -141,12 +153,16 @@ http_interactions:
|
|
141
153
|
- application/json
|
142
154
|
Accept-Encoding:
|
143
155
|
- gzip, deflate
|
156
|
+
User-Agent:
|
157
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
144
158
|
Content-Type:
|
145
159
|
- application/json
|
160
|
+
Accept-Language:
|
161
|
+
- en_US,en
|
146
162
|
Content-Length:
|
147
163
|
- '48'
|
148
|
-
|
149
|
-
-
|
164
|
+
Host:
|
165
|
+
- localhost:8150
|
150
166
|
response:
|
151
167
|
status:
|
152
168
|
code: 202
|
@@ -161,13 +177,13 @@ http_interactions:
|
|
161
177
|
Content-Length:
|
162
178
|
- '233'
|
163
179
|
Date:
|
164
|
-
-
|
180
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
165
181
|
body:
|
166
|
-
encoding:
|
182
|
+
encoding: UTF-8
|
167
183
|
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some%20noop%20broker","name":"some
|
168
184
|
noop broker","command":"http://localhost:8150/api/collections/commands/1"}'
|
169
185
|
http_version:
|
170
|
-
recorded_at:
|
186
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
171
187
|
- request:
|
172
188
|
method: get
|
173
189
|
uri: http://localhost:8150/api/collections/brokers/some%20noop%20broker
|
@@ -180,7 +196,11 @@ http_interactions:
|
|
180
196
|
Accept-Encoding:
|
181
197
|
- gzip, deflate
|
182
198
|
User-Agent:
|
183
|
-
-
|
199
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
200
|
+
Accept-Language:
|
201
|
+
- en_US,en
|
202
|
+
Host:
|
203
|
+
- localhost:8150
|
184
204
|
response:
|
185
205
|
status:
|
186
206
|
code: 200
|
@@ -195,13 +215,13 @@ http_interactions:
|
|
195
215
|
Content-Length:
|
196
216
|
- '336'
|
197
217
|
Date:
|
198
|
-
-
|
218
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
199
219
|
body:
|
200
|
-
encoding:
|
220
|
+
encoding: UTF-8
|
201
221
|
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some%20noop%20broker","name":"some
|
202
222
|
noop broker","configuration":{},"broker_type":"noop","policies":{"id":"http://localhost:8150/api/collections/brokers/some%20noop%20broker/policies","count":0,"name":"policies"}}'
|
203
223
|
http_version:
|
204
|
-
recorded_at:
|
224
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
205
225
|
- request:
|
206
226
|
method: get
|
207
227
|
uri: http://localhost:8150/api
|
@@ -214,7 +234,11 @@ http_interactions:
|
|
214
234
|
Accept-Encoding:
|
215
235
|
- gzip, deflate
|
216
236
|
User-Agent:
|
217
|
-
-
|
237
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
238
|
+
Accept-Language:
|
239
|
+
- en_US,en
|
240
|
+
Host:
|
241
|
+
- localhost:8150
|
218
242
|
response:
|
219
243
|
status:
|
220
244
|
code: 200
|
@@ -227,14 +251,14 @@ http_interactions:
|
|
227
251
|
Content-Type:
|
228
252
|
- application/json
|
229
253
|
Content-Length:
|
230
|
-
- '
|
254
|
+
- '7110'
|
231
255
|
Date:
|
232
|
-
-
|
256
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
233
257
|
body:
|
234
|
-
encoding:
|
235
|
-
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"}],"version":{"server":"v1.
|
258
|
+
encoding: UTF-8
|
259
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-broker","id":"http://localhost:8150/api/commands/update-policy-broker"},{"name":"update-policy-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-node-metadata","id":"http://localhost:8150/api/commands/update-policy-node-metadata"},{"name":"update-policy-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-repo","id":"http://localhost:8150/api/commands/update-policy-repo"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"},{"name":"config","rel":"http://api.puppetlabs.com/razor/v1/collections/config","id":"http://localhost:8150/api/collections/config"}],"version":{"server":"v1.8.0-dirty"}}'
|
236
260
|
http_version:
|
237
|
-
recorded_at:
|
261
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
238
262
|
- request:
|
239
263
|
method: get
|
240
264
|
uri: http://localhost:8150/api/commands/create-broker
|
@@ -247,7 +271,11 @@ http_interactions:
|
|
247
271
|
Accept-Encoding:
|
248
272
|
- gzip, deflate
|
249
273
|
User-Agent:
|
250
|
-
-
|
274
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
275
|
+
Accept-Language:
|
276
|
+
- en_US,en
|
277
|
+
Host:
|
278
|
+
- localhost:8150
|
251
279
|
response:
|
252
280
|
status:
|
253
281
|
code: 200
|
@@ -256,17 +284,17 @@ http_interactions:
|
|
256
284
|
Server:
|
257
285
|
- Apache-Coyote/1.1
|
258
286
|
Etag:
|
259
|
-
- '"server-version-v1.
|
287
|
+
- '"server-version-v1.8.0-dirty"'
|
260
288
|
X-Content-Type-Options:
|
261
289
|
- nosniff
|
262
290
|
Content-Type:
|
263
291
|
- application/json
|
264
292
|
Content-Length:
|
265
|
-
- '
|
293
|
+
- '5560'
|
266
294
|
Date:
|
267
|
-
-
|
295
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
268
296
|
body:
|
269
|
-
encoding:
|
297
|
+
encoding: UTF-8
|
270
298
|
string: '{"name":"create-broker","help":{"summary":"Create a new broker configuration
|
271
299
|
for hand-off of installed nodes","description":"Create a new broker configuration. Brokers
|
272
300
|
are responsible for handing a node\noff to a config management system, such
|
@@ -285,30 +313,33 @@ http_interactions:
|
|
285
313
|
within Razor.\n This is the name that you supply to, eg, `create-policy`
|
286
314
|
to specify\n which broker the node will be handed off via after installation.\n -
|
287
315
|
This attribute is required.\n - It must be of type string.\n - It must
|
288
|
-
be between 1 and 250 in length.\n\n * broker_type\n -
|
289
|
-
which this broker is created. The available\n broker
|
290
|
-
are:\n - chef\n -
|
291
|
-
|
292
|
-
the name of an existing broker type.\n
|
293
|
-
|
316
|
+
be between 1 and 250 in length.\n - Its argument position is 0.\n\n * broker_type\n -
|
317
|
+
The broker type from which this broker is created. The available\n broker
|
318
|
+
types on your server are:\n - chef\n - legacy-puppet\n - noop\n -
|
319
|
+
puppet-pe\n - puppet\n - This attribute is required.\n - It must be
|
320
|
+
of type string.\n - It must match the name of an existing broker type.\n -
|
321
|
+
Its argument position is 1.\n\n * configuration\n - The configuration for
|
322
|
+
the broker. The acceptable values here are\n determined by the `broker_type`
|
294
323
|
selected. In general this has\n settings like which server to contact,
|
295
324
|
and other configuration\n related to handing on the newly installed system
|
296
325
|
to the final\n configuration management system.\n \n This attribute
|
297
326
|
can be abbreviated as `c` for convenience.\n - It must be of type object.\n","examples":{"api":"Creating
|
298
327
|
a simple Puppet broker:\n\n{\n \"name\": \"puppet\",\n \"configuration\":
|
299
328
|
{\n \"server\": \"puppet.example.org\",\n \"environment\": \"production\"\n },\n \"broker_type\":
|
300
|
-
\"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\
|
301
|
-
--name puppet -c server=puppet.example.org \\\n
|
302
|
-
--broker-type puppet
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
329
|
+
\"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\n razor create-broker
|
330
|
+
--name puppet -c server=puppet.example.org \\\n -c environment=production
|
331
|
+
--broker-type puppet\n\nWith positional arguments, this can be shortened::\n\n razor
|
332
|
+
create-broker puppet puppet -c server=puppet.example.org \\\n -c environment=production"},"full":"#
|
333
|
+
SYNOPSIS\nCreate a new broker configuration for hand-off of installed nodes\n\n#
|
334
|
+
DESCRIPTION\nCreate a new broker configuration. Brokers are responsible for
|
335
|
+
handing a node\noff to a config management system, such as Puppet or Chef. In
|
336
|
+
cases where you\nhave no configuration management system, you can use the
|
337
|
+
`noop` broker.\n# Access Control\n\nThis command''s access control pattern:
|
338
|
+
`commands:create-broker:%{name}`\n\nWords surrounded by `%{...}` are substitutions
|
339
|
+
from the input data: typically\nthe name of the object being modified, or
|
340
|
+
some other critical detail, these\nallow roles to be granted partial access
|
341
|
+
to modify the system.\n\nFor more detail on how the permission strings are
|
342
|
+
structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
312
343
|
pattern is expanded\nand then a permission check applied to it, before the
|
313
344
|
command is authorized.\n\nThese checks only apply if security is enabled in
|
314
345
|
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
@@ -317,12 +348,13 @@ http_interactions:
|
|
317
348
|
is the name that you supply to, eg, `create-policy` to specify\n which
|
318
349
|
broker the node will be handed off via after installation.\n - This attribute
|
319
350
|
is required.\n - It must be of type string.\n - It must be between 1 and
|
320
|
-
250 in length.\n\n * broker_type\n - The
|
321
|
-
is created. The available\n broker
|
322
|
-
|
323
|
-
|
324
|
-
an existing broker type.\n
|
325
|
-
|
351
|
+
250 in length.\n - Its argument position is 0.\n\n * broker_type\n - The
|
352
|
+
broker type from which this broker is created. The available\n broker
|
353
|
+
types on your server are:\n - chef\n - legacy-puppet\n - noop\n -
|
354
|
+
puppet-pe\n - puppet\n - This attribute is required.\n - It must be
|
355
|
+
of type string.\n - It must match the name of an existing broker type.\n -
|
356
|
+
Its argument position is 1.\n\n * configuration\n - The configuration for
|
357
|
+
the broker. The acceptable values here are\n determined by the `broker_type`
|
326
358
|
selected. In general this has\n settings like which server to contact,
|
327
359
|
and other configuration\n related to handing on the newly installed system
|
328
360
|
to the final\n configuration management system.\n \n This attribute
|
@@ -331,7 +363,7 @@ http_interactions:
|
|
331
363
|
{\n \"server\": \"puppet.example.org\",\n \"environment\":
|
332
364
|
\"production\"\n },\n \"broker_type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string","position":0},"broker_type":{"type":"string","aliases":["broker-type"],"position":1},"configuration":{"type":"object","aliases":["c"]}}}'
|
333
365
|
http_version:
|
334
|
-
recorded_at:
|
366
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
335
367
|
- request:
|
336
368
|
method: post
|
337
369
|
uri: http://localhost:8150/api/commands/create-broker
|
@@ -343,12 +375,16 @@ http_interactions:
|
|
343
375
|
- application/json
|
344
376
|
Accept-Encoding:
|
345
377
|
- gzip, deflate
|
378
|
+
User-Agent:
|
379
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
346
380
|
Content-Type:
|
347
381
|
- application/json
|
382
|
+
Accept-Language:
|
383
|
+
- en_US,en
|
348
384
|
Content-Length:
|
349
385
|
- '49'
|
350
|
-
|
351
|
-
-
|
386
|
+
Host:
|
387
|
+
- localhost:8150
|
352
388
|
response:
|
353
389
|
status:
|
354
390
|
code: 202
|
@@ -363,13 +399,13 @@ http_interactions:
|
|
363
399
|
Content-Length:
|
364
400
|
- '235'
|
365
401
|
Date:
|
366
|
-
-
|
402
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
367
403
|
body:
|
368
|
-
encoding:
|
404
|
+
encoding: UTF-8
|
369
405
|
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some%20other%20broker","name":"some
|
370
406
|
other broker","command":"http://localhost:8150/api/collections/commands/2"}'
|
371
407
|
http_version:
|
372
|
-
recorded_at:
|
408
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
373
409
|
- request:
|
374
410
|
method: get
|
375
411
|
uri: http://localhost:8150/api/collections/brokers/some%20other%20broker
|
@@ -382,7 +418,11 @@ http_interactions:
|
|
382
418
|
Accept-Encoding:
|
383
419
|
- gzip, deflate
|
384
420
|
User-Agent:
|
385
|
-
-
|
421
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
422
|
+
Accept-Language:
|
423
|
+
- en_US,en
|
424
|
+
Host:
|
425
|
+
- localhost:8150
|
386
426
|
response:
|
387
427
|
status:
|
388
428
|
code: 200
|
@@ -397,13 +437,13 @@ http_interactions:
|
|
397
437
|
Content-Length:
|
398
438
|
- '339'
|
399
439
|
Date:
|
400
|
-
-
|
440
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
401
441
|
body:
|
402
|
-
encoding:
|
442
|
+
encoding: UTF-8
|
403
443
|
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some%20other%20broker","name":"some
|
404
444
|
other broker","configuration":{},"broker_type":"noop","policies":{"id":"http://localhost:8150/api/collections/brokers/some%20other%20broker/policies","count":0,"name":"policies"}}'
|
405
445
|
http_version:
|
406
|
-
recorded_at:
|
446
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
407
447
|
- request:
|
408
448
|
method: get
|
409
449
|
uri: http://localhost:8150/api
|
@@ -416,7 +456,11 @@ http_interactions:
|
|
416
456
|
Accept-Encoding:
|
417
457
|
- gzip, deflate
|
418
458
|
User-Agent:
|
419
|
-
-
|
459
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
460
|
+
Accept-Language:
|
461
|
+
- en_US,en
|
462
|
+
Host:
|
463
|
+
- localhost:8150
|
420
464
|
response:
|
421
465
|
status:
|
422
466
|
code: 200
|
@@ -429,14 +473,14 @@ http_interactions:
|
|
429
473
|
Content-Type:
|
430
474
|
- application/json
|
431
475
|
Content-Length:
|
432
|
-
- '
|
476
|
+
- '7110'
|
433
477
|
Date:
|
434
|
-
-
|
478
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
435
479
|
body:
|
436
|
-
encoding:
|
437
|
-
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"}],"version":{"server":"v1.
|
480
|
+
encoding: UTF-8
|
481
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-broker","id":"http://localhost:8150/api/commands/update-policy-broker"},{"name":"update-policy-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-node-metadata","id":"http://localhost:8150/api/commands/update-policy-node-metadata"},{"name":"update-policy-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-repo","id":"http://localhost:8150/api/commands/update-policy-repo"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"},{"name":"config","rel":"http://api.puppetlabs.com/razor/v1/collections/config","id":"http://localhost:8150/api/collections/config"}],"version":{"server":"v1.8.0-dirty"}}'
|
438
482
|
http_version:
|
439
|
-
recorded_at:
|
483
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
440
484
|
- request:
|
441
485
|
method: get
|
442
486
|
uri: http://localhost:8150/api/commands/delete-broker
|
@@ -449,7 +493,11 @@ http_interactions:
|
|
449
493
|
Accept-Encoding:
|
450
494
|
- gzip, deflate
|
451
495
|
User-Agent:
|
452
|
-
-
|
496
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
497
|
+
Accept-Language:
|
498
|
+
- en_US,en
|
499
|
+
Host:
|
500
|
+
- localhost:8150
|
453
501
|
response:
|
454
502
|
status:
|
455
503
|
code: 200
|
@@ -458,17 +506,17 @@ http_interactions:
|
|
458
506
|
Server:
|
459
507
|
- Apache-Coyote/1.1
|
460
508
|
Etag:
|
461
|
-
- '"server-version-v1.
|
509
|
+
- '"server-version-v1.8.0-dirty"'
|
462
510
|
X-Content-Type-Options:
|
463
511
|
- nosniff
|
464
512
|
Content-Type:
|
465
513
|
- application/json
|
466
514
|
Content-Length:
|
467
|
-
- '
|
515
|
+
- '2765'
|
468
516
|
Date:
|
469
|
-
-
|
517
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
470
518
|
body:
|
471
|
-
encoding:
|
519
|
+
encoding: UTF-8
|
472
520
|
string: '{"name":"delete-broker","help":{"summary":"Delete an existing broker
|
473
521
|
configuration","description":"Delete a broker configuration from Razor. If
|
474
522
|
the broker is currently used by\na policy the attempt will fail.","schema":"#
|
@@ -483,27 +531,28 @@ http_interactions:
|
|
483
531
|
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
484
532
|
Attributes\n\n * name\n - The name of the broker to delete.\n - This attribute
|
485
533
|
is required.\n - It must be of type string.\n - It must be between 1 and
|
486
|
-
250 in length.\n","examples":{"api":"Delete
|
487
|
-
\"obsolete\":\n\n{\"name\": \"obsolete\"}","cli":"Delete
|
488
|
-
configuration \"obsolete\":\n\
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
\
|
534
|
+
250 in length.\n - Its argument position is 0.\n","examples":{"api":"Delete
|
535
|
+
the unused broker configuration \"obsolete\":\n\n{\"name\": \"obsolete\"}","cli":"Delete
|
536
|
+
the unused broker configuration \"obsolete\":\n\n razor delete-broker --name
|
537
|
+
obsolete\n\nWith positional arguments, this can be shortened::\n\n razor
|
538
|
+
delete-broker obsolete"},"full":"# SYNOPSIS\nDelete an existing broker configuration\n\n#
|
539
|
+
DESCRIPTION\nDelete a broker configuration from Razor. If the broker is currently
|
540
|
+
used by\na policy the attempt will fail.\n# Access Control\n\nThis command''s
|
541
|
+
access control pattern: `commands:delete-broker:%{name}`\n\nWords surrounded
|
542
|
+
by `%{...}` are substitutions from the input data: typically\nthe name of
|
543
|
+
the object being modified, or some other critical detail, these\nallow roles
|
544
|
+
to be granted partial access to modify the system.\n\nFor more detail on how
|
545
|
+
the permission strings are structured and work, you can\nsee the [Shiro Permissions
|
546
|
+
documentation][shiro]. That pattern is expanded\nand then a permission check
|
547
|
+
applied to it, before the command is authorized.\n\nThese checks only apply
|
548
|
+
if security is enabled in the Razor configuration\nfile; on this server security
|
549
|
+
is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
550
|
+
Attributes\n\n * name\n - The name of the broker to delete.\n - This attribute
|
551
|
+
is required.\n - It must be of type string.\n - It must be between 1 and
|
552
|
+
250 in length.\n - Its argument position is 0.\n\n# EXAMPLES\n\n Delete
|
553
|
+
the unused broker configuration \"obsolete\":\n \n {\"name\": \"obsolete\"}\n"},"schema":{"name":{"type":"string","position":0}}}'
|
505
554
|
http_version:
|
506
|
-
recorded_at:
|
555
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
507
556
|
- request:
|
508
557
|
method: post
|
509
558
|
uri: http://localhost:8150/api/commands/delete-broker
|
@@ -515,12 +564,16 @@ http_interactions:
|
|
515
564
|
- application/json
|
516
565
|
Accept-Encoding:
|
517
566
|
- gzip, deflate
|
567
|
+
User-Agent:
|
568
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
518
569
|
Content-Type:
|
519
570
|
- application/json
|
571
|
+
Accept-Language:
|
572
|
+
- en_US,en
|
520
573
|
Content-Length:
|
521
574
|
- '27'
|
522
|
-
|
523
|
-
-
|
575
|
+
Host:
|
576
|
+
- localhost:8150
|
524
577
|
response:
|
525
578
|
status:
|
526
579
|
code: 202
|
@@ -535,12 +588,12 @@ http_interactions:
|
|
535
588
|
Content-Length:
|
536
589
|
- '107'
|
537
590
|
Date:
|
538
|
-
-
|
591
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
539
592
|
body:
|
540
|
-
encoding:
|
593
|
+
encoding: UTF-8
|
541
594
|
string: '{"result":"broker some noop broker destroyed","command":"http://localhost:8150/api/collections/commands/3"}'
|
542
595
|
http_version:
|
543
|
-
recorded_at:
|
596
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
544
597
|
- request:
|
545
598
|
method: get
|
546
599
|
uri: http://localhost:8150/api
|
@@ -553,7 +606,11 @@ http_interactions:
|
|
553
606
|
Accept-Encoding:
|
554
607
|
- gzip, deflate
|
555
608
|
User-Agent:
|
556
|
-
-
|
609
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
610
|
+
Accept-Language:
|
611
|
+
- en_US,en
|
612
|
+
Host:
|
613
|
+
- localhost:8150
|
557
614
|
response:
|
558
615
|
status:
|
559
616
|
code: 200
|
@@ -566,14 +623,14 @@ http_interactions:
|
|
566
623
|
Content-Type:
|
567
624
|
- application/json
|
568
625
|
Content-Length:
|
569
|
-
- '
|
626
|
+
- '7110'
|
570
627
|
Date:
|
571
|
-
-
|
628
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
572
629
|
body:
|
573
|
-
encoding:
|
574
|
-
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"}],"version":{"server":"v1.
|
630
|
+
encoding: UTF-8
|
631
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-broker","id":"http://localhost:8150/api/commands/update-policy-broker"},{"name":"update-policy-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-node-metadata","id":"http://localhost:8150/api/commands/update-policy-node-metadata"},{"name":"update-policy-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-repo","id":"http://localhost:8150/api/commands/update-policy-repo"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"},{"name":"config","rel":"http://api.puppetlabs.com/razor/v1/collections/config","id":"http://localhost:8150/api/collections/config"}],"version":{"server":"v1.8.0-dirty"}}'
|
575
632
|
http_version:
|
576
|
-
recorded_at:
|
633
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
577
634
|
- request:
|
578
635
|
method: get
|
579
636
|
uri: http://localhost:8150/api/commands/delete-broker
|
@@ -586,7 +643,11 @@ http_interactions:
|
|
586
643
|
Accept-Encoding:
|
587
644
|
- gzip, deflate
|
588
645
|
User-Agent:
|
589
|
-
-
|
646
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
647
|
+
Accept-Language:
|
648
|
+
- en_US,en
|
649
|
+
Host:
|
650
|
+
- localhost:8150
|
590
651
|
response:
|
591
652
|
status:
|
592
653
|
code: 200
|
@@ -595,17 +656,17 @@ http_interactions:
|
|
595
656
|
Server:
|
596
657
|
- Apache-Coyote/1.1
|
597
658
|
Etag:
|
598
|
-
- '"server-version-v1.
|
659
|
+
- '"server-version-v1.8.0-dirty"'
|
599
660
|
X-Content-Type-Options:
|
600
661
|
- nosniff
|
601
662
|
Content-Type:
|
602
663
|
- application/json
|
603
664
|
Content-Length:
|
604
|
-
- '
|
665
|
+
- '2765'
|
605
666
|
Date:
|
606
|
-
-
|
667
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
607
668
|
body:
|
608
|
-
encoding:
|
669
|
+
encoding: UTF-8
|
609
670
|
string: '{"name":"delete-broker","help":{"summary":"Delete an existing broker
|
610
671
|
configuration","description":"Delete a broker configuration from Razor. If
|
611
672
|
the broker is currently used by\na policy the attempt will fail.","schema":"#
|
@@ -620,27 +681,28 @@ http_interactions:
|
|
620
681
|
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
621
682
|
Attributes\n\n * name\n - The name of the broker to delete.\n - This attribute
|
622
683
|
is required.\n - It must be of type string.\n - It must be between 1 and
|
623
|
-
250 in length.\n","examples":{"api":"Delete
|
624
|
-
\"obsolete\":\n\n{\"name\": \"obsolete\"}","cli":"Delete
|
625
|
-
configuration \"obsolete\":\n\
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
\
|
684
|
+
250 in length.\n - Its argument position is 0.\n","examples":{"api":"Delete
|
685
|
+
the unused broker configuration \"obsolete\":\n\n{\"name\": \"obsolete\"}","cli":"Delete
|
686
|
+
the unused broker configuration \"obsolete\":\n\n razor delete-broker --name
|
687
|
+
obsolete\n\nWith positional arguments, this can be shortened::\n\n razor
|
688
|
+
delete-broker obsolete"},"full":"# SYNOPSIS\nDelete an existing broker configuration\n\n#
|
689
|
+
DESCRIPTION\nDelete a broker configuration from Razor. If the broker is currently
|
690
|
+
used by\na policy the attempt will fail.\n# Access Control\n\nThis command''s
|
691
|
+
access control pattern: `commands:delete-broker:%{name}`\n\nWords surrounded
|
692
|
+
by `%{...}` are substitutions from the input data: typically\nthe name of
|
693
|
+
the object being modified, or some other critical detail, these\nallow roles
|
694
|
+
to be granted partial access to modify the system.\n\nFor more detail on how
|
695
|
+
the permission strings are structured and work, you can\nsee the [Shiro Permissions
|
696
|
+
documentation][shiro]. That pattern is expanded\nand then a permission check
|
697
|
+
applied to it, before the command is authorized.\n\nThese checks only apply
|
698
|
+
if security is enabled in the Razor configuration\nfile; on this server security
|
699
|
+
is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
700
|
+
Attributes\n\n * name\n - The name of the broker to delete.\n - This attribute
|
701
|
+
is required.\n - It must be of type string.\n - It must be between 1 and
|
702
|
+
250 in length.\n - Its argument position is 0.\n\n# EXAMPLES\n\n Delete
|
703
|
+
the unused broker configuration \"obsolete\":\n \n {\"name\": \"obsolete\"}\n"},"schema":{"name":{"type":"string","position":0}}}'
|
642
704
|
http_version:
|
643
|
-
recorded_at:
|
705
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
644
706
|
- request:
|
645
707
|
method: post
|
646
708
|
uri: http://localhost:8150/api/commands/delete-broker
|
@@ -652,12 +714,16 @@ http_interactions:
|
|
652
714
|
- application/json
|
653
715
|
Accept-Encoding:
|
654
716
|
- gzip, deflate
|
717
|
+
User-Agent:
|
718
|
+
- rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
|
655
719
|
Content-Type:
|
656
720
|
- application/json
|
721
|
+
Accept-Language:
|
722
|
+
- en_US,en
|
657
723
|
Content-Length:
|
658
724
|
- '28'
|
659
|
-
|
660
|
-
-
|
725
|
+
Host:
|
726
|
+
- localhost:8150
|
661
727
|
response:
|
662
728
|
status:
|
663
729
|
code: 202
|
@@ -672,10 +738,10 @@ http_interactions:
|
|
672
738
|
Content-Length:
|
673
739
|
- '108'
|
674
740
|
Date:
|
675
|
-
-
|
741
|
+
- Mon, 23 Apr 2018 19:47:51 GMT
|
676
742
|
body:
|
677
|
-
encoding:
|
743
|
+
encoding: UTF-8
|
678
744
|
string: '{"result":"broker some other broker destroyed","command":"http://localhost:8150/api/collections/commands/4"}'
|
679
745
|
http_version:
|
680
|
-
recorded_at:
|
681
|
-
recorded_with: VCR
|
746
|
+
recorded_at: Mon, 23 Apr 2018 19:47:51 GMT
|
747
|
+
recorded_with: VCR 4.0.0
|