razor-client 0.16.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.md +15 -0
- data/bin/razor +3 -2
- data/lib/razor/cli.rb +6 -0
- data/lib/razor/cli/command.rb +24 -13
- data/lib/razor/cli/navigate.rb +1 -0
- data/lib/razor/cli/parse.rb +29 -3
- data/lib/razor/cli/query.rb +2 -1
- data/lib/razor/cli/table_format.rb +38 -2
- data/lib/razor/cli/transforms.rb +8 -1
- data/lib/razor/cli/version.rb +1 -1
- data/lib/razor/cli/views.yaml +17 -4
- data/spec/cli/command_spec.rb +66 -0
- data/spec/cli/navigate_spec.rb +7 -7
- data/spec/cli/parse_spec.rb +23 -4
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_in_string.yml +82 -171
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml +281 -548
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml +160 -37
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml +160 -37
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml +160 -37
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml +160 -37
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml +160 -37
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml +160 -37
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml +10 -10
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml +5 -5
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_bad_JSON.yml +71 -166
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml +109 -59
- 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 +527 -1360
- 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 +528 -1361
- 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 +528 -1361
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml +66 -229
- 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 +104 -165
- 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 +57 -155
- 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 +57 -220
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml +98 -5
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_limit.yml +8 -8
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_start.yml +8 -8
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_not_fail_when_query_returns_details_for_one_item.yml +41 -149
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_store_query_without_query_parameters.yml +70 -286
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_throw_an_error_if_the_query_parameter_is_not_in_the_API.yml +5 -5
- 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 +36 -144
- data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml +5 -5
- data/spec/spec_helper.rb +8 -4
- metadata +92 -85
- checksums.yaml +0 -7
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_command_--help_.yml +0 -110
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_command_help_.yml +0 -110
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_help_command_.yml +0 -110
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--help_--api_command_.yml +0 -110
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_-a_-h_command_.yml +0 -110
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_-a_command_-h_.yml +0 -110
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://localhost:
|
5
|
+
uri: http://localhost:8150/api
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -25,17 +25,17 @@ http_interactions:
|
|
25
25
|
Content-Type:
|
26
26
|
- application/json;charset=utf-8
|
27
27
|
Content-Length:
|
28
|
-
- '
|
28
|
+
- '5650'
|
29
29
|
Date:
|
30
|
-
-
|
30
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
31
31
|
body:
|
32
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:
|
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
34
|
http_version:
|
35
|
-
recorded_at:
|
35
|
+
recorded_at: Mon, 09 Mar 2015 19:55:23 GMT
|
36
36
|
- request:
|
37
37
|
method: get
|
38
|
-
uri: http://localhost:
|
38
|
+
uri: http://localhost:8150/api/commands/register-node
|
39
39
|
body:
|
40
40
|
encoding: US-ASCII
|
41
41
|
string: ''
|
@@ -54,15 +54,15 @@ http_interactions:
|
|
54
54
|
Server:
|
55
55
|
- Apache-Coyote/1.1
|
56
56
|
Etag:
|
57
|
-
- '"server-version-v0.
|
57
|
+
- '"server-version-v0.16.1-18-gd3acc7a-dirty"'
|
58
58
|
X-Content-Type-Options:
|
59
59
|
- nosniff
|
60
60
|
Content-Type:
|
61
61
|
- application/json;charset=utf-8
|
62
62
|
Content-Length:
|
63
|
-
- '
|
63
|
+
- '6207'
|
64
64
|
Date:
|
65
|
-
-
|
65
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
66
66
|
body:
|
67
67
|
encoding: US-ASCII
|
68
68
|
string: '{"name":"register-node","help":{"summary":"Register a node with Razor
|
@@ -85,7 +85,7 @@ http_interactions:
|
|
85
85
|
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
|
86
86
|
Should the node be considered ''installed'' already? Installed nodes are\n not
|
87
87
|
eligible for policy matching, and will simply boot locally.\n - This attribute
|
88
|
-
is required.\n - It must be of type boolean.\n\n *
|
88
|
+
is required.\n - It must be of type boolean.\n\n * hw_info\n - The hardware
|
89
89
|
information for the node. This is used to match the node on first\n boot
|
90
90
|
with the record in the database. The order of MAC address assignment in\n this
|
91
91
|
data is not significant, as a node with reordered MAC addresses will be\n treated
|
@@ -96,7 +96,7 @@ http_interactions:
|
|
96
96
|
It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
|
97
97
|
It must be of type string.\n","examples":{"api":"Register a machine before
|
98
98
|
you boot it, and note that it already has an OS\ninstalled, so should not
|
99
|
-
be subject to policy-based reinstallation:\n\n {\n \"
|
99
|
+
be subject to policy-based reinstallation:\n\n {\n \"hw_info\": {\n \"net0\": \"78:31:c1:be:c8:00\",\n \"net1\": \"72:00:01:f2:13:f0\",\n \"net2\": \"72:00:01:f2:13:f1\",\n \"serial\":
|
100
100
|
\"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
|
101
101
|
Settable\"\n },\n \"installed\": true\n }","cli":"Register a
|
102
102
|
machine before you boot it, and note that it already has an OS\ninstalled,
|
@@ -124,7 +124,7 @@ http_interactions:
|
|
124
124
|
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
|
125
125
|
Should the node be considered ''installed'' already? Installed nodes are\n not
|
126
126
|
eligible for policy matching, and will simply boot locally.\n - This attribute
|
127
|
-
is required.\n - It must be of type boolean.\n\n *
|
127
|
+
is required.\n - It must be of type boolean.\n\n * hw_info\n - The hardware
|
128
128
|
information for the node. This is used to match the node on first\n boot
|
129
129
|
with the record in the database. The order of MAC address assignment in\n this
|
130
130
|
data is not significant, as a node with reordered MAC addresses will be\n treated
|
@@ -135,126 +135,18 @@ http_interactions:
|
|
135
135
|
It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
|
136
136
|
It must be of type string.\n\n# EXAMPLES\n\n Register a machine before you
|
137
137
|
boot it, and note that it already has an OS\n installed, so should not be
|
138
|
-
subject to policy-based reinstallation:\n \n {\n \"
|
138
|
+
subject to policy-based reinstallation:\n \n {\n \"hw_info\":
|
139
139
|
{\n \"net0\": \"78:31:c1:be:c8:00\",\n \"net1\": \"72:00:01:f2:13:f0\",\n \"net2\": \"72:00:01:f2:13:f1\",\n \"serial\":
|
140
140
|
\"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
|
141
|
-
Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"
|
141
|
+
Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"hw_info":{"type":"object","aliases":["hw-info"]}}}'
|
142
142
|
http_version:
|
143
|
-
recorded_at:
|
144
|
-
- request:
|
145
|
-
method: get
|
146
|
-
uri: http://localhost:8080/api/commands/register-node
|
147
|
-
body:
|
148
|
-
encoding: US-ASCII
|
149
|
-
string: ''
|
150
|
-
headers:
|
151
|
-
Accept:
|
152
|
-
- application/json
|
153
|
-
Accept-Encoding:
|
154
|
-
- gzip, deflate
|
155
|
-
User-Agent:
|
156
|
-
- Ruby
|
157
|
-
response:
|
158
|
-
status:
|
159
|
-
code: 200
|
160
|
-
message: OK
|
161
|
-
headers:
|
162
|
-
Server:
|
163
|
-
- Apache-Coyote/1.1
|
164
|
-
Etag:
|
165
|
-
- '"server-version-v0.15.0-67-gcc2509f"'
|
166
|
-
X-Content-Type-Options:
|
167
|
-
- nosniff
|
168
|
-
Content-Type:
|
169
|
-
- application/json;charset=utf-8
|
170
|
-
Content-Length:
|
171
|
-
- '6185'
|
172
|
-
Date:
|
173
|
-
- Tue, 18 Nov 2014 07:10:19 GMT
|
174
|
-
body:
|
175
|
-
encoding: US-ASCII
|
176
|
-
string: '{"name":"register-node","help":{"summary":"Register a node with Razor
|
177
|
-
before it is discovered","description":"In order to make brownfield deployments
|
178
|
-
of Razor easier we allow users to\nregister nodes explicitly. This command
|
179
|
-
allows you to perform the same\nregistration that would happen when a new
|
180
|
-
node checked in, ahead of time.\n\nIn order for this to be effective the hw_info
|
181
|
-
must contain enough information\nthat the node can successfully be matched
|
182
|
-
during the iPXE boot phase.\n\nIf the node matches an existing node, in keeping
|
183
|
-
with the overall policy of\ncommands declaring desired state, the node installed
|
184
|
-
field will be updated to\nmatch the value in this command.\n\nThe final state
|
185
|
-
is that a node with the supplied hardware information, and the\ndesired installed
|
186
|
-
state, will be present in the database, regardless of it\nexisting before
|
187
|
-
hand or not.","schema":"# Access Control\n\nThis command''s access control
|
188
|
-
pattern: `commands:register-node`\n\nFor more detail on how the permission
|
189
|
-
strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
190
|
-
pattern is expanded\nand then a permission check applied to it, before the
|
191
|
-
command is authorized.\n\nThese checks only apply if security is enabled in
|
192
|
-
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
193
|
-
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
|
194
|
-
Should the node be considered ''installed'' already? Installed nodes are\n not
|
195
|
-
eligible for policy matching, and will simply boot locally.\n - This attribute
|
196
|
-
is required.\n - It must be of type boolean.\n\n * hw-info\n - The hardware
|
197
|
-
information for the node. This is used to match the node on first\n boot
|
198
|
-
with the record in the database. The order of MAC address assignment in\n this
|
199
|
-
data is not significant, as a node with reordered MAC addresses will be\n treated
|
200
|
-
as the same node.\n - This attribute is required.\n - It must be of type
|
201
|
-
object.\n - It must be between 1 and Infinity in length.\n # Attributes\n \n *
|
202
|
-
serial\n - The DMI serial number of the node\n - It must be of type
|
203
|
-
string.\n \n * asset\n - The DMI asset tag of the node\n -
|
204
|
-
It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
|
205
|
-
It must be of type string.\n","examples":{"api":"Register a machine before
|
206
|
-
you boot it, and note that it already has an OS\ninstalled, so should not
|
207
|
-
be subject to policy-based reinstallation:\n\n {\n \"hw-info\": {\n \"net0\": \"78:31:c1:be:c8:00\",\n \"net1\": \"72:00:01:f2:13:f0\",\n \"net2\": \"72:00:01:f2:13:f1\",\n \"serial\":
|
208
|
-
\"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
|
209
|
-
Settable\"\n },\n \"installed\": true\n }","cli":"Register a
|
210
|
-
machine before you boot it, and note that it already has an OS\ninstalled,
|
211
|
-
so should not be subject to policy-based reinstallation:\n\n razor register-node
|
212
|
-
--hw-info net0=78:31:c1:be:c8:00 \\\n --hw-info net1=72:00:01:f2:13:f0
|
213
|
-
\\\n --hw-info net2=72:00:01:f2:13:f1 \\\n --hw-info serial=xxxxxxxxxxx
|
214
|
-
\\\n --hw-info asset=Asset-1234567890 \\\n --hw-info uuid=\"Not
|
215
|
-
Settable\" \\\n --installed"},"full":"# SYNOPSIS\nRegister a node with
|
216
|
-
Razor before it is discovered\n\n# DESCRIPTION\nIn order to make brownfield
|
217
|
-
deployments of Razor easier we allow users to\nregister nodes explicitly. This
|
218
|
-
command allows you to perform the same\nregistration that would happen when
|
219
|
-
a new node checked in, ahead of time.\n\nIn order for this to be effective
|
220
|
-
the hw_info must contain enough information\nthat the node can successfully
|
221
|
-
be matched during the iPXE boot phase.\n\nIf the node matches an existing
|
222
|
-
node, in keeping with the overall policy of\ncommands declaring desired state,
|
223
|
-
the node installed field will be updated to\nmatch the value in this command.\n\nThe
|
224
|
-
final state is that a node with the supplied hardware information, and the\ndesired
|
225
|
-
installed state, will be present in the database, regardless of it\nexisting
|
226
|
-
before hand or not.\n# Access Control\n\nThis command''s access control pattern:
|
227
|
-
`commands:register-node`\n\nFor more detail on how the permission strings
|
228
|
-
are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
229
|
-
pattern is expanded\nand then a permission check applied to it, before the
|
230
|
-
command is authorized.\n\nThese checks only apply if security is enabled in
|
231
|
-
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
232
|
-
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
|
233
|
-
Should the node be considered ''installed'' already? Installed nodes are\n not
|
234
|
-
eligible for policy matching, and will simply boot locally.\n - This attribute
|
235
|
-
is required.\n - It must be of type boolean.\n\n * hw-info\n - The hardware
|
236
|
-
information for the node. This is used to match the node on first\n boot
|
237
|
-
with the record in the database. The order of MAC address assignment in\n this
|
238
|
-
data is not significant, as a node with reordered MAC addresses will be\n treated
|
239
|
-
as the same node.\n - This attribute is required.\n - It must be of type
|
240
|
-
object.\n - It must be between 1 and Infinity in length.\n # Attributes\n \n *
|
241
|
-
serial\n - The DMI serial number of the node\n - It must be of type
|
242
|
-
string.\n \n * asset\n - The DMI asset tag of the node\n -
|
243
|
-
It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
|
244
|
-
It must be of type string.\n\n# EXAMPLES\n\n Register a machine before you
|
245
|
-
boot it, and note that it already has an OS\n installed, so should not be
|
246
|
-
subject to policy-based reinstallation:\n \n {\n \"hw-info\":
|
247
|
-
{\n \"net0\": \"78:31:c1:be:c8:00\",\n \"net1\": \"72:00:01:f2:13:f0\",\n \"net2\": \"72:00:01:f2:13:f1\",\n \"serial\":
|
248
|
-
\"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
|
249
|
-
Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"hw-info":{"type":"object"}}}'
|
250
|
-
http_version:
|
251
|
-
recorded_at: Tue, 18 Nov 2014 07:10:20 GMT
|
143
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
252
144
|
- request:
|
253
145
|
method: post
|
254
|
-
uri: http://localhost:
|
146
|
+
uri: http://localhost:8150/api/commands/register-node
|
255
147
|
body:
|
256
148
|
encoding: UTF-8
|
257
|
-
string: '{"installed":true,"
|
149
|
+
string: '{"installed":true,"hw_info":{"net0":"78:31:c1:be:c8:00"}}'
|
258
150
|
headers:
|
259
151
|
Accept:
|
260
152
|
- application/json
|
@@ -278,17 +170,17 @@ http_interactions:
|
|
278
170
|
Content-Type:
|
279
171
|
- application/json;charset=utf-8
|
280
172
|
Content-Length:
|
281
|
-
- '
|
173
|
+
- '203'
|
282
174
|
Date:
|
283
|
-
-
|
175
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
284
176
|
body:
|
285
177
|
encoding: US-ASCII
|
286
|
-
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:
|
178
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8150/api/collections/nodes/node1","name":"node1","command":"http://localhost:8150/api/collections/commands/1"}'
|
287
179
|
http_version:
|
288
|
-
recorded_at:
|
180
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
289
181
|
- request:
|
290
182
|
method: get
|
291
|
-
uri: http://localhost:
|
183
|
+
uri: http://localhost:8150/api/collections/nodes/node1
|
292
184
|
body:
|
293
185
|
encoding: US-ASCII
|
294
186
|
string: ''
|
@@ -311,17 +203,17 @@ http_interactions:
|
|
311
203
|
Content-Type:
|
312
204
|
- application/json;charset=utf-8
|
313
205
|
Content-Length:
|
314
|
-
- '
|
206
|
+
- '409'
|
315
207
|
Date:
|
316
|
-
-
|
208
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
317
209
|
body:
|
318
210
|
encoding: US-ASCII
|
319
|
-
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:
|
211
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8150/api/collections/nodes/node1","name":"node1","hw_info":{"mac":["78:31:c1:be:c8:00"]},"log":{"id":"http://localhost:8150/api/collections/nodes/node1/log","name":"log","params":{"limit":{"type":"number"},"start":{"type":"number"}}},"tags":[],"state":{"installed":"true","installed_at":"2015-03-09T14:55:24-05:00"}}'
|
320
212
|
http_version:
|
321
|
-
recorded_at:
|
213
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
322
214
|
- request:
|
323
215
|
method: get
|
324
|
-
uri: http://localhost:
|
216
|
+
uri: http://localhost:8150/api
|
325
217
|
body:
|
326
218
|
encoding: US-ASCII
|
327
219
|
string: ''
|
@@ -344,125 +236,17 @@ http_interactions:
|
|
344
236
|
Content-Type:
|
345
237
|
- application/json;charset=utf-8
|
346
238
|
Content-Length:
|
347
|
-
- '
|
239
|
+
- '5650'
|
348
240
|
Date:
|
349
|
-
-
|
241
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
350
242
|
body:
|
351
243
|
encoding: US-ASCII
|
352
|
-
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:
|
353
|
-
http_version:
|
354
|
-
recorded_at: Tue, 18 Nov 2014 07:10:20 GMT
|
355
|
-
- request:
|
356
|
-
method: get
|
357
|
-
uri: http://localhost:8080/api/commands/register-node
|
358
|
-
body:
|
359
|
-
encoding: US-ASCII
|
360
|
-
string: ''
|
361
|
-
headers:
|
362
|
-
Accept:
|
363
|
-
- application/json
|
364
|
-
Accept-Encoding:
|
365
|
-
- gzip, deflate
|
366
|
-
User-Agent:
|
367
|
-
- Ruby
|
368
|
-
response:
|
369
|
-
status:
|
370
|
-
code: 200
|
371
|
-
message: OK
|
372
|
-
headers:
|
373
|
-
Server:
|
374
|
-
- Apache-Coyote/1.1
|
375
|
-
Etag:
|
376
|
-
- '"server-version-v0.15.0-67-gcc2509f"'
|
377
|
-
X-Content-Type-Options:
|
378
|
-
- nosniff
|
379
|
-
Content-Type:
|
380
|
-
- application/json;charset=utf-8
|
381
|
-
Content-Length:
|
382
|
-
- '6185'
|
383
|
-
Date:
|
384
|
-
- Tue, 18 Nov 2014 07:10:19 GMT
|
385
|
-
body:
|
386
|
-
encoding: US-ASCII
|
387
|
-
string: '{"name":"register-node","help":{"summary":"Register a node with Razor
|
388
|
-
before it is discovered","description":"In order to make brownfield deployments
|
389
|
-
of Razor easier we allow users to\nregister nodes explicitly. This command
|
390
|
-
allows you to perform the same\nregistration that would happen when a new
|
391
|
-
node checked in, ahead of time.\n\nIn order for this to be effective the hw_info
|
392
|
-
must contain enough information\nthat the node can successfully be matched
|
393
|
-
during the iPXE boot phase.\n\nIf the node matches an existing node, in keeping
|
394
|
-
with the overall policy of\ncommands declaring desired state, the node installed
|
395
|
-
field will be updated to\nmatch the value in this command.\n\nThe final state
|
396
|
-
is that a node with the supplied hardware information, and the\ndesired installed
|
397
|
-
state, will be present in the database, regardless of it\nexisting before
|
398
|
-
hand or not.","schema":"# Access Control\n\nThis command''s access control
|
399
|
-
pattern: `commands:register-node`\n\nFor more detail on how the permission
|
400
|
-
strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
401
|
-
pattern is expanded\nand then a permission check applied to it, before the
|
402
|
-
command is authorized.\n\nThese checks only apply if security is enabled in
|
403
|
-
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
404
|
-
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
|
405
|
-
Should the node be considered ''installed'' already? Installed nodes are\n not
|
406
|
-
eligible for policy matching, and will simply boot locally.\n - This attribute
|
407
|
-
is required.\n - It must be of type boolean.\n\n * hw-info\n - The hardware
|
408
|
-
information for the node. This is used to match the node on first\n boot
|
409
|
-
with the record in the database. The order of MAC address assignment in\n this
|
410
|
-
data is not significant, as a node with reordered MAC addresses will be\n treated
|
411
|
-
as the same node.\n - This attribute is required.\n - It must be of type
|
412
|
-
object.\n - It must be between 1 and Infinity in length.\n # Attributes\n \n *
|
413
|
-
serial\n - The DMI serial number of the node\n - It must be of type
|
414
|
-
string.\n \n * asset\n - The DMI asset tag of the node\n -
|
415
|
-
It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
|
416
|
-
It must be of type string.\n","examples":{"api":"Register a machine before
|
417
|
-
you boot it, and note that it already has an OS\ninstalled, so should not
|
418
|
-
be subject to policy-based reinstallation:\n\n {\n \"hw-info\": {\n \"net0\": \"78:31:c1:be:c8:00\",\n \"net1\": \"72:00:01:f2:13:f0\",\n \"net2\": \"72:00:01:f2:13:f1\",\n \"serial\":
|
419
|
-
\"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
|
420
|
-
Settable\"\n },\n \"installed\": true\n }","cli":"Register a
|
421
|
-
machine before you boot it, and note that it already has an OS\ninstalled,
|
422
|
-
so should not be subject to policy-based reinstallation:\n\n razor register-node
|
423
|
-
--hw-info net0=78:31:c1:be:c8:00 \\\n --hw-info net1=72:00:01:f2:13:f0
|
424
|
-
\\\n --hw-info net2=72:00:01:f2:13:f1 \\\n --hw-info serial=xxxxxxxxxxx
|
425
|
-
\\\n --hw-info asset=Asset-1234567890 \\\n --hw-info uuid=\"Not
|
426
|
-
Settable\" \\\n --installed"},"full":"# SYNOPSIS\nRegister a node with
|
427
|
-
Razor before it is discovered\n\n# DESCRIPTION\nIn order to make brownfield
|
428
|
-
deployments of Razor easier we allow users to\nregister nodes explicitly. This
|
429
|
-
command allows you to perform the same\nregistration that would happen when
|
430
|
-
a new node checked in, ahead of time.\n\nIn order for this to be effective
|
431
|
-
the hw_info must contain enough information\nthat the node can successfully
|
432
|
-
be matched during the iPXE boot phase.\n\nIf the node matches an existing
|
433
|
-
node, in keeping with the overall policy of\ncommands declaring desired state,
|
434
|
-
the node installed field will be updated to\nmatch the value in this command.\n\nThe
|
435
|
-
final state is that a node with the supplied hardware information, and the\ndesired
|
436
|
-
installed state, will be present in the database, regardless of it\nexisting
|
437
|
-
before hand or not.\n# Access Control\n\nThis command''s access control pattern:
|
438
|
-
`commands:register-node`\n\nFor more detail on how the permission strings
|
439
|
-
are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
440
|
-
pattern is expanded\nand then a permission check applied to it, before the
|
441
|
-
command is authorized.\n\nThese checks only apply if security is enabled in
|
442
|
-
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
443
|
-
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
|
444
|
-
Should the node be considered ''installed'' already? Installed nodes are\n not
|
445
|
-
eligible for policy matching, and will simply boot locally.\n - This attribute
|
446
|
-
is required.\n - It must be of type boolean.\n\n * hw-info\n - The hardware
|
447
|
-
information for the node. This is used to match the node on first\n boot
|
448
|
-
with the record in the database. The order of MAC address assignment in\n this
|
449
|
-
data is not significant, as a node with reordered MAC addresses will be\n treated
|
450
|
-
as the same node.\n - This attribute is required.\n - It must be of type
|
451
|
-
object.\n - It must be between 1 and Infinity in length.\n # Attributes\n \n *
|
452
|
-
serial\n - The DMI serial number of the node\n - It must be of type
|
453
|
-
string.\n \n * asset\n - The DMI asset tag of the node\n -
|
454
|
-
It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
|
455
|
-
It must be of type string.\n\n# EXAMPLES\n\n Register a machine before you
|
456
|
-
boot it, and note that it already has an OS\n installed, so should not be
|
457
|
-
subject to policy-based reinstallation:\n \n {\n \"hw-info\":
|
458
|
-
{\n \"net0\": \"78:31:c1:be:c8:00\",\n \"net1\": \"72:00:01:f2:13:f0\",\n \"net2\": \"72:00:01:f2:13:f1\",\n \"serial\":
|
459
|
-
\"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
|
460
|
-
Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"hw-info":{"type":"object"}}}'
|
244
|
+
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"}}'
|
461
245
|
http_version:
|
462
|
-
recorded_at:
|
246
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
463
247
|
- request:
|
464
248
|
method: get
|
465
|
-
uri: http://localhost:
|
249
|
+
uri: http://localhost:8150/api/commands/register-node
|
466
250
|
body:
|
467
251
|
encoding: US-ASCII
|
468
252
|
string: ''
|
@@ -481,15 +265,15 @@ http_interactions:
|
|
481
265
|
Server:
|
482
266
|
- Apache-Coyote/1.1
|
483
267
|
Etag:
|
484
|
-
- '"server-version-v0.
|
268
|
+
- '"server-version-v0.16.1-18-gd3acc7a-dirty"'
|
485
269
|
X-Content-Type-Options:
|
486
270
|
- nosniff
|
487
271
|
Content-Type:
|
488
272
|
- application/json;charset=utf-8
|
489
273
|
Content-Length:
|
490
|
-
- '
|
274
|
+
- '6207'
|
491
275
|
Date:
|
492
|
-
-
|
276
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
493
277
|
body:
|
494
278
|
encoding: US-ASCII
|
495
279
|
string: '{"name":"register-node","help":{"summary":"Register a node with Razor
|
@@ -512,7 +296,7 @@ http_interactions:
|
|
512
296
|
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
|
513
297
|
Should the node be considered ''installed'' already? Installed nodes are\n not
|
514
298
|
eligible for policy matching, and will simply boot locally.\n - This attribute
|
515
|
-
is required.\n - It must be of type boolean.\n\n *
|
299
|
+
is required.\n - It must be of type boolean.\n\n * hw_info\n - The hardware
|
516
300
|
information for the node. This is used to match the node on first\n boot
|
517
301
|
with the record in the database. The order of MAC address assignment in\n this
|
518
302
|
data is not significant, as a node with reordered MAC addresses will be\n treated
|
@@ -523,7 +307,7 @@ http_interactions:
|
|
523
307
|
It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
|
524
308
|
It must be of type string.\n","examples":{"api":"Register a machine before
|
525
309
|
you boot it, and note that it already has an OS\ninstalled, so should not
|
526
|
-
be subject to policy-based reinstallation:\n\n {\n \"
|
310
|
+
be subject to policy-based reinstallation:\n\n {\n \"hw_info\": {\n \"net0\": \"78:31:c1:be:c8:00\",\n \"net1\": \"72:00:01:f2:13:f0\",\n \"net2\": \"72:00:01:f2:13:f1\",\n \"serial\":
|
527
311
|
\"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
|
528
312
|
Settable\"\n },\n \"installed\": true\n }","cli":"Register a
|
529
313
|
machine before you boot it, and note that it already has an OS\ninstalled,
|
@@ -551,7 +335,7 @@ http_interactions:
|
|
551
335
|
http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
|
552
336
|
Should the node be considered ''installed'' already? Installed nodes are\n not
|
553
337
|
eligible for policy matching, and will simply boot locally.\n - This attribute
|
554
|
-
is required.\n - It must be of type boolean.\n\n *
|
338
|
+
is required.\n - It must be of type boolean.\n\n * hw_info\n - The hardware
|
555
339
|
information for the node. This is used to match the node on first\n boot
|
556
340
|
with the record in the database. The order of MAC address assignment in\n this
|
557
341
|
data is not significant, as a node with reordered MAC addresses will be\n treated
|
@@ -562,18 +346,18 @@ http_interactions:
|
|
562
346
|
It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
|
563
347
|
It must be of type string.\n\n# EXAMPLES\n\n Register a machine before you
|
564
348
|
boot it, and note that it already has an OS\n installed, so should not be
|
565
|
-
subject to policy-based reinstallation:\n \n {\n \"
|
349
|
+
subject to policy-based reinstallation:\n \n {\n \"hw_info\":
|
566
350
|
{\n \"net0\": \"78:31:c1:be:c8:00\",\n \"net1\": \"72:00:01:f2:13:f0\",\n \"net2\": \"72:00:01:f2:13:f1\",\n \"serial\":
|
567
351
|
\"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
|
568
|
-
Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"
|
352
|
+
Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"hw_info":{"type":"object","aliases":["hw-info"]}}}'
|
569
353
|
http_version:
|
570
|
-
recorded_at:
|
354
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
571
355
|
- request:
|
572
356
|
method: post
|
573
|
-
uri: http://localhost:
|
357
|
+
uri: http://localhost:8150/api/commands/register-node
|
574
358
|
body:
|
575
359
|
encoding: UTF-8
|
576
|
-
string: '{"installed":true,"
|
360
|
+
string: '{"installed":true,"hw_info":{"net0":"78:31:c1:be:c8:01"}}'
|
577
361
|
headers:
|
578
362
|
Accept:
|
579
363
|
- application/json
|
@@ -597,17 +381,17 @@ http_interactions:
|
|
597
381
|
Content-Type:
|
598
382
|
- application/json;charset=utf-8
|
599
383
|
Content-Length:
|
600
|
-
- '
|
384
|
+
- '203'
|
601
385
|
Date:
|
602
|
-
-
|
386
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
603
387
|
body:
|
604
388
|
encoding: US-ASCII
|
605
|
-
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:
|
389
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8150/api/collections/nodes/node2","name":"node2","command":"http://localhost:8150/api/collections/commands/2"}'
|
606
390
|
http_version:
|
607
|
-
recorded_at:
|
391
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
608
392
|
- request:
|
609
393
|
method: get
|
610
|
-
uri: http://localhost:
|
394
|
+
uri: http://localhost:8150/api/collections/nodes/node2
|
611
395
|
body:
|
612
396
|
encoding: US-ASCII
|
613
397
|
string: ''
|
@@ -630,17 +414,17 @@ http_interactions:
|
|
630
414
|
Content-Type:
|
631
415
|
- application/json;charset=utf-8
|
632
416
|
Content-Length:
|
633
|
-
- '
|
417
|
+
- '409'
|
634
418
|
Date:
|
635
|
-
-
|
419
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
636
420
|
body:
|
637
421
|
encoding: US-ASCII
|
638
|
-
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:
|
422
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8150/api/collections/nodes/node2","name":"node2","hw_info":{"mac":["78:31:c1:be:c8:01"]},"log":{"id":"http://localhost:8150/api/collections/nodes/node2/log","name":"log","params":{"limit":{"type":"number"},"start":{"type":"number"}}},"tags":[],"state":{"installed":"true","installed_at":"2015-03-09T14:55:24-05:00"}}'
|
639
423
|
http_version:
|
640
|
-
recorded_at:
|
424
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
641
425
|
- request:
|
642
426
|
method: get
|
643
|
-
uri: http://fred:dead@localhost:
|
427
|
+
uri: http://fred:dead@localhost:8150/api
|
644
428
|
body:
|
645
429
|
encoding: US-ASCII
|
646
430
|
string: ''
|
@@ -663,17 +447,17 @@ http_interactions:
|
|
663
447
|
Content-Type:
|
664
448
|
- application/json;charset=utf-8
|
665
449
|
Content-Length:
|
666
|
-
- '
|
450
|
+
- '5650'
|
667
451
|
Date:
|
668
|
-
-
|
452
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
669
453
|
body:
|
670
454
|
encoding: US-ASCII
|
671
|
-
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:
|
455
|
+
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"}}'
|
672
456
|
http_version:
|
673
|
-
recorded_at:
|
457
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
674
458
|
- request:
|
675
459
|
method: get
|
676
|
-
uri: http://fred:dead@localhost:
|
460
|
+
uri: http://fred:dead@localhost:8150/api/collections/nodes
|
677
461
|
body:
|
678
462
|
encoding: US-ASCII
|
679
463
|
string: ''
|
@@ -696,17 +480,17 @@ http_interactions:
|
|
696
480
|
Content-Type:
|
697
481
|
- application/json;charset=utf-8
|
698
482
|
Content-Length:
|
699
|
-
- '
|
483
|
+
- '369'
|
700
484
|
Date:
|
701
|
-
-
|
485
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
702
486
|
body:
|
703
487
|
encoding: US-ASCII
|
704
|
-
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes","items":[{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:
|
488
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes","items":[{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8150/api/collections/nodes/node1","name":"node1"},{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8150/api/collections/nodes/node2","name":"node2"}],"total":2}'
|
705
489
|
http_version:
|
706
|
-
recorded_at:
|
490
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
707
491
|
- request:
|
708
492
|
method: get
|
709
|
-
uri: http://fred:dead@localhost:
|
493
|
+
uri: http://fred:dead@localhost:8150/api/collections/nodes/node1
|
710
494
|
body:
|
711
495
|
encoding: US-ASCII
|
712
496
|
string: ''
|
@@ -729,17 +513,17 @@ http_interactions:
|
|
729
513
|
Content-Type:
|
730
514
|
- application/json;charset=utf-8
|
731
515
|
Content-Length:
|
732
|
-
- '
|
516
|
+
- '409'
|
733
517
|
Date:
|
734
|
-
-
|
518
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
735
519
|
body:
|
736
520
|
encoding: US-ASCII
|
737
|
-
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:
|
521
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8150/api/collections/nodes/node1","name":"node1","hw_info":{"mac":["78:31:c1:be:c8:00"]},"log":{"id":"http://localhost:8150/api/collections/nodes/node1/log","name":"log","params":{"limit":{"type":"number"},"start":{"type":"number"}}},"tags":[],"state":{"installed":"true","installed_at":"2015-03-09T14:55:24-05:00"}}'
|
738
522
|
http_version:
|
739
|
-
recorded_at:
|
523
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
740
524
|
- request:
|
741
525
|
method: get
|
742
|
-
uri: http://fred:dead@localhost:
|
526
|
+
uri: http://fred:dead@localhost:8150/api/collections/nodes/node1/log?limit=1
|
743
527
|
body:
|
744
528
|
encoding: US-ASCII
|
745
529
|
string: ''
|
@@ -764,10 +548,10 @@ http_interactions:
|
|
764
548
|
Content-Length:
|
765
549
|
- '78'
|
766
550
|
Date:
|
767
|
-
-
|
551
|
+
- Mon, 09 Mar 2015 19:55:23 GMT
|
768
552
|
body:
|
769
553
|
encoding: US-ASCII
|
770
554
|
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/log","items":[]}'
|
771
555
|
http_version:
|
772
|
-
recorded_at:
|
556
|
+
recorded_at: Mon, 09 Mar 2015 19:55:24 GMT
|
773
557
|
recorded_with: VCR 2.5.0
|