razor-client 0.15.1 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +7 -0
  2. data/NEWS.md +22 -0
  3. data/bin/razor +24 -0
  4. data/lib/razor/cli/command.rb +139 -0
  5. data/lib/razor/cli/document.rb +8 -4
  6. data/lib/razor/cli/format.rb +46 -22
  7. data/lib/razor/cli/navigate.rb +27 -149
  8. data/lib/razor/cli/parse.rb +21 -5
  9. data/lib/razor/cli/query.rb +68 -0
  10. data/lib/razor/cli/table_format.rb +41 -0
  11. data/lib/razor/cli/transforms.rb +18 -0
  12. data/lib/razor/cli/version.rb +1 -1
  13. data/lib/razor/cli/views.yaml +38 -0
  14. data/lib/razor/cli.rb +5 -2
  15. data/spec/cli/format_spec.rb +95 -5
  16. data/spec/cli/navigate_spec.rb +49 -5
  17. data/spec/cli/parse_spec.rb +21 -0
  18. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_in_string.yml +322 -0
  19. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_command_--help_.yml +110 -0
  20. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_command_help_.yml +110 -0
  21. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_help_command_.yml +110 -0
  22. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--help_--api_command_.yml +110 -0
  23. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_-a_-h_command_.yml +110 -0
  24. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_-a_command_-h_.yml +110 -0
  25. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml +181 -49
  26. 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 +121 -46
  27. 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 +68 -65
  28. 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 +177 -45
  29. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_limit.yml +69 -0
  30. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_start.yml +69 -0
  31. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_not_fail_when_query_returns_details_for_one_item.yml +421 -0
  32. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_store_query_without_query_parameters.yml +773 -0
  33. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_throw_an_error_if_the_query_parameter_is_not_in_the_API.yml +36 -0
  34. 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 +388 -0
  35. metadata +94 -82
@@ -25,14 +25,14 @@ http_interactions:
25
25
  Content-Type:
26
26
  - application/json;charset=utf-8
27
27
  Content-Length:
28
- - '4982'
28
+ - '4981'
29
29
  Date:
30
- - Fri, 16 May 2014 22:18:28 GMT
30
+ - Thu, 14 Aug 2014 20:49:46 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: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"}}'
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-26-gfffaba4-dirty"}}'
34
34
  http_version:
35
- recorded_at: Fri, 16 May 2014 22:18:28 GMT
35
+ recorded_at: Thu, 14 Aug 2014 20:49:46 GMT
36
36
  - request:
37
37
  method: get
38
38
  uri: http://localhost:8080/api/commands/create-broker
@@ -54,23 +54,23 @@ http_interactions:
54
54
  Server:
55
55
  - Apache-Coyote/1.1
56
56
  Etag:
57
- - '"server-version-v0.14.1-113-g8b33d83-dirty"'
57
+ - '"server-version-v0.15.0-26-gfffaba4-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
- - '2496'
63
+ - '2568'
64
64
  Date:
65
- - Fri, 16 May 2014 22:18:28 GMT
65
+ - Thu, 14 Aug 2014 20:49:46 GMT
66
66
  body:
67
67
  encoding: US-ASCII
68
68
  string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
69
69
  configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
70
70
  broker configuration. Brokers are responsible for handing a node\noff to
71
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
72
+ no configuration management system, you can use the `noop` broker.\n\n# Access
73
+ Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
74
74
  surrounded by `%{...}` are substitutions from the input data: typically\nthe
75
75
  name of the object being modified, or some other critical detail, these\nallow
76
76
  roles to be granted partial access to modify the system.\n\nFor more detail
@@ -80,23 +80,24 @@ http_interactions:
80
80
  apply if security is enabled in the Razor configuration\nfile; on this server
81
81
  security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
