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
@@ -19,7 +19,7 @@ describe Razor::CLI::Parse do
19
19
  describe "#new" do
20
20
  context "with no arguments" do
21
21
  it {parse.show_help?.should be true}
22
- it {parse.verify_ssl?.should be true}
22
+ it {parse.verify_ssl?.should be false}
23
23
  end
24
24
 
25
25
  context "with a '-h'" do
@@ -54,6 +54,7 @@ describe Razor::CLI::Parse do
54
54
  it "should use the given URL" do
55
55
  url = 'http://razor.example.com:2150/path/to/api'
56
56
  parse('-u',url).api_url.to_s.should == url
57
+ parse('-u',url).verify_ssl?.should == true
57
58
  end
58
59
 
59
60
  it "should terminate with an error if an invalid URL is provided" do
@@ -61,7 +62,7 @@ describe Razor::CLI::Parse do
61
62
  end
62
63
 
63
64
  it "should terminate with an error if a URL without a protocol is provided" do
64
- expect{parse('-u','localhost:8080/api')}.to raise_error(Razor::CLI::InvalidURIError)
65
+ expect{parse('-u','localhost:8151/api')}.to raise_error(Razor::CLI::InvalidURIError)
65
66
  end
66
67
  end
67
68
 
@@ -81,6 +82,10 @@ describe Razor::CLI::Parse do
81
82
  it {parse("--insecure").verify_ssl?.should be false}
82
83
  end
83
84
 
85
+ context "with '--version'" do
86
+ it {parse("--version").show_version?.should be true}
87
+ end
88
+
84
89
  context "with ENV RAZOR_API set" do
85
90
  it "should use the given URL" do
86
91
  url = 'http://razor.example.com:2150/env/path/to/api'
@@ -101,16 +106,30 @@ describe Razor::CLI::Parse do
101
106
  end
102
107
  end
103
108
 
109
+ context "with ENV RAZOR_CA_FILE set" do
110
+ after :each do
111
+ ENV::delete('RAZOR_CA_FILE')
112
+ end
113
+ it "should raise an error if the RAZOR_CA_FILE override is invalid" do
114
+ ENV['RAZOR_CA_FILE'] = '/does/not/exist'
115
+ expect{parse}.to raise_error(Razor::CLI::InvalidCAFileError,
116
+ "CA file '/does/not/exist' in ENV variable RAZOR_CA_FILE does not exist")
117
+ end
118
+ end
119
+
104
120
  describe "#help", :vcr do
105
121
  subject(:p) {parse}
106
122
  it { should respond_to :help}
107
123
 
108
- it { p.help.should be_a String}
124
+ it { output, exitcode = p.help
125
+ output.should be_a String
126
+ exitcode.should == 0}
109
127
 
110
128
  it "should print a list of known endpoints" do
111
129
  p.navigate.should_receive(:collections).and_return([])
112
130
  p.navigate.should_receive(:commands).and_return([])
113
- p.help
131
+ _, exitcode = p.help
132
+ exitcode.should == 0
114
133
  end
115
134
  end
116
135
  end
@@ -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 21:10:25 GMT
30
+ - Mon, 09 Mar 2015 19:54:07 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 21:10:25 GMT
35
+ recorded_at: Mon, 09 Mar 2015 19:54:07 GMT
36
36
  - request:
37
37
  method: get
38
- uri: http://localhost:8080/api/commands/create-repo
38
+ uri: http://localhost:8150/api/commands/create-repo
39
39
  body:
40
40
  encoding: US-ASCII
41
41
  string: ''
@@ -54,21 +54,21 @@ 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
- - '3240'
63
+ - '7794'
64
64
  Date:
65
- - Thu, 14 Aug 2014 21:10:25 GMT
65
+ - Mon, 09 Mar 2015 19:54:07 GMT
66
66
  body:
67
67
  encoding: US-ASCII
68
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
69
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
70
- can either contain the content to install a\nnode, or simply point to an existing
71
- online repository by URL.\n\n# Access Control\n\nThis command''s access control
68
+ string: '{"name":"create-repo","help":{"summary":"Create a new repository, from
69
+ an ISO image or a URL","description":"Create a new repository, which can either
70
+ contain the content to install a\nnode, or simply point to an existing online
71
+ repository by URL.","schema":"# Access Control\n\nThis command''s access control
72
72
  pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
73
73
  substitutions from the input data: typically\nthe name of the object being
74
74
  modified, or some other critical detail, these\nallow roles to be granted
@@ -81,138 +81,45 @@ http_interactions:
81
81
  The name of the repository.\n - This attribute is required.\n - It must
82
82
  be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
83
83
  The URL of the remote repository to use.\n - It must be of type string.\n -
