pe-razor-client 0.14.0 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS.md +25 -0
  3. data/bin/razor +9 -4
  4. data/lib/razor/cli.rb +10 -0
  5. data/lib/razor/cli/document.rb +59 -0
  6. data/lib/razor/cli/format.rb +81 -20
  7. data/lib/razor/cli/navigate.rb +121 -27
  8. data/lib/razor/cli/parse.rb +83 -10
  9. data/lib/razor/cli/transforms.rb +42 -0
  10. data/lib/razor/cli/version.rb +46 -0
  11. data/lib/razor/cli/views.rb +25 -0
  12. data/lib/razor/cli/views.yaml +196 -0
  13. data/spec/cli/format_spec.rb +99 -0
  14. data/spec/cli/navigate_spec.rb +111 -2
  15. data/spec/cli/parse_spec.rb +20 -0
  16. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml +966 -0
  17. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml +99 -0
  18. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml +99 -0
  19. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml +99 -0
  20. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml +99 -0
  21. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml +99 -0
  22. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml +99 -0
  23. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml +9 -42
  24. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml +5 -5
  25. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_bad_JSON.yml +228 -0
  26. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml +120 -0
  27. 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 +2006 -0
  28. 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 +2006 -0
  29. 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 +2006 -0
  30. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml +234 -0
  31. 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 +412 -0
  32. 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 +228 -0
  33. 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 +164 -0
  34. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml +36 -0
  35. data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml +5 -5
  36. data/spec/spec_helper.rb +12 -1
  37. data/spec/testing.md +16 -0
  38. data/spec/version_spec.rb +8 -0
  39. metadata +67 -60
  40. data/.gitignore +0 -7
  41. data/.yardopts +0 -2
  42. data/Gemfile +0 -35
  43. data/Gemfile.lock +0 -53
  44. data/Rakefile +0 -37
  45. data/lib/razor/cli/navigate.yaml +0 -28
  46. data/pe-razor-client.gemspec +0 -32
  47. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_a_single_item_path/.yml +0 -69
  48. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_an_invalid_path/.yml +0 -36
  49. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_path/.yml +0 -36
  50. data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/.yml +0 -36