82
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
83
+ within Razor.\n This is the name that you supply to, eg, `create-policy`
84
+ to specify\n which broker the node will be handed off via after installation.\n -
85
+ This attribute is required.\n - It must be of type string.\n - It must
86
+ be between 1 and 250 in length.\n\n * broker-type\n - The broker type from
87
+ which this broker is created. The available\n broker types on your server
88
+ are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
89
+ attribute is required.\n - It must be of type string.\n - It must match
90
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"}}}'
91
+ for the broker. The acceptable values here are\n determined by the `broker-type`
92
+ selected. In general this has\n settings like which server to contact,
93
+ and other configuration\n related to handing on the newly installed system
94
+ to the final\n configuration management system.\n \n This attribute
95
+ can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
96
+ EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
97
+ {\n \"server\": \"puppet.example.org\",\n \"environment\":
98
+ \"production\"\n },\n \"broker-type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
98
99
  http_version:
99
- recorded_at: Fri, 16 May 2014 22:18:28 GMT
100
+ recorded_at: Thu, 14 Aug 2014 20:49:46 GMT
100
101
  - request:
101
102
  method: get
102
103
  uri: http://localhost:8080/api/commands/create-broker
@@ -118,23 +119,23 @@ http_interactions:
118
119
  Server:
119
120
  - Apache-Coyote/1.1
120
121
  Etag:
121
- - '"server-version-v0.14.1-113-g8b33d83-dirty"'
122
+ - '"server-version-v0.15.0-26-gfffaba4-dirty"'
122
123
  X-Content-Type-Options:
123
124
  - nosniff
124
125
  Content-Type:
125
126
  - application/json;charset=utf-8
126
127
  Content-Length:
127
- - '2496'
128
+ - '2568'
128
129
  Date:
129
- - Fri, 16 May 2014 22:18:28 GMT
130
+ - Thu, 14 Aug 2014 20:49:46 GMT
130
131
  body:
131
132
  encoding: US-ASCII
132
133
  string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
133
134
  configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
134
135
  broker configuration. Brokers are responsible for handing a node\noff to
135
136
  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
137
+ no configuration management system, you can use the `noop` broker.\n\n# Access
138
+ Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
138
139
  surrounded by `%{...}` are substitutions from the input data: typically\nthe
139
140
  name of the object being modified, or some other critical detail, these\nallow
140
141
  roles to be granted partial access to modify the system.\n\nFor more detail
@@ -144,23 +145,154 @@ http_interactions:
144
145
  apply if security is enabled in the Razor configuration\nfile; on this server
145
146
  security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
146
147
  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
148
+ within Razor.\n This is the name that you supply to, eg, `create-policy`
149
+ to specify\n which broker the node will be handed off via after installation.\n -
150
+ This attribute is required.\n - It must be of type string.\n - It must
151
+ be between 1 and 250 in length.\n\n * broker-type\n - The broker type from
152
+ which this broker is created. The available\n broker types on your server
153
+ are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
154
+ attribute is required.\n - It must be of type string.\n - It must match
154
155
  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"}}}'
156
+ for the broker. The acceptable values here are\n determined by the `broker-type`
157
+ selected. In general this has\n settings like which server to contact,
158
+ and other configuration\n related to handing on the newly installed system
159
+ to the final\n configuration management system.\n \n This attribute
160
+ can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
161
+ EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
162
+ {\n \"server\": \"puppet.example.org\",\n \"environment\":
163
+ \"production\"\n },\n \"broker-type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
162
164
  http_version:
163
- recorded_at: Fri, 16 May 2014 22:18:28 GMT
165
+ recorded_at: Thu, 14 Aug 2014 20:49:46 GMT
166
+ - request:
167
+ method: get
168
+ uri: http://localhost:8080/api/commands/create-broker
169
+ body:
170
+ encoding: US-ASCII
171
+ string: ''
172
+ headers:
173
+ Accept:
174
+ - application/json
175
+ Accept-Encoding:
176
+ - gzip, deflate
177
+ User-Agent:
178
+ - Ruby
179
+ response:
180
+ status:
181
+ code: 200
182
+ message: OK
183
+ headers:
184
+ Server:
185
+ - Apache-Coyote/1.1
186
+ Etag:
187
+ - '"server-version-v0.15.0-26-gfffaba4-dirty"'
188
+ X-Content-Type-Options:
189
+ - nosniff
190
+ Content-Type:
191
+ - application/json;charset=utf-8
192
+ Content-Length:
193
+ - '2568'
194
+ Date:
195
+ - Thu, 14 Aug 2014 20:49:46 GMT
196
+ body:
197
+ encoding: US-ASCII
198
+ string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
199
+ configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
200
+ broker configuration. Brokers are responsible for handing a node\noff to
201
+ a config management system, such as Puppet or Chef. In cases where you\nhave
202
+ no configuration management system, you can use the `noop` broker.\n\n# Access
203
+ Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
204
+ surrounded by `%{...}` are substitutions from the input data: typically\nthe
205
+ name of the object being modified, or some other critical detail, these\nallow
206
+ roles to be granted partial access to modify the system.\n\nFor more detail
207
+ on how the permission strings are structured and work, you can\nsee the [Shiro
208
+ Permissions documentation][shiro]. That pattern is expanded\nand then a permission
209
+ check applied to it, before the command is authorized.\n\nThese checks only
210
+ apply if security is enabled in the Razor configuration\nfile; on this server
211
+ security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
212
+ Attributes\n\n * name\n - The name of the broker, as it will be referenced
213
+ within Razor.\n This is the name that you supply to, eg, `create-policy`
214
+ to specify\n which broker the node will be handed off via after installation.\n -
215
+ This attribute is required.\n - It must be of type string.\n - It must
216
+ be between 1 and 250 in length.\n\n * broker-type\n - The broker type from
217
+ which this broker is created. The available\n broker types on your server
218
+ are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
219
+ attribute is required.\n - It must be of type string.\n - It must match
220
+ the name of an existing broker type.\n\n * configuration\n - The configuration
221
+ for the broker. The acceptable values here are\n determined by the `broker-type`
222
+ selected. In general this has\n settings like which server to contact,
223
+ and other configuration\n related to handing on the newly installed system
224
+ to the final\n configuration management system.\n \n This attribute
225
+ can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
226
+ EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
227
+ {\n \"server\": \"puppet.example.org\",\n \"environment\":
228
+ \"production\"\n },\n \"broker-type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
229
+ http_version:
230
+ recorded_at: Thu, 14 Aug 2014 20:49:46 GMT
231
+ - request:
232
+ method: get
233
+ uri: http://localhost:8080/api/commands/create-broker
234
+ body:
235
+ encoding: US-ASCII
236
+ string: ''
237
+ headers:
238
+ Accept:
239
+ - application/json
240
+ Accept-Encoding:
241
+ - gzip, deflate
242
+ User-Agent:
243
+ - Ruby
244
+ response:
245
+ status:
246
+ code: 200
247
+ message: OK
248
+ headers:
249
+ Server:
250
+ - Apache-Coyote/1.1
251
+ Etag:
252
+ - '"server-version-v0.15.0-26-gfffaba4-dirty"'
253
+ X-Content-Type-Options:
254
+ - nosniff
255
+ Content-Type:
256
+ - application/json;charset=utf-8
257
+ Content-Length:
258
+ - '2568'
259
+ Date:
260
+ - Thu, 14 Aug 2014 20:49:46 GMT
261
+ body:
262
+ encoding: US-ASCII
263
+ string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
264
+ configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
265
+ broker configuration. Brokers are responsible for handing a node\noff to
266
+ a config management system, such as Puppet or Chef. In cases where you\nhave
267
+ no configuration management system, you can use the `noop` broker.\n\n# Access
268
+ Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
269
+ surrounded by `%{...}` are substitutions from the input data: typically\nthe
270
+ name of the object being modified, or some other critical detail, these\nallow
271
+ roles to be granted partial access to modify the system.\n\nFor more detail
272
+ on how the permission strings are structured and work, you can\nsee the [Shiro
273
+ Permissions documentation][shiro]. That pattern is expanded\nand then a permission
274
+ check applied to it, before the command is authorized.\n\nThese checks only
275
+ apply if security is enabled in the Razor configuration\nfile; on this server
276
+ security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
277
+ Attributes\n\n * name\n - The name of the broker, as it will be referenced
278
+ within Razor.\n This is the name that you supply to, eg, `create-policy`
279
+ to specify\n which broker the node will be handed off via after installation.\n -
280
+ This attribute is required.\n - It must be of type string.\n - It must
281
+ be between 1 and 250 in length.\n\n * broker-type\n - The broker type from
282
+ which this broker is created. The available\n broker types on your server
283
+ are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
284
+ attribute is required.\n - It must be of type string.\n - It must match
285
+ the name of an existing broker type.\n\n * configuration\n - The configuration
286
+ for the broker. The acceptable values here are\n determined by the `broker-type`
287
+ selected. In general this has\n settings like which server to contact,
288
+ and other configuration\n related to handing on the newly installed system
289
+ to the final\n configuration management system.\n \n This attribute
290
+ can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
291
+ EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
292
+ {\n \"server\": \"puppet.example.org\",\n \"environment\":
293
+ \"production\"\n },\n \"broker-type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
294
+ http_version:
295
+ recorded_at: Thu, 14 Aug 2014 20:49:46 GMT
164
296
  - request:
165
297
  method: post
166
298
  uri: http://localhost:8080/api/commands/create-broker
@@ -192,12 +324,12 @@ http_interactions:
192
324
  Content-Length:
193
325
  - '211'
194
326
  Date:
195
- - Fri, 16 May 2014 22:18:28 GMT
327
+ - Thu, 14 Aug 2014 20:49:46 GMT
196
328
  body:
197
329
  encoding: US-ASCII
198
330
  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
331
  http_version:
200
- recorded_at: Fri, 16 May 2014 22:18:28 GMT
332
+ recorded_at: Thu, 14 Aug 2014 20:49:47 GMT
201
333
  - request:
202
334
  method: get
203
335
  uri: http://localhost:8080/api/collections/brokers/broker1
@@ -225,10 +357,10 @@ http_interactions:
225
357
  Content-Length:
226
358
  - '359'
227
359
  Date:
228
- - Fri, 16 May 2014 22:18:28 GMT
360
+ - Thu, 14 Aug 2014 20:49:46 GMT
229
361
  body:
230
362
  encoding: US-ASCII
231
363
  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
364
  http_version:
233
- recorded_at: Fri, 16 May 2014 22:18:28 GMT
234
- recorded_with: VCR 2.5.0
365
+ recorded_at: Thu, 14 Aug 2014 20:49:47 GMT
366
+ recorded_with: VCR 2.9.2
@@ -4,7 +4,7 @@ http_interactions:
4
4
  method: get
5
5
  uri: http://localhost:8080/api
6
6
  body:
7
- encoding: UTF-8
7
+ encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  Accept:
@@ -25,19 +25,19 @@ http_interactions:
25
25
  Content-Type:
26
26
  - application/json;charset=utf-8
27
27
  Content-Length:
28
- - '4980'
28
+ - '4981'
29
29
  Date:
30
- - Tue, 03 Jun 2014 23:18:44 GMT
30
+ - Thu, 14 Aug 2014 20:49:53 GMT
31
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"}}'
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.15.0-26-gfffaba4-dirty"}}'
34
34
  http_version:
35
- recorded_at: Tue, 03 Jun 2014 23:18:44 GMT
35
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
36
36
  - request:
37
37
  method: get
38
38
  uri: http://localhost:8080/api/commands/register-node
39
39
  body:
40
- encoding: UTF-8
40
+ encoding: US-ASCII
41
41
  string: ''
42
42
  headers:
43
43
  Accept:
@@ -54,7 +54,7 @@ http_interactions:
54
54
  Server:
55
55
  - Apache-Coyote/1.1
56
56
  Etag:
57
- - '"server-version-v0.15.0-3-gb0cbb3f-dirty"'
57
+ - '"server-version-v0.15.0-26-gfffaba4-dirty"'
58
58
  X-Content-Type-Options:
59
59
  - nosniff
60
60
  Content-Type:
@@ -62,9 +62,9 @@ http_interactions:
62
62
  Content-Length:
63
63
  - '2936'
64
64
  Date:
65
- - Tue, 03 Jun 2014 23:18:44 GMT
65
+ - Thu, 14 Aug 2014 20:49:53 GMT
66
66
  body:
67
- encoding: UTF-8
67
+ encoding: US-ASCII
68
68
  string: '{"name":"register-node","help":{"full":"# SYNOPSIS\nRegister a node
69
69
  with Razor before it is discovered\n\n# DESCRIPTION\nIn order to make brownfield
70
70
  deployments of Razor easier we allow users to\nregister nodes explicitly. This
@@ -101,12 +101,12 @@ http_interactions:
101
101
  \"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
102
102
  Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"hw-info":{"type":"object"}}}'
103
103
  http_version:
104
- recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
104
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
105
105
  - request:
106
106
  method: get
107
107
  uri: http://localhost:8080/api/commands/register-node
108
108
  body:
109
- encoding: UTF-8
109
+ encoding: US-ASCII
110
110
  string: ''
111
111
  headers:
112
112
  Accept:
@@ -123,7 +123,7 @@ http_interactions:
123
123
  Server:
124
124
  - Apache-Coyote/1.1
125
125
  Etag:
126
- - '"server-version-v0.15.0-3-gb0cbb3f-dirty"'
126
+ - '"server-version-v0.15.0-26-gfffaba4-dirty"'
127
127
  X-Content-Type-Options:
128
128
  - nosniff
129
129
  Content-Type:
@@ -131,9 +131,9 @@ http_interactions:
131
131
  Content-Length:
132
132
  - '2936'
133
133
  Date:
134
- - Tue, 03 Jun 2014 23:18:44 GMT
134
+ - Thu, 14 Aug 2014 20:49:53 GMT
135
135
  body:
136
- encoding: UTF-8
136
+ encoding: US-ASCII
137
137
  string: '{"name":"register-node","help":{"full":"# SYNOPSIS\nRegister a node
138
138
  with Razor before it is discovered\n\n# DESCRIPTION\nIn order to make brownfield
139
139
  deployments of Razor easier we allow users to\nregister nodes explicitly. This
@@ -170,7 +170,7 @@ http_interactions:
170
170
  \"xxxxxxxxxxx\",\n \"asset\": \"Asset-1234567890\",\n \"uuid\": \"Not
171
171
  Settable\"\n },\n \"installed\": true\n }\n"},"schema":{"installed":{"type":"boolean"},"hw-info":{"type":"object"}}}'