84
- If present, iso-url must not be present.\n - It must be between 1 and 1000
85
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
86
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
87
- be a\n file URL.\n \n In the latter case, the file path is interpreted
88
- as a path on the\n Razor server, rather than a path on the client. This
89
- requires that\n you manually place the ISO image on the server before
90
- invoking the\n command.\n - It must be of type string.\n - If present,
91
- url must not be present.\n - It must be between 1 and 1000 in length.\n\n
92
- * task\n - The name of the task associated with this repository. This is
93
- used to\n install nodes that match a policy using this repository; generally
94
- it\n should match the OS that the URL or ISO-URL attributes point to.\n -
95
- This attribute is required.\n - It must be of type string.\n\n# EXAMPLES\n\n Create
96
- a repository from an ISO image, which will be downloaded and unpacked\n by
97
- the razor-server in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
98
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
99
- can also unpack an ISO image from a file *on the server*; this does not\n upload
100
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
101
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
102
- you can provide a `url` property when you create the repository;\n this form
103
- is merely a pointer to a resource somewhere and nothing will be\n downloaded
104
- 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\":
105
- \"fedora\"\n }\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
106
- http_version:
107
- recorded_at: Thu, 14 Aug 2014 21:10:25 GMT
108
- - request:
109
- method: get
110
- uri: http://localhost:8080/api/commands/create-repo
111
- body:
112
- encoding: US-ASCII
113
- string: ''
114
- headers:
115
- Accept:
116
- - application/json
117
- Accept-Encoding:
118
- - gzip, deflate
119
- User-Agent:
120
- - Ruby
121
- response:
122
- status:
123
- code: 200
124
- message: OK
125
- headers:
126
- Server:
127
- - Apache-Coyote/1.1
128
- Etag:
129
- - '"server-version-v0.15.0-26-gfffaba4-dirty"'
130
- X-Content-Type-Options:
131
- - nosniff
132
- Content-Type:
133
- - application/json;charset=utf-8
134
- Content-Length:
135
- - '3240'
136
- Date:
137
- - Thu, 14 Aug 2014 21:10:25 GMT
138
- body:
139
- encoding: US-ASCII
140
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
141
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
142
- can either contain the content to install a\nnode, or simply point to an existing
143
- online repository by URL.\n\n# Access Control\n\nThis command''s access control
144
- pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
145
- substitutions from the input data: typically\nthe name of the object being
146
- modified, or some other critical detail, these\nallow roles to be granted
147
- partial access to modify the system.\n\nFor more detail on how the permission
148
- strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
149
- pattern is expanded\nand then a permission check applied to it, before the
150
- command is authorized.\n\nThese checks only apply if security is enabled in
151
- the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
152
- http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
153
- The name of the repository.\n - This attribute is required.\n - It must
154
- be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
155
- The URL of the remote repository to use.\n - It must be of type string.\n -
156
- If present, iso-url must not be present.\n - It must be between 1 and 1000
157
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
158
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
159
- be a\n file URL.\n \n In the latter case, the file path is interpreted
160
- as a path on the\n Razor server, rather than a path on the client. This
161
- requires that\n you manually place the ISO image on the server before
162
- invoking the\n command.\n - It must be of type string.\n - If present,
163
- url must not be present.\n - It must be between 1 and 1000 in length.\n\n
164
- * task\n - The name of the task associated with this repository. This is
165
- used to\n install nodes that match a policy using this repository; generally
166
- it\n should match the OS that the URL or ISO-URL attributes point to.\n -
167
- This attribute is required.\n - It must be of type string.\n\n# EXAMPLES\n\n Create
168
- a repository from an ISO image, which will be downloaded and unpacked\n by
169
- the razor-server in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
170
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
171
- can also unpack an ISO image from a file *on the server*; this does not\n upload
172
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
173
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
174
- you can provide a `url` property when you create the repository;\n this form
175
- is merely a pointer to a resource somewhere and nothing will be\n downloaded
176
- 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\":
177
- \"fedora\"\n }\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
178
- http_version:
179
- recorded_at: Thu, 14 Aug 2014 21:10:25 GMT
180
- - request:
181
- method: get
182
- uri: http://localhost:8080/api/commands/create-repo
183
- body:
184
- encoding: US-ASCII
185
- string: ''
186
- headers:
187
- Accept:
188
- - application/json
189
- Accept-Encoding:
190
- - gzip, deflate
191
- User-Agent:
192
- - Ruby
193
- response:
194
- status:
195
- code: 200
196
- message: OK
197
- headers:
198
- Server:
199
- - Apache-Coyote/1.1
200
- Etag:
201
- - '"server-version-v0.15.0-26-gfffaba4-dirty"'
202
- X-Content-Type-Options:
203
- - nosniff
204
- Content-Type:
205
- - application/json;charset=utf-8
206
- Content-Length:
207
- - '3240'
208
- Date:
209
- - Thu, 14 Aug 2014 21:10:25 GMT
210
- body:
211
- encoding: US-ASCII
212
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
213
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
214
- can either contain the content to install a\nnode, or simply point to an existing
215
- online repository by URL.\n\n# Access Control\n\nThis command''s access control
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
100
+ 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
103
+ 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,
106
+ you can provide a `url` property when you create the repository;\nthis form
107
+ 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\":
109
+ \"fedora\"\n }","cli":"Create a repository from an ISO image, which will
110
+ 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
112
+ \\\n --task fedora\n\nYou can also unpack an ISO image from a file
113
+ *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
115
+ \\\n --task fedora\n\nFinally, you can provide a `url` property when
116
+ you create the repository;\nthis form is merely a pointer to a resource somewhere
117
+ 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
216
123
  pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
217
124
  substitutions from the input data: typically\nthe name of the object being
218
125
  modified, or some other critical detail, these\nallow roles to be granted
@@ -225,33 +132,37 @@ http_interactions:
225
132
  The name of the repository.\n - This attribute is required.\n - It must
226
133
  be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
227
134
  The URL of the remote repository to use.\n - It must be of type string.\n -
228
- If present, iso-url must not be present.\n - It must be between 1 and 1000
229
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
230
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
231
- be a\n file URL.\n \n In the latter case, the file path is interpreted
232
- as a path on the\n Razor server, rather than a path on the client. This
233
- requires that\n you manually place the ISO image on the server before
234
- invoking the\n command.\n - It must be of type string.\n - If present,
235
- url must not be present.\n - It must be between 1 and 1000 in length.\n\n
236
- * task\n - The name of the task associated with this repository. This is
237
- used to\n install nodes that match a policy using this repository; generally
238
- it\n should match the OS that the URL or ISO-URL attributes point to.\n -
239
- This attribute is required.\n - It must be of type string.\n\n# EXAMPLES\n\n Create
240
- a repository from an ISO image, which will be downloaded and unpacked\n by
241
- the razor-server in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
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\":
242
153
  \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
243
154
  can also unpack an ISO image from a file *on the server*; this does not\n upload
244
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
155
+ the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso_url\":
245
156
  \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
246
157
  you can provide a `url` property when you create the repository;\n this form
247
158
  is merely a pointer to a resource somewhere and nothing will be\n downloaded
248
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\":
249
- \"fedora\"\n }\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
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"}}}'
250
161
  http_version:
251
- recorded_at: Thu, 14 Aug 2014 21:10:26 GMT
162
+ recorded_at: Mon, 09 Mar 2015 19:54:07 GMT
252
163
  - request:
253
164
  method: post
254
- uri: http://localhost:8080/api/commands/create-repo
165
+ uri: http://localhost:8150/api/commands/create-repo
255
166
  body:
256
167
  encoding: UTF-8
257
168
  string: '{"name":"''with=equals''","url":"http://url.com/some.iso","task":"noop"}'
@@ -280,15 +191,15 @@ http_interactions:
280
191
  Content-Length:
281
192
  - '219'
282
193
  Date:
283
- - Thu, 14 Aug 2014 21:10:25 GMT
194
+ - Mon, 09 Mar 2015 19:54:07 GMT
284
195
  body:
285
196
  encoding: US-ASCII
286
- string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/''with=equals''","name":"''with=equals''","command":"http://localhost:8080/api/collections/commands/1"}'
197
+ 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"}'
287
198
  http_version:
288
- recorded_at: Thu, 14 Aug 2014 21:10:26 GMT
199
+ recorded_at: Mon, 09 Mar 2015 19:54:07 GMT
289
200
  - request:
290
201
  method: get
291
- uri: http://localhost:8080/api/collections/repos/'with=equals'
202
+ uri: http://localhost:8150/api/collections/repos/'with=equals'
292
203
  body:
293
204
  encoding: US-ASCII
294
205
  string: ''
@@ -313,10 +224,10 @@ http_interactions:
313
224
  Content-Length:
314
225
  - '353'
315
226
  Date:
316
- - Thu, 14 Aug 2014 21:10:25 GMT
227
+ - Mon, 09 Mar 2015 19:54:07 GMT
317
228
  body:
318
229
  encoding: US-ASCII
319
- string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/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:8080/api/collections/tasks/noop","name":"noop"}}'
230
+ 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"}}'
320
231
  http_version:
321
- recorded_at: Thu, 14 Aug 2014 21:10:26 GMT
322
- recorded_with: VCR 2.9.2
232
+ recorded_at: Mon, 09 Mar 2015 19:54:07 GMT
233
+ 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
- - '4982'
28
+ - '5650'
29
29
  Date:
30
- - Wed, 21 May 2014 21:40:46 GMT
30
+ - Mon, 09 Mar 2015 19:54:01 GMT
31
31
  body:
32
32
  encoding: US-ASCII
33
- string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8080/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-125-g591a14d-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: Wed, 21 May 2014 21:40:46 GMT
35
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
36
36
  - request:
37
37
  method: get
