razor-client 1.7.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/NEWS.md +12 -0
  2. data/bin/razor +19 -23
  3. data/lib/razor/cli/command.rb +3 -3
  4. data/lib/razor/cli/navigate.rb +55 -1
  5. data/lib/razor/cli/parse.rb +15 -11
  6. data/lib/razor/cli/version.rb +1 -1
  7. data/spec/cli/command_spec.rb +10 -1
  8. data/spec/cli/navigate_spec.rb +52 -4
  9. data/spec/cli/parse_spec.rb +1 -2
  10. data/spec/fixtures/sample_api +1 -0
  11. data/spec/fixtures/vcr/Razor_CLI_Navigate/accept-language_header/should_allow_other_accept-language_headers.yml +10 -8
  12. data/spec/fixtures/vcr/Razor_CLI_Navigate/accept-language_header/should_set_the_accept-language_header.yml +10 -8
  13. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_in_string.yml +110 -91
  14. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_single-dash_with_single_character_flag.yml +71 -51
  15. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml +328 -271
  16. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_not_allow_double-dash_with_single_character_flag.yml +52 -40
  17. data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_not_allow_single-dash_with_multiple_character_flag.yml +49 -37
  18. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml +53 -135
  19. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml +53 -135
  20. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml +53 -135
  21. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml +53 -135
  22. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml +53 -135
  23. data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml +53 -135
  24. data/spec/fixtures/vcr/Razor_CLI_Navigate/positional_arguments/should_allow_the_use_of_positional_arguments.yml +229 -163
  25. data/spec/fixtures/vcr/Razor_CLI_Navigate/positional_arguments/should_fail_with_too_many_positional_arguments.yml +49 -37
  26. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml +25 -13
  27. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml +14 -8
  28. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_bad_JSON.yml +52 -40
  29. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml +105 -90
  30. 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 +549 -446
  31. 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 +549 -446
  32. 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 +549 -446
  33. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml +71 -51
  34. 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 +144 -100
  35. 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 +52 -40
  36. 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 +52 -40
  37. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml +54 -43
  38. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_limit.yml +25 -13
  39. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_append_start.yml +25 -13
  40. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_not_fail_when_query_returns_details_for_one_item.yml +78 -44
  41. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_store_query_without_query_parameters.yml +130 -74
  42. data/spec/fixtures/vcr/Razor_CLI_Navigate/with_query_parameters/should_throw_an_error_if_the_query_parameter_is_not_in_the_API.yml +14 -8
  43. 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 +66 -38
  44. data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml +12 -8
  45. data/spec/spec_helper.rb +4 -1
  46. data/spec/testing.md +25 -1
  47. metadata +73 -71
@@ -12,7 +12,11 @@ http_interactions:
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  User-Agent:
15
- - Ruby
15
+ - rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
16
+ Accept-Language:
17
+ - en_US,en
18
+ Host:
19
+ - localhost:8150
16
20
  response:
17
21
  status:
18
22
  code: 200
@@ -23,16 +27,16 @@ http_interactions:
23
27
  X-Content-Type-Options:
24
28
  - nosniff
25
29
  Content-Type:
26
- - application/json;charset=utf-8
30
+ - application/json
27
31
  Content-Length:
28
- - '5650'
32
+ - '7110'
29
33
  Date:
30
- - Mon, 09 Mar 2015 19:54:07 GMT
34
+ - Mon, 23 Apr 2018 19:47:24 GMT
31
35
  body:
32
- encoding: US-ASCII
33
- string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"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"}}'
36
+ encoding: UTF-8
37
+ string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-broker","id":"http://localhost:8150/api/commands/update-policy-broker"},{"name":"update-policy-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-node-metadata","id":"http://localhost:8150/api/commands/update-policy-node-metadata"},{"name":"update-policy-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-repo","id":"http://localhost:8150/api/commands/update-policy-repo"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"},{"name":"config","rel":"http://api.puppetlabs.com/razor/v1/collections/config","id":"http://localhost:8150/api/collections/config"}],"version":{"server":"v1.8.0-dirty"}}'
34
38
  http_version:
35
- recorded_at: Mon, 09 Mar 2015 19:54:07 GMT
39
+ recorded_at: Mon, 23 Apr 2018 19:47:24 GMT
36
40
  - request:
37
41
  method: get
38
42
  uri: http://localhost:8150/api/commands/create-repo
@@ -45,7 +49,11 @@ http_interactions:
45
49
  Accept-Encoding:
46
50
  - gzip, deflate
47
51
  User-Agent:
48
- - Ruby
52
+ - rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
53
+ Accept-Language:
54
+ - en_US,en
55
+ Host:
56
+ - localhost:8150
49
57
  response:
50
58
  status:
51
59
  code: 200
@@ -54,17 +62,17 @@ http_interactions:
54
62
  Server:
55
63
  - Apache-Coyote/1.1
56
64
  Etag:
57
- - '"server-version-v0.16.1-18-gd3acc7a-dirty"'
65
+ - '"server-version-v1.8.0-dirty"'
58
66
  X-Content-Type-Options:
59
67
  - nosniff
60
68
  Content-Type:
61
- - application/json;charset=utf-8
69
+ - application/json
62
70
  Content-Length:
63
- - '7794'
71
+ - '8224'
64
72
  Date:
65
- - Mon, 09 Mar 2015 19:54:07 GMT
73
+ - Mon, 23 Apr 2018 19:47:24 GMT
66
74
  body:
67
- encoding: US-ASCII
75
+ encoding: UTF-8
68
76
  string: '{"name":"create-repo","help":{"summary":"Create a new repository, from
69
77
  an ISO image or a URL","description":"Create a new repository, which can either
70
78
  contain the content to install a\nnode, or simply point to an existing online
@@ -79,87 +87,90 @@ http_interactions:
79
87
  the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
80
88
  http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
81
89
  The name of the repository.\n - This attribute is required.\n - It must
82
- be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
83
- The URL of the remote repository to use.\n - It must be of type string.\n -
84
- If present, iso_url, no_content must not be present.\n - It must be between
85
- 1 and 1000 in length.\n\n * iso_url\n - The URL of the ISO image to download
86
- and unpack to create the\n repository. This can be an HTTP or HTTPS URL,
87
- or it can be a\n file URL.\n \n In the latter case, the file path
88
- is interpreted as a path on the\n Razor server, rather than a path on
89
- the client. This requires that\n you manually place the ISO image on
90
- the server before invoking the\n command.\n - It must be of type string.\n -
91
- If present, url, no_content must not be present.\n - It must be between
92
- 1 and 1000 in length.\n\n * no_content\n - For cases where extraction will
93
- be done manually, this argument\n creates a stub directory in the repo
94
- store where the extracted\n contents can be placed.\n - It must be of
95
- type boolean.\n - If present, iso_url, url must not be present.\n\n * task\n -
96
- The name of the task associated with this repository. This is used to\n install
97
- nodes that match a policy using this repository; generally it\n should
98
- match the OS that the URL or ISO_URL attributes point to.\n - This attribute
99
- is required.\n - It must be of type string.\n","examples":{"api":"Create
90
+ be of type string.\n - It must be between 1 and 250 in length.\n - Its
91
+ argument position is 0.\n\n * url\n - The URL of the remote repository to
92
+ use.\n - It must be of type string.\n - If present, iso_url, no_content
93
+ must not be present.\n - It must be between 1 and 1000 in length.\n\n *
94
+ iso_url\n - The URL of the ISO image to download and unpack to create the\n repository. This
95
+ can be an HTTP or HTTPS URL, or it can be a\n file URL.\n \n In
96
+ the latter case, the file path is interpreted as a path on the\n Razor
97
+ server, rather than a path on the client. This requires that\n you manually
98
+ place the ISO image on the server before invoking the\n command.\n -
99
+ It must be of type string.\n - If present, url, no_content must not be present.\n -
100
+ It must be between 1 and 1000 in length.\n\n * no_content\n - For cases
101
+ where extraction will be done manually, this argument\n creates a stub
102
+ directory in the repo store where the extracted\n contents can be placed.\n -
103
+ It must be of type boolean.\n - If present, iso_url, url must not be present.\n\n
104
+ * task\n - The name of the default task associated with this repository. This
105
+ is\n used to install nodes that match a policy using this repository;\n generally
106
+ it should match the OS that the URL or ISO_URL attributes point\n to.
107
+ Note that this attribute can be overridden by the task on the policy.\n -
108
+ This attribute is required.\n - It must be of type string.\n","examples":{"api":"Create
100
109
  a repository from an ISO image, which will be downloaded and unpacked\nby