172
172
  http_version:
173
- recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
173
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
174
174
  - request:
175
175
  method: post
176
176
  uri: http://localhost:8080/api/commands/register-node
@@ -202,17 +202,17 @@ http_interactions:
202
202
  Content-Length:
203
203
  - '203'
204
204
  Date:
205
- - Tue, 03 Jun 2014 23:18:44 GMT
205
+ - Thu, 14 Aug 2014 20:49:53 GMT
206
206
  body:
207
- encoding: UTF-8
207
+ encoding: US-ASCII
208
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
209
  http_version:
210
- recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
210
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
211
211
  - request:
212
212
  method: get
213
213
  uri: http://localhost:8080/api/collections/nodes/node1
214
214
  body:
215
- encoding: UTF-8
215
+ encoding: US-ASCII
216
216
  string: ''
217
217
  headers:
218
218
  Accept:
@@ -233,19 +233,19 @@ http_interactions:
233
233
  Content-Type:
234
234
  - application/json;charset=utf-8
235
235
  Content-Length:
236
- - '335'
236
+ - '376'
237
237
  Date:
238
- - Tue, 03 Jun 2014 23:18:44 GMT
238
+ - Thu, 14 Aug 2014 20:49:53 GMT
239
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"}}'
240
+ encoding: US-ASCII
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-08-14T15:49:53-05:00"},"ipmi":{"hostname":null,"username":null}}'
242
242
  http_version:
243
- recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
243
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
244
244
  - request:
245
245
  method: get
246
246
  uri: http://localhost:8080/api
247
247
  body:
248
- encoding: UTF-8
248
+ encoding: US-ASCII
249
249
  string: ''
250
250
  headers:
251
251
  Accept:
@@ -266,19 +266,19 @@ http_interactions:
266
266
  Content-Type:
267
267
  - application/json;charset=utf-8
268
268
  Content-Length:
269
- - '4980'
269
+ - '4981'
270
270
  Date:
271
- - Tue, 03 Jun 2014 23:18:44 GMT
271
+ - Thu, 14 Aug 2014 20:49:53 GMT
272
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"}}'
273
+ encoding: US-ASCII
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-26-gfffaba4-dirty"}}'
275
275
  http_version:
276
- recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
276
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
277
277
  - request:
278
278
  method: get
279
279
  uri: http://localhost:8080/api/commands/modify-node-metadata
280
280
  body:
281
- encoding: UTF-8
281
+ encoding: US-ASCII
282
282
  string: ''
283
283
  headers:
284
284
  Accept:
@@ -295,7 +295,7 @@ http_interactions:
295
295
  Server:
296
296
  - Apache-Coyote/1.1
297
297
  Etag:
298
- - '"server-version-v0.15.0-3-gb0cbb3f-dirty"'
298
+ - '"server-version-v0.15.0-26-gfffaba4-dirty"'
299
299
  X-Content-Type-Options:
300
300
  - nosniff
301
301
  Content-Type:
@@ -303,9 +303,74 @@ http_interactions:
303
303
  Content-Length:
304
304
  - '2610'
305
305
  Date:
306
- - Tue, 03 Jun 2014 23:18:44 GMT
306
+ - Thu, 14 Aug 2014 20:49:53 GMT
307
307
  body:
308
- encoding: UTF-8
308
+ encoding: US-ASCII
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: Thu, 14 Aug 2014 20:49:53 GMT
342
+ - request:
343
+ method: get
344
+ uri: http://localhost:8080/api/commands/modify-node-metadata
345
+ body:
346
+ encoding: US-ASCII
347
+ string: ''
348
+ headers:
349
+ Accept:
350
+ - application/json
351
+ Accept-Encoding:
352
+ - gzip, deflate
353
+ User-Agent:
354
+ - Ruby
355
+ response:
356
+ status:
357
+ code: 200
358
+ message: OK
359
+ headers:
360
+ Server:
361
+ - Apache-Coyote/1.1
362
+ Etag:
363
+ - '"server-version-v0.15.0-26-gfffaba4-dirty"'
364
+ X-Content-Type-Options:
365
+ - nosniff
366
+ Content-Type:
367
+ - application/json;charset=utf-8
368
+ Content-Length:
369
+ - '2610'
370
+ Date:
371
+ - Thu, 14 Aug 2014 20:49:53 GMT
372
+ body:
373
+ encoding: US-ASCII
309
374
  string: '{"name":"modify-node-metadata","help":{"full":"# SYNOPSIS\nPerform
