pe-razor-client 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +16 -2
- data/bin/razor +3 -2
- data/lib/razor/cli/command.rb +41 -36
- data/lib/razor/cli/format.rb +28 -13
- data/lib/razor/cli/navigate.rb +45 -1
- data/lib/razor/cli/parse.rb +52 -21
- data/lib/razor/cli/version.rb +1 -1
- data/spec/cli/command_spec.rb +96 -0
- data/spec/cli/navigate_spec.rb +25 -0
- data/spec/cli/parse_spec.rb +11 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_single-dash_with_single_character_flag.yml +203 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_not_allow_double-dash_with_single_character_flag.yml +133 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_not_allow_single-dash_with_multiple_character_flag.yml +133 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/positional_arguments/should_allow_the_use_of_positional_arguments.yml +681 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/positional_arguments/should_fail_with_too_many_positional_arguments.yml +133 -0
- metadata +17 -7
@@ -0,0 +1,681 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:8150/api
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- Apache-Coyote/1.1
|
23
|
+
X-Content-Type-Options:
|
24
|
+
- nosniff
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Content-Length:
|
28
|
+
- '6464'
|
29
|
+
Date:
|
30
|
+
- Fri, 11 Dec 2015 23:07:28 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":"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.1.0-8-g5bd90c6"}}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Fri, 11 Dec 2015 23:07:28 GMT
|
36
|
+
- request:
|
37
|
+
method: get
|
38
|
+
uri: http://localhost:8150/api/commands/create-broker
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: ''
|
42
|
+
headers:
|
43
|
+
Accept:
|
44
|
+
- 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-v1.1.0-8-g5bd90c6"'
|
58
|
+
X-Content-Type-Options:
|
59
|
+
- nosniff
|
60
|
+
Content-Type:
|
61
|
+
- application/json
|
62
|
+
Content-Length:
|
63
|
+
- '5210'
|
64
|
+
Date:
|
65
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
66
|
+
body:
|
67
|
+
encoding: US-ASCII
|
68
|
+
string: '{"name":"create-broker","help":{"summary":"Create a new broker configuration
|
69
|
+
for hand-off of installed nodes","description":"Create a new broker configuration. Brokers
|
70
|
+
are responsible for handing a node\noff to a config management system, such
|
71
|
+
as Puppet or Chef. In cases where you\nhave no configuration management system,
|
72
|
+
you can use the `noop` broker.","schema":"# Access Control\n\nThis command''s
|
73
|
+
access control pattern: `commands:create-broker:%{name}`\n\nWords surrounded
|
74
|
+
by `%{...}` are substitutions from the input data: typically\nthe name of
|
75
|
+
the object being modified, or some other critical detail, these\nallow roles
|
76
|
+
to be granted partial access to modify the system.\n\nFor more detail on how
|
77
|
+
the permission strings are structured and work, you can\nsee the [Shiro Permissions
|
78
|
+
documentation][shiro]. That pattern is expanded\nand then a permission check
|
79
|
+
applied to it, before the command is authorized.\n\nThese checks only apply
|
80
|
+
if security is enabled in the Razor configuration\nfile; on this server security
|
81
|
+
is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
82
|
+
Attributes\n\n * name\n - The name of the broker, as it will be referenced
|
83
|
+
within Razor.\n This is the name that you supply to, eg, `create-policy`
|
84
|
+
to specify\n which broker the node will be handed off via after installation.\n -
|
85
|
+
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 - The broker type from
|
87
|
+
which this broker is created. The available\n broker types on your server
|
88
|
+
are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
|
89
|
+
attribute is required.\n - It must be of type string.\n - It must match
|
90
|
+
the name of an existing broker type.\n\n * configuration\n - The configuration
|
91
|
+
for the broker. The acceptable values here are\n determined by the `broker_type`
|
92
|
+
selected. In general this has\n settings like which server to contact,
|
93
|
+
and other configuration\n related to handing on the newly installed system
|
94
|
+
to the final\n configuration management system.\n \n This attribute
|
95
|
+
can be abbreviated as `c` for convenience.\n - It must be of type object.\n","examples":{"api":"Creating
|
96
|
+
a simple Puppet broker:\n\n{\n \"name\": \"puppet\",\n \"configuration\":
|
97
|
+
{\n \"server\": \"puppet.example.org\",\n \"environment\": \"production\"\n },\n \"broker_type\":
|
98
|
+
\"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\nrazor create-broker
|
99
|
+
--name puppet -c server=puppet.example.org \\\n -c environment=production
|
100
|
+
--broker-type puppet"},"full":"# SYNOPSIS\nCreate a new broker configuration
|
101
|
+
for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new broker configuration. Brokers
|
102
|
+
are responsible for handing a node\noff to a config management system, such
|
103
|
+
as Puppet or Chef. In cases where you\nhave no configuration management system,
|
104
|
+
you can use the `noop` broker.\n# Access Control\n\nThis command''s access
|
105
|
+
control pattern: `commands:create-broker:%{name}`\n\nWords surrounded by `%{...}`
|
106
|
+
are substitutions from the input data: typically\nthe name of the object being
|
107
|
+
modified, or some other critical detail, these\nallow roles to be granted
|
108
|
+
partial access to modify the system.\n\nFor more detail on how the permission
|
109
|
+
strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
110
|
+
pattern is expanded\nand then a permission check applied to it, before the
|
111
|
+
command is authorized.\n\nThese checks only apply if security is enabled in
|
112
|
+
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
113
|
+
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
|
114
|
+
The name of the broker, as it will be referenced within Razor.\n This
|
115
|
+
is the name that you supply to, eg, `create-policy` to specify\n which
|
116
|
+
broker the node will be handed off via after installation.\n - This attribute
|
117
|
+
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 broker type from which this broker
|
119
|
+
is created. The available\n broker types on your server are:\n -
|
120
|
+
chef\n - noop\n - puppet-pe\n - puppet\n - This attribute is
|
121
|
+
required.\n - It must be of type string.\n - It must match the name of
|
122
|
+
an existing broker type.\n\n * configuration\n - The configuration for the
|
123
|
+
broker. The acceptable values here are\n determined by the `broker_type`
|
124
|
+
selected. In general this has\n settings like which server to contact,
|
125
|
+
and other configuration\n related to handing on the newly installed system
|
126
|
+
to the final\n configuration management system.\n \n This attribute
|
127
|
+
can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
|
128
|
+
EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
|
129
|
+
{\n \"server\": \"puppet.example.org\",\n \"environment\":
|
130
|
+
\"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
|
+
http_version:
|
132
|
+
recorded_at: Fri, 11 Dec 2015 23:07:28 GMT
|
133
|
+
- request:
|
134
|
+
method: post
|
135
|
+
uri: http://localhost:8150/api/commands/create-broker
|
136
|
+
body:
|
137
|
+
encoding: UTF-8
|
138
|
+
string: '{"name":"some noop broker","broker_type":"noop"}'
|
139
|
+
headers:
|
140
|
+
Accept:
|
141
|
+
- application/json
|
142
|
+
Accept-Encoding:
|
143
|
+
- gzip, deflate
|
144
|
+
Content-Type:
|
145
|
+
- application/json
|
146
|
+
Content-Length:
|
147
|
+
- '48'
|
148
|
+
User-Agent:
|
149
|
+
- Ruby
|
150
|
+
response:
|
151
|
+
status:
|
152
|
+
code: 202
|
153
|
+
message: Accepted
|
154
|
+
headers:
|
155
|
+
Server:
|
156
|
+
- Apache-Coyote/1.1
|
157
|
+
X-Content-Type-Options:
|
158
|
+
- nosniff
|
159
|
+
Content-Type:
|
160
|
+
- application/json
|
161
|
+
Content-Length:
|
162
|
+
- '233'
|
163
|
+
Date:
|
164
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
165
|
+
body:
|
166
|
+
encoding: US-ASCII
|
167
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some%20noop%20broker","name":"some
|
168
|
+
noop broker","command":"http://localhost:8150/api/collections/commands/1"}'
|
169
|
+
http_version:
|
170
|
+
recorded_at: Fri, 11 Dec 2015 23:07:28 GMT
|
171
|
+
- request:
|
172
|
+
method: get
|
173
|
+
uri: http://localhost:8150/api/collections/brokers/some%20noop%20broker
|
174
|
+
body:
|
175
|
+
encoding: US-ASCII
|
176
|
+
string: ''
|
177
|
+
headers:
|
178
|
+
Accept:
|
179
|
+
- application/json
|
180
|
+
Accept-Encoding:
|
181
|
+
- gzip, deflate
|
182
|
+
User-Agent:
|
183
|
+
- Ruby
|
184
|
+
response:
|
185
|
+
status:
|
186
|
+
code: 200
|
187
|
+
message: OK
|
188
|
+
headers:
|
189
|
+
Server:
|
190
|
+
- Apache-Coyote/1.1
|
191
|
+
X-Content-Type-Options:
|
192
|
+
- nosniff
|
193
|
+
Content-Type:
|
194
|
+
- application/json
|
195
|
+
Content-Length:
|
196
|
+
- '336'
|
197
|
+
Date:
|
198
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
199
|
+
body:
|
200
|
+
encoding: US-ASCII
|
201
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some%20noop%20broker","name":"some
|
202
|
+
noop broker","configuration":{},"broker_type":"noop","policies":{"id":"http://localhost:8150/api/collections/brokers/some%20noop%20broker/policies","count":0,"name":"policies"}}'
|
203
|
+
http_version:
|
204
|
+
recorded_at: Fri, 11 Dec 2015 23:07:28 GMT
|
205
|
+
- request:
|
206
|
+
method: get
|
207
|
+
uri: http://localhost:8150/api
|
208
|
+
body:
|
209
|
+
encoding: US-ASCII
|
210
|
+
string: ''
|
211
|
+
headers:
|
212
|
+
Accept:
|
213
|
+
- application/json
|
214
|
+
Accept-Encoding:
|
215
|
+
- gzip, deflate
|
216
|
+
User-Agent:
|
217
|
+
- Ruby
|
218
|
+
response:
|
219
|
+
status:
|
220
|
+
code: 200
|
221
|
+
message: OK
|
222
|
+
headers:
|
223
|
+
Server:
|
224
|
+
- Apache-Coyote/1.1
|
225
|
+
X-Content-Type-Options:
|
226
|
+
- nosniff
|
227
|
+
Content-Type:
|
228
|
+
- application/json
|
229
|
+
Content-Length:
|
230
|
+
- '6464'
|
231
|
+
Date:
|
232
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
233
|
+
body:
|
234
|
+
encoding: US-ASCII
|
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.1.0-8-g5bd90c6"}}'
|
236
|
+
http_version:
|
237
|
+
recorded_at: Fri, 11 Dec 2015 23:07:28 GMT
|
238
|
+
- request:
|
239
|
+
method: get
|
240
|
+
uri: http://localhost:8150/api/commands/create-broker
|
241
|
+
body:
|
242
|
+
encoding: US-ASCII
|
243
|
+
string: ''
|
244
|
+
headers:
|
245
|
+
Accept:
|
246
|
+
- application/json
|
247
|
+
Accept-Encoding:
|
248
|
+
- gzip, deflate
|
249
|
+
User-Agent:
|
250
|
+
- Ruby
|
251
|
+
response:
|
252
|
+
status:
|
253
|
+
code: 200
|
254
|
+
message: OK
|
255
|
+
headers:
|
256
|
+
Server:
|
257
|
+
- Apache-Coyote/1.1
|
258
|
+
Etag:
|
259
|
+
- '"server-version-v1.1.0-8-g5bd90c6"'
|
260
|
+
X-Content-Type-Options:
|
261
|
+
- nosniff
|
262
|
+
Content-Type:
|
263
|
+
- application/json
|
264
|
+
Content-Length:
|
265
|
+
- '5210'
|
266
|
+
Date:
|
267
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
268
|
+
body:
|
269
|
+
encoding: US-ASCII
|
270
|
+
string: '{"name":"create-broker","help":{"summary":"Create a new broker configuration
|
271
|
+
for hand-off of installed nodes","description":"Create a new broker configuration. Brokers
|
272
|
+
are responsible for handing a node\noff to a config management system, such
|
273
|
+
as Puppet or Chef. In cases where you\nhave no configuration management system,
|
274
|
+
you can use the `noop` broker.","schema":"# Access Control\n\nThis command''s
|
275
|
+
access control pattern: `commands:create-broker:%{name}`\n\nWords surrounded
|
276
|
+
by `%{...}` are substitutions from the input data: typically\nthe name of
|
277
|
+
the object being modified, or some other critical detail, these\nallow roles
|
278
|
+
to be granted partial access to modify the system.\n\nFor more detail on how
|
279
|
+
the permission strings are structured and work, you can\nsee the [Shiro Permissions
|
280
|
+
documentation][shiro]. That pattern is expanded\nand then a permission check
|
281
|
+
applied to it, before the command is authorized.\n\nThese checks only apply
|
282
|
+
if security is enabled in the Razor configuration\nfile; on this server security
|
283
|
+
is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
284
|
+
Attributes\n\n * name\n - The name of the broker, as it will be referenced
|
285
|
+
within Razor.\n This is the name that you supply to, eg, `create-policy`
|
286
|
+
to specify\n which broker the node will be handed off via after installation.\n -
|
287
|
+
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 - The broker type from
|
289
|
+
which this broker is created. The available\n broker types on your server
|
290
|
+
are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
|
291
|
+
attribute is required.\n - It must be of type string.\n - It must match
|
292
|
+
the name of an existing broker type.\n\n * configuration\n - The configuration
|
293
|
+
for the broker. The acceptable values here are\n determined by the `broker_type`
|
294
|
+
selected. In general this has\n settings like which server to contact,
|
295
|
+
and other configuration\n related to handing on the newly installed system
|
296
|
+
to the final\n configuration management system.\n \n This attribute
|
297
|
+
can be abbreviated as `c` for convenience.\n - It must be of type object.\n","examples":{"api":"Creating
|
298
|
+
a simple Puppet broker:\n\n{\n \"name\": \"puppet\",\n \"configuration\":
|
299
|
+
{\n \"server\": \"puppet.example.org\",\n \"environment\": \"production\"\n },\n \"broker_type\":
|
300
|
+
\"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\nrazor create-broker
|
301
|
+
--name puppet -c server=puppet.example.org \\\n -c environment=production
|
302
|
+
--broker-type puppet"},"full":"# SYNOPSIS\nCreate a new broker configuration
|
303
|
+
for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new broker configuration. Brokers
|
304
|
+
are responsible for handing a node\noff to a config management system, such
|
305
|
+
as Puppet or Chef. In cases where you\nhave no configuration management system,
|
306
|
+
you can use the `noop` broker.\n# Access Control\n\nThis command''s access
|
307
|
+
control pattern: `commands:create-broker:%{name}`\n\nWords surrounded by `%{...}`
|
308
|
+
are substitutions from the input data: typically\nthe name of the object being
|
309
|
+
modified, or some other critical detail, these\nallow roles to be granted
|
310
|
+
partial access to modify the system.\n\nFor more detail on how the permission
|
311
|
+
strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
312
|
+
pattern is expanded\nand then a permission check applied to it, before the
|
313
|
+
command is authorized.\n\nThese checks only apply if security is enabled in
|
314
|
+
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
315
|
+
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
|
316
|
+
The name of the broker, as it will be referenced within Razor.\n This
|
317
|
+
is the name that you supply to, eg, `create-policy` to specify\n which
|
318
|
+
broker the node will be handed off via after installation.\n - This attribute
|
319
|
+
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 broker type from which this broker
|
321
|
+
is created. The available\n broker types on your server are:\n -
|
322
|
+
chef\n - noop\n - puppet-pe\n - puppet\n - This attribute is
|
323
|
+
required.\n - It must be of type string.\n - It must match the name of
|
324
|
+
an existing broker type.\n\n * configuration\n - The configuration for the
|
325
|
+
broker. The acceptable values here are\n determined by the `broker_type`
|
326
|
+
selected. In general this has\n settings like which server to contact,
|
327
|
+
and other configuration\n related to handing on the newly installed system
|
328
|
+
to the final\n configuration management system.\n \n This attribute
|
329
|
+
can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
|
330
|
+
EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
|
331
|
+
{\n \"server\": \"puppet.example.org\",\n \"environment\":
|
332
|
+
\"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
|
+
http_version:
|
334
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
335
|
+
- request:
|
336
|
+
method: post
|
337
|
+
uri: http://localhost:8150/api/commands/create-broker
|
338
|
+
body:
|
339
|
+
encoding: UTF-8
|
340
|
+
string: '{"name":"some other broker","broker_type":"noop"}'
|
341
|
+
headers:
|
342
|
+
Accept:
|
343
|
+
- application/json
|
344
|
+
Accept-Encoding:
|
345
|
+
- gzip, deflate
|
346
|
+
Content-Type:
|
347
|
+
- application/json
|
348
|
+
Content-Length:
|
349
|
+
- '49'
|
350
|
+
User-Agent:
|
351
|
+
- Ruby
|
352
|
+
response:
|
353
|
+
status:
|
354
|
+
code: 202
|
355
|
+
message: Accepted
|
356
|
+
headers:
|
357
|
+
Server:
|
358
|
+
- Apache-Coyote/1.1
|
359
|
+
X-Content-Type-Options:
|
360
|
+
- nosniff
|
361
|
+
Content-Type:
|
362
|
+
- application/json
|
363
|
+
Content-Length:
|
364
|
+
- '235'
|
365
|
+
Date:
|
366
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
367
|
+
body:
|
368
|
+
encoding: US-ASCII
|
369
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some%20other%20broker","name":"some
|
370
|
+
other broker","command":"http://localhost:8150/api/collections/commands/2"}'
|
371
|
+
http_version:
|
372
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
373
|
+
- request:
|
374
|
+
method: get
|
375
|
+
uri: http://localhost:8150/api/collections/brokers/some%20other%20broker
|
376
|
+
body:
|
377
|
+
encoding: US-ASCII
|
378
|
+
string: ''
|
379
|
+
headers:
|
380
|
+
Accept:
|
381
|
+
- application/json
|
382
|
+
Accept-Encoding:
|
383
|
+
- gzip, deflate
|
384
|
+
User-Agent:
|
385
|
+
- Ruby
|
386
|
+
response:
|
387
|
+
status:
|
388
|
+
code: 200
|
389
|
+
message: OK
|
390
|
+
headers:
|
391
|
+
Server:
|
392
|
+
- Apache-Coyote/1.1
|
393
|
+
X-Content-Type-Options:
|
394
|
+
- nosniff
|
395
|
+
Content-Type:
|
396
|
+
- application/json
|
397
|
+
Content-Length:
|
398
|
+
- '339'
|
399
|
+
Date:
|
400
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
401
|
+
body:
|
402
|
+
encoding: US-ASCII
|
403
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some%20other%20broker","name":"some
|
404
|
+
other broker","configuration":{},"broker_type":"noop","policies":{"id":"http://localhost:8150/api/collections/brokers/some%20other%20broker/policies","count":0,"name":"policies"}}'
|
405
|
+
http_version:
|
406
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
407
|
+
- request:
|
408
|
+
method: get
|
409
|
+
uri: http://localhost:8150/api
|
410
|
+
body:
|
411
|
+
encoding: US-ASCII
|
412
|
+
string: ''
|
413
|
+
headers:
|
414
|
+
Accept:
|
415
|
+
- application/json
|
416
|
+
Accept-Encoding:
|
417
|
+
- gzip, deflate
|
418
|
+
User-Agent:
|
419
|
+
- Ruby
|
420
|
+
response:
|
421
|
+
status:
|
422
|
+
code: 200
|
423
|
+
message: OK
|
424
|
+
headers:
|
425
|
+
Server:
|
426
|
+
- Apache-Coyote/1.1
|
427
|
+
X-Content-Type-Options:
|
428
|
+
- nosniff
|
429
|
+
Content-Type:
|
430
|
+
- application/json
|
431
|
+
Content-Length:
|
432
|
+
- '6464'
|
433
|
+
Date:
|
434
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
435
|
+
body:
|
436
|
+
encoding: US-ASCII
|
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.1.0-8-g5bd90c6"}}'
|
438
|
+
http_version:
|
439
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
440
|
+
- request:
|
441
|
+
method: get
|
442
|
+
uri: http://localhost:8150/api/commands/delete-broker
|
443
|
+
body:
|
444
|
+
encoding: US-ASCII
|
445
|
+
string: ''
|
446
|
+
headers:
|
447
|
+
Accept:
|
448
|
+
- application/json
|
449
|
+
Accept-Encoding:
|
450
|
+
- gzip, deflate
|
451
|
+
User-Agent:
|
452
|
+
- Ruby
|
453
|
+
response:
|
454
|
+
status:
|
455
|
+
code: 200
|
456
|
+
message: OK
|
457
|
+
headers:
|
458
|
+
Server:
|
459
|
+
- Apache-Coyote/1.1
|
460
|
+
Etag:
|
461
|
+
- '"server-version-v1.1.0-8-g5bd90c6"'
|
462
|
+
X-Content-Type-Options:
|
463
|
+
- nosniff
|
464
|
+
Content-Type:
|
465
|
+
- application/json
|
466
|
+
Content-Length:
|
467
|
+
- '2603'
|
468
|
+
Date:
|
469
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
470
|
+
body:
|
471
|
+
encoding: US-ASCII
|
472
|
+
string: '{"name":"delete-broker","help":{"summary":"Delete an existing broker
|
473
|
+
configuration","description":"Delete a broker configuration from Razor. If
|
474
|
+
the broker is currently used by\na policy the attempt will fail.","schema":"#
|
475
|
+
Access Control\n\nThis command''s access control pattern: `commands:delete-broker:%{name}`\n\nWords
|
476
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
477
|
+
name of the object being modified, or some other critical detail, these\nallow
|
478
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
479
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
480
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
481
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
482
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
483
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
484
|
+
Attributes\n\n * name\n - The name of the broker to delete.\n - This attribute
|
485
|
+
is required.\n - It must be of type string.\n - It must be between 1 and
|
486
|
+
250 in length.\n","examples":{"api":"Delete the unused broker configuration
|
487
|
+
\"obsolete\":\n\n{\"name\": \"obsolete\"}","cli":"Delete the unused broker
|
488
|
+
configuration \"obsolete\":\n\nrazor delete-broker --name obsolete"},"full":"#
|
489
|
+
SYNOPSIS\nDelete an existing broker configuration\n\n# DESCRIPTION\nDelete
|
490
|
+
a broker configuration from Razor. If the broker is currently used by\na
|
491
|
+
policy the attempt will fail.\n# Access Control\n\nThis command''s access
|
492
|
+
control pattern: `commands:delete-broker:%{name}`\n\nWords surrounded by `%{...}`
|
493
|
+
are substitutions from the input data: typically\nthe name of the object being
|
494
|
+
modified, or some other critical detail, these\nallow roles to be granted
|
495
|
+
partial access to modify the system.\n\nFor more detail on how the permission
|
496
|
+
strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
497
|
+
pattern is expanded\nand then a permission check applied to it, before the
|
498
|
+
command is authorized.\n\nThese checks only apply if security is enabled in
|
499
|
+
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
500
|
+
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
|
501
|
+
The name of the broker to delete.\n - This attribute is required.\n -
|
502
|
+
It must be of type string.\n - It must be between 1 and 250 in length.\n\n#
|
503
|
+
EXAMPLES\n\n Delete the unused broker configuration \"obsolete\":\n \n {\"name\":
|
504
|
+
\"obsolete\"}\n"},"schema":{"name":{"type":"string","position":0}}}'
|
505
|
+
http_version:
|
506
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
507
|
+
- request:
|
508
|
+
method: post
|
509
|
+
uri: http://localhost:8150/api/commands/delete-broker
|
510
|
+
body:
|
511
|
+
encoding: UTF-8
|
512
|
+
string: '{"name":"some noop broker"}'
|
513
|
+
headers:
|
514
|
+
Accept:
|
515
|
+
- application/json
|
516
|
+
Accept-Encoding:
|
517
|
+
- gzip, deflate
|
518
|
+
Content-Type:
|
519
|
+
- application/json
|
520
|
+
Content-Length:
|
521
|
+
- '27'
|
522
|
+
User-Agent:
|
523
|
+
- Ruby
|
524
|
+
response:
|
525
|
+
status:
|
526
|
+
code: 202
|
527
|
+
message: Accepted
|
528
|
+
headers:
|
529
|
+
Server:
|
530
|
+
- Apache-Coyote/1.1
|
531
|
+
X-Content-Type-Options:
|
532
|
+
- nosniff
|
533
|
+
Content-Type:
|
534
|
+
- application/json
|
535
|
+
Content-Length:
|
536
|
+
- '107'
|
537
|
+
Date:
|
538
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
539
|
+
body:
|
540
|
+
encoding: US-ASCII
|
541
|
+
string: '{"result":"broker some noop broker destroyed","command":"http://localhost:8150/api/collections/commands/3"}'
|
542
|
+
http_version:
|
543
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
544
|
+
- request:
|
545
|
+
method: get
|
546
|
+
uri: http://localhost:8150/api
|
547
|
+
body:
|
548
|
+
encoding: US-ASCII
|
549
|
+
string: ''
|
550
|
+
headers:
|
551
|
+
Accept:
|
552
|
+
- application/json
|
553
|
+
Accept-Encoding:
|
554
|
+
- gzip, deflate
|
555
|
+
User-Agent:
|
556
|
+
- Ruby
|
557
|
+
response:
|
558
|
+
status:
|
559
|
+
code: 200
|
560
|
+
message: OK
|
561
|
+
headers:
|
562
|
+
Server:
|
563
|
+
- Apache-Coyote/1.1
|
564
|
+
X-Content-Type-Options:
|
565
|
+
- nosniff
|
566
|
+
Content-Type:
|
567
|
+
- application/json
|
568
|
+
Content-Length:
|
569
|
+
- '6464'
|
570
|
+
Date:
|
571
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
572
|
+
body:
|
573
|
+
encoding: US-ASCII
|
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.1.0-8-g5bd90c6"}}'
|
575
|
+
http_version:
|
576
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
577
|
+
- request:
|
578
|
+
method: get
|
579
|
+
uri: http://localhost:8150/api/commands/delete-broker
|
580
|
+
body:
|
581
|
+
encoding: US-ASCII
|
582
|
+
string: ''
|
583
|
+
headers:
|
584
|
+
Accept:
|
585
|
+
- application/json
|
586
|
+
Accept-Encoding:
|
587
|
+
- gzip, deflate
|
588
|
+
User-Agent:
|
589
|
+
- Ruby
|
590
|
+
response:
|
591
|
+
status:
|
592
|
+
code: 200
|
593
|
+
message: OK
|
594
|
+
headers:
|
595
|
+
Server:
|
596
|
+
- Apache-Coyote/1.1
|
597
|
+
Etag:
|
598
|
+
- '"server-version-v1.1.0-8-g5bd90c6"'
|
599
|
+
X-Content-Type-Options:
|
600
|
+
- nosniff
|
601
|
+
Content-Type:
|
602
|
+
- application/json
|
603
|
+
Content-Length:
|
604
|
+
- '2603'
|
605
|
+
Date:
|
606
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
607
|
+
body:
|
608
|
+
encoding: US-ASCII
|
609
|
+
string: '{"name":"delete-broker","help":{"summary":"Delete an existing broker
|
610
|
+
configuration","description":"Delete a broker configuration from Razor. If
|
611
|
+
the broker is currently used by\na policy the attempt will fail.","schema":"#
|
612
|
+
Access Control\n\nThis command''s access control pattern: `commands:delete-broker:%{name}`\n\nWords
|
613
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
614
|
+
name of the object being modified, or some other critical detail, these\nallow
|
615
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
616
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
617
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
618
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
619
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
620
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
621
|
+
Attributes\n\n * name\n - The name of the broker to delete.\n - This attribute
|
622
|
+
is required.\n - It must be of type string.\n - It must be between 1 and
|
623
|
+
250 in length.\n","examples":{"api":"Delete the unused broker configuration
|
624
|
+
\"obsolete\":\n\n{\"name\": \"obsolete\"}","cli":"Delete the unused broker
|
625
|
+
configuration \"obsolete\":\n\nrazor delete-broker --name obsolete"},"full":"#
|
626
|
+
SYNOPSIS\nDelete an existing broker configuration\n\n# DESCRIPTION\nDelete
|
627
|
+
a broker configuration from Razor. If the broker is currently used by\na
|
628
|
+
policy the attempt will fail.\n# Access Control\n\nThis command''s access
|
629
|
+
control pattern: `commands:delete-broker:%{name}`\n\nWords surrounded by `%{...}`
|
630
|
+
are substitutions from the input data: typically\nthe name of the object being
|
631
|
+
modified, or some other critical detail, these\nallow roles to be granted
|
632
|
+
partial access to modify the system.\n\nFor more detail on how the permission
|
633
|
+
strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
634
|
+
pattern is expanded\nand then a permission check applied to it, before the
|
635
|
+
command is authorized.\n\nThese checks only apply if security is enabled in
|
636
|
+
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
637
|
+
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
|
638
|
+
The name of the broker to delete.\n - This attribute is required.\n -
|
639
|
+
It must be of type string.\n - It must be between 1 and 250 in length.\n\n#
|
640
|
+
EXAMPLES\n\n Delete the unused broker configuration \"obsolete\":\n \n {\"name\":
|
641
|
+
\"obsolete\"}\n"},"schema":{"name":{"type":"string","position":0}}}'
|
642
|
+
http_version:
|
643
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
644
|
+
- request:
|
645
|
+
method: post
|
646
|
+
uri: http://localhost:8150/api/commands/delete-broker
|
647
|
+
body:
|
648
|
+
encoding: UTF-8
|
649
|
+
string: '{"name":"some other broker"}'
|
650
|
+
headers:
|
651
|
+
Accept:
|
652
|
+
- application/json
|
653
|
+
Accept-Encoding:
|
654
|
+
- gzip, deflate
|
655
|
+
Content-Type:
|
656
|
+
- application/json
|
657
|
+
Content-Length:
|
658
|
+
- '28'
|
659
|
+
User-Agent:
|
660
|
+
- Ruby
|
661
|
+
response:
|
662
|
+
status:
|
663
|
+
code: 202
|
664
|
+
message: Accepted
|
665
|
+
headers:
|
666
|
+
Server:
|
667
|
+
- Apache-Coyote/1.1
|
668
|
+
X-Content-Type-Options:
|
669
|
+
- nosniff
|
670
|
+
Content-Type:
|
671
|
+
- application/json
|
672
|
+
Content-Length:
|
673
|
+
- '108'
|
674
|
+
Date:
|
675
|
+
- Fri, 11 Dec 2015 23:07:28 GMT
|
676
|
+
body:
|
677
|
+
encoding: US-ASCII
|
678
|
+
string: '{"result":"broker some other broker destroyed","command":"http://localhost:8150/api/collections/commands/4"}'
|
679
|
+
http_version:
|
680
|
+
recorded_at: Fri, 11 Dec 2015 23:07:29 GMT
|
681
|
+
recorded_with: VCR 2.5.0
|