101
- the razor-server in the background:\n\n {\n \"name\": \"fedora19\",\n \"iso_url\":
102
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n\nYou
110
+ the razor-server in the background:\n\n {\n \"name\": \"fedora21\",\n \"iso_url\":
111
+ \"http://example.com/Fedora-21-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n\nYou
103
112
  can also unpack an ISO image from a file *on the server*; this does not\nupload
104
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso_url\":
105
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n\nFinally,
113
+ the file from the client:\n {\n \"name\": \"fedora21\",\n \"iso_url\":
114
+ \"file:///tmp/Fedora-21-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n\nFinally,
106
115
  you can provide a `url` property when you create the repository;\nthis form
107
116
  is merely a pointer to a resource somewhere and nothing will be\ndownloaded
108
- onto the Razor server:\n\n {\n \"name\": \"fedora19\",\n \"url\": \"http://mirrors.n-ix.net/fedora/linux/releases/19/Fedora/x86_64/os/\"\n \"task\":
117
+ onto the Razor server:\n\n {\n \"name\": \"fedora21\",\n \"url\": \"http://mirrors.n-ix.net/fedora/linux/releases/21/Server/x86_64/os\"\n \"task\":
109
118
  \"fedora\"\n }","cli":"Create a repository from an ISO image, which will
110
119
  be downloaded and unpacked\nby the razor-server in the background:\n\n razor
111
- create-repo --name fedora19 \\\n --iso-url http://example.com/Fedora-19-x86_64-DVD.iso
120
+ create-repo --name fedora21 \\\n --iso-url http://example.com/Fedora-21-x86_64-DVD.iso
112
121
  \\\n --task fedora\n\nYou can also unpack an ISO image from a file
113
122
  *on the server*; this does not\nupload the file from the client:\n\n razor
114
- create-repo --name fedora19 \\\n --iso-url file:///tmp/Fedora-19-x86_64-DVD.iso
123
+ create-repo --name fedora21 \\\n --iso-url file:///tmp/Fedora-21-x86_64-DVD.iso
115
124
  \\\n --task fedora\n\nFinally, you can provide a `url` property when
116
125
  you create the repository;\nthis form is merely a pointer to a resource somewhere
117
126
  and nothing will be\ndownloaded onto the Razor server:\n\n razor create-repo
118
- --name fedora19 --iso-url \\\n http://mirrors.n-ix.net/fedora/linux/releases/19/Fedora/x86_64/os/
119
- \\\n --task fedora"},"full":"# SYNOPSIS\nCreate a new repository, from
120
- an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which can
121
- either contain the content to install a\nnode, or simply point to an existing
122
- online repository by URL.\n# Access Control\n\nThis command''s access control
123
- pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
124
- substitutions from the input data: typically\nthe name of the object being
125
- modified, or some other critical detail, these\nallow roles to be granted
126
- partial access to modify the system.\n\nFor more detail on how the permission
127
- strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
128
- pattern is expanded\nand then a permission check applied to it, before the
129
- command is authorized.\n\nThese checks only apply if security is enabled in
130
- the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
131
- http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
132
- The name of the repository.\n - This attribute is required.\n - It must
133
- be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
134
- The URL of the remote repository to use.\n - It must be of type string.\n -
135
- If present, iso_url, no_content must not be present.\n - It must be between
136
- 1 and 1000 in length.\n\n * iso_url\n - The URL of the ISO image to download
137
- and unpack to create the\n repository. This can be an HTTP or HTTPS URL,
138
- or it can be a\n file URL.\n \n In the latter case, the file path
139
- is interpreted as a path on the\n Razor server, rather than a path on
140
- the client. This requires that\n you manually place the ISO image on
141
- the server before invoking the\n command.\n - It must be of type string.\n -
142
- If present, url, no_content must not be present.\n - It must be between
143
- 1 and 1000 in length.\n\n * no_content\n - For cases where extraction will
144
- be done manually, this argument\n creates a stub directory in the repo
145
- store where the extracted\n contents can be placed.\n - It must be of
146
- type boolean.\n - If present, iso_url, url must not be present.\n\n * task\n -
147
- The name of the task associated with this repository. This is used to\n install
148
- nodes that match a policy using this repository; generally it\n should
149
- match the OS that the URL or ISO_URL attributes point to.\n - This attribute
150
- is required.\n - It must be of type string.\n\n# EXAMPLES\n\n Create a
151
- repository from an ISO image, which will be downloaded and unpacked\n by
152
- the razor-server in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso_url\":
153
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
127
+ --name fedora21 --url \\\n http://mirrors.n-ix.net/fedora/linux/releases/21/Server/x86_64/os/
128
+ \\\n --task fedora\n\nWith positional arguments, this can be shortened::\n\n razor
129
+ create-repo fedora21 --task fedora --url \\\n http://mirrors.n-ix.net/fedora/linux/releases/21/Server/x86_64/os/"},"full":"#
130
+ SYNOPSIS\nCreate a new repository, from an ISO image or a URL\n\n# DESCRIPTION\nCreate
131
+ a new repository, which can either contain the content to install a\nnode,
132
+ or simply point to an existing online repository by URL.\n# Access Control\n\nThis
133
+ command''s access control pattern: `commands:create-repo:%{name}`\n\nWords
134
+ surrounded by `%{...}` are substitutions from the input data: typically\nthe
135
+ name of the object being modified, or some other critical detail, these\nallow
136
+ roles to be granted partial access to modify the system.\n\nFor more detail
137
+ on how the permission strings are structured and work, you can\nsee the [Shiro
138
+ Permissions documentation][shiro]. That pattern is expanded\nand then a permission
139
+ check applied to it, before the command is authorized.\n\nThese checks only
140
+ apply if security is enabled in the Razor configuration\nfile; on this server
141
+ security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
142
+ Attributes\n\n * name\n - The name of the repository.\n - This attribute
143
+ is required.\n - It must be of type string.\n - It must be between 1 and
144
+ 250 in length.\n - Its argument position is 0.\n\n * url\n - The URL of
145
+ the remote repository to use.\n - It must be of type string.\n - If present,
146
+ iso_url, no_content must not be present.\n - It must be between 1 and 1000
147
+ in length.\n\n * iso_url\n - The URL of the ISO image to download and unpack
148
+ to create the\n repository. This can be an HTTP or HTTPS URL, or it can
149
+ be a\n file URL.\n \n In the latter case, the file path is interpreted
150
+ as a path on the\n Razor server, rather than a path on the client. This
151
+ requires that\n you manually place the ISO image on the server before
152
+ invoking the\n command.\n - It must be of type string.\n - If present,
153
+ url, no_content must not be present.\n - It must be between 1 and 1000 in
154
+ length.\n\n * no_content\n - For cases where extraction will be done manually,
155
+ this argument\n creates a stub directory in the repo store where the extracted\n contents
156
+ can be placed.\n - It must be of type boolean.\n - If present, iso_url,
157
+ url must not be present.\n\n * task\n - The name of the default task associated
158
+ with this repository. This is\n used to install nodes that match a policy
159
+ using this repository;\n generally it should match the OS that the URL
160
+ or ISO_URL attributes point\n to. Note that this attribute can be overridden
161
+ by the task on the policy.\n - This attribute is required.\n - It must
162
+ be of type string.\n\n# EXAMPLES\n\n Create a repository from an ISO image,
163
+ which will be downloaded and unpacked\n by the razor-server in the background:\n \n {\n \"name\": \"fedora21\",\n \"iso_url\":
164
+ \"http://example.com/Fedora-21-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
154
165
  can also unpack an ISO image from a file *on the server*; this does not\n upload
155
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso_url\":
156
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
166
+ the file from the client:\n {\n \"name\": \"fedora21\",\n \"iso_url\":
167
+ \"file:///tmp/Fedora-21-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
157
168
  you can provide a `url` property when you create the repository;\n this form
158
169
  is merely a pointer to a resource somewhere and nothing will be\n downloaded
159
- onto the Razor server:\n \n {\n \"name\": \"fedora19\",\n \"url\": \"http://mirrors.n-ix.net/fedora/linux/releases/19/Fedora/x86_64/os/\"\n \"task\":
160
- \"fedora\"\n }\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso_url":{"type":"string","aliases":["iso-url"]},"no_content":{"type":"boolean","aliases":["no-content"]},"task":{"type":"string"}}}'
170
+ onto the Razor server:\n \n {\n \"name\": \"fedora21\",\n \"url\": \"http://mirrors.n-ix.net/fedora/linux/releases/21/Server/x86_64/os\"\n \"task\":
171
+ \"fedora\"\n }\n"},"schema":{"name":{"type":"string","position":0},"url":{"type":"string"},"iso_url":{"type":"string","aliases":["iso-url"]},"no_content":{"type":"boolean","aliases":["no-content"]},"task":{"type":"string"}}}'
161
172
  http_version:
162
- recorded_at: Mon, 09 Mar 2015 19:54:07 GMT
173
+ recorded_at: Mon, 23 Apr 2018 19:47:24 GMT
163
174
  - request:
164
175
  method: post
165
176
  uri: http://localhost:8150/api/commands/create-repo
@@ -171,12 +182,16 @@ http_interactions:
171
182
  - application/json
172
183
  Accept-Encoding:
173
184
  - gzip, deflate
185
+ User-Agent:
186
+ - rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
174
187
  Content-Type:
175
188
  - application/json
189
+ Accept-Language:
190
+ - en_US,en
176
191
  Content-Length:
177
192
  - '70'
178
- User-Agent:
179
- - Ruby
193
+ Host:
194
+ - localhost:8150
180
195
  response:
181
196
  status:
182
197
  code: 202
@@ -187,16 +202,16 @@ http_interactions:
187
202
  X-Content-Type-Options:
188
203
  - nosniff
189
204
  Content-Type:
190
- - application/json;charset=utf-8
205
+ - application/json
191
206
  Content-Length:
192
207
  - '219'
193
208
  Date:
194
- - Mon, 09 Mar 2015 19:54:07 GMT
209
+ - Mon, 23 Apr 2018 19:47:24 GMT
195
210
  body:
196
- encoding: US-ASCII
211
+ encoding: UTF-8
197
212
  string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8150/api/collections/repos/''with=equals''","name":"''with=equals''","command":"http://localhost:8150/api/collections/commands/1"}'
198
213
  http_version:
199
- recorded_at: Mon, 09 Mar 2015 19:54:07 GMT
214
+ recorded_at: Mon, 23 Apr 2018 19:47:25 GMT
200
215
  - request:
201
216
  method: get
202
217
  uri: http://localhost:8150/api/collections/repos/'with=equals'
@@ -209,7 +224,11 @@ http_interactions:
209
224
  Accept-Encoding:
210
225
  - gzip, deflate
211
226
  User-Agent:
212
- - Ruby
227
+ - rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
228
+ Accept-Language:
229
+ - en_US,en
230
+ Host:
231
+ - localhost:8150
213
232
  response:
214
233
  status:
215
234
  code: 200
@@ -220,14 +239,14 @@ http_interactions:
220
239
  X-Content-Type-Options:
221
240
  - nosniff
222
241
  Content-Type:
223
- - application/json;charset=utf-8
242
+ - application/json
224
243
  Content-Length:
225
244
  - '353'
226
245
  Date:
227
- - Mon, 09 Mar 2015 19:54:07 GMT
246
+ - Mon, 23 Apr 2018 19:47:24 GMT
228
247
  body:
229
- encoding: US-ASCII
248
+ encoding: UTF-8
230
249
  string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8150/api/collections/repos/''with=equals''","name":"''with=equals''","iso_url":null,"url":"http://url.com/some.iso","task":{"spec":"http://api.puppetlabs.com/razor/v1/collections/tasks/member","id":"http://localhost:8150/api/collections/tasks/noop","name":"noop"}}'
231
250
  http_version:
232
- recorded_at: Mon, 09 Mar 2015 19:54:07 GMT
233
- recorded_with: VCR 2.5.0
251
+ recorded_at: Mon, 23 Apr 2018 19:47:25 GMT
252
+ recorded_with: VCR 4.0.0
@@ -12,7 +12,11 @@ http_interactions:
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  User-Agent:
15
- - Ruby
15
+ - rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
16
+ Accept-Language:
17
+ - en_US,en
18
+ Host:
19
+ - localhost:8150
16
20
  response:
17
21
  status:
18
22
  code: 200
@@ -23,16 +27,16 @@ http_interactions:
23
27
  X-Content-Type-Options:
24
28
  - nosniff
25
29
  Content-Type:
26
- - application/json;charset=utf-8
30
+ - application/json
27
31
  Content-Length:
28
- - '6471'
32
+ - '7110'
29
33
  Date:
30
- - Tue, 06 Oct 2015 23:42:04 GMT
34
+ - Mon, 23 Apr 2018 19:47:44 GMT
31
35
  body:
32
- encoding: US-ASCII
33
- string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"}],"version":{"server":"v1.0.1-39-g2052ab6-dirty"}}'
36
+ encoding: UTF-8
37
+ string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8150/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8150/api/commands/create-broker"},{"name":"create-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/create-hook","id":"http://localhost:8150/api/commands/create-hook"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8150/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8150/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8150/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8150/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8150/api/commands/delete-broker"},{"name":"delete-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-hook","id":"http://localhost:8150/api/commands/delete-hook"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8150/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8150/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8150/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8150/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8150/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8150/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8150/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8150/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8150/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8150/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8150/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8150/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8150/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8150/api/commands/remove-policy-tag"},{"name":"run-hook","rel":"http://api.puppetlabs.com/razor/v1/commands/run-hook","id":"http://localhost:8150/api/commands/run-hook"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8150/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8150/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8150/api/commands/set-node-ipmi-credentials"},{"name":"update-broker-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-broker-configuration","id":"http://localhost:8150/api/commands/update-broker-configuration"},{"name":"update-hook-configuration","rel":"http://api.puppetlabs.com/razor/v1/commands/update-hook-configuration","id":"http://localhost:8150/api/commands/update-hook-configuration"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8150/api/commands/update-node-metadata"},{"name":"update-policy-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-broker","id":"http://localhost:8150/api/commands/update-policy-broker"},{"name":"update-policy-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-node-metadata","id":"http://localhost:8150/api/commands/update-policy-node-metadata"},{"name":"update-policy-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-repo","id":"http://localhost:8150/api/commands/update-policy-repo"},{"name":"update-policy-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-policy-task","id":"http://localhost:8150/api/commands/update-policy-task"},{"name":"update-repo-task","rel":"http://api.puppetlabs.com/razor/v1/commands/update-repo-task","id":"http://localhost:8150/api/commands/update-repo-task"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8150/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8150/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8150/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8150/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8150/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8150/api/collections/nodes","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8150/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8150/api/collections/commands"},{"name":"events","rel":"http://api.puppetlabs.com/razor/v1/collections/events","id":"http://localhost:8150/api/collections/events","params":{"start":{"type":"number"},"limit":{"type":"number"}}},{"name":"hooks","rel":"http://api.puppetlabs.com/razor/v1/collections/hooks","id":"http://localhost:8150/api/collections/hooks"},{"name":"config","rel":"http://api.puppetlabs.com/razor/v1/collections/config","id":"http://localhost:8150/api/collections/config"}],"version":{"server":"v1.8.0-dirty"}}'
34
38
  http_version:
35
- recorded_at: Tue, 06 Oct 2015 23:42:04 GMT
39
+ recorded_at: Mon, 23 Apr 2018 19:47:44 GMT
36
40
  - request:
37
41
  method: get
38
42
  uri: http://localhost:8150/api/commands/create-broker
@@ -45,7 +49,11 @@ http_interactions:
45
49
  Accept-Encoding:
46
50
  - gzip, deflate
47
51
  User-Agent:
48
- - Ruby
52
+ - rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
53
+ Accept-Language:
54
+ - en_US,en
55
+ Host:
56
+ - localhost:8150
49
57
  response:
50
58
  status:
51
59
  code: 200
@@ -54,17 +62,17 @@ http_interactions:
54
62
  Server:
55
63
  - Apache-Coyote/1.1
56
64
  Etag:
57
- - '"server-version-v1.0.1-39-g2052ab6-dirty"'
65
+ - '"server-version-v1.8.0-dirty"'
58
66
  X-Content-Type-Options:
59
67
  - nosniff
60
68
  Content-Type:
61
- - application/json;charset=utf-8
69
+ - application/json
62
70
  Content-Length:
63
- - '5184'
71
+ - '5560'
64
72
  Date:
65
- - Tue, 06 Oct 2015 23:42:04 GMT
73
+ - Mon, 23 Apr 2018 19:47:44 GMT
66
74
  body:
67
- encoding: US-ASCII
75
+ encoding: UTF-8
68
76
  string: '{"name":"create-broker","help":{"summary":"Create a new broker configuration
69
77
  for hand-off of installed nodes","description":"Create a new broker configuration. Brokers
70
78
  are responsible for handing a node\noff to a config management system, such
@@ -83,30 +91,33 @@ http_interactions:
83
91
  within Razor.\n This is the name that you supply to, eg, `create-policy`
84
92
  to specify\n which broker the node will be handed off via after installation.\n -
85
93
  This attribute is required.\n - It must be of type string.\n - It must
86
- be between 1 and 250 in length.\n\n * broker_type\n - The broker type from
87
- which this broker is created. The available\n broker types on your server
88
- are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
89
- attribute is required.\n - It must be of type string.\n - It must match
90
- the name of an existing broker type.\n\n * configuration\n - The configuration
91
- for the broker. The acceptable values here are\n determined by the `broker_type`
94
+ be between 1 and 250 in length.\n - Its argument position is 0.\n\n * broker_type\n -
95
+ The broker type from which this broker is created. The available\n broker
96
+ types on your server are:\n - chef\n - legacy-puppet\n - noop\n -
97
+ puppet-pe\n - puppet\n - This attribute is required.\n - It must be
98
+ of type string.\n - It must match the name of an existing broker type.\n -
99
+ Its argument position is 1.\n\n * configuration\n - The configuration for
100
+ the broker. The acceptable values here are\n determined by the `broker_type`
92
101
  selected. In general this has\n settings like which server to contact,
93
102
  and other configuration\n related to handing on the newly installed system
94
103
  to the final\n configuration management system.\n \n This attribute
95
104
  can be abbreviated as `c` for convenience.\n - It must be of type object.\n","examples":{"api":"Creating
96
105
  a simple Puppet broker:\n\n{\n \"name\": \"puppet\",\n \"configuration\":
97
106
  {\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
107
+ \"puppet\"\n}","cli":"Creating a simple Puppet broker:\n\n razor create-broker
108
+ --name puppet -c server=puppet.example.org \\\n -c environment=production
109
+ --broker-type puppet\n\nWith positional arguments, this can be shortened::\n\n razor
110
+ create-broker puppet puppet -c server=puppet.example.org \\\n -c environment=production"},"full":"#
111
+ SYNOPSIS\nCreate a new broker configuration for hand-off of installed nodes\n\n#
112
+ DESCRIPTION\nCreate a new broker configuration. Brokers are responsible for
113
+ handing a node\noff to a config management system, such as Puppet or Chef. In
114
+ cases where you\nhave no configuration management system, you can use the
115
+ `noop` broker.\n# Access Control\n\nThis command''s access control pattern:
116
+ `commands:create-broker:%{name}`\n\nWords surrounded by `%{...}` are substitutions
117
+ from the input data: typically\nthe name of the object being modified, or
118
+ some other critical detail, these\nallow roles to be granted partial access
119
+ to modify the system.\n\nFor more detail on how the permission strings are
120
+ structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
110
121
  pattern is expanded\nand then a permission check applied to it, before the
111
122
  command is authorized.\n\nThese checks only apply if security is enabled in
112
123
  the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
@@ -115,21 +126,22 @@ http_interactions:
115
126
  is the name that you supply to, eg, `create-policy` to specify\n which
116
127
  broker the node will be handed off via after installation.\n - This attribute
117
128
  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`
129
+ 250 in length.\n - Its argument position is 0.\n\n * broker_type\n - The
130
+ broker type from which this broker is created. The available\n broker
131
+ types on your server are:\n - chef\n - legacy-puppet\n - noop\n -
132
+ puppet-pe\n - puppet\n - This attribute is required.\n - It must be
133
+ of type string.\n - It must match the name of an existing broker type.\n -
134
+ Its argument position is 1.\n\n * configuration\n - The configuration for
135
+ the broker. The acceptable values here are\n determined by the `broker_type`
124
136
  selected. In general this has\n settings like which server to contact,
125
137
  and other configuration\n related to handing on the newly installed system
126
138
  to the final\n configuration management system.\n \n This attribute
127
139
  can be abbreviated as `c` for convenience.\n - It must be of type object.\n\n#
128
140
  EXAMPLES\n\n Creating a simple Puppet broker:\n \n {\n \"name\": \"puppet\",\n \"configuration\":
129
141
  {\n \"server\": \"puppet.example.org\",\n \"environment\":
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"]}}}'
142
+ \"production\"\n },\n \"broker_type\": \"puppet\"\n }\n"},"schema":{"name":{"type":"string","position":0},"broker_type":{"type":"string","aliases":["broker-type"],"position":1},"configuration":{"type":"object","aliases":["c"]}}}'
131
143
  http_version:
132
- recorded_at: Tue, 06 Oct 2015 23:42:04 GMT
144
+ recorded_at: Mon, 23 Apr 2018 19:47:44 GMT
133
145
  - request:
134
146
  method: post
135
147
  uri: http://localhost:8150/api/commands/create-broker
@@ -141,12 +153,16 @@ http_interactions:
141
153
  - application/json
142
154
  Accept-Encoding:
143
155
  - gzip, deflate
156
+ User-Agent:
157
+ - rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
144
158
  Content-Type:
145
159
  - application/json
160
+ Accept-Language:
161
+ - en_US,en
146
162
  Content-Length:
147
163
  - '85'
148
- User-Agent:
149
- - Ruby
164
+ Host:
165
+ - localhost:8150
150
166
  response:
151
167
  status:
152
168
  code: 202
@@ -157,16 +173,16 @@ http_interactions:
157
173
  X-Content-Type-Options:
158
174
  - nosniff
159
175
  Content-Type:
160
- - application/json;charset=utf-8
176
+ - application/json
161
177
  Content-Length:
162
178
  - '219'
163
179
  Date:
164
- - Tue, 06 Oct 2015 23:42:04 GMT
180
+ - Mon, 23 Apr 2018 19:47:44 GMT
165
181
  body:
166
- encoding: US-ASCII
182
+ encoding: UTF-8
167
183
  string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some-broker","name":"some-broker","command":"http://localhost:8150/api/collections/commands/1"}'
168
184
  http_version:
169
- recorded_at: Tue, 06 Oct 2015 23:42:05 GMT
185
+ recorded_at: Mon, 23 Apr 2018 19:47:44 GMT
170
186
  - request:
171
187
  method: get
172
188
  uri: http://localhost:8150/api/collections/brokers/some-broker
@@ -179,7 +195,11 @@ http_interactions:
179
195
  Accept-Encoding:
180
196
  - gzip, deflate
181
197
  User-Agent:
182
- - Ruby
198
+ - rest-client/2.0.2 (darwin x86_64) jruby/9.1.5.0 (2.3.1p0)
199
+ Accept-Language:
200
+ - en_US,en
201
+ Host:
202
+ - localhost:8150
183
203
  response:
184
204
  status:
185
205
  code: 200
@@ -190,14 +210,14 @@ http_interactions:
190
210
  X-Content-Type-Options:
191
211
  - nosniff
192
212
  Content-Type:
193
- - application/json;charset=utf-8
213
+ - application/json
194
214
  Content-Length:
195
215
  - '336'
196
216
  Date:
197
- - Tue, 06 Oct 2015 23:42:04 GMT
217
+ - Mon, 23 Apr 2018 19:47:44 GMT
198
218
  body:
199
- encoding: US-ASCII
219
+ encoding: UTF-8
200
220
  string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8150/api/collections/brokers/some-broker","name":"some-broker","configuration":{"server":"abc.com"},"broker_type":"puppet-pe","policies":{"id":"http://localhost:8150/api/collections/brokers/some-broker/policies","count":0,"name":"policies"}}'
201
221
  http_version:
202
- recorded_at: Tue, 06 Oct 2015 23:42:05 GMT
203
- recorded_with: VCR 2.5.0
222
+ recorded_at: Mon, 23 Apr 2018 19:47:44 GMT
223
+ recorded_with: VCR 4.0.0