310
375
  various editing operations on node metadata\n\n# DESCRIPTION\nNode metadata
311
376
  can be added, changed, or removed with this command; it contains\na limited
@@ -338,7 +403,7 @@ http_interactions:
338
403
  true\n }\n \n Removing all node metadata:\n \n {\"node\": \"node1\",
339
404
  \"clear\": true}\n"},"schema":{"node":{"type":"string"},"update":{"type":"object"},"remove":{"type":"array"},"clear":{"type":"boolean"},"no-replace":{"type":"boolean"}}}'
340
405
  http_version:
341
- recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
406
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
342
407
  - request:
343
408
  method: post
344
409
  uri: http://localhost:8080/api/commands/modify-node-metadata
@@ -370,17 +435,17 @@ http_interactions:
370
435
  Content-Length:
371
436
  - '203'
372
437
  Date:
373
- - Tue, 03 Jun 2014 23:18:44 GMT
438
+ - Thu, 14 Aug 2014 20:49:53 GMT
374
439
  body:
375
- encoding: UTF-8
440
+ encoding: US-ASCII
376
441
  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
442
  http_version:
378
- recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
443
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
379
444
  - request:
380
445
  method: get
381
446
  uri: http://localhost:8080/api/collections/nodes/node1
382
447
  body:
383
- encoding: UTF-8
448
+ encoding: US-ASCII
384
449
  string: ''
385
450
  headers:
386
451
  Accept:
@@ -401,12 +466,22 @@ http_interactions:
401
466
  Content-Type:
402
467
  - application/json;charset=utf-8
403
468
  Content-Length:
404
- - '368'
469
+ - '413'
405
470
  Date:
406
- - Tue, 03 Jun 2014 23:18:44 GMT
471
+ - Thu, 14 Aug 2014 20:49:53 GMT
407
472
  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"}}'
473
+ encoding: ASCII-8BIT
474
+ string: !binary |-
475
+ eyJzcGVjIjoiaHR0cDovL2FwaS5wdXBwZXRsYWJzLmNvbS9yYXpvci92MS9j
476
+ b2xsZWN0aW9ucy9ub2Rlcy9tZW1iZXIiLCJpZCI6Imh0dHA6Ly9sb2NhbGhv
477
+ c3Q6ODA4MC9hcGkvY29sbGVjdGlvbnMvbm9kZXMvbm9kZTEiLCJuYW1lIjoi
478
+ bm9kZTEiLCJod19pbmZvIjp7Im1hYyI6WyJhYmNkZWYiXX0sImxvZyI6eyJp
479
+ ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9hcGkvY29sbGVjdGlvbnMvbm9k
480
+ ZXMvbm9kZTEvbG9nIiwibmFtZSI6ImxvZyJ9LCJ0YWdzIjpbXSwibWV0YWRh
481
+ dGEiOnsia2V54ZOxMTIzIjoidmFsdWXhk7ExIn0sInN0YXRlIjp7Imluc3Rh
482
+ bGxlZCI6InRydWUiLCJpbnN0YWxsZWRfYXQiOiIyMDE0LTA4LTE0VDE1OjQ5
483
+ OjUzLTA1OjAwIn0sImlwbWkiOnsiaG9zdG5hbWUiOm51bGwsInVzZXJuYW1l
484
+ IjpudWxsfX0=
410
485
  http_version:
411
- recorded_at: Tue, 03 Jun 2014 23:18:45 GMT
412
- recorded_with: VCR 2.5.0
486
+ recorded_at: Thu, 14 Aug 2014 20:49:53 GMT
487
+ recorded_with: VCR 2.9.2