38
- uri: http://localhost:8080/api/commands/create-repo
38
+ uri: http://localhost:8150/api/commands/create-repo
39
39
  body:
40
40
  encoding: US-ASCII
41
41
  string: ''
@@ -54,23 +54,23 @@ http_interactions:
54
54
  Server:
55
55
  - Apache-Coyote/1.1
56
56
  Etag:
57
- - '"server-version-v0.14.1-125-g591a14d-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
- - '3227'
63
+ - '7794'
64
64
  Date:
65
- - Wed, 21 May 2014 21:40:46 GMT
65
+ - Mon, 09 Mar 2015 19:54:01 GMT
66
66
  body:
67
67
  encoding: US-ASCII
68
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
69
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
70
- can either contain the content to install a\nnode, or simply point to an existing
71
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
72
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
73
- are substitutions from the input data: typically\nthe name of the object being
68
+ string: '{"name":"create-repo","help":{"summary":"Create a new repository, from
69
+ an ISO image or a URL","description":"Create a new repository, which can either
70
+ contain the content to install a\nnode, or simply point to an existing online
71
+ repository by URL.","schema":"# Access Control\n\nThis command''s access control
72
+ pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
73
+ substitutions from the input data: typically\nthe name of the object being
74
74
  modified, or some other critical detail, these\nallow roles to be granted
75
75
  partial access to modify the system.\n\nFor more detail on how the permission
76
76
  strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
@@ -78,143 +78,50 @@ http_interactions:
78
78
  command is authorized.\n\nThese checks only apply if security is enabled in
79
79
  the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
80
80
  http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
81
- The name of the repository.\n - This attribute is required\n - It must
81
+ The name of the repository.\n - This attribute is required.\n - It must
82
82
  be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
83
83
  The URL of the remote repository to use.\n - It must be of type string.\n -
84
- If present, iso-url must not be present.\n - It must be between 1 and 1000
85
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
86
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
87
- be a\n file URL.\n \n In the later case, the file path is interpreted
88
- as a path on the\n Razor server, rather than a path on the client. This
89
- requires that\n you manually place the ISO image on the server before invoking
90
- the\n command.\n - It must be of type string.\n - If present, url must
91
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
92
- The name of the task associated with this repository. This is used to\n install
93
- nodes that match a policy using this repository; generally it\n should match
94
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
95
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
96
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
97
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
98
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
99
- can also unpack an ISO image from a file *on the server*; this does not\n upload
100
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
101
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
102
- you can providing a `url` property when you create the repository;\n this
103
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
104
- 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\":
105
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
106
- http_version:
107
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
108
- - request:
109
- method: get
110
- uri: http://localhost:8080/api/commands/create-repo
111
- body:
112
- encoding: US-ASCII
113
- string: ''
114
- headers:
115
- Accept:
116
- - application/json
117
- Accept-Encoding:
118
- - gzip, deflate
119
- User-Agent:
120
- - Ruby
121
- response:
122
- status:
123
- code: 200
124
- message: OK
125
- headers:
126
- Server:
127
- - Apache-Coyote/1.1
128
- Etag:
129
- - '"server-version-v0.14.1-125-g591a14d-dirty"'
130
- X-Content-Type-Options:
131
- - nosniff
132
- Content-Type:
133
- - application/json;charset=utf-8
134
- Content-Length:
135
- - '3227'
136
- Date:
137
- - Wed, 21 May 2014 21:40:46 GMT
138
- body:
139
- encoding: US-ASCII
140
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
141
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
142
- can either contain the content to install a\nnode, or simply point to an existing
143
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
144
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
145
- are substitutions from the input data: typically\nthe name of the object being
146
- modified, or some other critical detail, these\nallow roles to be granted
147
- partial access to modify the system.\n\nFor more detail on how the permission
148
- strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
149
- pattern is expanded\nand then a permission check applied to it, before the
150
- command is authorized.\n\nThese checks only apply if security is enabled in
151
- the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
152
- http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
153
- The name of the repository.\n - This attribute is required\n - It must
154
- be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
155
- The URL of the remote repository to use.\n - It must be of type string.\n -
156
- If present, iso-url must not be present.\n - It must be between 1 and 1000
157
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
158
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
159
- be a\n file URL.\n \n In the later case, the file path is interpreted
160
- as a path on the\n Razor server, rather than a path on the client. This
161
- requires that\n you manually place the ISO image on the server before invoking
162
- the\n command.\n - It must be of type string.\n - If present, url must
163
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
164
- The name of the task associated with this repository. This is used to\n install
165
- nodes that match a policy using this repository; generally it\n should match
166
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
167
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
168
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
169
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
170
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
171
- can also unpack an ISO image from a file *on the server*; this does not\n upload
172
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
173
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
174
- you can providing a `url` property when you create the repository;\n this
175
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
176
- 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\":
177
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
178
- http_version:
179
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
180
- - request:
181
- method: get
182
- uri: http://localhost:8080/api/commands/create-repo
183
- body:
184
- encoding: US-ASCII
185
- string: ''
186
- headers:
187
- Accept:
188
- - application/json
189
- Accept-Encoding:
190
- - gzip, deflate
191
- User-Agent:
192
- - Ruby
193
- response:
194
- status:
195
- code: 200
196
- message: OK
197
- headers:
198
- Server:
199
- - Apache-Coyote/1.1
200
- Etag:
201
- - '"server-version-v0.14.1-125-g591a14d-dirty"'
202
- X-Content-Type-Options:
203
- - nosniff
204
- Content-Type:
205
- - application/json;charset=utf-8
206
- Content-Length:
207
- - '3227'
208
- Date:
209
- - Wed, 21 May 2014 21:40:46 GMT
210
- body:
211
- encoding: US-ASCII
212
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
213
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
214
- can either contain the content to install a\nnode, or simply point to an existing
215
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
216
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
217
- are substitutions from the input data: typically\nthe name of the object being
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
100
+ 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
103
+ 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,
106
+ you can provide a `url` property when you create the repository;\nthis form
107
+ 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\":
109
+ \"fedora\"\n }","cli":"Create a repository from an ISO image, which will
110
+ 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
112
+ \\\n --task fedora\n\nYou can also unpack an ISO image from a file
113
+ *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
115
+ \\\n --task fedora\n\nFinally, you can provide a `url` property when
116
+ you create the repository;\nthis form is merely a pointer to a resource somewhere
117
+ 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
218
125
  modified, or some other critical detail, these\nallow roles to be granted
219
126
  partial access to modify the system.\n\nFor more detail on how the permission
220
127
  strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
@@ -222,36 +129,40 @@ http_interactions:
222
129
  command is authorized.\n\nThese checks only apply if security is enabled in
223
130
  the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
224
131
  http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
225
- The name of the repository.\n - This attribute is required\n - It must
132
+ The name of the repository.\n - This attribute is required.\n - It must
226
133
  be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
227
134
  The URL of the remote repository to use.\n - It must be of type string.\n -
228
- If present, iso-url must not be present.\n - It must be between 1 and 1000
229
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
230
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
231
- be a\n file URL.\n \n In the later case, the file path is interpreted
232
- as a path on the\n Razor server, rather than a path on the client. This
233
- requires that\n you manually place the ISO image on the server before invoking
234
- the\n command.\n - It must be of type string.\n - If present, url must
235
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
236
- The name of the task associated with this repository. This is used to\n install
237
- nodes that match a policy using this repository; generally it\n should match
238
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
239
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
240
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
241
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
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\":
242
153
  \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
