razor-client 0.16.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/NEWS.md +15 -0
  2. data/bin/razor +3 -2
  3. data/lib/razor/cli.rb +6 -0
  4. data/lib/razor/cli/command.rb +24 -13
  5. data/lib/razor/cli/navigate.rb +1 -0
  6. data/lib/razor/cli/parse.rb +29 -3
  7. data/lib/razor/cli/query.rb +2 -1
  8. data/lib/razor/cli/table_format.rb +38 -2
  9. data/lib/razor/cli/transforms.rb +8 -1
  10. data/lib/razor/cli/version.rb +1 -1
  11. data/lib/razor/cli/views.yaml +17 -4
  12. data/spec/cli/command_spec.rb +66 -0
  13. data/spec/cli/navigate_spec.rb +7 -7
  14. data/spec/cli/parse_spec.rb +23 -4
  15. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_in_string.yml +82 -171
  16. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml +281 -548
  17. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml +160 -37
  18. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml +160 -37
  19. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml +160 -37
  20. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml +160 -37
  21. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml +160 -37
  22. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml +160 -37
  23. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml +10 -10
  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 +71 -166
  26. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml +109 -59
  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 +527 -1360
  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 +528 -1361
  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 +528 -1361
  30. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml +66 -229
  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 +104 -165
  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 +57 -155
  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 +57 -220
  34. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml +98 -5
  35. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_limit.yml +8 -8
  36. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_start.yml +8 -8
  37. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_not_fail_when_query_returns_details_for_one_item.yml +41 -149
  38. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_store_query_without_query_parameters.yml +70 -286
  39. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_throw_an_error_if_the_query_parameter_is_not_in_the_API.yml +5 -5
  40. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_throw_an_error_if_the_query_parameter_is_not_in_the_API_from_a_single_item.yml +36 -144
  41. data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml +5 -5
  42. data/spec/spec_helper.rb +8 -4
  43. metadata +92 -85
  44. checksums.yaml +0 -7
  45. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_command_--help_.yml +0 -110
  46. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_command_help_.yml +0 -110
  47. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--api_help_command_.yml +0 -110
  48. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_--help_--api_command_.yml +0 -110
  49. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_-a_-h_command_.yml +0 -110
  50. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_API_command_help_for_razor_-a_command_-h_.yml +0 -110
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://localhost:8080/api
5
+ uri: http://localhost:8150/api
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -25,17 +25,17 @@ http_interactions:
25
25
  Content-Type:
26
26
  - application/json;charset=utf-8
27
27
  Content-Length:
28
- - '4981'
28
+ - '5650'
29
29
  Date:
30
- - Thu, 14 Aug 2014 20:50:00 GMT
30
+ - Mon, 09 Mar 2015 19:53:50 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.15.0-26-gfffaba4-dirty"}}'
33
+ string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"}],"version":{"server":"v0.16.1-18-gd3acc7a-dirty"}}'
34
34
  http_version:
35
- recorded_at: Thu, 14 Aug 2014 20:50:00 GMT
35
+ recorded_at: Mon, 09 Mar 2015 19:53:50 GMT
36
36
  - request:
37
37
  method: get
38
- uri: http://localhost:8080/api/commands/create-broker
38
+ uri: http://localhost:8150/api/commands/create-broker
39
39
  body:
40
40
  encoding: US-ASCII
41
41
  string: ''
@@ -54,178 +54,80 @@ http_interactions:
54
54
  Server:
55
55
  - Apache-Coyote/1.1
56
56
  Etag:
57
- - '"server-version-v0.15.0-26-gfffaba4-dirty"'
57
+ - '"server-version-v0.16.1-18-gd3acc7a-dirty"'
58
58
  X-Content-Type-Options:
59
59
  - nosniff
60
60
  Content-Type:
61
61
  - application/json;charset=utf-8
62
62
  Content-Length:
63
- - '2568'
63
+ - '5184'
64
64
  Date:
65
- - Thu, 14 Aug 2014 20:50:00 GMT
65
+ - Mon, 09 Mar 2015 19:53:50 GMT
66
66
  body:
67
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# Access
73
- 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#
68
+ string: '{"name":"create-broker","help":{"summary":"Create a new broker configuration
69
+ for hand-off of installed nodes","description":"Create a new broker configuration. Brokers
70
+ are responsible for handing a node\noff to a config management system, such
71
+ as Puppet or Chef. In cases where you\nhave no configuration management system,
72
+ you can use the `noop` broker.","schema":"# Access Control\n\nThis command''s
73
+ access control pattern: `commands:create-broker:%{name}`\n\nWords surrounded
74
+ by `%{...}` are substitutions from the input data: typically\nthe name of
75
+ the object being modified, or some other critical detail, these\nallow roles
76
+ to be granted partial access to modify the system.\n\nFor more detail on how
77
+ the permission strings are structured and work, you can\nsee the [Shiro Permissions
78
+ documentation][shiro]. That pattern is expanded\nand then a permission check
79
+ applied to it, before the command is authorized.\n\nThese checks only apply
80
+ if security is enabled in the Razor configuration\nfile; on this server security
81
+ is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
82
82
  Attributes\n\n * name\n - The name of the broker, as it will be referenced
