pe-razor-client 0.14.0 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +25 -0
- data/bin/razor +9 -4
- data/lib/razor/cli.rb +10 -0
- data/lib/razor/cli/document.rb +59 -0
- data/lib/razor/cli/format.rb +81 -20
- data/lib/razor/cli/navigate.rb +121 -27
- data/lib/razor/cli/parse.rb +83 -10
- data/lib/razor/cli/transforms.rb +42 -0
- data/lib/razor/cli/version.rb +46 -0
- data/lib/razor/cli/views.rb +25 -0
- data/lib/razor/cli/views.yaml +196 -0
- data/spec/cli/format_spec.rb +99 -0
- data/spec/cli/navigate_spec.rb +111 -2
- data/spec/cli/parse_spec.rb +20 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/argument_formatting/should_allow_spaces.yml +966 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_--help_command_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_-h_command_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_--help_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_-h_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_command_help_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/for_command_help/should_provide_command_help_for_razor_help_command_.yml +99 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_preserve_that_across_navigation.yml +9 -42
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_authentication/should_supply_that_to_the_API_service.yml +5 -5
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_bad_JSON.yml +228 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_invalid_parameter/should_fail_with_malformed_argument.yml +120 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_an_array_into_an_existing_array.yml +2006 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_as_an_array.yml +2006 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_array/should_merge_the_arguments_into_an_existing_array.yml +2006 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object.yml +234 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_construct_a_json_object_with_unicode.yml +412 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_array_then_hash_.yml +228 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_multiple_arguments_with_same_name/combining_as_an_object/should_fail_with_mixed_types_hash_then_array_.yml +164 -0
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_parameters/should_fail_with_bad_JSON.yml +36 -0
- data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/should_print_a_list_of_known_endpoints.yml +5 -5
- data/spec/spec_helper.rb +12 -1
- data/spec/testing.md +16 -0
- data/spec/version_spec.rb +8 -0
- metadata +67 -60
- data/.gitignore +0 -7
- data/.yardopts +0 -2
- data/Gemfile +0 -35
- data/Gemfile.lock +0 -53
- data/Rakefile +0 -37
- data/lib/razor/cli/navigate.yaml +0 -28
- data/pe-razor-client.gemspec +0 -32
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_a_single_item_path/.yml +0 -69
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_an_invalid_path/.yml +0 -36
- data/spec/fixtures/vcr/Razor_CLI_Navigate/with_no_path/.yml +0 -36
- data/spec/fixtures/vcr/Razor_CLI_Parse/_new/_help/.yml +0 -36
@@ -0,0 +1,2006 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:8080/api
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- Apache-Coyote/1.1
|
23
|
+
X-Content-Type-Options:
|
24
|
+
- nosniff
|
25
|
+
Content-Type:
|
26
|
+
- application/json;charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '4982'
|
29
|
+
Date:
|
30
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
31
|
+
body:
|
32
|
+
encoding: US-ASCII
|
33
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8080/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-113-g8b33d83-dirty"}}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
36
|
+
- request:
|
37
|
+
method: get
|
38
|
+
uri: http://localhost:8080/api/commands/create-repo
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: ''
|
42
|
+
headers:
|
43
|
+
Accept:
|
44
|
+
- application/json
|
45
|
+
Accept-Encoding:
|
46
|
+
- gzip, deflate
|
47
|
+
User-Agent:
|
48
|
+
- Ruby
|
49
|
+
response:
|
50
|
+
status:
|
51
|
+
code: 200
|
52
|
+
message: OK
|
53
|
+
headers:
|
54
|
+
Server:
|
55
|
+
- Apache-Coyote/1.1
|
56
|
+
Etag:
|
57
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
58
|
+
X-Content-Type-Options:
|
59
|
+
- nosniff
|
60
|
+
Content-Type:
|
61
|
+
- application/json;charset=utf-8
|
62
|
+
Content-Length:
|
63
|
+
- '3227'
|
64
|
+
Date:
|
65
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
66
|
+
body:
|
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
|
74
|
+
modified, or some other critical detail, these\nallow roles to be granted
|
75
|
+
partial access to modify the system.\n\nFor more detail on how the permission
|
76
|
+
strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
77
|
+
pattern is expanded\nand then a permission check applied to it, before the
|
78
|
+
command is authorized.\n\nThese checks only apply if security is enabled in
|
79
|
+
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
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
|
82
|
+
be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
|
83
|
+
The URL of the remote repository to use.\n - It must be of type string.\n -
|
84
|
+
If present, iso-url 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: Fri, 16 May 2014 22:18:22 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-113-g8b33d83-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
|
+
- Fri, 16 May 2014 22:18:22 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: Fri, 16 May 2014 22:18:22 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-113-g8b33d83-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
|
+
- Fri, 16 May 2014 22:18:22 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
|
218
|
+
modified, or some other critical detail, these\nallow roles to be granted
|
219
|
+
partial access to modify the system.\n\nFor more detail on how the permission
|
220
|
+
strings are structured and work, you can\nsee the [Shiro Permissions documentation][shiro]. That
|
221
|
+
pattern is expanded\nand then a permission check applied to it, before the
|
222
|
+
command is authorized.\n\nThese checks only apply if security is enabled in
|
223
|
+
the Razor configuration\nfile; on this server security is currently disabled.\n\n[shiro]:
|
224
|
+
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
|
226
|
+
be of type string.\n - It must be between 1 and 250 in length.\n\n * url\n -
|
227
|
+
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\":
|
242
|
+
\"http://example.com/Fedora-19-x86_64-DVD.iso\"\n \"task\": \"fedora\"\n }\n \n You
|
243
|
+
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\":
|
245
|
+
\"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
|
248
|
+
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"}}}'
|
250
|
+
http_version:
|
251
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
252
|
+
- request:
|
253
|
+
method: post
|
254
|
+
uri: http://localhost:8080/api/commands/create-repo
|
255
|
+
body:
|
256
|
+
encoding: UTF-8
|
257
|
+
string: '{"name":"name","url":"http://url.com/some.iso","task":"noop"}'
|
258
|
+
headers:
|
259
|
+
Accept:
|
260
|
+
- application/json
|
261
|
+
Accept-Encoding:
|
262
|
+
- gzip, deflate
|
263
|
+
Content-Type:
|
264
|
+
- application/json
|
265
|
+
Content-Length:
|
266
|
+
- '61'
|
267
|
+
User-Agent:
|
268
|
+
- Ruby
|
269
|
+
response:
|
270
|
+
status:
|
271
|
+
code: 202
|
272
|
+
message: Accepted
|
273
|
+
headers:
|
274
|
+
Server:
|
275
|
+
- Apache-Coyote/1.1
|
276
|
+
X-Content-Type-Options:
|
277
|
+
- nosniff
|
278
|
+
Content-Type:
|
279
|
+
- application/json;charset=utf-8
|
280
|
+
Content-Length:
|
281
|
+
- '201'
|
282
|
+
Date:
|
283
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
284
|
+
body:
|
285
|
+
encoding: US-ASCII
|
286
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/name","name":"name","command":"http://localhost:8080/api/collections/commands/1"}'
|
287
|
+
http_version:
|
288
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
289
|
+
- request:
|
290
|
+
method: get
|
291
|
+
uri: http://localhost:8080/api/collections/repos/name
|
292
|
+
body:
|
293
|
+
encoding: US-ASCII
|
294
|
+
string: ''
|
295
|
+
headers:
|
296
|
+
Accept:
|
297
|
+
- application/json
|
298
|
+
Accept-Encoding:
|
299
|
+
- gzip, deflate
|
300
|
+
User-Agent:
|
301
|
+
- Ruby
|
302
|
+
response:
|
303
|
+
status:
|
304
|
+
code: 200
|
305
|
+
message: OK
|
306
|
+
headers:
|
307
|
+
Server:
|
308
|
+
- Apache-Coyote/1.1
|
309
|
+
X-Content-Type-Options:
|
310
|
+
- nosniff
|
311
|
+
Content-Type:
|
312
|
+
- application/json;charset=utf-8
|
313
|
+
Content-Length:
|
314
|
+
- '335'
|
315
|
+
Date:
|
316
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
317
|
+
body:
|
318
|
+
encoding: US-ASCII
|
319
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/name","name":"name","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"}}'
|
320
|
+
http_version:
|
321
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
322
|
+
- request:
|
323
|
+
method: get
|
324
|
+
uri: http://localhost:8080/api
|
325
|
+
body:
|
326
|
+
encoding: US-ASCII
|
327
|
+
string: ''
|
328
|
+
headers:
|
329
|
+
Accept:
|
330
|
+
- application/json
|
331
|
+
Accept-Encoding:
|
332
|
+
- gzip, deflate
|
333
|
+
User-Agent:
|
334
|
+
- Ruby
|
335
|
+
response:
|
336
|
+
status:
|
337
|
+
code: 200
|
338
|
+
message: OK
|
339
|
+
headers:
|
340
|
+
Server:
|
341
|
+
- Apache-Coyote/1.1
|
342
|
+
X-Content-Type-Options:
|
343
|
+
- nosniff
|
344
|
+
Content-Type:
|
345
|
+
- application/json;charset=utf-8
|
346
|
+
Content-Length:
|
347
|
+
- '4982'
|
348
|
+
Date:
|
349
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
350
|
+
body:
|
351
|
+
encoding: US-ASCII
|
352
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8080/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-113-g8b33d83-dirty"}}'
|
353
|
+
http_version:
|
354
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
355
|
+
- request:
|
356
|
+
method: get
|
357
|
+
uri: http://localhost:8080/api/commands/create-broker
|
358
|
+
body:
|
359
|
+
encoding: US-ASCII
|
360
|
+
string: ''
|
361
|
+
headers:
|
362
|
+
Accept:
|
363
|
+
- application/json
|
364
|
+
Accept-Encoding:
|
365
|
+
- gzip, deflate
|
366
|
+
User-Agent:
|
367
|
+
- Ruby
|
368
|
+
response:
|
369
|
+
status:
|
370
|
+
code: 200
|
371
|
+
message: OK
|
372
|
+
headers:
|
373
|
+
Server:
|
374
|
+
- Apache-Coyote/1.1
|
375
|
+
Etag:
|
376
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
377
|
+
X-Content-Type-Options:
|
378
|
+
- nosniff
|
379
|
+
Content-Type:
|
380
|
+
- application/json;charset=utf-8
|
381
|
+
Content-Length:
|
382
|
+
- '2496'
|
383
|
+
Date:
|
384
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
385
|
+
body:
|
386
|
+
encoding: US-ASCII
|
387
|
+
string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
|
388
|
+
configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
|
389
|
+
broker configuration. Brokers are responsible for handing a node\noff to
|
390
|
+
a config management system, such as Puppet or Chef. In cases where you\nhave
|
391
|
+
no configuration management system, you can use the `noop` broker.\n\n\n#
|
392
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
|
393
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
394
|
+
name of the object being modified, or some other critical detail, these\nallow
|
395
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
396
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
397
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
398
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
399
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
400
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
401
|
+
Attributes\n\n * name\n - The name of the broker, as it will be referenced
|
402
|
+
within Razor.\n This is the name that you supply to, eg, `create-policy`
|
403
|
+
to specify\n which broker the node will be handed off via after installation.\n -
|
404
|
+
This attribute is required\n - It must be of type string.\n - It must
|
405
|
+
be between 1 and 250 in length.\n\n * broker-type\n - The broker type that
|
406
|
+
this broker is created from. The available\n broker types on your server
|
407
|
+
are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
|
408
|
+
attribute is required\n - It must be of type string.\n - It must match
|
409
|
+
the name of an existing broker type.\n\n * configuration\n - The configuration
|
410
|
+
for the broker. The acceptable values here are\n determined by the `broker-type`
|
411
|
+
selected. In general this has\n settings like which server to contact,
|
412
|
+
and other configuration\n related to handing on the newly installed system
|
413
|
+
to the final\n configuration management system.\n - It must be of type
|
414
|
+
object.\n \n \n\n\n\n# EXAMPLES\n Creating a simple Puppet broker:\n \n {\n \"name\":
|
415
|
+
\"puppet\",\n \"configuration\": {\n \"server\": \"puppet.example.org\",\n \"environment\":
|
416
|
+
\"production\"\n },\n \"broker-type\": \"puppet\"\n }\n\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
|
417
|
+
http_version:
|
418
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
419
|
+
- request:
|
420
|
+
method: get
|
421
|
+
uri: http://localhost:8080/api/commands/create-broker
|
422
|
+
body:
|
423
|
+
encoding: US-ASCII
|
424
|
+
string: ''
|
425
|
+
headers:
|
426
|
+
Accept:
|
427
|
+
- application/json
|
428
|
+
Accept-Encoding:
|
429
|
+
- gzip, deflate
|
430
|
+
User-Agent:
|
431
|
+
- Ruby
|
432
|
+
response:
|
433
|
+
status:
|
434
|
+
code: 200
|
435
|
+
message: OK
|
436
|
+
headers:
|
437
|
+
Server:
|
438
|
+
- Apache-Coyote/1.1
|
439
|
+
Etag:
|
440
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
441
|
+
X-Content-Type-Options:
|
442
|
+
- nosniff
|
443
|
+
Content-Type:
|
444
|
+
- application/json;charset=utf-8
|
445
|
+
Content-Length:
|
446
|
+
- '2496'
|
447
|
+
Date:
|
448
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
449
|
+
body:
|
450
|
+
encoding: US-ASCII
|
451
|
+
string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
|
452
|
+
configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
|
453
|
+
broker configuration. Brokers are responsible for handing a node\noff to
|
454
|
+
a config management system, such as Puppet or Chef. In cases where you\nhave
|
455
|
+
no configuration management system, you can use the `noop` broker.\n\n\n#
|
456
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
|
457
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
458
|
+
name of the object being modified, or some other critical detail, these\nallow
|
459
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
460
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
461
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
462
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
463
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
464
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
465
|
+
Attributes\n\n * name\n - The name of the broker, as it will be referenced
|
466
|
+
within Razor.\n This is the name that you supply to, eg, `create-policy`
|
467
|
+
to specify\n which broker the node will be handed off via after installation.\n -
|
468
|
+
This attribute is required\n - It must be of type string.\n - It must
|
469
|
+
be between 1 and 250 in length.\n\n * broker-type\n - The broker type that
|
470
|
+
this broker is created from. The available\n broker types on your server
|
471
|
+
are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
|
472
|
+
attribute is required\n - It must be of type string.\n - It must match
|
473
|
+
the name of an existing broker type.\n\n * configuration\n - The configuration
|
474
|
+
for the broker. The acceptable values here are\n determined by the `broker-type`
|
475
|
+
selected. In general this has\n settings like which server to contact,
|
476
|
+
and other configuration\n related to handing on the newly installed system
|
477
|
+
to the final\n configuration management system.\n - It must be of type
|
478
|
+
object.\n \n \n\n\n\n# EXAMPLES\n Creating a simple Puppet broker:\n \n {\n \"name\":
|
479
|
+
\"puppet\",\n \"configuration\": {\n \"server\": \"puppet.example.org\",\n \"environment\":
|
480
|
+
\"production\"\n },\n \"broker-type\": \"puppet\"\n }\n\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
|
481
|
+
http_version:
|
482
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
483
|
+
- request:
|
484
|
+
method: get
|
485
|
+
uri: http://localhost:8080/api/commands/create-broker
|
486
|
+
body:
|
487
|
+
encoding: US-ASCII
|
488
|
+
string: ''
|
489
|
+
headers:
|
490
|
+
Accept:
|
491
|
+
- application/json
|
492
|
+
Accept-Encoding:
|
493
|
+
- gzip, deflate
|
494
|
+
User-Agent:
|
495
|
+
- Ruby
|
496
|
+
response:
|
497
|
+
status:
|
498
|
+
code: 200
|
499
|
+
message: OK
|
500
|
+
headers:
|
501
|
+
Server:
|
502
|
+
- Apache-Coyote/1.1
|
503
|
+
Etag:
|
504
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
505
|
+
X-Content-Type-Options:
|
506
|
+
- nosniff
|
507
|
+
Content-Type:
|
508
|
+
- application/json;charset=utf-8
|
509
|
+
Content-Length:
|
510
|
+
- '2496'
|
511
|
+
Date:
|
512
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
513
|
+
body:
|
514
|
+
encoding: US-ASCII
|
515
|
+
string: '{"name":"create-broker","help":{"full":"# SYNOPSIS\nCreate a new broker
|
516
|
+
configuration for hand-off of installed nodes\n\n# DESCRIPTION\nCreate a new
|
517
|
+
broker configuration. Brokers are responsible for handing a node\noff to
|
518
|
+
a config management system, such as Puppet or Chef. In cases where you\nhave
|
519
|
+
no configuration management system, you can use the `noop` broker.\n\n\n#
|
520
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-broker:%{name}`\n\nWords
|
521
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
522
|
+
name of the object being modified, or some other critical detail, these\nallow
|
523
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
524
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
525
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
526
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
527
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
528
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
529
|
+
Attributes\n\n * name\n - The name of the broker, as it will be referenced
|
530
|
+
within Razor.\n This is the name that you supply to, eg, `create-policy`
|
531
|
+
to specify\n which broker the node will be handed off via after installation.\n -
|
532
|
+
This attribute is required\n - It must be of type string.\n - It must
|
533
|
+
be between 1 and 250 in length.\n\n * broker-type\n - The broker type that
|
534
|
+
this broker is created from. The available\n broker types on your server
|
535
|
+
are:\n - chef\n - noop\n - puppet-pe\n - puppet\n - This
|
536
|
+
attribute is required\n - It must be of type string.\n - It must match
|
537
|
+
the name of an existing broker type.\n\n * configuration\n - The configuration
|
538
|
+
for the broker. The acceptable values here are\n determined by the `broker-type`
|
539
|
+
selected. In general this has\n settings like which server to contact,
|
540
|
+
and other configuration\n related to handing on the newly installed system
|
541
|
+
to the final\n configuration management system.\n - It must be of type
|
542
|
+
object.\n \n \n\n\n\n# EXAMPLES\n Creating a simple Puppet broker:\n \n {\n \"name\":
|
543
|
+
\"puppet\",\n \"configuration\": {\n \"server\": \"puppet.example.org\",\n \"environment\":
|
544
|
+
\"production\"\n },\n \"broker-type\": \"puppet\"\n }\n\n"},"schema":{"name":{"type":"string"},"broker-type":{"type":"string"},"configuration":{"type":"object"}}}'
|
545
|
+
http_version:
|
546
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
547
|
+
- request:
|
548
|
+
method: post
|
549
|
+
uri: http://localhost:8080/api/commands/create-broker
|
550
|
+
body:
|
551
|
+
encoding: UTF-8
|
552
|
+
string: '{"name":"puppet","configuration":{"server":"puppet.example.org","environment":"production"},"broker-type":"puppet"}'
|
553
|
+
headers:
|
554
|
+
Accept:
|
555
|
+
- application/json
|
556
|
+
Accept-Encoding:
|
557
|
+
- gzip, deflate
|
558
|
+
Content-Type:
|
559
|
+
- application/json
|
560
|
+
Content-Length:
|
561
|
+
- '115'
|
562
|
+
User-Agent:
|
563
|
+
- Ruby
|
564
|
+
response:
|
565
|
+
status:
|
566
|
+
code: 202
|
567
|
+
message: Accepted
|
568
|
+
headers:
|
569
|
+
Server:
|
570
|
+
- Apache-Coyote/1.1
|
571
|
+
X-Content-Type-Options:
|
572
|
+
- nosniff
|
573
|
+
Content-Type:
|
574
|
+
- application/json;charset=utf-8
|
575
|
+
Content-Length:
|
576
|
+
- '209'
|
577
|
+
Date:
|
578
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
579
|
+
body:
|
580
|
+
encoding: US-ASCII
|
581
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8080/api/collections/brokers/puppet","name":"puppet","command":"http://localhost:8080/api/collections/commands/2"}'
|
582
|
+
http_version:
|
583
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
584
|
+
- request:
|
585
|
+
method: get
|
586
|
+
uri: http://localhost:8080/api/collections/brokers/puppet
|
587
|
+
body:
|
588
|
+
encoding: US-ASCII
|
589
|
+
string: ''
|
590
|
+
headers:
|
591
|
+
Accept:
|
592
|
+
- application/json
|
593
|
+
Accept-Encoding:
|
594
|
+
- gzip, deflate
|
595
|
+
User-Agent:
|
596
|
+
- Ruby
|
597
|
+
response:
|
598
|
+
status:
|
599
|
+
code: 200
|
600
|
+
message: OK
|
601
|
+
headers:
|
602
|
+
Server:
|
603
|
+
- Apache-Coyote/1.1
|
604
|
+
X-Content-Type-Options:
|
605
|
+
- nosniff
|
606
|
+
Content-Type:
|
607
|
+
- application/json;charset=utf-8
|
608
|
+
Content-Length:
|
609
|
+
- '356'
|
610
|
+
Date:
|
611
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
612
|
+
body:
|
613
|
+
encoding: US-ASCII
|
614
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8080/api/collections/brokers/puppet","name":"puppet","configuration":{"server":"puppet.example.org","environment":"production"},"broker-type":"puppet","policies":{"id":"http://localhost:8080/api/collections/brokers/puppet/policies","count":0,"name":"policies"}}'
|
615
|
+
http_version:
|
616
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
617
|
+
- request:
|
618
|
+
method: get
|
619
|
+
uri: http://localhost:8080/api
|
620
|
+
body:
|
621
|
+
encoding: US-ASCII
|
622
|
+
string: ''
|
623
|
+
headers:
|
624
|
+
Accept:
|
625
|
+
- application/json
|
626
|
+
Accept-Encoding:
|
627
|
+
- gzip, deflate
|
628
|
+
User-Agent:
|
629
|
+
- Ruby
|
630
|
+
response:
|
631
|
+
status:
|
632
|
+
code: 200
|
633
|
+
message: OK
|
634
|
+
headers:
|
635
|
+
Server:
|
636
|
+
- Apache-Coyote/1.1
|
637
|
+
X-Content-Type-Options:
|
638
|
+
- nosniff
|
639
|
+
Content-Type:
|
640
|
+
- application/json;charset=utf-8
|
641
|
+
Content-Length:
|
642
|
+
- '4982'
|
643
|
+
Date:
|
644
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
645
|
+
body:
|
646
|
+
encoding: US-ASCII
|
647
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8080/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-113-g8b33d83-dirty"}}'
|
648
|
+
http_version:
|
649
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
650
|
+
- request:
|
651
|
+
method: get
|
652
|
+
uri: http://localhost:8080/api/commands/create-tag
|
653
|
+
body:
|
654
|
+
encoding: US-ASCII
|
655
|
+
string: ''
|
656
|
+
headers:
|
657
|
+
Accept:
|
658
|
+
- application/json
|
659
|
+
Accept-Encoding:
|
660
|
+
- gzip, deflate
|
661
|
+
User-Agent:
|
662
|
+
- Ruby
|
663
|
+
response:
|
664
|
+
status:
|
665
|
+
code: 200
|
666
|
+
message: OK
|
667
|
+
headers:
|
668
|
+
Server:
|
669
|
+
- Apache-Coyote/1.1
|
670
|
+
Etag:
|
671
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
672
|
+
X-Content-Type-Options:
|
673
|
+
- nosniff
|
674
|
+
Content-Type:
|
675
|
+
- application/json;charset=utf-8
|
676
|
+
Content-Length:
|
677
|
+
- '2178'
|
678
|
+
Date:
|
679
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
680
|
+
body:
|
681
|
+
encoding: ASCII-8BIT
|
682
|
+
string: !binary |-
|
683
|
+
eyJuYW1lIjoiY3JlYXRlLXRhZyIsImhlbHAiOnsiZnVsbCI6IiMgU1lOT1BT
|
684
|
+
SVNcbkNyZWF0ZSBhIG5ldyB0YWdcblxuIyBERVNDUklQVElPTlxuQ3JlYXRl
|
685
|
+
IGEgbmV3IHRhZywgYW5kIHNldCB0aGUgcnVsZSBpdCB3aWxsIHVzZSB0byBt
|
686
|
+
YXRjaCBvbiBmYWN0cyBhbmQgbm9kZVxubWV0YWRhdGEuXG5cblxuIyBBY2Nl
|
687
|
+
c3MgQ29udHJvbFxuXG5UaGlzIGNvbW1hbmQncyBhY2Nlc3MgY29udHJvbCBw
|
688
|
+
YXR0ZXJuOiBgY29tbWFuZHM6Y3JlYXRlLXRhZzole25hbWV9YFxuXG5Xb3Jk
|
689
|
+
cyBzdXJyb3VuZGVkIGJ5IGAley4uLn1gIGFyZSBzdWJzdGl0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vcm0gYFtvcCBhcmcxIGFyZzIgLi4gYXJnbl1g
|
721
|
+
XG4gICB3aGVyZSBvcCBpcyBvbmUgb2YgdGhlIG9wZXJhdG9ycyBiZWxvdywg
|
722
|
+
YW5kIGFyZzEgdGhyb3VnaCBhcmduIGFyZSB0aGVcbiAgIGFyZ3VtZW50cyBm
|
723
|
+
b3IgdGhlIG9wZXJhdG9yLiBJZiB0aGV5IGFyZSBleHByZXNzaW9ucyB0aGVt
|
724
|
+
c2VsdmVzLCB0aGV5IHdpbGxcbiAgIGJlIGV2YWx1YXRlZCBiZWZvcmUgb3Ag
|
725
|
+
aXMgZXZhbHVhdGVkXG4gICAtIFRoaXMgYXR0cmlidXRlIGlzIHJlcXVpcmVk
|
726
|
+
XG4gICAtIEl0IG11c3QgYmUgb2YgdHlwZSBhcnJheS5cblxuXG5cbiMgRVhB
|
727
|
+
TVBMRVNcbiAgQ3JlYXRlIGEgc2ltcGxlIHRhZzpcbiAgXG4gIHtcbiAgICBc
|
728
|
+
Im5hbWVcIjogXCJzbWFsbFwiLFxuICAgIFwicnVsZVwiOiBbXCI9XCIsIFtc
|
729
|
+
ImZhY3RcIiwgXCJwcm9jZXNzb3Jjb3VudFwiXSwgXCIyXCJdXG4gIH1cblxu
|
730
|
+
In0sInNjaGVtYSI6eyJuYW1lIjp7InR5cGUiOiJzdHJpbmcifSwicnVsZSI6
|
731
|
+
eyJ0eXBlIjoiYXJyYXkifX19
|
732
|
+
http_version:
|
733
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
734
|
+
- request:
|
735
|
+
method: get
|
736
|
+
uri: http://localhost:8080/api/commands/create-tag
|
737
|
+
body:
|
738
|
+
encoding: US-ASCII
|
739
|
+
string: ''
|
740
|
+
headers:
|
741
|
+
Accept:
|
742
|
+
- application/json
|
743
|
+
Accept-Encoding:
|
744
|
+
- gzip, deflate
|
745
|
+
User-Agent:
|
746
|
+
- Ruby
|
747
|
+
response:
|
748
|
+
status:
|
749
|
+
code: 200
|
750
|
+
message: OK
|
751
|
+
headers:
|
752
|
+
Server:
|
753
|
+
- Apache-Coyote/1.1
|
754
|
+
Etag:
|
755
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
756
|
+
X-Content-Type-Options:
|
757
|
+
- nosniff
|
758
|
+
Content-Type:
|
759
|
+
- application/json;charset=utf-8
|
760
|
+
Content-Length:
|
761
|
+
- '2178'
|
762
|
+
Date:
|
763
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
764
|
+
body:
|
765
|
+
encoding: ASCII-8BIT
|
766
|
+
string: !binary |-
|
767
|
+
eyJuYW1lIjoiY3JlYXRlLXRhZyIsImhlbHAiOnsiZnVsbCI6IiMgU1lOT1BT
|
768
|
+
SVNcbkNyZWF0ZSBhIG5ldyB0YWdcblxuIyBERVNDUklQVElPTlxuQ3JlYXRl
|
769
|
+
IGEgbmV3IHRhZywgYW5kIHNldCB0aGUgcnVsZSBpdCB3aWxsIHVzZSB0byBt
|
770
|
+
YXRjaCBvbiBmYWN0cyBhbmQgbm9kZVxubWV0YWRhdGEuXG5cblxuIyBBY2Nl
|
771
|
+
c3MgQ29udHJvbFxuXG5UaGlzIGNvbW1hbmQncyBhY2Nlc3MgY29udHJvbCBw
|
772
|
+
YXR0ZXJuOiBgY29tbWFuZHM6Y3JlYXRlLXRhZzole25hbWV9YFxuXG5Xb3Jk
|
773
|
+
cyBzdXJyb3VuZGVkIGJ5IGAley4uLn1gIGFyZSBzdWJzdGl0dXRpb25zIGZy
|
774
|
+
b20gdGhlIGlucHV0IGRhdGE6IHR5cGljYWxseVxudGhlIG5hbWUgb2YgdGhl
|
775
|
+
IG9iamVjdCBiZWluZyBtb2RpZmllZCwgb3Igc29tZSBvdGhlciBjcml0aWNh
|
776
|
+
bCBkZXRhaWwsIHRoZXNlXG5hbGxvdyByb2xlcyB0byBiZSBncmFudGVkIHBh
|
777
|
+
cnRpYWwgYWNjZXNzIHRvIG1vZGlmeSB0aGUgc3lzdGVtLlxuXG5G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HdpbGxcbiAgIGJlIGV2YWx1YXRlZCBiZWZvcmUgb3Ag
|
809
|
+
aXMgZXZhbHVhdGVkXG4gICAtIFRoaXMgYXR0cmlidXRlIGlzIHJlcXVpcmVk
|
810
|
+
XG4gICAtIEl0IG11c3QgYmUgb2YgdHlwZSBhcnJheS5cblxuXG5cbiMgRVhB
|
811
|
+
TVBMRVNcbiAgQ3JlYXRlIGEgc2ltcGxlIHRhZzpcbiAgXG4gIHtcbiAgICBc
|
812
|
+
Im5hbWVcIjogXCJzbWFsbFwiLFxuICAgIFwicnVsZVwiOiBbXCI9XCIsIFtc
|
813
|
+
ImZhY3RcIiwgXCJwcm9jZXNzb3Jjb3VudFwiXSwgXCIyXCJdXG4gIH1cblxu
|
814
|
+
In0sInNjaGVtYSI6eyJuYW1lIjp7InR5cGUiOiJzdHJpbmcifSwicnVsZSI6
|
815
|
+
eyJ0eXBlIjoiYXJyYXkifX19
|
816
|
+
http_version:
|
817
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
818
|
+
- request:
|
819
|
+
method: post
|
820
|
+
uri: http://localhost:8080/api/commands/create-tag
|
821
|
+
body:
|
822
|
+
encoding: UTF-8
|
823
|
+
string: '{"name":"tag1","rule":["=",["fact","processorcount"],"1"]}'
|
824
|
+
headers:
|
825
|
+
Accept:
|
826
|
+
- application/json
|
827
|
+
Accept-Encoding:
|
828
|
+
- gzip, deflate
|
829
|
+
Content-Type:
|
830
|
+
- application/json
|
831
|
+
Content-Length:
|
832
|
+
- '58'
|
833
|
+
User-Agent:
|
834
|
+
- Ruby
|
835
|
+
response:
|
836
|
+
status:
|
837
|
+
code: 202
|
838
|
+
message: Accepted
|
839
|
+
headers:
|
840
|
+
Server:
|
841
|
+
- Apache-Coyote/1.1
|
842
|
+
X-Content-Type-Options:
|
843
|
+
- nosniff
|
844
|
+
Content-Type:
|
845
|
+
- application/json;charset=utf-8
|
846
|
+
Content-Length:
|
847
|
+
- '199'
|
848
|
+
Date:
|
849
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
850
|
+
body:
|
851
|
+
encoding: US-ASCII
|
852
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/tags/member","id":"http://localhost:8080/api/collections/tags/tag1","name":"tag1","command":"http://localhost:8080/api/collections/commands/3"}'
|
853
|
+
http_version:
|
854
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
855
|
+
- request:
|
856
|
+
method: get
|
857
|
+
uri: http://localhost:8080/api/collections/tags/tag1
|
858
|
+
body:
|
859
|
+
encoding: US-ASCII
|
860
|
+
string: ''
|
861
|
+
headers:
|
862
|
+
Accept:
|
863
|
+
- application/json
|
864
|
+
Accept-Encoding:
|
865
|
+
- gzip, deflate
|
866
|
+
User-Agent:
|
867
|
+
- Ruby
|
868
|
+
response:
|
869
|
+
status:
|
870
|
+
code: 200
|
871
|
+
message: OK
|
872
|
+
headers:
|
873
|
+
Server:
|
874
|
+
- Apache-Coyote/1.1
|
875
|
+
X-Content-Type-Options:
|
876
|
+
- nosniff
|
877
|
+
Content-Type:
|
878
|
+
- application/json;charset=utf-8
|
879
|
+
Content-Length:
|
880
|
+
- '382'
|
881
|
+
Date:
|
882
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
883
|
+
body:
|
884
|
+
encoding: US-ASCII
|
885
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/tags/member","id":"http://localhost:8080/api/collections/tags/tag1","name":"tag1","rule":["=",["fact","processorcount"],"1"],"nodes":{"id":"http://localhost:8080/api/collections/tags/tag1/nodes","count":0,"name":"nodes"},"policies":{"id":"http://localhost:8080/api/collections/tags/tag1/policies","count":0,"name":"policies"}}'
|
886
|
+
http_version:
|
887
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
888
|
+
- request:
|
889
|
+
method: get
|
890
|
+
uri: http://localhost:8080/api
|
891
|
+
body:
|
892
|
+
encoding: US-ASCII
|
893
|
+
string: ''
|
894
|
+
headers:
|
895
|
+
Accept:
|
896
|
+
- application/json
|
897
|
+
Accept-Encoding:
|
898
|
+
- gzip, deflate
|
899
|
+
User-Agent:
|
900
|
+
- Ruby
|
901
|
+
response:
|
902
|
+
status:
|
903
|
+
code: 200
|
904
|
+
message: OK
|
905
|
+
headers:
|
906
|
+
Server:
|
907
|
+
- Apache-Coyote/1.1
|
908
|
+
X-Content-Type-Options:
|
909
|
+
- nosniff
|
910
|
+
Content-Type:
|
911
|
+
- application/json;charset=utf-8
|
912
|
+
Content-Length:
|
913
|
+
- '4982'
|
914
|
+
Date:
|
915
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
916
|
+
body:
|
917
|
+
encoding: US-ASCII
|
918
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8080/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-113-g8b33d83-dirty"}}'
|
919
|
+
http_version:
|
920
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
921
|
+
- request:
|
922
|
+
method: get
|
923
|
+
uri: http://localhost:8080/api/commands/create-tag
|
924
|
+
body:
|
925
|
+
encoding: US-ASCII
|
926
|
+
string: ''
|
927
|
+
headers:
|
928
|
+
Accept:
|
929
|
+
- application/json
|
930
|
+
Accept-Encoding:
|
931
|
+
- gzip, deflate
|
932
|
+
User-Agent:
|
933
|
+
- Ruby
|
934
|
+
response:
|
935
|
+
status:
|
936
|
+
code: 200
|
937
|
+
message: OK
|
938
|
+
headers:
|
939
|
+
Server:
|
940
|
+
- Apache-Coyote/1.1
|
941
|
+
Etag:
|
942
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
943
|
+
X-Content-Type-Options:
|
944
|
+
- nosniff
|
945
|
+
Content-Type:
|
946
|
+
- application/json;charset=utf-8
|
947
|
+
Content-Length:
|
948
|
+
- '2178'
|
949
|
+
Date:
|
950
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
951
|
+
body:
|
952
|
+
encoding: ASCII-8BIT
|
953
|
+
string: !binary |-
|
954
|
+
eyJuYW1lIjoiY3JlYXRlLXRhZyIsImhlbHAiOnsiZnVsbCI6IiMgU1lOT1BT
|
955
|
+
SVNcbkNyZWF0ZSBhIG5ldyB0YWdcblxuIyBERVNDUklQVElPTlxuQ3JlYXRl
|
956
|
+
IGEgbmV3IHRhZywgYW5kIHNldCB0aGUgcnVsZSBpdCB3aWxsIHVzZSB0byBt
|
957
|
+
YXRjaCBvbiBmYWN0cyBhbmQgbm9kZVxubWV0YWRhdGEuXG5cblxuIyBBY2Nl
|
958
|
+
c3MgQ29udHJvbFxuXG5UaGlzIGNvbW1hbmQncyBhY2Nlc3MgY29udHJvbCBw
|
959
|
+
YXR0ZXJuOiBgY29tbWFuZHM6Y3JlYXRlLXRhZzole25hbWV9YFxuXG5Xb3Jk
|
960
|
+
cyBzdXJyb3VuZGVkIGJ5IGAley4uLn1gIGFyZSBzdWJzdGl0dXRpb25zIGZy
|
961
|
+
b20gdGhlIGlucHV0IGRhdGE6IHR5cGljYWxseVxudGhlIG5hbWUgb2YgdGhl
|
962
|
+
IG9iamVjdCBiZWluZyBtb2RpZmllZCwgb3Igc29tZSBvdGhlciBjcml0aWNh
|
963
|
+
bCBkZXRhaWwsIHRoZXNlXG5hbGxvdyByb2xlcyB0byBiZSBncmFudGVkIHBh
|
964
|
+
cnRpYWwgYWNjZXNzIHRvIG1vZGlmeSB0aGUgc3lzdGVtLlxuXG5Gb3IgbW9y
|
965
|
+
ZSBkZXRhaWwgb24gaG93IHRoZSBwZXJtaXNzaW9uIHN0cmluZ3MgYXJlIHN0
|
966
|
+
cnVjdHVyZWQgYW5kIHdvcmssIHlvdSBjYW5cbnNlZSB0aGUgW1NoaXJvIFBl
|
967
|
+
cm1pc3Np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blxuXG5cbiMgRVhB
|
998
|
+
TVBMRVNcbiAgQ3JlYXRlIGEgc2ltcGxlIHRhZzpcbiAgXG4gIHtcbiAgICBc
|
999
|
+
Im5hbWVcIjogXCJzbWFsbFwiLFxuICAgIFwicnVsZVwiOiBbXCI9XCIsIFtc
|
1000
|
+
ImZhY3RcIiwgXCJwcm9jZXNzb3Jjb3VudFwiXSwgXCIyXCJdXG4gIH1cblxu
|
1001
|
+
In0sInNjaGVtYSI6eyJuYW1lIjp7InR5cGUiOiJzdHJpbmcifSwicnVsZSI6
|
1002
|
+
eyJ0eXBlIjoiYXJyYXkifX19
|
1003
|
+
http_version:
|
1004
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
1005
|
+
- request:
|
1006
|
+
method: get
|
1007
|
+
uri: http://localhost:8080/api/commands/create-tag
|
1008
|
+
body:
|
1009
|
+
encoding: US-ASCII
|
1010
|
+
string: ''
|
1011
|
+
headers:
|
1012
|
+
Accept:
|
1013
|
+
- application/json
|
1014
|
+
Accept-Encoding:
|
1015
|
+
- gzip, deflate
|
1016
|
+
User-Agent:
|
1017
|
+
- Ruby
|
1018
|
+
response:
|
1019
|
+
status:
|
1020
|
+
code: 200
|
1021
|
+
message: OK
|
1022
|
+
headers:
|
1023
|
+
Server:
|
1024
|
+
- Apache-Coyote/1.1
|
1025
|
+
Etag:
|
1026
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1027
|
+
X-Content-Type-Options:
|
1028
|
+
- nosniff
|
1029
|
+
Content-Type:
|
1030
|
+
- application/json;charset=utf-8
|
1031
|
+
Content-Length:
|
1032
|
+
- '2178'
|
1033
|
+
Date:
|
1034
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1035
|
+
body:
|
1036
|
+
encoding: ASCII-8BIT
|
1037
|
+
string: !binary |-
|
1038
|
+
eyJuYW1lIjoiY3JlYXRlLXRhZyIsImhlbHAiOnsiZnVsbCI6IiMgU1lOT1BT
|
1039
|
+
SVNcbkNyZW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XNzb3Jjb3VudFwiXSwgXCIyXCJdXG4gIH1cblxu
|
1085
|
+
In0sInNjaGVtYSI6eyJuYW1lIjp7InR5cGUiOiJzdHJpbmcifSwicnVsZSI6
|
1086
|
+
eyJ0eXBlIjoiYXJyYXkifX19
|
1087
|
+
http_version:
|
1088
|
+
recorded_at: Fri, 16 May 2014 22:18:22 GMT
|
1089
|
+
- request:
|
1090
|
+
method: post
|
1091
|
+
uri: http://localhost:8080/api/commands/create-tag
|
1092
|
+
body:
|
1093
|
+
encoding: UTF-8
|
1094
|
+
string: '{"name":"tag2","rule":["=",["fact","processorcount"],"2"]}'
|
1095
|
+
headers:
|
1096
|
+
Accept:
|
1097
|
+
- application/json
|
1098
|
+
Accept-Encoding:
|
1099
|
+
- gzip, deflate
|
1100
|
+
Content-Type:
|
1101
|
+
- application/json
|
1102
|
+
Content-Length:
|
1103
|
+
- '58'
|
1104
|
+
User-Agent:
|
1105
|
+
- Ruby
|
1106
|
+
response:
|
1107
|
+
status:
|
1108
|
+
code: 202
|
1109
|
+
message: Accepted
|
1110
|
+
headers:
|
1111
|
+
Server:
|
1112
|
+
- Apache-Coyote/1.1
|
1113
|
+
X-Content-Type-Options:
|
1114
|
+
- nosniff
|
1115
|
+
Content-Type:
|
1116
|
+
- application/json;charset=utf-8
|
1117
|
+
Content-Length:
|
1118
|
+
- '199'
|
1119
|
+
Date:
|
1120
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1121
|
+
body:
|
1122
|
+
encoding: US-ASCII
|
1123
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/tags/member","id":"http://localhost:8080/api/collections/tags/tag2","name":"tag2","command":"http://localhost:8080/api/collections/commands/4"}'
|
1124
|
+
http_version:
|
1125
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1126
|
+
- request:
|
1127
|
+
method: get
|
1128
|
+
uri: http://localhost:8080/api/collections/tags/tag2
|
1129
|
+
body:
|
1130
|
+
encoding: US-ASCII
|
1131
|
+
string: ''
|
1132
|
+
headers:
|
1133
|
+
Accept:
|
1134
|
+
- application/json
|
1135
|
+
Accept-Encoding:
|
1136
|
+
- gzip, deflate
|
1137
|
+
User-Agent:
|
1138
|
+
- Ruby
|
1139
|
+
response:
|
1140
|
+
status:
|
1141
|
+
code: 200
|
1142
|
+
message: OK
|
1143
|
+
headers:
|
1144
|
+
Server:
|
1145
|
+
- Apache-Coyote/1.1
|
1146
|
+
X-Content-Type-Options:
|
1147
|
+
- nosniff
|
1148
|
+
Content-Type:
|
1149
|
+
- application/json;charset=utf-8
|
1150
|
+
Content-Length:
|
1151
|
+
- '382'
|
1152
|
+
Date:
|
1153
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1154
|
+
body:
|
1155
|
+
encoding: US-ASCII
|
1156
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/tags/member","id":"http://localhost:8080/api/collections/tags/tag2","name":"tag2","rule":["=",["fact","processorcount"],"2"],"nodes":{"id":"http://localhost:8080/api/collections/tags/tag2/nodes","count":0,"name":"nodes"},"policies":{"id":"http://localhost:8080/api/collections/tags/tag2/policies","count":0,"name":"policies"}}'
|
1157
|
+
http_version:
|
1158
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1159
|
+
- request:
|
1160
|
+
method: get
|
1161
|
+
uri: http://localhost:8080/api
|
1162
|
+
body:
|
1163
|
+
encoding: US-ASCII
|
1164
|
+
string: ''
|
1165
|
+
headers:
|
1166
|
+
Accept:
|
1167
|
+
- application/json
|
1168
|
+
Accept-Encoding:
|
1169
|
+
- gzip, deflate
|
1170
|
+
User-Agent:
|
1171
|
+
- Ruby
|
1172
|
+
response:
|
1173
|
+
status:
|
1174
|
+
code: 200
|
1175
|
+
message: OK
|
1176
|
+
headers:
|
1177
|
+
Server:
|
1178
|
+
- Apache-Coyote/1.1
|
1179
|
+
X-Content-Type-Options:
|
1180
|
+
- nosniff
|
1181
|
+
Content-Type:
|
1182
|
+
- application/json;charset=utf-8
|
1183
|
+
Content-Length:
|
1184
|
+
- '4982'
|
1185
|
+
Date:
|
1186
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1187
|
+
body:
|
1188
|
+
encoding: US-ASCII
|
1189
|
+
string: '{"commands":[{"name":"add-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/add-policy-tag","id":"http://localhost:8080/api/commands/add-policy-tag"},{"name":"create-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/create-broker","id":"http://localhost:8080/api/commands/create-broker"},{"name":"create-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/create-policy","id":"http://localhost:8080/api/commands/create-policy"},{"name":"create-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/create-repo","id":"http://localhost:8080/api/commands/create-repo"},{"name":"create-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/create-tag","id":"http://localhost:8080/api/commands/create-tag"},{"name":"create-task","rel":"http://api.puppetlabs.com/razor/v1/commands/create-task","id":"http://localhost:8080/api/commands/create-task"},{"name":"delete-broker","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-broker","id":"http://localhost:8080/api/commands/delete-broker"},{"name":"delete-node","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-node","id":"http://localhost:8080/api/commands/delete-node"},{"name":"delete-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-policy","id":"http://localhost:8080/api/commands/delete-policy"},{"name":"delete-repo","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-repo","id":"http://localhost:8080/api/commands/delete-repo"},{"name":"delete-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/delete-tag","id":"http://localhost:8080/api/commands/delete-tag"},{"name":"disable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/disable-policy","id":"http://localhost:8080/api/commands/disable-policy"},{"name":"enable-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/enable-policy","id":"http://localhost:8080/api/commands/enable-policy"},{"name":"modify-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-node-metadata","id":"http://localhost:8080/api/commands/modify-node-metadata"},{"name":"modify-policy-max-count","rel":"http://api.puppetlabs.com/razor/v1/commands/modify-policy-max-count","id":"http://localhost:8080/api/commands/modify-policy-max-count"},{"name":"move-policy","rel":"http://api.puppetlabs.com/razor/v1/commands/move-policy","id":"http://localhost:8080/api/commands/move-policy"},{"name":"reboot-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reboot-node","id":"http://localhost:8080/api/commands/reboot-node"},{"name":"register-node","rel":"http://api.puppetlabs.com/razor/v1/commands/register-node","id":"http://localhost:8080/api/commands/register-node"},{"name":"reinstall-node","rel":"http://api.puppetlabs.com/razor/v1/commands/reinstall-node","id":"http://localhost:8080/api/commands/reinstall-node"},{"name":"remove-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-node-metadata","id":"http://localhost:8080/api/commands/remove-node-metadata"},{"name":"remove-policy-tag","rel":"http://api.puppetlabs.com/razor/v1/commands/remove-policy-tag","id":"http://localhost:8080/api/commands/remove-policy-tag"},{"name":"set-node-desired-power-state","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-desired-power-state","id":"http://localhost:8080/api/commands/set-node-desired-power-state"},{"name":"set-node-hw-info","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-hw-info","id":"http://localhost:8080/api/commands/set-node-hw-info"},{"name":"set-node-ipmi-credentials","rel":"http://api.puppetlabs.com/razor/v1/commands/set-node-ipmi-credentials","id":"http://localhost:8080/api/commands/set-node-ipmi-credentials"},{"name":"update-node-metadata","rel":"http://api.puppetlabs.com/razor/v1/commands/update-node-metadata","id":"http://localhost:8080/api/commands/update-node-metadata"},{"name":"update-tag-rule","rel":"http://api.puppetlabs.com/razor/v1/commands/update-tag-rule","id":"http://localhost:8080/api/commands/update-tag-rule"}],"collections":[{"name":"brokers","rel":"http://api.puppetlabs.com/razor/v1/collections/brokers","id":"http://localhost:8080/api/collections/brokers"},{"name":"repos","rel":"http://api.puppetlabs.com/razor/v1/collections/repos","id":"http://localhost:8080/api/collections/repos"},{"name":"tags","rel":"http://api.puppetlabs.com/razor/v1/collections/tags","id":"http://localhost:8080/api/collections/tags"},{"name":"policies","rel":"http://api.puppetlabs.com/razor/v1/collections/policies","id":"http://localhost:8080/api/collections/policies"},{"name":"nodes","rel":"http://api.puppetlabs.com/razor/v1/collections/nodes","id":"http://localhost:8080/api/collections/nodes"},{"name":"tasks","rel":"http://api.puppetlabs.com/razor/v1/collections/tasks","id":"http://localhost:8080/api/collections/tasks"},{"name":"commands","rel":"http://api.puppetlabs.com/razor/v1/collections/commands","id":"http://localhost:8080/api/collections/commands"}],"version":{"server":"v0.14.1-113-g8b33d83-dirty"}}'
|
1190
|
+
http_version:
|
1191
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1192
|
+
- request:
|
1193
|
+
method: get
|
1194
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1195
|
+
body:
|
1196
|
+
encoding: US-ASCII
|
1197
|
+
string: ''
|
1198
|
+
headers:
|
1199
|
+
Accept:
|
1200
|
+
- application/json
|
1201
|
+
Accept-Encoding:
|
1202
|
+
- gzip, deflate
|
1203
|
+
User-Agent:
|
1204
|
+
- Ruby
|
1205
|
+
response:
|
1206
|
+
status:
|
1207
|
+
code: 200
|
1208
|
+
message: OK
|
1209
|
+
headers:
|
1210
|
+
Server:
|
1211
|
+
- Apache-Coyote/1.1
|
1212
|
+
Etag:
|
1213
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1214
|
+
X-Content-Type-Options:
|
1215
|
+
- nosniff
|
1216
|
+
Content-Type:
|
1217
|
+
- application/json;charset=utf-8
|
1218
|
+
Content-Length:
|
1219
|
+
- '5306'
|
1220
|
+
Date:
|
1221
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1222
|
+
body:
|
1223
|
+
encoding: US-ASCII
|
1224
|
+
string: '{"name":"create-policy","help":{"full":"# SYNOPSIS\nCreate a new policy\n\n#
|
1225
|
+
DESCRIPTION\nPolicies tie together the rules, as tags, with the task and repo
|
1226
|
+
containing\nthe OS to install, and the broker for post-install configuration.\n\nThe
|
1227
|
+
overall list of policies is ordered, and policies are considered in that\norder.
|
1228
|
+
When a new policy is created, the entry `before` or `after` can be\nused to
|
1229
|
+
put the new policy into the table before or after another\npolicy. If neither
|
1230
|
+
`before` or `after` are specified, the policy is\nappended to the policy table.\n\n\n#
|
1231
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-policy:%{name}`\n\nWords
|
1232
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
1233
|
+
name of the object being modified, or some other critical detail, these\nallow
|
1234
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
1235
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
1236
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
1237
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
1238
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
1239
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
1240
|
+
Attributes\n\n * name\n - The name of the policy to create.\n - This attribute
|
1241
|
+
is required\n - It must be of type string.\n - It must be between 1 and
|
1242
|
+
Infinity in length.\n\n * hostname\n - The hostname pattern to use for newly
|
1243
|
+
installed nodes. This is filled\n in on a per-node basis, and then supplied
|
1244
|
+
to the task to be configured\n appropriately on the newly installed node.\n \n Substitutions
|
1245
|
+
are performed using `${...}` syntax, and the available\n substitution names
|
1246
|
+
on your server are:\n \n - id -- the internal node ID number\n - This
|
1247
|
+
attribute is required\n - It must be of type string.\n - It must be between
|
1248
|
+
1 and Infinity in length.\n\n * root-password\n - The root password for
|
1249
|
+
newly installed systems. This is passed directly\n to the individual task,
|
1250
|
+
rather than \"understood\" by the server, so the\n valid values are dependent
|
1251
|
+
on the individual task capabilities.\n - This attribute is required\n -
|
1252
|
+
It must be of type string.\n - It must be between 1 and Infinity in length.\n\n
|
1253
|
+
* enabled\n - Is this policy enabled when first created?\n - It must be
|
1254
|
+
of type boolean.\n\n * max-count\n - The maximum number of nodes that can
|
1255
|
+
bind to this policy.\n If omitted, the policy is ''unlimited'', and no maximum
|
1256
|
+
is applied.\n - It must be of type number.\n\n * before\n - The name of
|
1257
|
+
the policy to create this policy before in the policy list.\n - It must
|
1258
|
+
be of type string.\n - If present, after must not be present.\n - It must
|
1259
|
+
match the name of an existing policy.\n\n * after\n - The name of the policy
|
1260
|
+
to create this policy after in the policy list.\n - It must be of type string.\n -
|
1261
|
+
If present, before must not be present.\n - It must match the name of an
|
1262
|
+
existing policy.\n\n * tags\n - The array of names of tags that are used
|
1263
|
+
for matching nodes to this policy.\n \n When a node has all these tags
|
1264
|
+
matched on it, it will be a candidate\n for binding to this policy.\n -
|
1265
|
+
It must be of type array.\n \n - This value must be an array.\n -
|
1266
|
+
\n - This must be an array.\n - All elements must be of type string.\n -
|
1267
|
+
All elements must match the name of an existing tag.\n \n \n\n * repo\n -
|
1268
|
+
The name of the repository containing the OS to be installed by this policy.\n This
|
1269
|
+
should match the task assigned, or bad things will happen.\n - This attribute
|
1270
|
+
is required\n - It must be of type string.\n - It must match the name
|
1271
|
+
of an existing repo.\n\n * broker\n - The name of the broker to use when
|
1272
|
+
the node is fully installed, and is ready\n to hand off to the final configuration
|
1273
|
+
management system. If you have no\n ongoing configuration management, the
|
1274
|
+
supplied `noop` broker will do nothing.\n \n Please note that this is
|
1275
|
+
a broker created with the `create-broker` command,\n which is distinct from
|
1276
|
+
the broker types found on disk.\n - This attribute is required\n - It
|
1277
|
+
must be of type string.\n - It must match the name of an existing broker.\n\n
|
1278
|
+
* task\n - The name of the task used to install nodes that match this policy. This
|
1279
|
+
must\n match the selected repo, as it references files contained within
|
1280
|
+
that repository.\n - This attribute is required\n - It must be of type
|
1281
|
+
string.\n\n\n\n# EXAMPLES\n A sample policy installing CentOS 6.4:\n \n {\n \"name\": \"centos-for-small\",\n \"repo\": \"centos-6.4\",\n \"task\": \"centos\",\n \"broker\": \"noop\",\n \"enabled\": true,\n \"hostname\": \"host${id}.example.com\",\n \"root-password\":
|
1282
|
+
\"secret\",\n \"max-count\": 20,\n \"before\": \"other policy\",\n \"tags\": [\"small\"]\n }\n\n"},"schema":{"name":{"type":"string"},"hostname":{"type":"string"},"root-password":{"type":"string"},"enabled":{"type":"boolean"},"max-count":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"tags":{"type":"array"},"repo":{"type":"string"},"broker":{"type":"string"},"task":{"type":"string"}}}'
|
1283
|
+
http_version:
|
1284
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1285
|
+
- request:
|
1286
|
+
method: get
|
1287
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1288
|
+
body:
|
1289
|
+
encoding: US-ASCII
|
1290
|
+
string: ''
|
1291
|
+
headers:
|
1292
|
+
Accept:
|
1293
|
+
- application/json
|
1294
|
+
Accept-Encoding:
|
1295
|
+
- gzip, deflate
|
1296
|
+
User-Agent:
|
1297
|
+
- Ruby
|
1298
|
+
response:
|
1299
|
+
status:
|
1300
|
+
code: 200
|
1301
|
+
message: OK
|
1302
|
+
headers:
|
1303
|
+
Server:
|
1304
|
+
- Apache-Coyote/1.1
|
1305
|
+
Etag:
|
1306
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1307
|
+
X-Content-Type-Options:
|
1308
|
+
- nosniff
|
1309
|
+
Content-Type:
|
1310
|
+
- application/json;charset=utf-8
|
1311
|
+
Content-Length:
|
1312
|
+
- '5306'
|
1313
|
+
Date:
|
1314
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1315
|
+
body:
|
1316
|
+
encoding: US-ASCII
|
1317
|
+
string: '{"name":"create-policy","help":{"full":"# SYNOPSIS\nCreate a new policy\n\n#
|
1318
|
+
DESCRIPTION\nPolicies tie together the rules, as tags, with the task and repo
|
1319
|
+
containing\nthe OS to install, and the broker for post-install configuration.\n\nThe
|
1320
|
+
overall list of policies is ordered, and policies are considered in that\norder.
|
1321
|
+
When a new policy is created, the entry `before` or `after` can be\nused to
|
1322
|
+
put the new policy into the table before or after another\npolicy. If neither
|
1323
|
+
`before` or `after` are specified, the policy is\nappended to the policy table.\n\n\n#
|
1324
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-policy:%{name}`\n\nWords
|
1325
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
1326
|
+
name of the object being modified, or some other critical detail, these\nallow
|
1327
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
1328
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
1329
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
1330
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
1331
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
1332
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
1333
|
+
Attributes\n\n * name\n - The name of the policy to create.\n - This attribute
|
1334
|
+
is required\n - It must be of type string.\n - It must be between 1 and
|
1335
|
+
Infinity in length.\n\n * hostname\n - The hostname pattern to use for newly
|
1336
|
+
installed nodes. This is filled\n in on a per-node basis, and then supplied
|
1337
|
+
to the task to be configured\n appropriately on the newly installed node.\n \n Substitutions
|
1338
|
+
are performed using `${...}` syntax, and the available\n substitution names
|
1339
|
+
on your server are:\n \n - id -- the internal node ID number\n - This
|
1340
|
+
attribute is required\n - It must be of type string.\n - It must be between
|
1341
|
+
1 and Infinity in length.\n\n * root-password\n - The root password for
|
1342
|
+
newly installed systems. This is passed directly\n to the individual task,
|
1343
|
+
rather than \"understood\" by the server, so the\n valid values are dependent
|
1344
|
+
on the individual task capabilities.\n - This attribute is required\n -
|
1345
|
+
It must be of type string.\n - It must be between 1 and Infinity in length.\n\n
|
1346
|
+
* enabled\n - Is this policy enabled when first created?\n - It must be
|
1347
|
+
of type boolean.\n\n * max-count\n - The maximum number of nodes that can
|
1348
|
+
bind to this policy.\n If omitted, the policy is ''unlimited'', and no maximum
|
1349
|
+
is applied.\n - It must be of type number.\n\n * before\n - The name of
|
1350
|
+
the policy to create this policy before in the policy list.\n - It must
|
1351
|
+
be of type string.\n - If present, after must not be present.\n - It must
|
1352
|
+
match the name of an existing policy.\n\n * after\n - The name of the policy
|
1353
|
+
to create this policy after in the policy list.\n - It must be of type string.\n -
|
1354
|
+
If present, before must not be present.\n - It must match the name of an
|
1355
|
+
existing policy.\n\n * tags\n - The array of names of tags that are used
|
1356
|
+
for matching nodes to this policy.\n \n When a node has all these tags
|
1357
|
+
matched on it, it will be a candidate\n for binding to this policy.\n -
|
1358
|
+
It must be of type array.\n \n - This value must be an array.\n -
|
1359
|
+
\n - This must be an array.\n - All elements must be of type string.\n -
|
1360
|
+
All elements must match the name of an existing tag.\n \n \n\n * repo\n -
|
1361
|
+
The name of the repository containing the OS to be installed by this policy.\n This
|
1362
|
+
should match the task assigned, or bad things will happen.\n - This attribute
|
1363
|
+
is required\n - It must be of type string.\n - It must match the name
|
1364
|
+
of an existing repo.\n\n * broker\n - The name of the broker to use when
|
1365
|
+
the node is fully installed, and is ready\n to hand off to the final configuration
|
1366
|
+
management system. If you have no\n ongoing configuration management, the
|
1367
|
+
supplied `noop` broker will do nothing.\n \n Please note that this is
|
1368
|
+
a broker created with the `create-broker` command,\n which is distinct from
|
1369
|
+
the broker types found on disk.\n - This attribute is required\n - It
|
1370
|
+
must be of type string.\n - It must match the name of an existing broker.\n\n
|
1371
|
+
* task\n - The name of the task used to install nodes that match this policy. This
|
1372
|
+
must\n match the selected repo, as it references files contained within
|
1373
|
+
that repository.\n - This attribute is required\n - It must be of type
|
1374
|
+
string.\n\n\n\n# EXAMPLES\n A sample policy installing CentOS 6.4:\n \n {\n \"name\": \"centos-for-small\",\n \"repo\": \"centos-6.4\",\n \"task\": \"centos\",\n \"broker\": \"noop\",\n \"enabled\": true,\n \"hostname\": \"host${id}.example.com\",\n \"root-password\":
|
1375
|
+
\"secret\",\n \"max-count\": 20,\n \"before\": \"other policy\",\n \"tags\": [\"small\"]\n }\n\n"},"schema":{"name":{"type":"string"},"hostname":{"type":"string"},"root-password":{"type":"string"},"enabled":{"type":"boolean"},"max-count":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"tags":{"type":"array"},"repo":{"type":"string"},"broker":{"type":"string"},"task":{"type":"string"}}}'
|
1376
|
+
http_version:
|
1377
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1378
|
+
- request:
|
1379
|
+
method: get
|
1380
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1381
|
+
body:
|
1382
|
+
encoding: US-ASCII
|
1383
|
+
string: ''
|
1384
|
+
headers:
|
1385
|
+
Accept:
|
1386
|
+
- application/json
|
1387
|
+
Accept-Encoding:
|
1388
|
+
- gzip, deflate
|
1389
|
+
User-Agent:
|
1390
|
+
- Ruby
|
1391
|
+
response:
|
1392
|
+
status:
|
1393
|
+
code: 200
|
1394
|
+
message: OK
|
1395
|
+
headers:
|
1396
|
+
Server:
|
1397
|
+
- Apache-Coyote/1.1
|
1398
|
+
Etag:
|
1399
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1400
|
+
X-Content-Type-Options:
|
1401
|
+
- nosniff
|
1402
|
+
Content-Type:
|
1403
|
+
- application/json;charset=utf-8
|
1404
|
+
Content-Length:
|
1405
|
+
- '5306'
|
1406
|
+
Date:
|
1407
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1408
|
+
body:
|
1409
|
+
encoding: US-ASCII
|
1410
|
+
string: '{"name":"create-policy","help":{"full":"# SYNOPSIS\nCreate a new policy\n\n#
|
1411
|
+
DESCRIPTION\nPolicies tie together the rules, as tags, with the task and repo
|
1412
|
+
containing\nthe OS to install, and the broker for post-install configuration.\n\nThe
|
1413
|
+
overall list of policies is ordered, and policies are considered in that\norder.
|
1414
|
+
When a new policy is created, the entry `before` or `after` can be\nused to
|
1415
|
+
put the new policy into the table before or after another\npolicy. If neither
|
1416
|
+
`before` or `after` are specified, the policy is\nappended to the policy table.\n\n\n#
|
1417
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-policy:%{name}`\n\nWords
|
1418
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
1419
|
+
name of the object being modified, or some other critical detail, these\nallow
|
1420
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
1421
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
1422
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
1423
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
1424
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
1425
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
1426
|
+
Attributes\n\n * name\n - The name of the policy to create.\n - This attribute
|
1427
|
+
is required\n - It must be of type string.\n - It must be between 1 and
|
1428
|
+
Infinity in length.\n\n * hostname\n - The hostname pattern to use for newly
|
1429
|
+
installed nodes. This is filled\n in on a per-node basis, and then supplied
|
1430
|
+
to the task to be configured\n appropriately on the newly installed node.\n \n Substitutions
|
1431
|
+
are performed using `${...}` syntax, and the available\n substitution names
|
1432
|
+
on your server are:\n \n - id -- the internal node ID number\n - This
|
1433
|
+
attribute is required\n - It must be of type string.\n - It must be between
|
1434
|
+
1 and Infinity in length.\n\n * root-password\n - The root password for
|
1435
|
+
newly installed systems. This is passed directly\n to the individual task,
|
1436
|
+
rather than \"understood\" by the server, so the\n valid values are dependent
|
1437
|
+
on the individual task capabilities.\n - This attribute is required\n -
|
1438
|
+
It must be of type string.\n - It must be between 1 and Infinity in length.\n\n
|
1439
|
+
* enabled\n - Is this policy enabled when first created?\n - It must be
|
1440
|
+
of type boolean.\n\n * max-count\n - The maximum number of nodes that can
|
1441
|
+
bind to this policy.\n If omitted, the policy is ''unlimited'', and no maximum
|
1442
|
+
is applied.\n - It must be of type number.\n\n * before\n - The name of
|
1443
|
+
the policy to create this policy before in the policy list.\n - It must
|
1444
|
+
be of type string.\n - If present, after must not be present.\n - It must
|
1445
|
+
match the name of an existing policy.\n\n * after\n - The name of the policy
|
1446
|
+
to create this policy after in the policy list.\n - It must be of type string.\n -
|
1447
|
+
If present, before must not be present.\n - It must match the name of an
|
1448
|
+
existing policy.\n\n * tags\n - The array of names of tags that are used
|
1449
|
+
for matching nodes to this policy.\n \n When a node has all these tags
|
1450
|
+
matched on it, it will be a candidate\n for binding to this policy.\n -
|
1451
|
+
It must be of type array.\n \n - This value must be an array.\n -
|
1452
|
+
\n - This must be an array.\n - All elements must be of type string.\n -
|
1453
|
+
All elements must match the name of an existing tag.\n \n \n\n * repo\n -
|
1454
|
+
The name of the repository containing the OS to be installed by this policy.\n This
|
1455
|
+
should match the task assigned, or bad things will happen.\n - This attribute
|
1456
|
+
is required\n - It must be of type string.\n - It must match the name
|
1457
|
+
of an existing repo.\n\n * broker\n - The name of the broker to use when
|
1458
|
+
the node is fully installed, and is ready\n to hand off to the final configuration
|
1459
|
+
management system. If you have no\n ongoing configuration management, the
|
1460
|
+
supplied `noop` broker will do nothing.\n \n Please note that this is
|
1461
|
+
a broker created with the `create-broker` command,\n which is distinct from
|
1462
|
+
the broker types found on disk.\n - This attribute is required\n - It
|
1463
|
+
must be of type string.\n - It must match the name of an existing broker.\n\n
|
1464
|
+
* task\n - The name of the task used to install nodes that match this policy. This
|
1465
|
+
must\n match the selected repo, as it references files contained within
|
1466
|
+
that repository.\n - This attribute is required\n - It must be of type
|
1467
|
+
string.\n\n\n\n# EXAMPLES\n A sample policy installing CentOS 6.4:\n \n {\n \"name\": \"centos-for-small\",\n \"repo\": \"centos-6.4\",\n \"task\": \"centos\",\n \"broker\": \"noop\",\n \"enabled\": true,\n \"hostname\": \"host${id}.example.com\",\n \"root-password\":
|
1468
|
+
\"secret\",\n \"max-count\": 20,\n \"before\": \"other policy\",\n \"tags\": [\"small\"]\n }\n\n"},"schema":{"name":{"type":"string"},"hostname":{"type":"string"},"root-password":{"type":"string"},"enabled":{"type":"boolean"},"max-count":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"tags":{"type":"array"},"repo":{"type":"string"},"broker":{"type":"string"},"task":{"type":"string"}}}'
|
1469
|
+
http_version:
|
1470
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1471
|
+
- request:
|
1472
|
+
method: get
|
1473
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1474
|
+
body:
|
1475
|
+
encoding: US-ASCII
|
1476
|
+
string: ''
|
1477
|
+
headers:
|
1478
|
+
Accept:
|
1479
|
+
- application/json
|
1480
|
+
Accept-Encoding:
|
1481
|
+
- gzip, deflate
|
1482
|
+
User-Agent:
|
1483
|
+
- Ruby
|
1484
|
+
response:
|
1485
|
+
status:
|
1486
|
+
code: 200
|
1487
|
+
message: OK
|
1488
|
+
headers:
|
1489
|
+
Server:
|
1490
|
+
- Apache-Coyote/1.1
|
1491
|
+
Etag:
|
1492
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1493
|
+
X-Content-Type-Options:
|
1494
|
+
- nosniff
|
1495
|
+
Content-Type:
|
1496
|
+
- application/json;charset=utf-8
|
1497
|
+
Content-Length:
|
1498
|
+
- '5306'
|
1499
|
+
Date:
|
1500
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1501
|
+
body:
|
1502
|
+
encoding: US-ASCII
|
1503
|
+
string: '{"name":"create-policy","help":{"full":"# SYNOPSIS\nCreate a new policy\n\n#
|
1504
|
+
DESCRIPTION\nPolicies tie together the rules, as tags, with the task and repo
|
1505
|
+
containing\nthe OS to install, and the broker for post-install configuration.\n\nThe
|
1506
|
+
overall list of policies is ordered, and policies are considered in that\norder.
|
1507
|
+
When a new policy is created, the entry `before` or `after` can be\nused to
|
1508
|
+
put the new policy into the table before or after another\npolicy. If neither
|
1509
|
+
`before` or `after` are specified, the policy is\nappended to the policy table.\n\n\n#
|
1510
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-policy:%{name}`\n\nWords
|
1511
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
1512
|
+
name of the object being modified, or some other critical detail, these\nallow
|
1513
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
1514
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
1515
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
1516
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
1517
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
1518
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
1519
|
+
Attributes\n\n * name\n - The name of the policy to create.\n - This attribute
|
1520
|
+
is required\n - It must be of type string.\n - It must be between 1 and
|
1521
|
+
Infinity in length.\n\n * hostname\n - The hostname pattern to use for newly
|
1522
|
+
installed nodes. This is filled\n in on a per-node basis, and then supplied
|
1523
|
+
to the task to be configured\n appropriately on the newly installed node.\n \n Substitutions
|
1524
|
+
are performed using `${...}` syntax, and the available\n substitution names
|
1525
|
+
on your server are:\n \n - id -- the internal node ID number\n - This
|
1526
|
+
attribute is required\n - It must be of type string.\n - It must be between
|
1527
|
+
1 and Infinity in length.\n\n * root-password\n - The root password for
|
1528
|
+
newly installed systems. This is passed directly\n to the individual task,
|
1529
|
+
rather than \"understood\" by the server, so the\n valid values are dependent
|
1530
|
+
on the individual task capabilities.\n - This attribute is required\n -
|
1531
|
+
It must be of type string.\n - It must be between 1 and Infinity in length.\n\n
|
1532
|
+
* enabled\n - Is this policy enabled when first created?\n - It must be
|
1533
|
+
of type boolean.\n\n * max-count\n - The maximum number of nodes that can
|
1534
|
+
bind to this policy.\n If omitted, the policy is ''unlimited'', and no maximum
|
1535
|
+
is applied.\n - It must be of type number.\n\n * before\n - The name of
|
1536
|
+
the policy to create this policy before in the policy list.\n - It must
|
1537
|
+
be of type string.\n - If present, after must not be present.\n - It must
|
1538
|
+
match the name of an existing policy.\n\n * after\n - The name of the policy
|
1539
|
+
to create this policy after in the policy list.\n - It must be of type string.\n -
|
1540
|
+
If present, before must not be present.\n - It must match the name of an
|
1541
|
+
existing policy.\n\n * tags\n - The array of names of tags that are used
|
1542
|
+
for matching nodes to this policy.\n \n When a node has all these tags
|
1543
|
+
matched on it, it will be a candidate\n for binding to this policy.\n -
|
1544
|
+
It must be of type array.\n \n - This value must be an array.\n -
|
1545
|
+
\n - This must be an array.\n - All elements must be of type string.\n -
|
1546
|
+
All elements must match the name of an existing tag.\n \n \n\n * repo\n -
|
1547
|
+
The name of the repository containing the OS to be installed by this policy.\n This
|
1548
|
+
should match the task assigned, or bad things will happen.\n - This attribute
|
1549
|
+
is required\n - It must be of type string.\n - It must match the name
|
1550
|
+
of an existing repo.\n\n * broker\n - The name of the broker to use when
|
1551
|
+
the node is fully installed, and is ready\n to hand off to the final configuration
|
1552
|
+
management system. If you have no\n ongoing configuration management, the
|
1553
|
+
supplied `noop` broker will do nothing.\n \n Please note that this is
|
1554
|
+
a broker created with the `create-broker` command,\n which is distinct from
|
1555
|
+
the broker types found on disk.\n - This attribute is required\n - It
|
1556
|
+
must be of type string.\n - It must match the name of an existing broker.\n\n
|
1557
|
+
* task\n - The name of the task used to install nodes that match this policy. This
|
1558
|
+
must\n match the selected repo, as it references files contained within
|
1559
|
+
that repository.\n - This attribute is required\n - It must be of type
|
1560
|
+
string.\n\n\n\n# EXAMPLES\n A sample policy installing CentOS 6.4:\n \n {\n \"name\": \"centos-for-small\",\n \"repo\": \"centos-6.4\",\n \"task\": \"centos\",\n \"broker\": \"noop\",\n \"enabled\": true,\n \"hostname\": \"host${id}.example.com\",\n \"root-password\":
|
1561
|
+
\"secret\",\n \"max-count\": 20,\n \"before\": \"other policy\",\n \"tags\": [\"small\"]\n }\n\n"},"schema":{"name":{"type":"string"},"hostname":{"type":"string"},"root-password":{"type":"string"},"enabled":{"type":"boolean"},"max-count":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"tags":{"type":"array"},"repo":{"type":"string"},"broker":{"type":"string"},"task":{"type":"string"}}}'
|
1562
|
+
http_version:
|
1563
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1564
|
+
- request:
|
1565
|
+
method: get
|
1566
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1567
|
+
body:
|
1568
|
+
encoding: US-ASCII
|
1569
|
+
string: ''
|
1570
|
+
headers:
|
1571
|
+
Accept:
|
1572
|
+
- application/json
|
1573
|
+
Accept-Encoding:
|
1574
|
+
- gzip, deflate
|
1575
|
+
User-Agent:
|
1576
|
+
- Ruby
|
1577
|
+
response:
|
1578
|
+
status:
|
1579
|
+
code: 200
|
1580
|
+
message: OK
|
1581
|
+
headers:
|
1582
|
+
Server:
|
1583
|
+
- Apache-Coyote/1.1
|
1584
|
+
Etag:
|
1585
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1586
|
+
X-Content-Type-Options:
|
1587
|
+
- nosniff
|
1588
|
+
Content-Type:
|
1589
|
+
- application/json;charset=utf-8
|
1590
|
+
Content-Length:
|
1591
|
+
- '5306'
|
1592
|
+
Date:
|
1593
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1594
|
+
body:
|
1595
|
+
encoding: US-ASCII
|
1596
|
+
string: '{"name":"create-policy","help":{"full":"# SYNOPSIS\nCreate a new policy\n\n#
|
1597
|
+
DESCRIPTION\nPolicies tie together the rules, as tags, with the task and repo
|
1598
|
+
containing\nthe OS to install, and the broker for post-install configuration.\n\nThe
|
1599
|
+
overall list of policies is ordered, and policies are considered in that\norder.
|
1600
|
+
When a new policy is created, the entry `before` or `after` can be\nused to
|
1601
|
+
put the new policy into the table before or after another\npolicy. If neither
|
1602
|
+
`before` or `after` are specified, the policy is\nappended to the policy table.\n\n\n#
|
1603
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-policy:%{name}`\n\nWords
|
1604
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
1605
|
+
name of the object being modified, or some other critical detail, these\nallow
|
1606
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
1607
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
1608
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
1609
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
1610
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
1611
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
1612
|
+
Attributes\n\n * name\n - The name of the policy to create.\n - This attribute
|
1613
|
+
is required\n - It must be of type string.\n - It must be between 1 and
|
1614
|
+
Infinity in length.\n\n * hostname\n - The hostname pattern to use for newly
|
1615
|
+
installed nodes. This is filled\n in on a per-node basis, and then supplied
|
1616
|
+
to the task to be configured\n appropriately on the newly installed node.\n \n Substitutions
|
1617
|
+
are performed using `${...}` syntax, and the available\n substitution names
|
1618
|
+
on your server are:\n \n - id -- the internal node ID number\n - This
|
1619
|
+
attribute is required\n - It must be of type string.\n - It must be between
|
1620
|
+
1 and Infinity in length.\n\n * root-password\n - The root password for
|
1621
|
+
newly installed systems. This is passed directly\n to the individual task,
|
1622
|
+
rather than \"understood\" by the server, so the\n valid values are dependent
|
1623
|
+
on the individual task capabilities.\n - This attribute is required\n -
|
1624
|
+
It must be of type string.\n - It must be between 1 and Infinity in length.\n\n
|
1625
|
+
* enabled\n - Is this policy enabled when first created?\n - It must be
|
1626
|
+
of type boolean.\n\n * max-count\n - The maximum number of nodes that can
|
1627
|
+
bind to this policy.\n If omitted, the policy is ''unlimited'', and no maximum
|
1628
|
+
is applied.\n - It must be of type number.\n\n * before\n - The name of
|
1629
|
+
the policy to create this policy before in the policy list.\n - It must
|
1630
|
+
be of type string.\n - If present, after must not be present.\n - It must
|
1631
|
+
match the name of an existing policy.\n\n * after\n - The name of the policy
|
1632
|
+
to create this policy after in the policy list.\n - It must be of type string.\n -
|
1633
|
+
If present, before must not be present.\n - It must match the name of an
|
1634
|
+
existing policy.\n\n * tags\n - The array of names of tags that are used
|
1635
|
+
for matching nodes to this policy.\n \n When a node has all these tags
|
1636
|
+
matched on it, it will be a candidate\n for binding to this policy.\n -
|
1637
|
+
It must be of type array.\n \n - This value must be an array.\n -
|
1638
|
+
\n - This must be an array.\n - All elements must be of type string.\n -
|
1639
|
+
All elements must match the name of an existing tag.\n \n \n\n * repo\n -
|
1640
|
+
The name of the repository containing the OS to be installed by this policy.\n This
|
1641
|
+
should match the task assigned, or bad things will happen.\n - This attribute
|
1642
|
+
is required\n - It must be of type string.\n - It must match the name
|
1643
|
+
of an existing repo.\n\n * broker\n - The name of the broker to use when
|
1644
|
+
the node is fully installed, and is ready\n to hand off to the final configuration
|
1645
|
+
management system. If you have no\n ongoing configuration management, the
|
1646
|
+
supplied `noop` broker will do nothing.\n \n Please note that this is
|
1647
|
+
a broker created with the `create-broker` command,\n which is distinct from
|
1648
|
+
the broker types found on disk.\n - This attribute is required\n - It
|
1649
|
+
must be of type string.\n - It must match the name of an existing broker.\n\n
|
1650
|
+
* task\n - The name of the task used to install nodes that match this policy. This
|
1651
|
+
must\n match the selected repo, as it references files contained within
|
1652
|
+
that repository.\n - This attribute is required\n - It must be of type
|
1653
|
+
string.\n\n\n\n# EXAMPLES\n A sample policy installing CentOS 6.4:\n \n {\n \"name\": \"centos-for-small\",\n \"repo\": \"centos-6.4\",\n \"task\": \"centos\",\n \"broker\": \"noop\",\n \"enabled\": true,\n \"hostname\": \"host${id}.example.com\",\n \"root-password\":
|
1654
|
+
\"secret\",\n \"max-count\": 20,\n \"before\": \"other policy\",\n \"tags\": [\"small\"]\n }\n\n"},"schema":{"name":{"type":"string"},"hostname":{"type":"string"},"root-password":{"type":"string"},"enabled":{"type":"boolean"},"max-count":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"tags":{"type":"array"},"repo":{"type":"string"},"broker":{"type":"string"},"task":{"type":"string"}}}'
|
1655
|
+
http_version:
|
1656
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1657
|
+
- request:
|
1658
|
+
method: get
|
1659
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1660
|
+
body:
|
1661
|
+
encoding: US-ASCII
|
1662
|
+
string: ''
|
1663
|
+
headers:
|
1664
|
+
Accept:
|
1665
|
+
- application/json
|
1666
|
+
Accept-Encoding:
|
1667
|
+
- gzip, deflate
|
1668
|
+
User-Agent:
|
1669
|
+
- Ruby
|
1670
|
+
response:
|
1671
|
+
status:
|
1672
|
+
code: 200
|
1673
|
+
message: OK
|
1674
|
+
headers:
|
1675
|
+
Server:
|
1676
|
+
- Apache-Coyote/1.1
|
1677
|
+
Etag:
|
1678
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1679
|
+
X-Content-Type-Options:
|
1680
|
+
- nosniff
|
1681
|
+
Content-Type:
|
1682
|
+
- application/json;charset=utf-8
|
1683
|
+
Content-Length:
|
1684
|
+
- '5306'
|
1685
|
+
Date:
|
1686
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1687
|
+
body:
|
1688
|
+
encoding: US-ASCII
|
1689
|
+
string: '{"name":"create-policy","help":{"full":"# SYNOPSIS\nCreate a new policy\n\n#
|
1690
|
+
DESCRIPTION\nPolicies tie together the rules, as tags, with the task and repo
|
1691
|
+
containing\nthe OS to install, and the broker for post-install configuration.\n\nThe
|
1692
|
+
overall list of policies is ordered, and policies are considered in that\norder.
|
1693
|
+
When a new policy is created, the entry `before` or `after` can be\nused to
|
1694
|
+
put the new policy into the table before or after another\npolicy. If neither
|
1695
|
+
`before` or `after` are specified, the policy is\nappended to the policy table.\n\n\n#
|
1696
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-policy:%{name}`\n\nWords
|
1697
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
1698
|
+
name of the object being modified, or some other critical detail, these\nallow
|
1699
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
1700
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
1701
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
1702
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
1703
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
1704
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
1705
|
+
Attributes\n\n * name\n - The name of the policy to create.\n - This attribute
|
1706
|
+
is required\n - It must be of type string.\n - It must be between 1 and
|
1707
|
+
Infinity in length.\n\n * hostname\n - The hostname pattern to use for newly
|
1708
|
+
installed nodes. This is filled\n in on a per-node basis, and then supplied
|
1709
|
+
to the task to be configured\n appropriately on the newly installed node.\n \n Substitutions
|
1710
|
+
are performed using `${...}` syntax, and the available\n substitution names
|
1711
|
+
on your server are:\n \n - id -- the internal node ID number\n - This
|
1712
|
+
attribute is required\n - It must be of type string.\n - It must be between
|
1713
|
+
1 and Infinity in length.\n\n * root-password\n - The root password for
|
1714
|
+
newly installed systems. This is passed directly\n to the individual task,
|
1715
|
+
rather than \"understood\" by the server, so the\n valid values are dependent
|
1716
|
+
on the individual task capabilities.\n - This attribute is required\n -
|
1717
|
+
It must be of type string.\n - It must be between 1 and Infinity in length.\n\n
|
1718
|
+
* enabled\n - Is this policy enabled when first created?\n - It must be
|
1719
|
+
of type boolean.\n\n * max-count\n - The maximum number of nodes that can
|
1720
|
+
bind to this policy.\n If omitted, the policy is ''unlimited'', and no maximum
|
1721
|
+
is applied.\n - It must be of type number.\n\n * before\n - The name of
|
1722
|
+
the policy to create this policy before in the policy list.\n - It must
|
1723
|
+
be of type string.\n - If present, after must not be present.\n - It must
|
1724
|
+
match the name of an existing policy.\n\n * after\n - The name of the policy
|
1725
|
+
to create this policy after in the policy list.\n - It must be of type string.\n -
|
1726
|
+
If present, before must not be present.\n - It must match the name of an
|
1727
|
+
existing policy.\n\n * tags\n - The array of names of tags that are used
|
1728
|
+
for matching nodes to this policy.\n \n When a node has all these tags
|
1729
|
+
matched on it, it will be a candidate\n for binding to this policy.\n -
|
1730
|
+
It must be of type array.\n \n - This value must be an array.\n -
|
1731
|
+
\n - This must be an array.\n - All elements must be of type string.\n -
|
1732
|
+
All elements must match the name of an existing tag.\n \n \n\n * repo\n -
|
1733
|
+
The name of the repository containing the OS to be installed by this policy.\n This
|
1734
|
+
should match the task assigned, or bad things will happen.\n - This attribute
|
1735
|
+
is required\n - It must be of type string.\n - It must match the name
|
1736
|
+
of an existing repo.\n\n * broker\n - The name of the broker to use when
|
1737
|
+
the node is fully installed, and is ready\n to hand off to the final configuration
|
1738
|
+
management system. If you have no\n ongoing configuration management, the
|
1739
|
+
supplied `noop` broker will do nothing.\n \n Please note that this is
|
1740
|
+
a broker created with the `create-broker` command,\n which is distinct from
|
1741
|
+
the broker types found on disk.\n - This attribute is required\n - It
|
1742
|
+
must be of type string.\n - It must match the name of an existing broker.\n\n
|
1743
|
+
* task\n - The name of the task used to install nodes that match this policy. This
|
1744
|
+
must\n match the selected repo, as it references files contained within
|
1745
|
+
that repository.\n - This attribute is required\n - It must be of type
|
1746
|
+
string.\n\n\n\n# EXAMPLES\n A sample policy installing CentOS 6.4:\n \n {\n \"name\": \"centos-for-small\",\n \"repo\": \"centos-6.4\",\n \"task\": \"centos\",\n \"broker\": \"noop\",\n \"enabled\": true,\n \"hostname\": \"host${id}.example.com\",\n \"root-password\":
|
1747
|
+
\"secret\",\n \"max-count\": 20,\n \"before\": \"other policy\",\n \"tags\": [\"small\"]\n }\n\n"},"schema":{"name":{"type":"string"},"hostname":{"type":"string"},"root-password":{"type":"string"},"enabled":{"type":"boolean"},"max-count":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"tags":{"type":"array"},"repo":{"type":"string"},"broker":{"type":"string"},"task":{"type":"string"}}}'
|
1748
|
+
http_version:
|
1749
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1750
|
+
- request:
|
1751
|
+
method: get
|
1752
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1753
|
+
body:
|
1754
|
+
encoding: US-ASCII
|
1755
|
+
string: ''
|
1756
|
+
headers:
|
1757
|
+
Accept:
|
1758
|
+
- application/json
|
1759
|
+
Accept-Encoding:
|
1760
|
+
- gzip, deflate
|
1761
|
+
User-Agent:
|
1762
|
+
- Ruby
|
1763
|
+
response:
|
1764
|
+
status:
|
1765
|
+
code: 200
|
1766
|
+
message: OK
|
1767
|
+
headers:
|
1768
|
+
Server:
|
1769
|
+
- Apache-Coyote/1.1
|
1770
|
+
Etag:
|
1771
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1772
|
+
X-Content-Type-Options:
|
1773
|
+
- nosniff
|
1774
|
+
Content-Type:
|
1775
|
+
- application/json;charset=utf-8
|
1776
|
+
Content-Length:
|
1777
|
+
- '5306'
|
1778
|
+
Date:
|
1779
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1780
|
+
body:
|
1781
|
+
encoding: US-ASCII
|
1782
|
+
string: '{"name":"create-policy","help":{"full":"# SYNOPSIS\nCreate a new policy\n\n#
|
1783
|
+
DESCRIPTION\nPolicies tie together the rules, as tags, with the task and repo
|
1784
|
+
containing\nthe OS to install, and the broker for post-install configuration.\n\nThe
|
1785
|
+
overall list of policies is ordered, and policies are considered in that\norder.
|
1786
|
+
When a new policy is created, the entry `before` or `after` can be\nused to
|
1787
|
+
put the new policy into the table before or after another\npolicy. If neither
|
1788
|
+
`before` or `after` are specified, the policy is\nappended to the policy table.\n\n\n#
|
1789
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-policy:%{name}`\n\nWords
|
1790
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
1791
|
+
name of the object being modified, or some other critical detail, these\nallow
|
1792
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
1793
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
1794
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
1795
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
1796
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
1797
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
1798
|
+
Attributes\n\n * name\n - The name of the policy to create.\n - This attribute
|
1799
|
+
is required\n - It must be of type string.\n - It must be between 1 and
|
1800
|
+
Infinity in length.\n\n * hostname\n - The hostname pattern to use for newly
|
1801
|
+
installed nodes. This is filled\n in on a per-node basis, and then supplied
|
1802
|
+
to the task to be configured\n appropriately on the newly installed node.\n \n Substitutions
|
1803
|
+
are performed using `${...}` syntax, and the available\n substitution names
|
1804
|
+
on your server are:\n \n - id -- the internal node ID number\n - This
|
1805
|
+
attribute is required\n - It must be of type string.\n - It must be between
|
1806
|
+
1 and Infinity in length.\n\n * root-password\n - The root password for
|
1807
|
+
newly installed systems. This is passed directly\n to the individual task,
|
1808
|
+
rather than \"understood\" by the server, so the\n valid values are dependent
|
1809
|
+
on the individual task capabilities.\n - This attribute is required\n -
|
1810
|
+
It must be of type string.\n - It must be between 1 and Infinity in length.\n\n
|
1811
|
+
* enabled\n - Is this policy enabled when first created?\n - It must be
|
1812
|
+
of type boolean.\n\n * max-count\n - The maximum number of nodes that can
|
1813
|
+
bind to this policy.\n If omitted, the policy is ''unlimited'', and no maximum
|
1814
|
+
is applied.\n - It must be of type number.\n\n * before\n - The name of
|
1815
|
+
the policy to create this policy before in the policy list.\n - It must
|
1816
|
+
be of type string.\n - If present, after must not be present.\n - It must
|
1817
|
+
match the name of an existing policy.\n\n * after\n - The name of the policy
|
1818
|
+
to create this policy after in the policy list.\n - It must be of type string.\n -
|
1819
|
+
If present, before must not be present.\n - It must match the name of an
|
1820
|
+
existing policy.\n\n * tags\n - The array of names of tags that are used
|
1821
|
+
for matching nodes to this policy.\n \n When a node has all these tags
|
1822
|
+
matched on it, it will be a candidate\n for binding to this policy.\n -
|
1823
|
+
It must be of type array.\n \n - This value must be an array.\n -
|
1824
|
+
\n - This must be an array.\n - All elements must be of type string.\n -
|
1825
|
+
All elements must match the name of an existing tag.\n \n \n\n * repo\n -
|
1826
|
+
The name of the repository containing the OS to be installed by this policy.\n This
|
1827
|
+
should match the task assigned, or bad things will happen.\n - This attribute
|
1828
|
+
is required\n - It must be of type string.\n - It must match the name
|
1829
|
+
of an existing repo.\n\n * broker\n - The name of the broker to use when
|
1830
|
+
the node is fully installed, and is ready\n to hand off to the final configuration
|
1831
|
+
management system. If you have no\n ongoing configuration management, the
|
1832
|
+
supplied `noop` broker will do nothing.\n \n Please note that this is
|
1833
|
+
a broker created with the `create-broker` command,\n which is distinct from
|
1834
|
+
the broker types found on disk.\n - This attribute is required\n - It
|
1835
|
+
must be of type string.\n - It must match the name of an existing broker.\n\n
|
1836
|
+
* task\n - The name of the task used to install nodes that match this policy. This
|
1837
|
+
must\n match the selected repo, as it references files contained within
|
1838
|
+
that repository.\n - This attribute is required\n - It must be of type
|
1839
|
+
string.\n\n\n\n# EXAMPLES\n A sample policy installing CentOS 6.4:\n \n {\n \"name\": \"centos-for-small\",\n \"repo\": \"centos-6.4\",\n \"task\": \"centos\",\n \"broker\": \"noop\",\n \"enabled\": true,\n \"hostname\": \"host${id}.example.com\",\n \"root-password\":
|
1840
|
+
\"secret\",\n \"max-count\": 20,\n \"before\": \"other policy\",\n \"tags\": [\"small\"]\n }\n\n"},"schema":{"name":{"type":"string"},"hostname":{"type":"string"},"root-password":{"type":"string"},"enabled":{"type":"boolean"},"max-count":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"tags":{"type":"array"},"repo":{"type":"string"},"broker":{"type":"string"},"task":{"type":"string"}}}'
|
1841
|
+
http_version:
|
1842
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1843
|
+
- request:
|
1844
|
+
method: get
|
1845
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1846
|
+
body:
|
1847
|
+
encoding: US-ASCII
|
1848
|
+
string: ''
|
1849
|
+
headers:
|
1850
|
+
Accept:
|
1851
|
+
- application/json
|
1852
|
+
Accept-Encoding:
|
1853
|
+
- gzip, deflate
|
1854
|
+
User-Agent:
|
1855
|
+
- Ruby
|
1856
|
+
response:
|
1857
|
+
status:
|
1858
|
+
code: 200
|
1859
|
+
message: OK
|
1860
|
+
headers:
|
1861
|
+
Server:
|
1862
|
+
- Apache-Coyote/1.1
|
1863
|
+
Etag:
|
1864
|
+
- '"server-version-v0.14.1-113-g8b33d83-dirty"'
|
1865
|
+
X-Content-Type-Options:
|
1866
|
+
- nosniff
|
1867
|
+
Content-Type:
|
1868
|
+
- application/json;charset=utf-8
|
1869
|
+
Content-Length:
|
1870
|
+
- '5306'
|
1871
|
+
Date:
|
1872
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1873
|
+
body:
|
1874
|
+
encoding: US-ASCII
|
1875
|
+
string: '{"name":"create-policy","help":{"full":"# SYNOPSIS\nCreate a new policy\n\n#
|
1876
|
+
DESCRIPTION\nPolicies tie together the rules, as tags, with the task and repo
|
1877
|
+
containing\nthe OS to install, and the broker for post-install configuration.\n\nThe
|
1878
|
+
overall list of policies is ordered, and policies are considered in that\norder.
|
1879
|
+
When a new policy is created, the entry `before` or `after` can be\nused to
|
1880
|
+
put the new policy into the table before or after another\npolicy. If neither
|
1881
|
+
`before` or `after` are specified, the policy is\nappended to the policy table.\n\n\n#
|
1882
|
+
Access Control\n\nThis command''s access control pattern: `commands:create-policy:%{name}`\n\nWords
|
1883
|
+
surrounded by `%{...}` are substitutions from the input data: typically\nthe
|
1884
|
+
name of the object being modified, or some other critical detail, these\nallow
|
1885
|
+
roles to be granted partial access to modify the system.\n\nFor more detail
|
1886
|
+
on how the permission strings are structured and work, you can\nsee the [Shiro
|
1887
|
+
Permissions documentation][shiro]. That pattern is expanded\nand then a permission
|
1888
|
+
check applied to it, before the command is authorized.\n\nThese checks only
|
1889
|
+
apply if security is enabled in the Razor configuration\nfile; on this server
|
1890
|
+
security is currently disabled.\n\n[shiro]: http://shiro.apache.org/permissions.html\n\n#
|
1891
|
+
Attributes\n\n * name\n - The name of the policy to create.\n - This attribute
|
1892
|
+
is required\n - It must be of type string.\n - It must be between 1 and
|
1893
|
+
Infinity in length.\n\n * hostname\n - The hostname pattern to use for newly
|
1894
|
+
installed nodes. This is filled\n in on a per-node basis, and then supplied
|
1895
|
+
to the task to be configured\n appropriately on the newly installed node.\n \n Substitutions
|
1896
|
+
are performed using `${...}` syntax, and the available\n substitution names
|
1897
|
+
on your server are:\n \n - id -- the internal node ID number\n - This
|
1898
|
+
attribute is required\n - It must be of type string.\n - It must be between
|
1899
|
+
1 and Infinity in length.\n\n * root-password\n - The root password for
|
1900
|
+
newly installed systems. This is passed directly\n to the individual task,
|
1901
|
+
rather than \"understood\" by the server, so the\n valid values are dependent
|
1902
|
+
on the individual task capabilities.\n - This attribute is required\n -
|
1903
|
+
It must be of type string.\n - It must be between 1 and Infinity in length.\n\n
|
1904
|
+
* enabled\n - Is this policy enabled when first created?\n - It must be
|
1905
|
+
of type boolean.\n\n * max-count\n - The maximum number of nodes that can
|
1906
|
+
bind to this policy.\n If omitted, the policy is ''unlimited'', and no maximum
|
1907
|
+
is applied.\n - It must be of type number.\n\n * before\n - The name of
|
1908
|
+
the policy to create this policy before in the policy list.\n - It must
|
1909
|
+
be of type string.\n - If present, after must not be present.\n - It must
|
1910
|
+
match the name of an existing policy.\n\n * after\n - The name of the policy
|
1911
|
+
to create this policy after in the policy list.\n - It must be of type string.\n -
|
1912
|
+
If present, before must not be present.\n - It must match the name of an
|
1913
|
+
existing policy.\n\n * tags\n - The array of names of tags that are used
|
1914
|
+
for matching nodes to this policy.\n \n When a node has all these tags
|
1915
|
+
matched on it, it will be a candidate\n for binding to this policy.\n -
|
1916
|
+
It must be of type array.\n \n - This value must be an array.\n -
|
1917
|
+
\n - This must be an array.\n - All elements must be of type string.\n -
|
1918
|
+
All elements must match the name of an existing tag.\n \n \n\n * repo\n -
|
1919
|
+
The name of the repository containing the OS to be installed by this policy.\n This
|
1920
|
+
should match the task assigned, or bad things will happen.\n - This attribute
|
1921
|
+
is required\n - It must be of type string.\n - It must match the name
|
1922
|
+
of an existing repo.\n\n * broker\n - The name of the broker to use when
|
1923
|
+
the node is fully installed, and is ready\n to hand off to the final configuration
|
1924
|
+
management system. If you have no\n ongoing configuration management, the
|
1925
|
+
supplied `noop` broker will do nothing.\n \n Please note that this is
|
1926
|
+
a broker created with the `create-broker` command,\n which is distinct from
|
1927
|
+
the broker types found on disk.\n - This attribute is required\n - It
|
1928
|
+
must be of type string.\n - It must match the name of an existing broker.\n\n
|
1929
|
+
* task\n - The name of the task used to install nodes that match this policy. This
|
1930
|
+
must\n match the selected repo, as it references files contained within
|
1931
|
+
that repository.\n - This attribute is required\n - It must be of type
|
1932
|
+
string.\n\n\n\n# EXAMPLES\n A sample policy installing CentOS 6.4:\n \n {\n \"name\": \"centos-for-small\",\n \"repo\": \"centos-6.4\",\n \"task\": \"centos\",\n \"broker\": \"noop\",\n \"enabled\": true,\n \"hostname\": \"host${id}.example.com\",\n \"root-password\":
|
1933
|
+
\"secret\",\n \"max-count\": 20,\n \"before\": \"other policy\",\n \"tags\": [\"small\"]\n }\n\n"},"schema":{"name":{"type":"string"},"hostname":{"type":"string"},"root-password":{"type":"string"},"enabled":{"type":"boolean"},"max-count":{"type":"number"},"before":{"type":"string"},"after":{"type":"string"},"tags":{"type":"array"},"repo":{"type":"string"},"broker":{"type":"string"},"task":{"type":"string"}}}'
|
1934
|
+
http_version:
|
1935
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1936
|
+
- request:
|
1937
|
+
method: post
|
1938
|
+
uri: http://localhost:8080/api/commands/create-policy
|
1939
|
+
body:
|
1940
|
+
encoding: UTF-8
|
1941
|
+
string: '{"name":"test","hostname":"abc.com","root-password":"abc","task":"noop","repo":"name","broker":"puppet","tags":["tag1","tag2"]}'
|
1942
|
+
headers:
|
1943
|
+
Accept:
|
1944
|
+
- application/json
|
1945
|
+
Accept-Encoding:
|
1946
|
+
- gzip, deflate
|
1947
|
+
Content-Type:
|
1948
|
+
- application/json
|
1949
|
+
Content-Length:
|
1950
|
+
- '127'
|
1951
|
+
User-Agent:
|
1952
|
+
- Ruby
|
1953
|
+
response:
|
1954
|
+
status:
|
1955
|
+
code: 202
|
1956
|
+
message: Accepted
|
1957
|
+
headers:
|
1958
|
+
Server:
|
1959
|
+
- Apache-Coyote/1.1
|
1960
|
+
X-Content-Type-Options:
|
1961
|
+
- nosniff
|
1962
|
+
Content-Type:
|
1963
|
+
- application/json;charset=utf-8
|
1964
|
+
Content-Length:
|
1965
|
+
- '207'
|
1966
|
+
Date:
|
1967
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
1968
|
+
body:
|
1969
|
+
encoding: US-ASCII
|
1970
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/policies/member","id":"http://localhost:8080/api/collections/policies/test","name":"test","command":"http://localhost:8080/api/collections/commands/5"}'
|
1971
|
+
http_version:
|
1972
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
1973
|
+
- request:
|
1974
|
+
method: get
|
1975
|
+
uri: http://localhost:8080/api/collections/policies/test
|
1976
|
+
body:
|
1977
|
+
encoding: US-ASCII
|
1978
|
+
string: ''
|
1979
|
+
headers:
|
1980
|
+
Accept:
|
1981
|
+
- application/json
|
1982
|
+
Accept-Encoding:
|
1983
|
+
- gzip, deflate
|
1984
|
+
User-Agent:
|
1985
|
+
- Ruby
|
1986
|
+
response:
|
1987
|
+
status:
|
1988
|
+
code: 200
|
1989
|
+
message: OK
|
1990
|
+
headers:
|
1991
|
+
Server:
|
1992
|
+
- Apache-Coyote/1.1
|
1993
|
+
X-Content-Type-Options:
|
1994
|
+
- nosniff
|
1995
|
+
Content-Type:
|
1996
|
+
- application/json;charset=utf-8
|
1997
|
+
Content-Length:
|
1998
|
+
- '1071'
|
1999
|
+
Date:
|
2000
|
+
- Fri, 16 May 2014 22:18:22 GMT
|
2001
|
+
body:
|
2002
|
+
encoding: US-ASCII
|
2003
|
+
string: '{"spec":"http://api.puppetlabs.com/razor/v1/collections/policies/member","id":"http://localhost:8080/api/collections/policies/test","name":"test","repo":{"spec":"http://api.puppetlabs.com/razor/v1/collections/repos/member","id":"http://localhost:8080/api/collections/repos/name","name":"name"},"task":{"spec":"http://api.puppetlabs.com/razor/v1/collections/tasks/member","id":"http://localhost:8080/api/collections/tasks/noop","name":"noop"},"broker":{"spec":"http://api.puppetlabs.com/razor/v1/collections/brokers/member","id":"http://localhost:8080/api/collections/brokers/puppet","name":"puppet"},"enabled":true,"configuration":{"hostname_pattern":"abc.com","root_password":"abc"},"tags":[{"spec":"http://api.puppetlabs.com/razor/v1/collections/tags/member","id":"http://localhost:8080/api/collections/tags/tag1","name":"tag1"},{"spec":"http://api.puppetlabs.com/razor/v1/collections/tags/member","id":"http://localhost:8080/api/collections/tags/tag2","name":"tag2"}],"nodes":{"id":"http://localhost:8080/api/collections/policies/test/nodes","count":0,"name":"nodes"}}'
|
2004
|
+
http_version:
|
2005
|
+
recorded_at: Fri, 16 May 2014 22:18:23 GMT
|
2006
|
+
recorded_with: VCR 2.5.0
|