243
154
  can also unpack an ISO image from a file *on the server*; this does not\n upload
244
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
155
+ the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso_url\":
245
156
  \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
246
- you can providing a `url` property when you create the repository;\n this
247
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
157
+ you can provide a `url` property when you create the repository;\n this form
158
+ is merely a pointer to a resource somewhere and nothing will be\n downloaded
248
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\":
249
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
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"}}}'
250
161
  http_version:
251
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
162
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
252
163
  - request:
253
164
  method: post
254
- uri: http://localhost:8080/api/commands/create-repo
165
+ uri: http://localhost:8150/api/commands/create-repo
255
166
  body:
256
167
  encoding: UTF-8
257
168
  string: '{"name":"separate with spaces","url":"http://url.com/some.iso","task":"noop"}'
@@ -280,16 +191,16 @@ http_interactions:
280
191
  Content-Length:
281
192
  - '237'
282
193
  Date:
283
- - Wed, 21 May 2014 21:40:46 GMT
194
+ - Mon, 09 Mar 2015 19:54:01 GMT
284
195
  body:
285
196
  encoding: US-ASCII
286
- string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/separate%20with%20spaces","name":"separate
287
- with spaces","command":"http://localhost:8080/api/collections/commands/1"}'
197
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8150/api/collections/repos/separate%20with%20spaces","name":"separate
198
+ with spaces","command":"http://localhost:8150/api/collections/commands/1"}'
288
199
  http_version:
289
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
200
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
290
201
  - request:
291
202
  method: get
292
- uri: http://localhost:8080/api/collections/repos/separate%20with%20spaces
203
+ uri: http://localhost:8150/api/collections/repos/separate%20with%20spaces
293
204
  body:
294
205
  encoding: US-ASCII
295
206
  string: ''
@@ -314,16 +225,16 @@ http_interactions:
314
225
  Content-Length:
315
226
  - '371'
316
227
  Date:
317
- - Wed, 21 May 2014 21:40:46 GMT
228
+ - Mon, 09 Mar 2015 19:54:01 GMT
318
229
  body:
319
230
  encoding: US-ASCII
320
- string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/separate%20with%20spaces","name":"separate
321
- with spaces","iso_url":null,"url":"http://url.com/some.iso","task":{"spec":"http://api.puppetlabs.com/razor/v1/collections/tasks/member","id":"http://localhost:8080/api/collections/tasks/noop","name":"noop"}}'
231
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8150/api/collections/repos/separate%20with%20spaces","name":"separate
232
+ with spaces","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"}}'
322
233
  http_version:
323
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
234
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
324
235
  - request:
325
236
  method: get
326
- uri: http://localhost:8080/api
237
+ uri: http://localhost:8150/api
327
238
  body:
328
239
  encoding: US-ASCII
329
240
  string: ''
@@ -346,17 +257,17 @@ http_interactions:
346
257
  Content-Type:
347
258
  - application/json;charset=utf-8
348
259
  Content-Length:
349
- - '4982'
260
+ - '5650'
350
261
  Date:
351
- - Wed, 21 May 2014 21:40:46 GMT
262
+ - Mon, 09 Mar 2015 19:54:01 GMT
352
263
  body:
353
264
  encoding: US-ASCII
354
- string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8080/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-125-g591a14d-dirty"}}'
265
+ 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"}}'
355
266
  http_version:
356
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
267
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
357
268
  - request:
358
269
  method: get
359
- uri: http://localhost:8080/api/commands/create-repo
270
+ uri: http://localhost:8150/api/commands/create-repo
360
271
  body:
361
272
  encoding: US-ASCII
362
273
  string: ''
@@ -375,23 +286,23 @@ http_interactions:
375
286
  Server:
376
287
  - Apache-Coyote/1.1
377
288
  Etag:
378
- - '"server-version-v0.14.1-125-g591a14d-dirty"'
289
+ - '"server-version-v0.16.1-18-gd3acc7a-dirty"'
379
290
  X-Content-Type-Options:
380
291
  - nosniff
381
292
  Content-Type:
382
293
  - application/json;charset=utf-8
383
294
  Content-Length:
384
- - '3227'
295
+ - '7794'
385
296
  Date:
386
- - Wed, 21 May 2014 21:40:46 GMT
297
+ - Mon, 09 Mar 2015 19:54:01 GMT
387
298
  body:
388
299
  encoding: US-ASCII
389
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
390
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
391
- can either contain the content to install a\nnode, or simply point to an existing
392
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
393
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
394
- are substitutions from the input data: typically\nthe name of the object being
300
+ string: '{"name":"create-repo","help":{"summary":"Create a new repository, from
301
+ an ISO image or a URL","description":"Create a new repository, which can either
302
+ contain the content to install a\nnode, or simply point to an existing online
303
+ repository by URL.","schema":"# Access Control\n\nThis command''s access control
304
+ pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
305
+ substitutions from the input data: typically\nthe name of the object being
395
306
  modified, or some other critical detail, these\nallow roles to be granted
396
307
  partial access to modify the system.\n\nFor more detail on how the permission
397
308
  strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
@@ -399,71 +310,50 @@ http_interactions:
399
310
  command is authorized.\n\nThese checks only apply if security is enabled in
400
311
  the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
401
312
  http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
402
- The name of the repository.\n - This attribute is required\n - It must
313
+ The name of the repository.\n - This attribute is required.\n - It must
403
314
  be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
404
315
  The URL of the remote repository to use.\n - It must be of type string.\n -