83
83
  within Razor.\n This is the name that you supply to, eg, `create-policy`
84
84
  to specify\n which broker the node will be handed off via after installation.\n -
85
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
86
+ be between 1 and 250 in length.\n\n * broker_type\n - The broker type from
87
87
  which this broker is created. The available\n broker types on your server
88
88
  are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
89
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`
91
+ for the broker. The acceptable values here are\n determined by the `broker_type`
92
92
  selected. In general this has\n settings like which server to contact,
93
93
  and other configuration\n related to handing on the newly installed system
94
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"}}}'
99
- http_version:
100
- recorded_at: Thu, 14 Aug 2014 20:50:00 GMT
101
- - request:
102
- method: get
103
- uri: http://localhost:8080/api/commands/create-broker
104
- body:
105
- encoding: US-ASCII
106
- string: ''
107
- headers:
108
- Accept:
109
- - application/json
110
- Accept-Encoding:
111
- - gzip, deflate
112
- User-Agent:
113
- - Ruby
114
- response:
115
- status:
116
- code: 200
117
- message: OK
118
- headers:
119
- Server:
120
- - Apache-Coyote/1.1
121
- Etag:
122
- - '"server-version-v0.15.0-26-gfffaba4-dirty"'
123
- X-Content-Type-Options:
124
- - nosniff
125
- Content-Type:
126
- - application/json;charset=utf-8
127
- Content-Length:
128
- - '2568'
129
- Date:
130
- - Thu, 14 Aug 2014 20:50:00 GMT
131
- body:
132
- encoding: US-ASCII
133
- string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
134
- configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
135
- broker configuration. Brokers are responsible for handing a node\noff to
136
- a config management system, such as Puppet or Chef. In cases where you\nhave
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
139
- surrounded by `%{...}` are substitutions from the input data: typically\nthe
140
- name of the object being modified, or some other critical detail, these\nallow
141
- roles to be granted partial access to modify the system.\n\nFor more detail
142
- on how the permission strings are structured and work, you can\nsee the [Shiro
143
- Permissions documentation][shiro]. That pattern is expanded\nand then a permission
144
- check applied to it, before the command is authorized.\n\nThese checks only
145
- apply if security is enabled in the Razor configuration\nfile; on this server
146
- security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
147
- Attributes\n\n * name\n - The name of the broker, as it will be referenced
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
155
- the name of an existing broker type.\n\n * configuration\n - The configuration
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"}}}'
164
- http_version:
165
- recorded_at: Thu, 14 Aug 2014 20:50:00 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:50:00 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`
95
+ can be abbreviated as `c` for convenience.\n - It must be of type object.\n","examples":{"api":"Creating
96
+ a simple Puppet broker:\n\n{\n \"name\": \"puppet\",\n \"configuration\":
97
+ {\n \"server\": \"puppet.example.org\",\n \"environment\": \"production\"\n },\n \"broker_type\":
98
+ \"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\nrazor create-broker
99
+ --name puppet -c server=puppet.example.org \\\n -c environment=production
100
+ --broker-type puppet"},"full":"# SYNOPSIS\nCreate a new broker configuration
101
+ for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new broker configuration. Brokers
102
+ are responsible for handing a node\noff to a config management system, such
103
+ as Puppet or Chef. In cases where you\nhave no configuration management system,
104
+ you can use the `noop` broker.\n# Access Control\n\nThis command''s access
105
+ control pattern: `commands:create-broker:%{name}`\n\nWords surrounded by `%{...}`
106
+ are substitutions from the input data: typically\nthe name of the object being
107
+ modified, or some other critical detail, these\nallow roles to be granted
108
+ partial access to modify the system.\n\nFor more detail on how the permission
109
+ strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
110
+ pattern is expanded\nand then a permission check applied to it, before the
111
+ command is authorized.\n\nThese checks only apply if security is enabled in
112
+ the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
113
+ http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
114
+ The name of the broker, as it will be referenced within Razor.\n This
115
+ is the name that you supply to, eg, `create-policy` to specify\n which
116
+ broker the node will be handed off via after installation.\n - This attribute
117
+ is required.\n - It must be of type string.\n - It must be between 1 and
118
+ 250 in length.\n\n * broker_type\n - The broker type from which this broker
119
+ is created. The available\n broker types on your server are:\n -
120
+ chef\n - noop\n - puppet-pe\n - puppet\n - This attribute is
121
+ required.\n - It must be of type string.\n - It must match the name of
122
+ an existing broker type.\n\n * configuration\n - The configuration for the
123
+ broker. The acceptable values here are\n determined by the `broker_type`
222
124
  selected. In general this has\n settings like which server to contact,
223
125
  and other configuration\n related to handing on the newly installed system
224
126
  to the final\n configuration management system.\n \n This attribute
225
127
  can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
226
128
  EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
227
129
  {\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"}}}'
130
+ \"production\"\n },\n \"broker_type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string"},"broker_type":{"type":"string","aliases":["broker-type"]},"configuration":{"type":"object","aliases":["c"]}}}'
229
131
  http_version:
230
- recorded_at: Thu, 14 Aug 2014 20:50:01 GMT
231
- recorded_with: VCR 2.9.2
132
+ recorded_at: Mon, 09 Mar 2015 19:53:50 GMT
133
+ recorded_with: VCR 2.5.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://localhost:8080/api
5
+ uri: http://localhost:8150/api
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -25,17 +25,17 @@ http_interactions:
25
25
  Content-Type:
26
26
  - application/json;charset=utf-8
27
27
  Content-Length:
28
- - '4981'
28
+ - '5650'
29
29
  Date:
30
- - Thu, 14 Aug 2014 20:50:07 GMT
30
+ - Mon, 09 Mar 2015 19:53:55 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.15.0-26-gfffaba4-dirty"}}'
33
+ string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"}],"version":{"server":"v0.16.1-18-gd3acc7a-dirty"}}'
34
34
  http_version:
35
- recorded_at: Thu, 14 Aug 2014 20:50:07 GMT
35
+ recorded_at: Mon, 09 Mar 2015 19:53:55 GMT
36
36
  - request:
37
37
  method: get
38
- uri: http://localhost:8080/api/commands/create-broker
38
+ uri: http://localhost:8150/api/commands/create-broker
39
39
  body:
40
40
  encoding: US-ASCII
41
41
  string: ''
@@ -54,243 +54,80 @@ http_interactions:
54
54
  Server:
55
55
  - Apache-Coyote/1.1
56
56
  Etag:
57
- - '"server-version-v0.15.0-26-gfffaba4-dirty"'
57
+ - '"server-version-v0.16.1-18-gd3acc7a-dirty"'
58
58
  X-Content-Type-Options:
59
59
  - nosniff
60
60
  Content-Type:
61
61
  - application/json;charset=utf-8
62
62
  Content-Length:
63
- - '2568'
63
+ - '5184'
64
64
  Date:
65
- - Thu, 14 Aug 2014 20:50:07 GMT
65
+ - Mon, 09 Mar 2015 19:53:55 GMT
66
66
  body:
67
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# Access
73
- 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#
68
+ string: '{"name":"create-broker","help":{"summary":"Create a new broker configuration
69
+ for hand-off of installed nodes","description":"Create a new broker configuration. Brokers
70
+ are responsible for handing a node\noff to a config management system, such
71
+ as Puppet or Chef. In cases where you\nhave no configuration management system,
72
+ you can use the `noop` broker.","schema":"# Access Control\n\nThis command''s
73
+ access control pattern: `commands:create-broker:%{name}`\n\nWords surrounded
74
+ by `%{...}` are substitutions from the input data: typically\nthe name of
75
+ the object being modified, or some other critical detail, these\nallow roles
76
+ to be granted partial access to modify the system.\n\nFor more detail on how
77
+ the permission strings are structured and work, you can\nsee the [Shiro Permissions
78
+ documentation][shiro]. That pattern is expanded\nand then a permission check
79
+ applied to it, before the command is authorized.\n\nThese checks only apply
80
+ if security is enabled in the Razor configuration\nfile; on this server security
81
+ is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
82
82
  Attributes\n\n * name\n - The name of the broker, as it will be referenced
83
83
  within Razor.\n This is the name that you supply to, eg, `create-policy`
84
84
  to specify\n which broker the node will be handed off via after installation.\n -
85
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
86
+ be between 1 and 250 in length.\n\n * broker_type\n - The broker type from
87
87
  which this broker is created. The available\n broker types on your server
88
88
  are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