@@ -0,0 +1,234 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:8080/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;charset=utf-8
27
+ Content-Length:
28
+ - '4982'
29
+ Date:
30
+ - Fri, 16 May 2014 22:18: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:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/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:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/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:8080/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:8080/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:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-113-g8b33d83-dirty"}}'
34
+ http_version:
35
+ recorded_at: Fri, 16 May 2014 22:18:28 GMT
36
+ - request:
37
+ method: get
38
+ uri: http://localhost:8080/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-v0.14.1-113-g8b33d83-dirty"'
58
+ X-Content-Type-Options:
59
+ - nosniff
60
+ Content-Type:
61
+ - application/json;charset=utf-8
62
+ Content-Length:
63
+ - '2496'
64
+ Date:
65
+ - Fri, 16 May 2014 22:18:28 GMT
66
+ body:
67
+ encoding: US-ASCII
68
+ string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
69
+ configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
70
+ broker configuration. Brokers are responsible for handing a node\noff to
71
+ a config management system, such as Puppet or Chef. In cases where you\nhave
72
+ no configuration management system, you can use the `noop` broker.\n\n\n#
73
+ Access Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
74
+ surrounded by `%{...}` are substitutions from the input data: typically\nthe
75
+ name of the object being modified, or some other critical detail, these\nallow
76
+ roles to be granted partial access to modify the system.\n\nFor more detail
77
+ on how the permission strings are structured and work, you can\nsee the [Shiro
78
+ Permissions documentation][shiro]. That pattern is expanded\nand then a permission
79
+ check applied to it, before the command is authorized.\n\nThese checks only
80
+ apply if security is enabled in the Razor configuration\nfile; on this server
81
+ security 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 that
87
+ this broker is created from. 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 - It must be of type
95
+ object.\n \n \n\n\n\n# EXAMPLES\n Creating a simple Puppet broker:\n \n {\n \"name\":
96
+ \"puppet\",\n \"configuration\": {\n \"server\": \"puppet.example.org\",\n \"environment\":
97
+ \"production\"\n },\n \"broker-type\": \"puppet\"\n }\n\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
98
+ http_version:
99
+ recorded_at: Fri, 16 May 2014 22:18:28 GMT
100
+ - request:
101
+ method: get
102
+ uri: http://localhost:8080/api/commands/create-broker
103
+ body:
104
+ encoding: US-ASCII
105
+ string: ''
106
+ headers:
107
+ Accept:
108
+ - application/json
109
+ Accept-Encoding:
110
+ - gzip, deflate
111
+ User-Agent:
112
+ - Ruby
113
+ response:
114
+ status:
115
+ code: 200
116
+ message: OK
117
+ headers:
118
+ Server:
119
+ - Apache-Coyote/1.1
120
+ Etag:
121
+ - '"server-version-v0.14.1-113-g8b33d83-dirty"'
122
+ X-Content-Type-Options:
123
+ - nosniff
124
+ Content-Type:
125
+ - application/json;charset=utf-8
126
+ Content-Length:
127
+ - '2496'
128
+ Date:
129
+ - Fri, 16 May 2014 22:18:28 GMT
130
+ body:
131
+ encoding: US-ASCII
132
+ string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
133
+ configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
134
+ broker configuration. Brokers are responsible for handing a node\noff to
135
+ a config management system, such as Puppet or Chef. In cases where you\nhave
136
+ no configuration management system, you can use the `noop` broker.\n\n\n#
137
+ Access Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
138
+ surrounded by `%{...}` are substitutions from the input data: typically\nthe
139
+ name of the object being modified, or some other critical detail, these\nallow
140
+ roles to be granted partial access to modify the system.\n\nFor more detail
141
+ on how the permission strings are structured and work, you can\nsee the [Shiro
142
+ Permissions documentation][shiro]. That pattern is expanded\nand then a permission
143
+ check applied to it, before the command is authorized.\n\nThese checks only
144
+ apply if security is enabled in the Razor configuration\nfile; on this server
145
+ security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
146
+ Attributes\n\n * name\n - The name of the broker, as it will be referenced
147
+ within Razor.\n This is the name that you supply to, eg, `create-policy`
148
+ to specify\n which broker the node will be handed off via after installation.\n -
149
+ This attribute is required\n - It must be of type string.\n - It must
150
+ be between 1 and 250 in length.\n\n * broker-type\n - The broker type that
151
+ this broker is created from. The available\n broker types on your server
152
+ are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
153
+ attribute is required\n - It must be of type string.\n - It must match
154
+ the name of an existing broker type.\n\n * configuration\n - The configuration
155
+ for the broker. The acceptable values here are\n determined by the `broker-type`
156
+ selected. In general this has\n settings like which server to contact,
157
+ and other configuration\n related to handing on the newly installed system
158
+ to the final\n configuration management system.\n - It must be of type
159
+ object.\n \n \n\n\n\n# EXAMPLES\n Creating a simple Puppet broker:\n \n {\n \"name\":
160
+ \"puppet\",\n \"configuration\": {\n \"server\": \"puppet.example.org\",\n \"environment\":
161
+ \"production\"\n },\n \"broker-type\": \"puppet\"\n }\n\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
162
+ http_version:
163
+ recorded_at: Fri, 16 May 2014 22:18:28 GMT
164
+ - request:
165
+ method: post
166
+ uri: http://localhost:8080/api/commands/create-broker
167
+ body:
168
+ encoding: UTF-8
169
+ string: '{"name":"broker1","broker-type":"puppet","configuration":{"server":"puppet.example.org","environment":"production"}}'
170
+ headers:
171
+ Accept:
172
+ - application/json
173
+ Accept-Encoding:
174
+ - gzip, deflate
175
+ Content-Type:
176
+ - application/json
177
+ Content-Length:
178
+ - '116'
179
+ User-Agent:
180
+ - Ruby
181
+ response:
182
+ status:
183
+ code: 202
184
+ message: Accepted
185
+ headers:
186
+ Server:
187
+ - Apache-Coyote/1.1
188
+ X-Content-Type-Options:
189
+ - nosniff
190
+ Content-Type:
191
+ - application/json;charset=utf-8
192
+ Content-Length:
193
+ - '211'
194
+ Date:
195
+ - Fri, 16 May 2014 22:18:28 GMT
196
+ body:
197
+ encoding: US-ASCII
198
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8080/api/collections/brokers/broker1","name":"broker1","command":"http://localhost:8080/api/collections/commands/1"}'
199
+ http_version:
200
+ recorded_at: Fri, 16 May 2014 22:18:28 GMT
201
+ - request:
202
+ method: get
203
+ uri: http://localhost:8080/api/collections/brokers/broker1
204
+ body:
205
+ encoding: US-ASCII
206
+ string: ''
207
+ headers:
208
+ Accept:
209
+ - application/json
210
+ Accept-Encoding:
211
+ - gzip, deflate
212
+ User-Agent:
213
+ - Ruby
214
+ response:
215
+ status:
216
+ code: 200
217
+ message: OK
218
+ headers:
219
+ Server:
220
+ - Apache-Coyote/1.1
221
+ X-Content-Type-Options:
222
+ - nosniff
223
+ Content-Type:
224
+ - application/json;charset=utf-8
225
+ Content-Length:
226
+ - '359'
227
+ Date:
228
+ - Fri, 16 May 2014 22:18:28 GMT
229
+ body:
230
+ encoding: US-ASCII
231
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8080/api/collections/brokers/broker1","name":"broker1","configuration":{"server":"puppet.example.org","environment":"production"},"broker-type":"puppet","policies":{"id":"http://localhost:8080/api/collections/brokers/broker1/policies","count":0,"name":"policies"}}'
232
+ http_version:
233
+ recorded_at: Fri, 16 May 2014 22:18:28 GMT
234
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,412 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:8080/api
6
+ body:
7
+ encoding: UTF-8
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;charset=utf-8
27
+ Content-Length:
28
+ - '4980'
29
+ Date:
30
+ - Tue, 03 Jun 2014 23:18:44 GMT
31
+ body:
32
+ encoding: UTF-8
33
+ string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/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:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/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:8080/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:8080/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:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.15.0-3-gb0cbb3f-dirty"}}'
34
+ http_version:
35
+ recorded_at: Tue, 03 Jun 2014 23:18:44 GMT
36
+ - request:
37
+ method: get
38
+ uri: http://localhost:8080/api/commands/register-node
39
+ body:
40
+ encoding: UTF-8
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-v0.15.0-3-gb0cbb3f-dirty"'
58
+ X-Content-Type-Options:
59
+ - nosniff
60
+ Content-Type:
61
+ - application/json;charset=utf-8
62
+ Content-Length:
63
+ - '2936'
64
+ Date:
65
+ - Tue, 03 Jun 2014 23:18:44 GMT
66
+ body:
67
+ encoding: UTF-8
68
+ string: '{"name":"register-node","help":{"full":"# SYNOPSIS\nRegister a node
69
+ with Razor before it is discovered\n\n# DESCRIPTION\nIn order to make brownfield
70
+ deployments of Razor easier we allow users to\nregister nodes explicitly. This
71
+ command allows you to perform the same\nregistration that would happen when
72
+ a new node checked in, ahead of time.\n\nIn order for this to be effective
73
+ the hw_info must contain enough information\nthat the node can successfully
74
+ be matched during the iPXE boot phase.\n\nIf the node matches an existing
75
+ node, in keeping with the overall policy of\ncommands declaring desired state,
76
+ the node installed field will be updated to\nmatch the value in this command.\n\nThe
77
+ final state is that a node with the supplied hardware information, and the\ndesired
78
+ installed state, will be present in the database, regardless of it\nexisting
79
+ before hand or not.\n\n# Access Control\n\nThis command''s access control
80
+ pattern: `commands:register-node`\n\nFor more detail on how the permission
81
+ strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
82
+ pattern is expanded\nand then a permission check applied to it, before the
83
+ command is authorized.\n\nThese checks only apply if security is enabled in
84
+ the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
85
+ http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
86
+ Should the node be considered ''installed'' already? Installed nodes are\n not
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 * hw-info\n - The hardware
89
+ information for the node. This is used to match the node on first\n boot
90
+ with the record in the database. The order of MAC address assignment in\n this
91
+ data is not significant, as a node with reordered MAC addresses will be\n treated
92
+ as the same node.\n - This attribute is required.\n - It must be of type
93
+ object.\n - It must be between 1 and Infinity in length.\n \n # Attributes\n \n *
94
+ serial\n - The DMI serial number of the node\n - It must be of type
95
+ string.\n \n * asset\n - The DMI asset tag of the node\n -
96
+ It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
97
+ It must be of type string.\n\n# EXAMPLES\n\n Register a machine before you
98
+ boot it, and note that it already has an OS\n installed, so should not be
99
+ subject to policy-based reinstallation:\n \n {\n \"hw_info\":
100
+ {\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\":
101
+ \"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
102
+ Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"hw-info":{"type":"object"}}}'
103
+ http_version:
104
+ recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
105
+ - request:
106
+ method: get
107
+ uri: http://localhost:8080/api/commands/register-node
108
+ body:
109
+ encoding: UTF-8
110
+ string: ''
111
+ headers:
112
+ Accept:
113
+ - application/json
114
+ Accept-Encoding:
115
+ - gzip, deflate
116
+ User-Agent:
117
+ - Ruby
118
+ response:
119
+ status:
120
+ code: 200
121
+ message: OK
122
+ headers:
123
+ Server:
124
+ - Apache-Coyote/1.1
125
+ Etag:
126
+ - '"server-version-v0.15.0-3-gb0cbb3f-dirty"'
127
+ X-Content-Type-Options:
128
+ - nosniff
129
+ Content-Type:
130
+ - application/json;charset=utf-8
131
+ Content-Length:
132
+ - '2936'
133
+ Date:
134
+ - Tue, 03 Jun 2014 23:18:44 GMT
135
+ body:
136
+ encoding: UTF-8
137
+ string: '{"name":"register-node","help":{"full":"# SYNOPSIS\nRegister a node
138
+ with Razor before it is discovered\n\n# DESCRIPTION\nIn order to make brownfield
139
+ deployments of Razor easier we allow users to\nregister nodes explicitly. This
140
+ command allows you to perform the same\nregistration that would happen when
141
+ a new node checked in, ahead of time.\n\nIn order for this to be effective
142
+ the hw_info must contain enough information\nthat the node can successfully
143
+ be matched during the iPXE boot phase.\n\nIf the node matches an existing
144
+ node, in keeping with the overall policy of\ncommands declaring desired state,
145
+ the node installed field will be updated to\nmatch the value in this command.\n\nThe
146
+ final state is that a node with the supplied hardware information, and the\ndesired
147
+ installed state, will be present in the database, regardless of it\nexisting
148
+ before hand or not.\n\n# Access Control\n\nThis command''s access control
149
+ pattern: `commands:register-node`\n\nFor more detail on how the permission
150
+ strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
151
+ pattern is expanded\nand then a permission check applied to it, before the
152
+ command is authorized.\n\nThese checks only apply if security is enabled in
153
+ the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
154
+ http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * installed\n -
155
+ Should the node be considered ''installed'' already? Installed nodes are\n not
156
+ eligible for policy matching, and will simply boot locally.\n - This attribute
157
+ is required.\n - It must be of type boolean.\n\n * hw-info\n - The hardware
158
+ information for the node. This is used to match the node on first\n boot
159
+ with the record in the database. The order of MAC address assignment in\n this
160
+ data is not significant, as a node with reordered MAC addresses will be\n treated
161
+ as the same node.\n - This attribute is required.\n - It must be of type
162
+ object.\n - It must be between 1 and Infinity in length.\n \n # Attributes\n \n *
163
+ serial\n - The DMI serial number of the node\n - It must be of type
164
+ string.\n \n * asset\n - The DMI asset tag of the node\n -
165
+ It must be of type string.\n \n * uuid\n - The DMI UUID of the node\n -
166
+ It must be of type string.\n\n# EXAMPLES\n\n Register a machine before you
167
+ boot it, and note that it already has an OS\n installed, so should not be
168
+ subject to policy-based reinstallation:\n \n {\n \"hw_info\":
169
+ {\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\":
170
+ \"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
171
+ Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"hw-info":{"type":"object"}}}'
172
+ http_version:
173
+ recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
174
+ - request:
175
+ method: post
176
+ uri: http://localhost:8080/api/commands/register-node
177
+ body:
178
+ encoding: UTF-8
179
+ string: '{"installed":true,"hw-info":{"net0":"abcdef"}}'
180
+ headers:
181
+ Accept:
182
+ - application/json
183
+ Accept-Encoding:
184
+ - gzip, deflate
185
+ Content-Type:
186
+ - application/json
187
+ Content-Length:
188
+ - '46'
189
+ User-Agent:
190
+ - Ruby
191
+ response:
192
+ status:
193
+ code: 202
194
+ message: Accepted
195
+ headers:
196
+ Server:
197
+ - Apache-Coyote/1.1
198
+ X-Content-Type-Options:
199
+ - nosniff
200
+ Content-Type:
201
+ - application/json;charset=utf-8
202
+ Content-Length:
203
+ - '203'
204
+ Date:
205
+ - Tue, 03 Jun 2014 23:18:44 GMT
206
+ body:
207
+ encoding: UTF-8
208
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8080/api/collections/nodes/node1","name":"node1","command":"http://localhost:8080/api/collections/commands/1"}'
209
+ http_version:
210
+ recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
211
+ - request:
212
+ method: get
213
+ uri: http://localhost:8080/api/collections/nodes/node1
214
+ body:
215
+ encoding: UTF-8
216
+ string: ''
217
+ headers:
218
+ Accept:
219
+ - application/json
220
+ Accept-Encoding:
221
+ - gzip, deflate
222
+ User-Agent:
223
+ - Ruby
224
+ response:
225
+ status:
226
+ code: 200
227
+ message: OK
228
+ headers:
229
+ Server:
230
+ - Apache-Coyote/1.1
231
+ X-Content-Type-Options:
232
+ - nosniff
233
+ Content-Type:
234
+ - application/json;charset=utf-8
235
+ Content-Length:
236
+ - '335'
237
+ Date:
238
+ - Tue, 03 Jun 2014 23:18:44 GMT
239
+ body:
240
+ encoding: UTF-8
241
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8080/api/collections/nodes/node1","name":"node1","hw_info":{"mac":["abcdef"]},"log":{"id":"http://localhost:8080/api/collections/nodes/node1/log","name":"log"},"tags":[],"state":{"installed":"true","installed_at":"2014-06-03T18:18:45-05:00"}}'
242
+ http_version:
243
+ recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
244
+ - request:
245
+ method: get
246
+ uri: http://localhost:8080/api
247
+ body:
248
+ encoding: UTF-8
249
+ string: ''
250
+ headers:
251
+ Accept:
252
+ - application/json
253
+ Accept-Encoding:
254
+ - gzip, deflate
255
+ User-Agent:
256
+ - Ruby
257
+ response:
258
+ status:
259
+ code: 200
260
+ message: OK
261
+ headers:
262
+ Server:
263
+ - Apache-Coyote/1.1
264
+ X-Content-Type-Options:
265
+ - nosniff
266
+ Content-Type:
267
+ - application/json;charset=utf-8
268
+ Content-Length:
269
+ - '4980'
270
+ Date:
271
+ - Tue, 03 Jun 2014 23:18:44 GMT
272
+ body:
273
+ encoding: UTF-8
274
+ string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/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:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/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:8080/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:8080/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:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.15.0-3-gb0cbb3f-dirty"}}'
275
+ http_version:
276
+ recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
277
+ - request:
278
+ method: get
279
+ uri: http://localhost:8080/api/commands/modify-node-metadata
280
+ body:
281
+ encoding: UTF-8
282
+ string: ''
283
+ headers:
284
+ Accept:
285
+ - application/json
286
+ Accept-Encoding:
287
+ - gzip, deflate
288
+ User-Agent:
289
+ - Ruby
290
+ response:
291
+ status:
292
+ code: 200
293
+ message: OK
294
+ headers:
295
+ Server:
296
+ - Apache-Coyote/1.1
297
+ Etag:
298
+ - '"server-version-v0.15.0-3-gb0cbb3f-dirty"'
299
+ X-Content-Type-Options:
300
+ - nosniff
301
+ Content-Type:
302
+ - application/json;charset=utf-8
303
+ Content-Length:
304
+ - '2610'
305
+ Date:
306
+ - Tue, 03 Jun 2014 23:18:44 GMT
307
+ body:
308
+ encoding: UTF-8
309
+ string: '{"name":"modify-node-metadata","help":{"full":"# SYNOPSIS\nPerform
310
+ various editing operations on node metadata\n\n# DESCRIPTION\nNode metadata
311
+ can be added, changed, or removed with this command; it contains\na limited
312
+ editing language to make changes to the existing metadata in an\natomic fashion.\n\nIt
313
+ can also clear all metadata from a node, although that operation is\nexclusive
314
+ to all other editing operations, and cannot be performed atomically\nwith
315
+ them.\n\n# Access Control\n\nThis command''s access control pattern: `commands:modify-node-metadata:%{node}`\n\nWords
316
+ surrounded by `%{...}` are substitutions from the input data: typically\nthe
317
+ name of the object being modified, or some other critical detail, these\nallow
318
+ roles to be granted partial access to modify the system.\n\nFor more detail
319
+ on how the permission strings are structured and work, you can\nsee the [Shiro
320
+ Permissions documentation][shiro]. That pattern is expanded\nand then a permission
321
+ check applied to it, before the command is authorized.\n\nThese checks only
322
+ apply if security is enabled in the Razor configuration\nfile; on this server
323
+ security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
324
+ Attributes\n\n * node\n - The name of the node for which to modify metadata.\n -
325
+ This attribute is required.\n - It must be of type string.\n - It must
326
+ match the name of an existing node.\n\n * update\n - The metadata to update\n -
327
+ It must be of type object.\n\n * remove\n - The metadata to remove\n -
328
+ It must be of type array.\n\n * clear\n - Remove all metadata from the node. Cannot
329
+ be used together with\n either ''update'' or ''remove''.\n - It must
330
+ be of type boolean.\n - If present, update, remove must not be present.\n\n
331
+ * no-replace\n - If true, the `update` operation will cause this command
332
+ to fail if the\n metadata key is already present on the node. No effect
333
+ on `remove` or\n clear.\n - It must be of type boolean.\n\n# EXAMPLES\n\n Editing
334
+ node metadata, by adding and removing some keys, but refusing to\n modify
335
+ an existing value already present on a node:\n \n {\n \"node\":
336
+ \"node1\",\n \"update\": {\n \"key1\": \"value1\",\n \"key2\":
337
+ \"value2\"\n }\n \"remove\": [\"key3\", \"key4\"],\n \"no-replace\":
338
+ true\n }\n \n Removing all node metadata:\n \n {\"node\": \"node1\",
339
+ \"clear\": true}\n"},"schema":{"node":{"type":"string"},"update":{"type":"object"},"remove":{"type":"array"},"clear":{"type":"boolean"},"no-replace":{"type":"boolean"}}}'
340
+ http_version:
341
+ recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
342
+ - request:
343
+ method: post
344
+ uri: http://localhost:8080/api/commands/modify-node-metadata
345
+ body:
346
+ encoding: UTF-8
347
+ string: '{"node":"node1","update":{"keyᓱ123":"valueᓱ1"}}'
348
+ headers:
349
+ Accept:
350
+ - application/json
351
+ Accept-Encoding:
352
+ - gzip, deflate
353
+ Content-Type:
354
+ - application/json
355
+ Content-Length:
356
+ - '51'
357
+ User-Agent:
358
+ - Ruby
359
+ response:
360
+ status:
361
+ code: 202
362
+ message: Accepted
363
+ headers:
364
+ Server:
365
+ - Apache-Coyote/1.1
366
+ X-Content-Type-Options:
367
+ - nosniff
368
+ Content-Type:
369
+ - application/json;charset=utf-8
370
+ Content-Length:
371
+ - '203'
372
+ Date:
373
+ - Tue, 03 Jun 2014 23:18:44 GMT
374
+ body:
375
+ encoding: UTF-8
376
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8080/api/collections/nodes/node1","name":"node1","command":"http://localhost:8080/api/collections/commands/2"}'
377
+ http_version:
378
+ recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
379
+ - request:
380
+ method: get
381
+ uri: http://localhost:8080/api/collections/nodes/node1
382
+ body:
383
+ encoding: UTF-8
384
+ string: ''
385
+ headers:
386
+ Accept:
387
+ - application/json
388
+ Accept-Encoding:
389
+ - gzip, deflate
390
+ User-Agent:
391
+ - Ruby
392
+ response:
393
+ status:
394
+ code: 200
395
+ message: OK
396
+ headers:
397
+ Server:
398
+ - Apache-Coyote/1.1
399
+ X-Content-Type-Options:
400
+ - nosniff
401
+ Content-Type:
402
+ - application/json;charset=utf-8
403
+ Content-Length:
404
+ - '368'
405
+ Date:
406
+ - Tue, 03 Jun 2014 23:18:44 GMT
407
+ body:
408
+ encoding: UTF-8
409
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/nodes/member","id":"http://localhost:8080/api/collections/nodes/node1","name":"node1","hw_info":{"mac":["abcdef"]},"log":{"id":"http://localhost:8080/api/collections/nodes/node1/log","name":"log"},"tags":[],"metadata":{"keyᓱ123":"valueᓱ1"},"state":{"installed":"true","installed_at":"2014-06-03T18:18:45-05:00"}}'
410
+ http_version:
411
+ recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
412
+ recorded_with: VCR 2.5.0