405
- If present, iso-url must not be present.\n - It must be between 1 and 1000
406
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
407
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
408
- be a\n file URL.\n \n In the later case, the file path is interpreted
409
- as a path on the\n Razor server, rather than a path on the client. This
410
- requires that\n you manually place the ISO image on the server before invoking
411
- the\n command.\n - It must be of type string.\n - If present, url must
412
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
413
- The name of the task associated with this repository. This is used to\n install
414
- nodes that match a policy using this repository; generally it\n should match
415
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
416
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
417
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
418
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
419
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
420
- can also unpack an ISO image from a file *on the server*; this does not\n upload
421
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
422
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
423
- you can providing a `url` property when you create the repository;\n this
424
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
425
- 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\":
426
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
427
- http_version:
428
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
429
- - request:
430
- method: get
431
- uri: http://localhost:8080/api/commands/create-repo
432
- body:
433
- encoding: US-ASCII
434
- string: ''
435
- headers:
436
- Accept:
437
- - application/json
438
- Accept-Encoding:
439
- - gzip, deflate
440
- User-Agent:
441
- - Ruby
442
- response:
443
- status:
444
- code: 200
445
- message: OK
446
- headers:
447
- Server:
448
- - Apache-Coyote/1.1
449
- Etag:
450
- - '"server-version-v0.14.1-125-g591a14d-dirty"'
451
- X-Content-Type-Options:
452
- - nosniff
453
- Content-Type:
454
- - application/json;charset=utf-8
455
- Content-Length:
456
- - '3227'
457
- Date:
458
- - Wed, 21 May 2014 21:40:46 GMT
459
- body:
460
- encoding: US-ASCII
461
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
462
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
463
- can either contain the content to install a\nnode, or simply point to an existing
464
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
465
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
466
- are substitutions from the input data: typically\nthe name of the object being
316
+ If present, iso_url, no_content must not be present.\n - It must be between
317
+ 1 and 1000 in length.\n\n * iso_url\n - The URL of the ISO image to download
318
+ and unpack to create the\n repository. This can be an HTTP or HTTPS URL,
319
+ or it can be a\n file URL.\n \n In the latter case, the file path
320
+ is interpreted as a path on the\n Razor server, rather than a path on
321
+ the client. This requires that\n you manually place the ISO image on
322
+ the server before invoking the\n command.\n - It must be of type string.\n -
323
+ If present, url, no_content must not be present.\n - It must be between
324
+ 1 and 1000 in length.\n\n * no_content\n - For cases where extraction will
325
+ be done manually, this argument\n creates a stub directory in the repo
326
+ store where the extracted\n contents can be placed.\n - It must be of
327
+ type boolean.\n - If present, iso_url, url must not be present.\n\n * task\n -
328
+ The name of the task associated with this repository. This is used to\n install
329
+ nodes that match a policy using this repository; generally it\n should
330
+ match the OS that the URL or ISO_URL attributes point to.\n - This attribute
331
+ is required.\n - It must be of type string.\n","examples":{"api":"Create
332
+ a repository from an ISO image, which will be downloaded and unpacked\nby
333
+ the razor-server in the background:\n\n {\n \"name\": \"fedora19\",\n \"iso_url\":
334
+ \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n\nYou
335
+ can also unpack an ISO image from a file *on the server*; this does not\nupload
336
+ the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso_url\":
337
+ \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n\nFinally,
338
+ you can provide a `url` property when you create the repository;\nthis form
339
+ is merely a pointer to a resource somewhere and nothing will be\ndownloaded
340
+ 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\":
341
+ \"fedora\"\n }","cli":"Create a repository from an ISO image, which will
342
+ be downloaded and unpacked\nby the razor-server in the background:\n\n razor
343
+ create-repo --name fedora19 \\\n --iso-url http://example.com/Fedora-19-x86_64-DVD.iso
344
+ \\\n --task fedora\n\nYou can also unpack an ISO image from a file
345
+ *on the server*; this does not\nupload the file from the client:\n\n razor
346
+ create-repo --name fedora19 \\\n --iso-url file:///tmp/Fedora-19-x86_64-DVD.iso
347
+ \\\n --task fedora\n\nFinally, you can provide a `url` property when
348
+ you create the repository;\nthis form is merely a pointer to a resource somewhere
349
+ and nothing will be\ndownloaded onto the Razor server:\n\n razor create-repo
350
+ --name fedora19 --iso-url \\\n http://mirrors.n-ix.net/fedora/linux/releases/19/Fedora/x86_64/os/
351
+ \\\n --task fedora"},"full":"# SYNOPSIS\nCreate a new repository, from
352
+ an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which can
353
+ either contain the content to install a\nnode, or simply point to an existing
354
+ online repository by URL.\n# Access Control\n\nThis command''s access control
355
+ pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
356
+ substitutions from the input data: typically\nthe name of the object being
467
357
  modified, or some other critical detail, these\nallow roles to be granted
468
358
  partial access to modify the system.\n\nFor more detail on how the permission
469
359
  strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
@@ -471,111 +361,43 @@ http_interactions:
471
361
  command is authorized.\n\nThese checks only apply if security is enabled in
472
362
  the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
473
363
  http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
474
- The name of the repository.\n - This attribute is required\n - It must
364
+ The name of the repository.\n - This attribute is required.\n - It must
475
365
  be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
476
366
  The URL of the remote repository to use.\n - It must be of type string.\n -
477
- If present, iso-url must not be present.\n - It must be between 1 and 1000
478
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
479
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
480
- be a\n file URL.\n \n In the later case, the file path is interpreted
481
- as a path on the\n Razor server, rather than a path on the client. This
482
- requires that\n you manually place the ISO image on the server before invoking
483
- the\n command.\n - It must be of type string.\n - If present, url must
484
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
485
- The name of the task associated with this repository. This is used to\n install
486
- nodes that match a policy using this repository; generally it\n should match
487
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
488
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
489
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
490
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
367
+ If present, iso_url, no_content must not be present.\n - It must be between
368
+ 1 and 1000 in length.\n\n * iso_url\n - The URL of the ISO image to download
369
+ and unpack to create the\n repository. This can be an HTTP or HTTPS URL,
370
+ or it can be a\n file URL.\n \n In the latter case, the file path
371
+ is interpreted as a path on the\n Razor server, rather than a path on
372
+ the client. This requires that\n you manually place the ISO image on
373
+ the server before invoking the\n command.\n - It must be of type string.\n -
374
+ If present, url, no_content must not be present.\n - It must be between
375
+ 1 and 1000 in length.\n\n * no_content\n - For cases where extraction will
376
+ be done manually, this argument\n creates a stub directory in the repo
377
+ store where the extracted\n contents can be placed.\n - It must be of
378
+ type boolean.\n - If present, iso_url, url must not be present.\n\n * task\n -
379
+ The name of the task associated with this repository. This is used to\n install
380
+ nodes that match a policy using this repository; generally it\n should
381
+ match the OS that the URL or ISO_URL attributes point to.\n - This attribute
382
+ is required.\n - It must be of type string.\n\n# EXAMPLES\n\n Create a
383
+ repository from an ISO image, which will be downloaded and unpacked\n by
384
+ the razor-server in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso_url\":
491
385
  \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
492
386
  can also unpack an ISO image from a file *on the server*; this does not\n upload
493
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
387
+ the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso_url\":
494
388
  \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
495
- you can providing a `url` property when you create the repository;\n this
496
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
389
+ you can provide a `url` property when you create the repository;\n this form
390
+ is merely a pointer to a resource somewhere and nothing will be\n downloaded
497
391
  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\":
498
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
392
+ \"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"}}}'
499
393
  http_version:
500
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
501
- - request:
502
- method: get
503
- uri: http://localhost:8080/api/commands/create-repo
504
- body:
505
- encoding: US-ASCII
506
- string: ''
507
- headers:
508
- Accept:
509
- - application/json
510
- Accept-Encoding:
511
- - gzip, deflate
512
- User-Agent:
513
- - Ruby
514
- response:
515
- status:
516
- code: 200
517
- message: OK
518
- headers:
519
- Server:
520
- - Apache-Coyote/1.1
521
- Etag:
522
- - '"server-version-v0.14.1-125-g591a14d-dirty"'
523
- X-Content-Type-Options:
524
- - nosniff
525
- Content-Type:
526
- - application/json;charset=utf-8
527
- Content-Length:
528
- - '3227'
529
- Date:
530
- - Wed, 21 May 2014 21:40:46 GMT
531
- body:
532
- encoding: US-ASCII
533
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
534
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
535
- can either contain the content to install a\nnode, or simply point to an existing
536
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
537
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
538
- are substitutions from the input data: typically\nthe name of the object being
539
- modified, or some other critical detail, these\nallow roles to be granted
540
- partial access to modify the system.\n\nFor more detail on how the permission
541
- strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
542
- pattern is expanded\nand then a permission check applied to it, before the
543
- command is authorized.\n\nThese checks only apply if security is enabled in
544
- the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
545
- http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
546
- The name of the repository.\n - This attribute is required\n - It must
547
- be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
548
- The URL of the remote repository to use.\n - It must be of type string.\n -
549
- If present, iso-url must not be present.\n - It must be between 1 and 1000
550
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
551
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
552
- be a\n file URL.\n \n In the later case, the file path is interpreted
553
- as a path on the\n Razor server, rather than a path on the client. This
554
- requires that\n you manually place the ISO image on the server before invoking
555
- the\n command.\n - It must be of type string.\n - If present, url must
556
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
557
- The name of the task associated with this repository. This is used to\n install
558
- nodes that match a policy using this repository; generally it\n should match
559
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
560
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
561
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
562
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
563
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
564
- can also unpack an ISO image from a file *on the server*; this does not\n upload
565
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
566
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
567
- you can providing a `url` property when you create the repository;\n this
568
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
569
- 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\":
570
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
571
- http_version:
572
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
394
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
573
395
  - request:
574
396
  method: post
575
- uri: http://localhost:8080/api/commands/create-repo
397
+ uri: http://localhost:8150/api/commands/create-repo
576
398
  body:
577
399
  encoding: UTF-8
578
- string: '{"name":"double-quote with spaces\"","url":"http://url.com/some.iso","task":"noop"}'
400
+ string: '{"name":"\"double-quote with spaces\"","url":"http://url.com/some.iso","task":"noop"}'
579
401
  headers:
580
402
  Accept:
581
403
  - application/json
@@ -584,7 +406,7 @@ http_interactions:
584
406
  Content-Type:
585
407
  - application/json
586
408
  Content-Length:
587
- - '83'
409
+ - '85'
588
410
  User-Agent:
589
411
  - Ruby
590
412
  response:
@@ -599,18 +421,18 @@ http_interactions:
599
421
  Content-Type:
600
422
  - application/json;charset=utf-8
601
423
  Content-Length:
602
- - '250'
424
+ - '255'
603
425
  Date:
604
- - Wed, 21 May 2014 21:40:46 GMT
426
+ - Mon, 09 Mar 2015 19:54:01 GMT
605
427
  body:
606
428
  encoding: US-ASCII
607
- string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/double-quote%20with%20spaces%22","name":"double-quote
608
- with spaces\"","command":"http://localhost:8080/api/collections/commands/2"}'
429
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8150/api/collections/repos/%22double-quote%20with%20spaces%22","name":"\"double-quote
430
+ with spaces\"","command":"http://localhost:8150/api/collections/commands/2"}'
609
431
  http_version:
610
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
432
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
611
433
  - request:
612
434
  method: get
613
- uri: http://localhost:8080/api/collections/repos/double-quote%20with%20spaces%22
435
+ uri: http://localhost:8150/api/collections/repos/%22double-quote%20with%20spaces%22
614
436
  body:
615
437
  encoding: US-ASCII
616
438
  string: ''
@@ -633,18 +455,18 @@ http_interactions:
633
455
  Content-Type:
634
456
  - application/json;charset=utf-8
635
457
  Content-Length:
636
- - '384'
458
+ - '389'
637
459
  Date:
638
- - Wed, 21 May 2014 21:40:46 GMT
460
+ - Mon, 09 Mar 2015 19:54:01 GMT
639
461
  body:
640
462
  encoding: US-ASCII
641
- string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/double-quote%20with%20spaces%22","name":"double-quote
642
- with spaces\"","iso_url":null,"url":"http://url.com/some.iso","task":{"spec":"http://api.puppetlabs.com/razor/v1/collections/tasks/member","id":"http://localhost:8080/api/collections/tasks/noop","name":"noop"}}'
463
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8150/api/collections/repos/%22double-quote%20with%20spaces%22","name":"\"double-quote
464
+ with spaces\"","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"}}'
643
465
  http_version:
644
- recorded_at: Wed, 21 May 2014 21:40:46 GMT
466
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
645
467
  - request:
646
468
  method: get
647
- uri: http://localhost:8080/api
469
+ uri: http://localhost:8150/api
648
470
  body:
649
471
  encoding: US-ASCII
650
472
  string: ''
@@ -667,17 +489,17 @@ http_interactions:
667
489
  Content-Type:
668
490
  - application/json;charset=utf-8
669
491
  Content-Length:
670
- - '4982'
492
+ - '5650'
671
493
  Date:
672
- - Wed, 21 May 2014 21:40:46 GMT
494
+ - Mon, 09 Mar 2015 19:54:01 GMT
673
495
  body:
674
496
  encoding: US-ASCII
675
- string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8080/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-125-g591a14d-dirty"}}'
497
+ 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"}}'
676
498
  http_version:
677
- recorded_at: Wed, 21 May 2014 21:40:47 GMT
499
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
678
500
  - request:
679
501
  method: get
680
- uri: http://localhost:8080/api/commands/create-repo
502
+ uri: http://localhost:8150/api/commands/create-repo
681
503
  body:
682
504
  encoding: US-ASCII
683
505
  string: ''
@@ -696,23 +518,23 @@ http_interactions:
696
518
  Server:
697
519
  - Apache-Coyote/1.1
698
520
  Etag:
699
- - '"server-version-v0.14.1-125-g591a14d-dirty"'
521
+ - '"server-version-v0.16.1-18-gd3acc7a-dirty"'
700
522
  X-Content-Type-Options:
701
523
  - nosniff
702
524
  Content-Type:
703
525
  - application/json;charset=utf-8
704
526
  Content-Length:
705
- - '3227'
527
+ - '7794'
706
528
  Date:
707
- - Wed, 21 May 2014 21:40:46 GMT
529
+ - Mon, 09 Mar 2015 19:54:01 GMT
708
530
  body:
709
531
  encoding: US-ASCII
710
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
711
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
712
- can either contain the content to install a\nnode, or simply point to an existing
713
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
714
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
715
- are substitutions from the input data: typically\nthe name of the object being
532
+ string: '{"name":"create-repo","help":{"summary":"Create a new repository, from
533
+ an ISO image or a URL","description":"Create a new repository, which can either
534
+ contain the content to install a\nnode, or simply point to an existing online
535
+ repository by URL.","schema":"# Access Control\n\nThis command''s access control
536
+ pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
537
+ substitutions from the input data: typically\nthe name of the object being
716
538
  modified, or some other critical detail, these\nallow roles to be granted
717
539
  partial access to modify the system.\n\nFor more detail on how the permission
718
540
  strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
@@ -720,143 +542,50 @@ http_interactions:
720
542
  command is authorized.\n\nThese checks only apply if security is enabled in
721
543
  the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
722
544
  http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
723
- The name of the repository.\n - This attribute is required\n - It must
545
+ The name of the repository.\n - This attribute is required.\n - It must
724
546
  be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
725
547
  The URL of the remote repository to use.\n - It must be of type string.\n -