89
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`
91
+ for the broker. The acceptable values here are\n determined by the `broker_type`
92
92
  selected. In general this has\n settings like which server to contact,
93
93
  and other configuration\n related to handing on the newly installed system
94
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"}}}'
99
- http_version:
100
- recorded_at: Thu, 14 Aug 2014 20:50:07 GMT
101
- - request:
102
- method: get
103
- uri: http://localhost:8080/api/commands/create-broker
104
- body:
105
- encoding: US-ASCII
106
- string: ''
107
- headers:
108
- Accept:
109
- - application/json
110
- Accept-Encoding:
111
- - gzip, deflate
112
- User-Agent:
113
- - Ruby
114
- response:
115
- status:
116
- code: 200
117
- message: OK
118
- headers:
119
- Server:
120
- - Apache-Coyote/1.1
121
- Etag:
122
- - '"server-version-v0.15.0-26-gfffaba4-dirty"'
123
- X-Content-Type-Options:
124
- - nosniff
125
- Content-Type:
126
- - application/json;charset=utf-8
127
- Content-Length:
128
- - '2568'
129
- Date:
130
- - Thu, 14 Aug 2014 20:50:07 GMT
131
- body:
132
- encoding: US-ASCII
133
- string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
134
- configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
135
- broker configuration. Brokers are responsible for handing a node\noff to
136
- a config management system, such as Puppet or Chef. In cases where you\nhave
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
139
- surrounded by `%{...}` are substitutions from the input data: typically\nthe
140
- name of the object being modified, or some other critical detail, these\nallow
141
- roles to be granted partial access to modify the system.\n\nFor more detail
142
- on how the permission strings are structured and work, you can\nsee the [Shiro
143
- Permissions documentation][shiro]. That pattern is expanded\nand then a permission
144
- check applied to it, before the command is authorized.\n\nThese checks only
145
- apply if security is enabled in the Razor configuration\nfile; on this server
146
- security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
147
- Attributes\n\n * name\n - The name of the broker, as it will be referenced
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
155
- the name of an existing broker type.\n\n * configuration\n - The configuration
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"}}}'
164
- http_version:
165
- recorded_at: Thu, 14 Aug 2014 20:50:08 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:50:07 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:50:08 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:50:07 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`
95
+ can be abbreviated as `c` for convenience.\n - It must be of type object.\n","examples":{"api":"Creating
96
+ a simple Puppet broker:\n\n{\n \"name\": \"puppet\",\n \"configuration\":
97
+ {\n \"server\": \"puppet.example.org\",\n \"environment\": \"production\"\n },\n \"broker_type\":
98
+ \"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\nrazor create-broker
99
+ --name puppet -c server=puppet.example.org \\\n -c environment=production
100
+ --broker-type puppet"},"full":"# SYNOPSIS\nCreate a new broker configuration
101
+ for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new broker configuration. Brokers
102
+ are responsible for handing a node\noff to a config management system, such
103
+ as Puppet or Chef. In cases where you\nhave no configuration management system,
104
+ you can use the `noop` broker.\n# Access Control\n\nThis command''s access
105
+ control pattern: `commands:create-broker:%{name}`\n\nWords surrounded by `%{...}`
106
+ are substitutions from the input data: typically\nthe name of the object being
107
+ modified, or some other critical detail, these\nallow roles to be granted
108
+ partial access to modify the system.\n\nFor more detail on how the permission
109
+ strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
110
+ pattern is expanded\nand then a permission check applied to it, before the
111
+ command is authorized.\n\nThese checks only apply if security is enabled in
112
+ the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
113
+ http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
114
+ The name of the broker, as it will be referenced within Razor.\n This
115
+ is the name that you supply to, eg, `create-policy` to specify\n which
116
+ broker the node will be handed off via after installation.\n - This attribute
117
+ is required.\n - It must be of type string.\n - It must be between 1 and
118
+ 250 in length.\n\n * broker_type\n - The broker type from which this broker
119
+ is created. The available\n broker types on your server are:\n -
120
+ chef\n - noop\n - puppet-pe\n - puppet\n - This attribute is
121
+ required.\n - It must be of type string.\n - It must match the name of
122
+ an existing broker type.\n\n * configuration\n - The configuration for the
123
+ broker. The acceptable values here are\n determined by the `broker_type`
287
124
  selected. In general this has\n settings like which server to contact,
288
125
  and other configuration\n related to handing on the newly installed system
289
126
  to the final\n configuration management system.\n \n This attribute
290
127
  can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
291
128
  EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
292
129
  {\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"}}}'
130
+ \"production\"\n },\n \"broker_type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string"},"broker_type":{"type":"string","aliases":["broker-type"]},"configuration":{"type":"object","aliases":["c"]}}}'
294
131
  http_version:
295
- recorded_at: Thu, 14 Aug 2014 20:50:08 GMT
296
- recorded_with: VCR 2.9.2
132
+ recorded_at: Mon, 09 Mar 2015 19:53:55 GMT
133
+ recorded_with: VCR 2.5.0