726
- If present, iso-url must not be present.\n - It must be between 1 and 1000
727
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
728
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
729
- be a\n file URL.\n \n In the later case, the file path is interpreted
730
- as a path on the\n Razor server, rather than a path on the client. This
731
- requires that\n you manually place the ISO image on the server before invoking
732
- the\n command.\n - It must be of type string.\n - If present, url must
733
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
734
- The name of the task associated with this repository. This is used to\n install
735
- nodes that match a policy using this repository; generally it\n should match
736
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
737
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
738
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
739
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
740
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
741
- can also unpack an ISO image from a file *on the server*; this does not\n upload
742
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
743
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
744
- you can providing a `url` property when you create the repository;\n this
745
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
746
- 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\":
747
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
748
- http_version:
749
- recorded_at: Wed, 21 May 2014 21:40:47 GMT
750
- - request:
751
- method: get
752
- uri: http://localhost:8080/api/commands/create-repo
753
- body:
754
- encoding: US-ASCII
755
- string: ''
756
- headers:
757
- Accept:
758
- - application/json
759
- Accept-Encoding:
760
- - gzip, deflate
761
- User-Agent:
762
- - Ruby
763
- response:
764
- status:
765
- code: 200
766
- message: OK
767
- headers:
768
- Server:
769
- - Apache-Coyote/1.1
770
- Etag:
771
- - '"server-version-v0.14.1-125-g591a14d-dirty"'
772
- X-Content-Type-Options:
773
- - nosniff
774
- Content-Type:
775
- - application/json;charset=utf-8
776
- Content-Length:
777
- - '3227'
778
- Date:
779
- - Wed, 21 May 2014 21:40:46 GMT
780
- body:
781
- encoding: US-ASCII
782
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
783
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
784
- can either contain the content to install a\nnode, or simply point to an existing
785
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
786
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
787
- are substitutions from the input data: typically\nthe name of the object being
788
- modified, or some other critical detail, these\nallow roles to be granted
789
- partial access to modify the system.\n\nFor more detail on how the permission
790
- strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
791
- pattern is expanded\nand then a permission check applied to it, before the
792
- command is authorized.\n\nThese checks only apply if security is enabled in
793
- the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
794
- http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
795
- The name of the repository.\n - This attribute is required\n - It must
796
- be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
797
- The URL of the remote repository to use.\n - It must be of type string.\n -
798
- If present, iso-url must not be present.\n - It must be between 1 and 1000
799
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
800
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
801
- be a\n file URL.\n \n In the later case, the file path is interpreted
802
- as a path on the\n Razor server, rather than a path on the client. This
803
- requires that\n you manually place the ISO image on the server before invoking
804
- the\n command.\n - It must be of type string.\n - If present, url must
805
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
806
- The name of the task associated with this repository. This is used to\n install
807
- nodes that match a policy using this repository; generally it\n should match
808
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
809
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
810
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
811
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
812
- \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
813
- can also unpack an ISO image from a file *on the server*; this does not\n upload
814
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
815
- \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
816
- you can providing a `url` property when you create the repository;\n this
817
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
818
- 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\":
819
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
820
- http_version:
821
- recorded_at: Wed, 21 May 2014 21:40:47 GMT
822
- - request:
823
- method: get
824
- uri: http://localhost:8080/api/commands/create-repo
825
- body:
826
- encoding: US-ASCII
827
- string: ''
828
- headers:
829
- Accept:
830
- - application/json
831
- Accept-Encoding:
832
- - gzip, deflate
833
- User-Agent:
834
- - Ruby
835
- response:
836
- status:
837
- code: 200
838
- message: OK
839
- headers:
840
- Server:
841
- - Apache-Coyote/1.1
842
- Etag:
843
- - '"server-version-v0.14.1-125-g591a14d-dirty"'
844
- X-Content-Type-Options:
845
- - nosniff
846
- Content-Type:
847
- - application/json;charset=utf-8
848
- Content-Length:
849
- - '3227'
850
- Date:
851
- - Wed, 21 May 2014 21:40:46 GMT
852
- body:
853
- encoding: US-ASCII
854
- string: '{"name":"create-repo","help":{"full":"# SYNOPSIS\nCreate a new repository,
855
- from an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which
856
- can either contain the content to install a\nnode, or simply point to an existing
857
- online repository by URL.\n\n\n# Access Control\n\nThis command''s access
858
- control pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}`
859
- are substitutions from the input data: typically\nthe name of the object being
548
+ If present, iso_url, no_content must not be present.\n - It must be between
549
+ 1 and 1000 in length.\n\n * iso_url\n - The URL of the ISO image to download
550
+ and unpack to create the\n repository. This can be an HTTP or HTTPS URL,
551
+ or it can be a\n file URL.\n \n In the latter case, the file path
552
+ is interpreted as a path on the\n Razor server, rather than a path on
553
+ the client. This requires that\n you manually place the ISO image on
554
+ the server before invoking the\n command.\n - It must be of type string.\n -
555
+ If present, url, no_content must not be present.\n - It must be between
556
+ 1 and 1000 in length.\n\n * no_content\n - For cases where extraction will
557
+ be done manually, this argument\n creates a stub directory in the repo
558
+ store where the extracted\n contents can be placed.\n - It must be of
559
+ type boolean.\n - If present, iso_url, url must not be present.\n\n * task\n -
560
+ The name of the task associated with this repository. This is used to\n install
561
+ nodes that match a policy using this repository; generally it\n should
562
+ match the OS that the URL or ISO_URL attributes point to.\n - This attribute
563
+ is required.\n - It must be of type string.\n","examples":{"api":"Create
564
+ a repository from an ISO image, which will be downloaded and unpacked\nby
565
+ the razor-server in the background:\n\n {\n \"name\": \"fedora19\",\n \"iso_url\":
566
+ \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n\nYou
567
+ can also unpack an ISO image from a file *on the server*; this does not\nupload
568
+ the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso_url\":
569
+ \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n\nFinally,
570
+ you can provide a `url` property when you create the repository;\nthis form
571
+ is merely a pointer to a resource somewhere and nothing will be\ndownloaded
572
+ 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\":
573
+ \"fedora\"\n }","cli":"Create a repository from an ISO image, which will
574
+ be downloaded and unpacked\nby the razor-server in the background:\n\n razor
575
+ create-repo --name fedora19 \\\n --iso-url http://example.com/Fedora-19-x86_64-DVD.iso
576
+ \\\n --task fedora\n\nYou can also unpack an ISO image from a file
577
+ *on the server*; this does not\nupload the file from the client:\n\n razor
578
+ create-repo --name fedora19 \\\n --iso-url file:///tmp/Fedora-19-x86_64-DVD.iso
579
+ \\\n --task fedora\n\nFinally, you can provide a `url` property when
580
+ you create the repository;\nthis form is merely a pointer to a resource somewhere
581
+ and nothing will be\ndownloaded onto the Razor server:\n\n razor create-repo
582
+ --name fedora19 --iso-url \\\n http://mirrors.n-ix.net/fedora/linux/releases/19/Fedora/x86_64/os/
583
+ \\\n --task fedora"},"full":"# SYNOPSIS\nCreate a new repository, from
584
+ an ISO image or a URL\n\n# DESCRIPTION\nCreate a new repository, which can
585
+ either contain the content to install a\nnode, or simply point to an existing
586
+ online repository by URL.\n# Access Control\n\nThis command''s access control
587
+ pattern: `commands:create-repo:%{name}`\n\nWords surrounded by `%{...}` are
588
+ substitutions from the input data: typically\nthe name of the object being
860
589
  modified, or some other critical detail, these\nallow roles to be granted
861
590
  partial access to modify the system.\n\nFor more detail on how the permission
862
591
  strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
@@ -864,39 +593,43 @@ http_interactions:
864
593
  command is authorized.\n\nThese checks only apply if security is enabled in
865
594
  the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
866
595
  http://shiro.apache.org/permissions.html\n\n# Attributes\n\n * name\n -
867
- The name of the repository.\n - This attribute is required\n - It must
596
+ The name of the repository.\n - This attribute is required.\n - It must
868
597
  be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
869
598
  The URL of the remote repository to use.\n - It must be of type string.\n -
870
- If present, iso-url must not be present.\n - It must be between 1 and 1000
871
- in length.\n\n * iso-url\n - The URL of the ISO image to download and unpack
872
- to create the\n repository. This can be an HTTP or HTTPS URL, or it can
873
- be a\n file URL.\n \n In the later case, the file path is interpreted
874
- as a path on the\n Razor server, rather than a path on the client. This
875
- requires that\n you manually place the ISO image on the server before invoking
876
- the\n command.\n - It must be of type string.\n - If present, url must
877
- not be present.\n - It must be between 1 and 1000 in length.\n\n * task\n -
878
- The name of the task associated with this repository. This is used to\n install
879
- nodes that match a policy using this repository; generally it\n should match
880
- the OS that the URL or ISO-URL attributes point to.\n - This attribute is
881
- required\n - It must be of type string.\n\n\n\n# EXAMPLES\n Create a repository
882
- from an ISO image, which will be downloaded and unpacked\n by the razor-server
883
- in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso-url\":
599
+ If present, iso_url, no_content must not be present.\n - It must be between
600
+ 1 and 1000 in length.\n\n * iso_url\n - The URL of the ISO image to download
601
+ and unpack to create the\n repository. This can be an HTTP or HTTPS URL,
602
+ or it can be a\n file URL.\n \n In the latter case, the file path
603
+ is interpreted as a path on the\n Razor server, rather than a path on
604
+ the client. This requires that\n you manually place the ISO image on
605
+ the server before invoking the\n command.\n - It must be of type string.\n -
606
+ If present, url, no_content must not be present.\n - It must be between
607
+ 1 and 1000 in length.\n\n * no_content\n - For cases where extraction will
608
+ be done manually, this argument\n creates a stub directory in the repo
609
+ store where the extracted\n contents can be placed.\n - It must be of
610
+ type boolean.\n - If present, iso_url, url must not be present.\n\n * task\n -
611
+ The name of the task associated with this repository. This is used to\n install
612
+ nodes that match a policy using this repository; generally it\n should
613
+ match the OS that the URL or ISO_URL attributes point to.\n - This attribute
614
+ is required.\n - It must be of type string.\n\n# EXAMPLES\n\n Create a
615
+ repository from an ISO image, which will be downloaded and unpacked\n by
616
+ the razor-server in the background:\n \n {\n \"name\": \"fedora19\",\n \"iso_url\":
884
617
  \"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
885
618
  can also unpack an ISO image from a file *on the server*; this does not\n upload
886
- the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso-url\":
619
+ the file from the client:\n {\n \"name\": \"fedora19\",\n \"iso_url\":
887
620
  \"file:///tmp/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n Finally,
888
- you can providing a `url` property when you create the repository;\n this
889
- form is merely a pointer to a resource somehwere and nothing will be\n downloaded
621
+ you can provide a `url` property when you create the repository;\n this form
622
+ is merely a pointer to a resource somewhere and nothing will be\n downloaded
890
623
  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\":
891
- \"fedora\"\n }\n\n"},"schema":{"name":{"type":"string"},"url":{"type":"string"},"iso-url":{"type":"string"},"task":{"type":"string"}}}'
624
+ \"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"}}}'
892
625
  http_version:
893
- recorded_at: Wed, 21 May 2014 21:40:47 GMT
626
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
894
627
  - request:
895
628
  method: post
896
- uri: http://localhost:8080/api/commands/create-repo
629
+ uri: http://localhost:8150/api/commands/create-repo
897
630
  body:
898
631
  encoding: UTF-8
899
- string: '{"name":"single-quote with spaces''","url":"http://url.com/some.iso","task":"noop"}'
632
+ string: '{"name":"''single-quote with spaces''","url":"http://url.com/some.iso","task":"noop"}'
900
633
  headers:
901
634
  Accept:
902
635
  - application/json
@@ -905,7 +638,7 @@ http_interactions:
905
638
  Content-Type:
906
639
  - application/json
907
640
  Content-Length:
908
- - '82'
641
+ - '83'
909
642
  User-Agent:
910
643
  - Ruby
911
644
  response:
@@ -920,18 +653,18 @@ http_interactions:
920
653
  Content-Type:
921
654
  - application/json;charset=utf-8
922
655
  Content-Length:
923
- - '247'
656
+ - '249'
924
657
  Date:
925
- - Wed, 21 May 2014 21:40:46 GMT
658
+ - Mon, 09 Mar 2015 19:54:01 GMT
926
659
  body:
927
660
  encoding: US-ASCII
928
- string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/single-quote%20with%20spaces''","name":"single-quote
929
- with spaces''","command":"http://localhost:8080/api/collections/commands/3"}'
661
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8150/api/collections/repos/''single-quote%20with%20spaces''","name":"''single-quote
662
+ with spaces''","command":"http://localhost:8150/api/collections/commands/3"}'
930
663
  http_version:
931
- recorded_at: Wed, 21 May 2014 21:40:47 GMT
664
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
932
665
  - request:
933
666
  method: get
934
- uri: http://localhost:8080/api/collections/repos/single-quote%20with%20spaces'
667
+ uri: http://localhost:8150/api/collections/repos/'single-quote%20with%20spaces'
935
668
  body:
936
669
  encoding: US-ASCII
937
670
  string: ''
@@ -954,13 +687,13 @@ http_interactions:
954
687
  Content-Type:
955
688
  - application/json;charset=utf-8
956
689
  Content-Length:
957
- - '381'
690
+ - '383'
958
691
  Date:
959
- - Wed, 21 May 2014 21:40:46 GMT
692
+ - Mon, 09 Mar 2015 19:54:01 GMT
960
693
  body:
961
694
  encoding: US-ASCII
962
- string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/single-quote%20with%20spaces''","name":"single-quote
963
- with spaces''","iso_url":null,"url":"http://url.com/some.iso","task":{"spec":"http://api.puppetlabs.com/razor/v1/collections/tasks/member","id":"http://localhost:8080/api/collections/tasks/noop","name":"noop"}}'
695
+ string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8150/api/collections/repos/''single-quote%20with%20spaces''","name":"''single-quote
696
+ with spaces''","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"}}'
964
697
  http_version:
965
- recorded_at: Wed, 21 May 2014 21:40:47 GMT
698
+ recorded_at: Mon, 09 Mar 2015 19:54:01 GMT
966
699
  recorded_with: VCR 2.5.0