Revision 3fe1ff94
Added by Thomas McKay almost 7 years ago
README.md | ||
---|---|---|
45 | 45 |
| --username USERNAME | Username for server. Overrides any config file value. | |
46 | 46 |
| --password PASSWORD | Password for user. Overrides any config file value. | |
47 | 47 |
| --verbose | Display verbose progress information during import. | |
48 |
| --continue-on-error | Continue processing even if individual resource error | |
|
48 | 49 |
|
49 | 50 |
## Count Substitution |
50 | 51 |
|
lib/hammer_cli_csv/architectures.rb | ||
---|---|---|
54 | 54 |
end |
55 | 55 |
print "done\n" if option_verbose? |
56 | 56 |
end |
57 |
rescue RuntimeError => e |
|
58 |
raise "#{e}\n #{line}" |
|
59 | 57 |
end |
60 | 58 |
end |
61 | 59 |
end |
lib/hammer_cli_csv/base.rb | ||
---|---|---|
16 | 16 |
option %w(--prefix), 'PREFIX', 'Prefix for all name columns', |
17 | 17 |
:hidden => true |
18 | 18 |
option %w(--organization), 'ORGANIZATION', _('Only process organization matching this name') |
19 |
option %w(--continue-on-error), :flag, _('Continue processing even if individual resource error') |
|
19 | 20 |
|
20 | 21 |
option %w(--csv-file), 'FILE_NAME', 'Option --csv-file is deprecated. Use --file', |
21 | 22 |
:deprecated => "Use --file", :hidden => true, |
... | ... | |
154 | 155 |
lines = csv[start_index...finish_index].clone |
155 | 156 |
splits << Thread.new do |
156 | 157 |
lines.each do |line| |
157 |
if line[name_column || NAME][0] != '#' |
|
158 |
next if line[name_column || NAME][0] == '#' |
|
159 |
begin |
|
158 | 160 |
yield line |
161 |
rescue RuntimeError => e |
|
162 |
message = "#{e}\n#{line}" |
|
163 |
option_continue_on_error? ? $stderr.puts("Error: #{message}") : raise(message) |
|
159 | 164 |
end |
160 | 165 |
end |
161 | 166 |
end |
lib/hammer_cli_csv/compute_profiles.rb | ||
---|---|---|
65 | 65 |
|
66 | 66 |
print "done\n" if option_verbose? |
67 | 67 |
end |
68 |
rescue RuntimeError => e |
|
69 |
raise "#{e}\n #{line}" |
|
70 | 68 |
end |
71 | 69 |
end |
72 | 70 |
end |
lib/hammer_cli_csv/compute_resources.rb | ||
---|---|---|
67 | 67 |
|
68 | 68 |
print "done\n" if option_verbose? |
69 | 69 |
end |
70 |
rescue RuntimeError => e |
|
71 |
raise "#{e}\n #{line}" |
|
72 | 70 |
end |
73 | 71 |
end |
74 | 72 |
end |
lib/hammer_cli_csv/content_hosts.rb | ||
---|---|---|
207 | 207 |
update_subscriptions(host, line, true) |
208 | 208 |
|
209 | 209 |
puts _('done') if option_verbose? |
210 |
rescue RuntimeError => e |
|
211 |
raise "#{e}\n #{line}" |
|
212 | 210 |
end |
213 | 211 |
|
214 | 212 |
def facts(name, line) |
lib/hammer_cli_csv/content_view_filters.rb | ||
---|---|---|
153 | 153 |
puts 'done' if option_verbose? |
154 | 154 |
end |
155 | 155 |
|
156 |
rescue RuntimeError => e |
|
157 |
raise "#{e}\n #{line}" |
|
158 | 156 |
end |
159 | 157 |
|
160 | 158 |
private |
lib/hammer_cli_csv/content_views.rb | ||
---|---|---|
129 | 129 |
puts _('done') if option_verbose? |
130 | 130 |
end |
131 | 131 |
|
132 |
rescue RuntimeError => e |
|
133 |
raise "#{e}\n #{line}" |
|
134 | 132 |
end |
135 | 133 |
|
136 | 134 |
def environment_names(contentview) |
lib/hammer_cli_csv/domains.rb | ||
---|---|---|
90 | 90 |
|
91 | 91 |
print "done\n" if option_verbose? |
92 | 92 |
end |
93 |
rescue RuntimeError => e |
|
94 |
raise "#{e}\n #{line}" |
|
95 | 93 |
end |
96 | 94 |
|
97 | 95 |
private |
lib/hammer_cli_csv/host_groups.rb | ||
---|---|---|
117 | 117 |
|
118 | 118 |
print "done\n" if option_verbose? |
119 | 119 |
end |
120 |
rescue RuntimeError => e |
|
121 |
raise "#{e}\n #{line}" |
|
122 | 120 |
end |
123 | 121 |
end |
124 | 122 |
end |
lib/hammer_cli_csv/hosts.rb | ||
---|---|---|
108 | 108 |
end |
109 | 109 |
print "done\n" if option_verbose? |
110 | 110 |
end |
111 |
rescue RuntimeError => e |
|
112 |
raise "#{e}\n #{line}" |
|
113 | 111 |
end |
114 | 112 |
end |
115 | 113 |
end |
lib/hammer_cli_csv/installation_media.rb | ||
---|---|---|
68 | 68 |
end |
69 | 69 |
puts _('done') if option_verbose? |
70 | 70 |
end |
71 |
rescue RuntimeError => e |
|
72 |
raise "#{e}\n #{line}" |
|
73 | 71 |
end |
74 | 72 |
end |
75 | 73 |
end |
lib/hammer_cli_csv/job_templates.rb | ||
---|---|---|
136 | 136 |
# end |
137 | 137 |
|
138 | 138 |
end |
139 |
rescue RuntimeError => e |
|
140 |
raise "#{e}\n #{line[NAME]}" |
|
141 | 139 |
end |
142 | 140 |
|
143 | 141 |
def create_template(line, number) |
lib/hammer_cli_csv/lifecycle_environments.rb | ||
---|---|---|
74 | 74 |
end |
75 | 75 |
print "done\n" if option_verbose? |
76 | 76 |
end |
77 |
rescue RuntimeError => e |
|
78 |
raise "#{e}\n #{line}" |
|
79 | 77 |
end |
80 | 78 |
end |
81 | 79 |
end |
lib/hammer_cli_csv/operating_systems.rb | ||
---|---|---|
80 | 80 |
end |
81 | 81 |
print "done\n" if option_verbose? |
82 | 82 |
end |
83 |
rescue RuntimeError => e |
|
84 |
raise "#{e}\n #{line}" |
|
85 | 83 |
end |
86 | 84 |
end |
87 | 85 |
end |
lib/hammer_cli_csv/partition_tables.rb | ||
---|---|---|
100 | 100 |
end |
101 | 101 |
print "done\n" if option_verbose? |
102 | 102 |
end |
103 |
rescue RuntimeError => e |
|
104 |
raise "#{e}\n #{line}" |
|
105 | 103 |
end |
106 | 104 |
end |
107 | 105 |
end |
lib/hammer_cli_csv/products.rb | ||
---|---|---|
66 | 66 |
puts _('done') if option_verbose? |
67 | 67 |
end |
68 | 68 |
|
69 |
rescue RuntimeError => e |
|
70 |
raise "#{e}\n #{line}" |
|
71 | 69 |
end |
72 | 70 |
|
73 | 71 |
private |
... | ... | |
264 | 262 |
--organization-id #{ foreman_organization(:name => line[ORGANIZATION]) } } |
265 | 263 |
hammer.run(args) |
266 | 264 |
|
267 |
rescue RuntimeError => e |
|
268 |
raise "#{e}\n #{line}" |
|
269 | 265 |
end |
270 | 266 |
|
271 | 267 |
def get_content_set(organization, product, repository) |
lib/hammer_cli_csv/provisioning_templates.rb | ||
---|---|---|
138 | 138 |
|
139 | 139 |
puts _('done') if option_verbose? |
140 | 140 |
end |
141 |
rescue RuntimeError => e |
|
142 |
raise "#{e}\n #{line[NAME]}" |
|
143 | 141 |
end |
144 | 142 |
|
145 | 143 |
def export_associations(template) |
lib/hammer_cli_csv/puppet_environments.rb | ||
---|---|---|
72 | 72 |
|
73 | 73 |
puts "done" if option_verbose? |
74 | 74 |
end |
75 |
rescue RuntimeError => e |
|
76 |
raise "#{e}\n #{line}" |
|
77 | 75 |
end |
78 | 76 |
end |
79 | 77 |
end |
lib/hammer_cli_csv/puppet_facts.rb | ||
---|---|---|
67 | 67 |
}) |
68 | 68 |
print "done\n" if option_verbose? |
69 | 69 |
end |
70 |
rescue RuntimeError => e |
|
71 |
raise "#{e}\n #{line}" |
|
72 | 70 |
end |
73 | 71 |
end |
74 | 72 |
end |
lib/hammer_cli_csv/puppet_reports.rb | ||
---|---|---|
145 | 145 |
|
146 | 146 |
puts 'done' if option_verbose? |
147 | 147 |
end |
148 |
rescue RuntimeError => e |
|
149 |
raise "#{e}\n #{line}" |
|
150 | 148 |
end |
151 | 149 |
|
152 | 150 |
private |
lib/hammer_cli_csv/smart_proxies.rb | ||
---|---|---|
61 | 61 |
|
62 | 62 |
print "done\n" if option_verbose? |
63 | 63 |
end |
64 |
rescue RuntimeError => e |
|
65 |
raise "#{e}\n #{line}" |
|
66 | 64 |
end |
67 | 65 |
end |
68 | 66 |
end |
lib/hammer_cli_csv/splice.rb | ||
---|---|---|
130 | 130 |
update_host_collections(host_id, line) |
131 | 131 |
|
132 | 132 |
puts _('done') if option_verbose? |
133 |
rescue RuntimeError => e |
|
134 |
raise "#{e}\n #{line}" |
|
135 | 133 |
end |
136 | 134 |
|
137 | 135 |
private |
lib/hammer_cli_csv/subnets.rb | ||
---|---|---|
98 | 98 |
|
99 | 99 |
print "done\n" if option_verbose? |
100 | 100 |
end |
101 |
rescue RuntimeError => e |
|
102 |
raise "#{e}\n #{line}" |
|
103 | 101 |
end |
104 | 102 |
end |
105 | 103 |
end |
lib/hammer_cli_csv/subscriptions.rb | ||
---|---|---|
66 | 66 |
} |
67 | 67 |
hammer.run(args) |
68 | 68 |
|
69 |
rescue RuntimeError => e |
|
70 |
raise "#{e}\n #{line}" |
|
71 | 69 |
end |
72 | 70 |
end |
73 | 71 |
end |
lib/hammer_cli_csv/sync_plans.rb | ||
---|---|---|
87 | 87 |
puts "done" if option_verbose? |
88 | 88 |
end |
89 | 89 |
|
90 |
rescue RuntimeError => e |
|
91 |
raise "#{e}\n #{line}" |
|
92 | 90 |
end |
93 | 91 |
|
94 | 92 |
private |
lib/hammer_cli_csv/users.rb | ||
---|---|---|
79 | 79 |
end |
80 | 80 |
print "done\n" if option_verbose? |
81 | 81 |
end |
82 |
rescue RuntimeError => e |
|
83 |
raise "#{e}\n #{line}" |
|
84 | 82 |
end |
85 | 83 |
|
86 | 84 |
def create_user(line, name, roles, organizations, locations) |
test/data/settings.csv | ||
---|---|---|
1 | 1 |
Name,Count,Value |
2 |
xyz,1,123 |
|
2 | 3 |
idle_timeout,1,60000 |
test/fixtures/vcr_cassettes/apipie.yml | ||
---|---|---|
39 | 39 |
Apipie-Checksum: |
40 | 40 |
- e98945ba1db6bdbb4c25ce4988912344 |
41 | 41 |
X-Request-Id: |
42 |
- be669e66-8be8-4a3a-8168-a4636201a334
|
|
42 |
- 645d6788-1dd0-4765-a41c-b982f63614a5
|
|
43 | 43 |
X-Runtime: |
44 |
- '0.282461'
|
|
44 |
- '0.224373'
|
|
45 | 45 |
Transfer-Encoding: |
46 | 46 |
- chunked |
47 | 47 |
body: |
... | ... | |
18524 | 18524 |
bnVsbCwic2VlIjpbXSwiaGVhZGVycyI6W10sInNob3ciOnRydWV9XSwiaGVh |
18525 | 18525 |
ZGVycyI6bnVsbH19LCJsaW5rX2V4dGVuc2lvbiI6Ii5lbi5odG1sIn19 |
18526 | 18526 |
http_version: |
18527 |
recorded_at: Tue, 16 Aug 2016 19:11:44 GMT
|
|
18527 |
recorded_at: Tue, 23 Aug 2016 12:27:04 GMT
|
|
18528 | 18528 |
recorded_with: VCR 3.0.3 |
test/fixtures/vcr_cassettes/resources/settings_import/update_settings.yml | ||
---|---|---|
1 | 1 |
--- |
2 | 2 |
http_interactions: |
3 | 3 |
- request: |
4 |
method: put |
|
5 |
uri: http://admin:changeme@katello:3000/api/settings/104 |
|
6 |
body: |
|
7 |
encoding: UTF-8 |
|
8 |
string: '{"setting":{"value":"60000"}}' |
|
9 |
headers: |
|
10 |
Accept: |
|
11 |
- application/json;version=2 |
|
12 |
Accept-Encoding: |
|
13 |
- gzip, deflate |
|
14 |
Content-Type: |
|
15 |
- application/json |
|
16 |
Content-Length: |
|
17 |
- '29' |
|
18 |
User-Agent: |
|
19 |
- Ruby |
|
20 |
response: |
|
21 |
status: |
|
22 |
code: 200 |
|
23 |
message: OK |
|
24 |
headers: |
|
25 |
X-Frame-Options: |
|
26 |
- SAMEORIGIN |
|
27 |
X-Xss-Protection: |
|
28 |
- 1; mode=block |
|
29 |
X-Content-Type-Options: |
|
30 |
- nosniff |
|
31 |
Foreman-Version: |
|
32 |
- 1.13.0-develop |
|
33 |
Foreman-Api-Version: |
|
34 |
- '2' |
|
35 |
Content-Type: |
|
36 |
- application/json; charset=utf-8 |
|
37 |
Apipie-Checksum: |
|
38 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
39 |
Etag: |
|
40 |
- W/"fad2d243311537e4336d8fdd609f58db" |
|
41 |
Cache-Control: |
|
42 |
- max-age=0, private, must-revalidate |
|
43 |
Set-Cookie: |
|
44 |
- _session_id=3bd66552dd1479004842de123877b27c; path=/; HttpOnly |
|
45 |
- request_method=PUT; path=/ |
|
46 |
X-Request-Id: |
|
47 |
- 22959f07-f544-4d77-bce4-54f9f908e55c |
|
48 |
X-Runtime: |
|
49 |
- '1.433806' |
|
50 |
Transfer-Encoding: |
|
51 |
- chunked |
|
52 |
body: |
|
53 |
encoding: UTF-8 |
|
54 |
string: '{"value":60000,"description":"Log out idle users after a certain number |
|
55 |
of minutes","category":"Setting::Auth","settings_type":"integer","default":60,"created_at":"2016-07-15 |
|
56 |
13:17:56 UTC","updated_at":"2016-07-15 13:38:43 UTC","id":104,"name":"idle_timeout"}' |
|
57 |
http_version: |
|
58 |
recorded_at: Wed, 03 Aug 2016 18:37:06 GMT |
|
59 |
- request: |
|
60 |
method: get |
|
61 |
uri: http://admin:changeme@katello:3000/api/status |
|
62 |
body: |
|
63 |
encoding: US-ASCII |
|
64 |
string: '' |
|
65 |
headers: |
|
66 |
Accept-Encoding: |
|
67 |
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 |
|
68 |
Accept: |
|
69 |
- '*/*' |
|
70 |
User-Agent: |
|
71 |
- Ruby |
|
72 |
response: |
|
73 |
status: |
|
74 |
code: 200 |
|
75 |
message: OK |
|
76 |
headers: |
|
77 |
X-Frame-Options: |
|
78 |
- SAMEORIGIN |
|
79 |
X-Xss-Protection: |
|
80 |
- 1; mode=block |
|
81 |
X-Content-Type-Options: |
|
82 |
- nosniff |
|
83 |
Foreman-Version: |
|
84 |
- 1.13.0-develop |
|
85 |
Foreman-Api-Version: |
|
86 |
- '2' |
|
87 |
Content-Type: |
|
88 |
- application/json; charset=utf-8 |
|
89 |
Apipie-Checksum: |
|
90 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
91 |
Etag: |
|
92 |
- W/"f536fd8685b76bb26a943d472593c93e" |
|
93 |
Cache-Control: |
|
94 |
- max-age=0, private, must-revalidate |
|
95 |
Set-Cookie: |
|
96 |
- _session_id=debcf6aad8756b41c3f13af385bab84e; path=/; HttpOnly |
|
97 |
X-Request-Id: |
|
98 |
- 71a5d376-c714-402f-8cb9-88abae35f646 |
|
99 |
X-Runtime: |
|
100 |
- '0.207556' |
|
101 |
Transfer-Encoding: |
|
102 |
- chunked |
|
103 |
body: |
|
104 |
encoding: UTF-8 |
|
105 |
string: '{"result":"ok","status":200,"version":"1.13.0-develop","api_version":2}' |
|
106 |
http_version: |
|
107 |
recorded_at: Tue, 23 Aug 2016 12:27:06 GMT |
|
108 |
- request: |
|
109 |
method: get |
|
110 |
uri: http://admin:changeme@katello:3000/api/v2/plugins |
|
111 |
body: |
|
112 |
encoding: US-ASCII |
|
113 |
string: '' |
|
114 |
headers: |
|
115 |
Accept-Encoding: |
|
116 |
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 |
|
117 |
Accept: |
|
118 |
- '*/*' |
|
119 |
User-Agent: |
|
120 |
- Ruby |
|
121 |
response: |
|
122 |
status: |
|
123 |
code: 200 |
|
124 |
message: OK |
|
125 |
headers: |
|
126 |
X-Frame-Options: |
|
127 |
- SAMEORIGIN |
|
128 |
X-Xss-Protection: |
|
129 |
- 1; mode=block |
|
130 |
X-Content-Type-Options: |
|
131 |
- nosniff |
|
132 |
Foreman-Version: |
|
133 |
- 1.13.0-develop |
|
134 |
Foreman-Api-Version: |
|
135 |
- '2' |
|
136 |
Content-Type: |
|
137 |
- application/json; charset=utf-8 |
|
138 |
Apipie-Checksum: |
|
139 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
140 |
Etag: |
|
141 |
- W/"5fdeea8a610f7805000b37060cecd4be" |
|
142 |
Cache-Control: |
|
143 |
- max-age=0, private, must-revalidate |
|
144 |
Set-Cookie: |
|
145 |
- _session_id=88376faf79d6c8bbfdd82b5e739cf005; path=/; HttpOnly |
|
146 |
X-Request-Id: |
|
147 |
- 8eea7dcf-e74f-4188-aa89-4b0aa6ad610f |
|
148 |
X-Runtime: |
|
149 |
- '0.258911' |
|
150 |
Transfer-Encoding: |
|
151 |
- chunked |
|
152 |
body: |
|
153 |
encoding: ASCII-8BIT |
|
154 |
string: !binary |- |
|
155 |
ewogICJ0b3RhbCI6IDQsCiAgInN1YnRvdGFsIjogNCwKICAicGFnZSI6I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Np |
|
187 |
b24iOiIzLjIuMCJ9XQp9Cg== |
|
188 |
http_version: |
|
189 |
recorded_at: Tue, 23 Aug 2016 12:27:06 GMT |
|
190 |
- request: |
|
191 |
method: get |
|
192 |
uri: http://admin:changeme@katello:3000/api/settings?search=name=%22idle_timeout%22 |
|
193 |
body: |
|
194 |
encoding: US-ASCII |
|
195 |
string: '' |
|
196 |
headers: |
|
197 |
Accept: |
|
198 |
- application/json;version=2 |
|
199 |
Accept-Encoding: |
|
200 |
- gzip, deflate |
|
201 |
Content-Type: |
|
202 |
- application/json |
|
203 |
User-Agent: |
|
204 |
- Ruby |
|
205 |
response: |
|
206 |
status: |
|
207 |
code: 200 |
|
208 |
message: OK |
|
209 |
headers: |
|
210 |
X-Frame-Options: |
|
211 |
- SAMEORIGIN |
|
212 |
X-Xss-Protection: |
|
213 |
- 1; mode=block |
|
214 |
X-Content-Type-Options: |
|
215 |
- nosniff |
|
216 |
Foreman-Version: |
|
217 |
- 1.13.0-develop |
|
218 |
Foreman-Api-Version: |
|
219 |
- '2' |
|
220 |
Content-Type: |
|
221 |
- application/json; charset=utf-8 |
|
222 |
Apipie-Checksum: |
|
223 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
224 |
Etag: |
|
225 |
- W/"36e0831745e01f3460c82a79d66680fb" |
|
226 |
Cache-Control: |
|
227 |
- max-age=0, private, must-revalidate |
|
228 |
Set-Cookie: |
|
229 |
- _session_id=f6c64e0318b837ee51a30c0bc3462d79; path=/; HttpOnly |
|
230 |
X-Request-Id: |
|
231 |
- a06a4276-15a6-495d-a63d-c3530b638bdc |
|
232 |
X-Runtime: |
|
233 |
- '0.281033' |
|
234 |
Transfer-Encoding: |
|
235 |
- chunked |
|
236 |
body: |
|
237 |
encoding: UTF-8 |
|
238 |
string: | |
|
239 |
{ |
|
240 |
"total": 106, |
|
241 |
"subtotal": 1, |
|
242 |
"page": 1, |
|
243 |
"per_page": 20, |
|
244 |
"search": "name=\"idle_timeout\"", |
|
245 |
"sort": { |
|
246 |
"by": null, |
|
247 |
"order": null |
|
248 |
}, |
|
249 |
"results": [{"value":60000,"description":"Log out idle users after a certain number of minutes","category":"Setting::Auth","settings_type":"integer","default":60,"created_at":"2016-08-10 12:38:11 UTC","updated_at":"2016-08-10 13:34:48 UTC","id":99,"name":"idle_timeout"}] |
|
250 |
} |
|
251 |
http_version: |
|
252 |
recorded_at: Tue, 23 Aug 2016 12:27:07 GMT |
|
253 |
- request: |
|
4 | 254 |
method: get |
5 | 255 |
uri: http://admin:changeme@katello:3000/apidoc/v2.json |
6 | 256 |
body: |
... | ... | |
37 | 287 |
Apipie-Checksum: |
38 | 288 |
- e98945ba1db6bdbb4c25ce4988912344 |
39 | 289 |
X-Request-Id: |
40 |
- cafa3e3b-22c6-493d-8221-c9ea03e9f468
|
|
290 |
- e18b2e18-9920-443d-b53e-ee03ec0cf9c1
|
|
41 | 291 |
X-Runtime: |
42 |
- '0.131546'
|
|
292 |
- '0.146171'
|
|
43 | 293 |
Transfer-Encoding: |
44 | 294 |
- chunked |
45 | 295 |
body: |
... | ... | |
18522 | 18772 |
bnVsbCwic2VlIjpbXSwiaGVhZGVycyI6W10sInNob3ciOnRydWV9XSwiaGVh |
18523 | 18773 |
ZGVycyI6bnVsbH19LCJsaW5rX2V4dGVuc2lvbiI6Ii5odG1sIn19 |
18524 | 18774 |
http_version: |
18525 |
recorded_at: Tue, 02 Aug 2016 17:16:27 GMT |
|
18526 |
- request: |
|
18527 |
method: get |
|
18528 |
uri: http://admin:changeme@katello:3000/api/status |
|
18529 |
body: |
|
18530 |
encoding: US-ASCII |
|
18531 |
string: '' |
|
18532 |
headers: |
|
18533 |
Accept-Encoding: |
|
18534 |
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 |
|
18535 |
Accept: |
|
18536 |
- '*/*' |
|
18537 |
User-Agent: |
|
18538 |
- Ruby |
|
18539 |
response: |
|
18540 |
status: |
|
18541 |
code: 200 |
|
18542 |
message: OK |
|
18543 |
headers: |
|
18544 |
X-Frame-Options: |
|
18545 |
- SAMEORIGIN |
|
18546 |
X-Xss-Protection: |
|
18547 |
- 1; mode=block |
|
18548 |
X-Content-Type-Options: |
|
18549 |
- nosniff |
|
18550 |
Foreman-Version: |
|
18551 |
- 1.13.0-develop |
|
18552 |
Foreman-Api-Version: |
|
18553 |
- '2' |
|
18554 |
Content-Type: |
|
18555 |
- application/json; charset=utf-8 |
|
18556 |
Apipie-Checksum: |
|
18557 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
18558 |
Etag: |
|
18559 |
- W/"f536fd8685b76bb26a943d472593c93e" |
|
18560 |
Cache-Control: |
|
18561 |
- max-age=0, private, must-revalidate |
|
18562 |
Set-Cookie: |
|
18563 |
- _session_id=33b5190d7df9cd4cd969a9d2421f28ae; path=/; HttpOnly |
|
18564 |
X-Request-Id: |
|
18565 |
- 2b53b0eb-7189-40b5-aae5-87dbfc023cc1 |
|
18566 |
X-Runtime: |
|
18567 |
- '0.224774' |
|
18568 |
Transfer-Encoding: |
|
18569 |
- chunked |
|
18570 |
body: |
|
18571 |
encoding: UTF-8 |
|
18572 |
string: '{"result":"ok","status":200,"version":"1.13.0-develop","api_version":2}' |
|
18573 |
http_version: |
|
18574 |
recorded_at: Wed, 03 Aug 2016 18:37:03 GMT |
|
18575 |
- request: |
|
18576 |
method: get |
|
18577 |
uri: http://admin:changeme@katello:3000/api/v2/plugins |
|
18578 |
body: |
|
18579 |
encoding: US-ASCII |
|
18580 |
string: '' |
|
18581 |
headers: |
|
18582 |
Accept-Encoding: |
|
18583 |
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 |
|
18584 |
Accept: |
|
18585 |
- '*/*' |
|
18586 |
User-Agent: |
|
18587 |
- Ruby |
|
18588 |
response: |
|
18589 |
status: |
|
18590 |
code: 200 |
|
18591 |
message: OK |
|
18592 |
headers: |
|
18593 |
X-Frame-Options: |
|
18594 |
- SAMEORIGIN |
|
18595 |
X-Xss-Protection: |
|
18596 |
- 1; mode=block |
|
18597 |
X-Content-Type-Options: |
|
18598 |
- nosniff |
|
18599 |
Foreman-Version: |
|
18600 |
- 1.13.0-develop |
|
18601 |
Foreman-Api-Version: |
|
18602 |
- '2' |
|
18603 |
Content-Type: |
|
18604 |
- application/json; charset=utf-8 |
|
18605 |
Apipie-Checksum: |
|
18606 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
18607 |
Etag: |
|
18608 |
- W/"85abe67b01ef6683a42df854df2005a3" |
|
18609 |
Cache-Control: |
|
18610 |
- max-age=0, private, must-revalidate |
|
18611 |
Set-Cookie: |
|
18612 |
- _session_id=fcf2fdeb7d16c802f12b5fd7054317f6; path=/; HttpOnly |
|
18613 |
X-Request-Id: |
|
18614 |
- a95f47a0-74c4-4e5b-bb03-4992b1d3f954 |
|
18615 |
X-Runtime: |
|
18616 |
- '0.215053' |
|
18617 |
Transfer-Encoding: |
|
18618 |
- chunked |
|
18619 |
body: |
|
18620 |
encoding: ASCII-8BIT |
|
18621 |
string: !binary |- |
|
18622 |
ewogICJ0b3RhbCI6IDQsCiAgInN1YnRvdGFsIjogNCwKICAicGFnZSI6IDEs |
|
18623 |
CiAgInBlcl9wYWdlIjogMjAsCiAgInNlYXJjaCI6IG51bGwsCiAgInNvcnQi |
|
18624 |
OiB7CiAgICAiYnkiOiBudWxsLAogICAgIm9yZGVyIjogbnVsbAogIH0sCiAg |
|
18625 |
InJlc3VsdHMiOiBbeyJpZCI6ImZvcmVtYW4tdGFza3MiLCJuYW1lIjoiZm9y |
|
18626 |
ZW1hbi10YXNrcyIsImF1dGhvciI6Ikl2YW4gTmXEjWFzIiwiZGVzY3JpcHRp |
|
18627 |
b24iOiJUaGUgZ29hbCBvZiB0aGlzIHBsdWdpbiBpcyB0byB1bmlmeSB0aGUg |
|
18628 |
d2F5IG9mIHNob3dpbmcgdGFzayBzdGF0dXNlcyBhY3Jvc3MgdGhlIEZvcmVt |
|
18629 |
YW4gaW5zdGFuY2UuXG5JdCBkZWZpbmVzIFRhc2sgbW9kZWwgZ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645 |
RXhlY3V0aW9uIHRlYW0iLCJkZXNjcmlwdGlvbiI6IkEgcGx1Z2luIGJyaW5n |
|
18646 |
aW5nIHJlbW90ZSBleGVjdXRpb24gdG8gdGhlIEZvcmVtYW4sIGNvbXBsZXRp |
|
18647 |
bmcgdGhlIGNvbmZpZyBtYW5hZ2VtZW50IGZ1bmN0aW9uYWxpdHkgd2l0aCBy |
|
18648 |
ZW1vdGUgbWFuYWdlbWVudCBmdW5jdGlvbmFsaXR5LiIsInVybCI6Imh0dHBz |
|
18649 |
Oi8vZ2l0aHViLmNvbS90aGVmb3JlbWFuL2ZvcmVtYW5fcmVtb3RlX2V4ZWN1 |
|
18650 |
dGlvbiIsInZlcnNpb24iOiIxLjAuMCJ9LHsiaWQiOiJrYXRlbGxvIiwibmFt |
|
18651 |
ZSI6ImthdGVsbG8iLCJhdXRob3IiOiJOL0EiLCJkZXNjcmlwdGlvbiI6IkNv |
|
18652 |
bnRlbnQgYW5kIFN1YnNjcmlwdGlvbiBNYW5hZ2VtZW50IHBsdWdpbiBmb3Ig |
|
18653 |
Rm9yZW1hbiIsInVybCI6Imh0dHA6Ly93d3cua2F0ZWxsby5vcmciLCJ2ZXJz |
|
18654 |
aW9uIjoiMy4yLjAifV0KfQo= |
|
18655 |
http_version: |
|
18656 |
recorded_at: Wed, 03 Aug 2016 18:37:04 GMT |
|
18657 |
- request: |
|
18658 |
method: get |
|
18659 |
uri: http://admin:changeme@katello:3000/api/settings?search=name=%22idle_timeout%22 |
|
18660 |
body: |
|
18661 |
encoding: US-ASCII |
|
18662 |
string: '' |
|
18663 |
headers: |
|
18664 |
Accept: |
|
18665 |
- application/json;version=2 |
|
18666 |
Accept-Encoding: |
|
18667 |
- gzip, deflate |
|
18668 |
Content-Type: |
|
18669 |
- application/json |
|
18670 |
User-Agent: |
|
18671 |
- Ruby |
|
18672 |
response: |
|
18673 |
status: |
|
18674 |
code: 200 |
|
18675 |
message: OK |
|
18676 |
headers: |
|
18677 |
X-Frame-Options: |
|
18678 |
- SAMEORIGIN |
|
18679 |
X-Xss-Protection: |
|
18680 |
- 1; mode=block |
|
18681 |
X-Content-Type-Options: |
|
18682 |
- nosniff |
|
18683 |
Foreman-Version: |
|
18684 |
- 1.13.0-develop |
|
18685 |
Foreman-Api-Version: |
|
18686 |
- '2' |
|
18687 |
Content-Type: |
|
18688 |
- application/json; charset=utf-8 |
|
18689 |
Apipie-Checksum: |
|
18690 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
18691 |
Etag: |
|
18692 |
- W/"0ee4ceb7b718054a40fb49aa97ff9317" |
|
18693 |
Cache-Control: |
|
18694 |
- max-age=0, private, must-revalidate |
|
18695 |
Set-Cookie: |
|
18696 |
- _session_id=3382db5153910129bb1d083cd4e68421; path=/; HttpOnly |
|
18697 |
X-Request-Id: |
|
18698 |
- f16c1948-3419-4422-ae0a-eee9bafd7844 |
|
18699 |
X-Runtime: |
|
18700 |
- '0.464199' |
|
18701 |
Transfer-Encoding: |
|
18702 |
- chunked |
|
18703 |
body: |
|
18704 |
encoding: UTF-8 |
|
18705 |
string: | |
|
18706 |
{ |
|
18707 |
"total": 104, |
|
18708 |
"subtotal": 1, |
|
18709 |
"page": 1, |
|
18710 |
"per_page": 20, |
|
18711 |
"search": "name=\"idle_timeout\"", |
|
18712 |
"sort": { |
|
18713 |
"by": null, |
|
18714 |
"order": null |
|
18715 |
}, |
|
18716 |
"results": [{"value":60000,"description":"Log out idle users after a certain number of minutes","category":"Setting::Auth","settings_type":"integer","default":60,"created_at":"2016-07-15 13:17:56 UTC","updated_at":"2016-07-15 13:38:43 UTC","id":104,"name":"idle_timeout"}] |
|
18717 |
} |
|
18718 |
http_version: |
|
18719 |
recorded_at: Wed, 03 Aug 2016 18:37:04 GMT |
|
18775 |
recorded_at: Tue, 23 Aug 2016 12:27:07 GMT |
|
18720 | 18776 |
- request: |
18721 | 18777 |
method: put |
18722 |
uri: http://admin:changeme@katello:3000/api/settings/104
|
|
18778 |
uri: http://admin:changeme@katello:3000/api/settings/99
|
|
18723 | 18779 |
body: |
18724 | 18780 |
encoding: UTF-8 |
18725 | 18781 |
string: '{"setting":{"value":"60000"}}' |
... | ... | |
18754 | 18810 |
Apipie-Checksum: |
18755 | 18811 |
- e98945ba1db6bdbb4c25ce4988912344 |
18756 | 18812 |
Etag: |
18757 |
- W/"fad2d243311537e4336d8fdd609f58db"
|
|
18813 |
- W/"076d4507efa74eb8790faa1c97e1c713"
|
|
18758 | 18814 |
Cache-Control: |
18759 | 18815 |
- max-age=0, private, must-revalidate |
18760 | 18816 |
Set-Cookie: |
18761 |
- _session_id=3bd66552dd1479004842de123877b27c; path=/; HttpOnly
|
|
18817 |
- _session_id=77e996e0e83d5d521158c97d748ee59b; path=/; HttpOnly
|
|
18762 | 18818 |
- request_method=PUT; path=/ |
18763 | 18819 |
X-Request-Id: |
18764 |
- 22959f07-f544-4d77-bce4-54f9f908e55c
|
|
18820 |
- 940fefbd-b49c-47dd-a68d-3e6ba2c7b040
|
|
18765 | 18821 |
X-Runtime: |
18766 |
- '1.433806'
|
|
18822 |
- '0.375763'
|
|
18767 | 18823 |
Transfer-Encoding: |
18768 | 18824 |
- chunked |
18769 | 18825 |
body: |
18770 | 18826 |
encoding: UTF-8 |
18771 | 18827 |
string: '{"value":60000,"description":"Log out idle users after a certain number |
18772 |
of minutes","category":"Setting::Auth","settings_type":"integer","default":60,"created_at":"2016-07-15
|
|
18773 |
13:17:56 UTC","updated_at":"2016-07-15 13:38:43 UTC","id":104,"name":"idle_timeout"}'
|
|
18828 |
of minutes","category":"Setting::Auth","settings_type":"integer","default":60,"created_at":"2016-08-10
|
|
18829 |
12:38:11 UTC","updated_at":"2016-08-10 13:34:48 UTC","id":99,"name":"idle_timeout"}'
|
|
18774 | 18830 |
http_version: |
18775 |
recorded_at: Wed, 03 Aug 2016 18:37:06 GMT
|
|
18831 |
recorded_at: Tue, 23 Aug 2016 12:27:07 GMT
|
|
18776 | 18832 |
recorded_with: VCR 3.0.3 |
test/fixtures/vcr_cassettes/resources/settings_import/update_settings_continue.yml | ||
---|---|---|
1 |
--- |
|
2 |
http_interactions: |
|
3 |
- request: |
|
4 |
method: get |
|
5 |
uri: http://admin:changeme@katello:3000/api/status |
|
6 |
body: |
|
7 |
encoding: US-ASCII |
|
8 |
string: '' |
|
9 |
headers: |
|
10 |
Accept-Encoding: |
|
11 |
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 |
|
12 |
Accept: |
|
13 |
- '*/*' |
|
14 |
User-Agent: |
|
15 |
- Ruby |
|
16 |
response: |
|
17 |
status: |
|
18 |
code: 200 |
|
19 |
message: OK |
|
20 |
headers: |
|
21 |
X-Frame-Options: |
|
22 |
- SAMEORIGIN |
|
23 |
X-Xss-Protection: |
|
24 |
- 1; mode=block |
|
25 |
X-Content-Type-Options: |
|
26 |
- nosniff |
|
27 |
Foreman-Version: |
|
28 |
- 1.13.0-develop |
|
29 |
Foreman-Api-Version: |
|
30 |
- '2' |
|
31 |
Content-Type: |
|
32 |
- application/json; charset=utf-8 |
|
33 |
Apipie-Checksum: |
|
34 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
35 |
Etag: |
|
36 |
- W/"f536fd8685b76bb26a943d472593c93e" |
|
37 |
Cache-Control: |
|
38 |
- max-age=0, private, must-revalidate |
|
39 |
Set-Cookie: |
|
40 |
- _session_id=fe8e544a6960d4e9414c6c6f9485039d; path=/; HttpOnly |
|
41 |
X-Request-Id: |
|
42 |
- 382dfe53-746c-4d59-a1ad-6f23d903362b |
|
43 |
X-Runtime: |
|
44 |
- '0.219354' |
|
45 |
Transfer-Encoding: |
|
46 |
- chunked |
|
47 |
body: |
|
48 |
encoding: UTF-8 |
|
49 |
string: '{"result":"ok","status":200,"version":"1.13.0-develop","api_version":2}' |
|
50 |
http_version: |
|
51 |
recorded_at: Tue, 23 Aug 2016 12:27:08 GMT |
|
52 |
- request: |
|
53 |
method: get |
|
54 |
uri: http://admin:changeme@katello:3000/api/v2/plugins |
|
55 |
body: |
|
56 |
encoding: US-ASCII |
|
57 |
string: '' |
|
58 |
headers: |
|
59 |
Accept-Encoding: |
|
60 |
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3 |
|
61 |
Accept: |
|
62 |
- '*/*' |
|
63 |
User-Agent: |
|
64 |
- Ruby |
|
65 |
response: |
|
66 |
status: |
|
67 |
code: 200 |
|
68 |
message: OK |
|
69 |
headers: |
|
70 |
X-Frame-Options: |
|
71 |
- SAMEORIGIN |
|
72 |
X-Xss-Protection: |
|
73 |
- 1; mode=block |
|
74 |
X-Content-Type-Options: |
|
75 |
- nosniff |
|
76 |
Foreman-Version: |
|
77 |
- 1.13.0-develop |
|
78 |
Foreman-Api-Version: |
|
79 |
- '2' |
|
80 |
Content-Type: |
|
81 |
- application/json; charset=utf-8 |
|
82 |
Apipie-Checksum: |
|
83 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
84 |
Etag: |
|
85 |
- W/"5fdeea8a610f7805000b37060cecd4be" |
|
86 |
Cache-Control: |
|
87 |
- max-age=0, private, must-revalidate |
|
88 |
Set-Cookie: |
|
89 |
- _session_id=751cd08fdddca7c9e57a7fe911851ab7; path=/; HttpOnly |
|
90 |
X-Request-Id: |
|
91 |
- e084840e-5972-4d4a-8d86-04b3034325b2 |
|
92 |
X-Runtime: |
|
93 |
- '0.224010' |
|
94 |
Transfer-Encoding: |
|
95 |
- chunked |
|
96 |
body: |
|
97 |
encoding: ASCII-8BIT |
|
98 |
string: !binary |- |
|
99 |
ewogICJ0b3RhbCI6IDQsCiAgInN1YnRvdGFsIjogNCwKICAicGFnZSI6IDEs |
|
100 |
CiAgInBlcl9wYWdlIjogMjAsCiAgInNlYXJjaCI6IG51bGwsCiAgInNvcnQi |
|
101 |
OiB7CiAgICAiYnkiOiBudWxsLAogICAgIm9yZGVyIjogbnVsbAogIH0sCiAg |
|
102 |
InJlc3VsdHMiOiBbeyJpZCI6ImZvcmVtYW4tdGFza3MiLCJuYW1lIjoiZm9y |
|
103 |
ZW1hbi10YXNrcy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NvbS90aGVm |
|
119 |
b3JlbWFuL2ZvcmVtYW4tZG9ja2VyIiwidmVyc2lvbiI6IjMuMC4wIn0seyJp |
|
120 |
ZCI6ImZvcmVtYW5fcmVtb3RlX2V4ZWN1dGlvbiIsIm5hbWUiOiJmb3JlbWFu |
|
121 |
X3JlbW90ZV9leGVjdXRpb24iLCJhdXRob3IiOiJGb3JlbWFuIFJlbW90ZSBF |
|
122 |
eGVjdXRpb24gdGVhbSIsImRlc2NyaXB0aW9uIjoiQSBwbHVnaW4gYnJpbmdp |
|
123 |
bmcgcmVtb3RlIGV4ZWN1dGlvbiB0byB0aGUgRm9yZW1hbiwgY29tcGxldGlu |
|
124 |
ZyB0aGUgY29uZmlnIG1hbmFnZW1lbnQgZnVuY3Rpb25hbGl0eSB3aXRoIHJl |
|
125 |
bW90ZSBtYW5hZ2VtZW50IGZ1bmN0aW9uYWxpdHkuIiwidXJsIjoiaHR0cHM6 |
|
126 |
Ly9naXRodWIuY29tL3RoZWZvcmVtYW4vZm9yZW1hbl9yZW1vdGVfZXhlY3V0 |
|
127 |
aW9uIiwidmVyc2lvbiI6IjEuMC4wIn0seyJpZCI6ImthdGVsbG8iLCJuYW1l |
|
128 |
Ijoia2F0ZWxsbyIsImF1dGhvciI6Ik4vQSIsImRlc2NyaXB0aW9uIjoiQ29u |
|
129 |
dGVudCBhbmQgU3Vic2NyaXB0aW9uIE1hbmFnZW1lbnQgcGx1Z2luIGZvciBG |
|
130 |
b3JlbWFuIiwidXJsIjoiaHR0cDovL3d3dy5rYXRlbGxvLm9yZyIsInZlcnNp |
|
131 |
b24iOiIzLjIuMCJ9XQp9Cg== |
|
132 |
http_version: |
|
133 |
recorded_at: Tue, 23 Aug 2016 12:27:08 GMT |
|
134 |
- request: |
|
135 |
method: get |
|
136 |
uri: http://admin:changeme@katello:3000/api/settings?search=name=%22badsetting%22 |
|
137 |
body: |
|
138 |
encoding: US-ASCII |
|
139 |
string: '' |
|
140 |
headers: |
|
141 |
Accept: |
|
142 |
- application/json;version=2 |
|
143 |
Accept-Encoding: |
|
144 |
- gzip, deflate |
|
145 |
Content-Type: |
|
146 |
- application/json |
|
147 |
User-Agent: |
|
148 |
- Ruby |
|
149 |
response: |
|
150 |
status: |
|
151 |
code: 200 |
|
152 |
message: OK |
|
153 |
headers: |
|
154 |
X-Frame-Options: |
|
155 |
- SAMEORIGIN |
|
156 |
X-Xss-Protection: |
|
157 |
- 1; mode=block |
|
158 |
X-Content-Type-Options: |
|
159 |
- nosniff |
|
160 |
Foreman-Version: |
|
161 |
- 1.13.0-develop |
|
162 |
Foreman-Api-Version: |
|
163 |
- '2' |
|
164 |
Content-Type: |
|
165 |
- application/json; charset=utf-8 |
|
166 |
Apipie-Checksum: |
|
167 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
168 |
Etag: |
|
169 |
- W/"d4c516d8c44e3fc286dd84616988bd22" |
|
170 |
Cache-Control: |
|
171 |
- max-age=0, private, must-revalidate |
|
172 |
Set-Cookie: |
|
173 |
- _session_id=b099cb53a190d8eeb8145a91bd76a1e5; path=/; HttpOnly |
|
174 |
X-Request-Id: |
|
175 |
- 89dce3ed-ef29-4b22-a4ce-1a51ebb3e8c1 |
|
176 |
X-Runtime: |
|
177 |
- '0.241582' |
|
178 |
Transfer-Encoding: |
|
179 |
- chunked |
|
180 |
body: |
|
181 |
encoding: UTF-8 |
|
182 |
string: | |
|
183 |
{ |
|
184 |
"total": 106, |
|
185 |
"subtotal": 0, |
|
186 |
"page": 1, |
|
187 |
"per_page": 20, |
|
188 |
"search": "name=\"badsetting\"", |
|
189 |
"sort": { |
|
190 |
"by": null, |
|
191 |
"order": null |
|
192 |
}, |
|
193 |
"results": [] |
|
194 |
} |
|
195 |
http_version: |
|
196 |
recorded_at: Tue, 23 Aug 2016 12:27:08 GMT |
|
197 |
- request: |
|
198 |
method: get |
|
199 |
uri: http://admin:changeme@katello:3000/api/settings?search=name=%22idle_timeout%22 |
|
200 |
body: |
|
201 |
encoding: US-ASCII |
|
202 |
string: '' |
|
203 |
headers: |
|
204 |
Accept: |
|
205 |
- application/json;version=2 |
|
206 |
Accept-Encoding: |
|
207 |
- gzip, deflate |
|
208 |
Content-Type: |
|
209 |
- application/json |
|
210 |
User-Agent: |
|
211 |
- Ruby |
|
212 |
response: |
|
213 |
status: |
|
214 |
code: 200 |
|
215 |
message: OK |
|
216 |
headers: |
|
217 |
X-Frame-Options: |
|
218 |
- SAMEORIGIN |
|
219 |
X-Xss-Protection: |
|
220 |
- 1; mode=block |
|
221 |
X-Content-Type-Options: |
|
222 |
- nosniff |
|
223 |
Foreman-Version: |
|
224 |
- 1.13.0-develop |
|
225 |
Foreman-Api-Version: |
|
226 |
- '2' |
|
227 |
Content-Type: |
|
228 |
- application/json; charset=utf-8 |
|
229 |
Apipie-Checksum: |
|
230 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
231 |
Etag: |
|
232 |
- W/"36e0831745e01f3460c82a79d66680fb" |
|
233 |
Cache-Control: |
|
234 |
- max-age=0, private, must-revalidate |
|
235 |
Set-Cookie: |
|
236 |
- _session_id=808587226a38c5127d61e77e36a05692; path=/; HttpOnly |
|
237 |
X-Request-Id: |
|
238 |
- 7820d6c0-a37e-4fdd-a2c1-ba16669133e0 |
|
239 |
X-Runtime: |
|
240 |
- '0.303437' |
|
241 |
Transfer-Encoding: |
|
242 |
- chunked |
|
243 |
body: |
|
244 |
encoding: UTF-8 |
|
245 |
string: | |
|
246 |
{ |
|
247 |
"total": 106, |
|
248 |
"subtotal": 1, |
|
249 |
"page": 1, |
|
250 |
"per_page": 20, |
|
251 |
"search": "name=\"idle_timeout\"", |
|
252 |
"sort": { |
|
253 |
"by": null, |
|
254 |
"order": null |
|
255 |
}, |
|
256 |
"results": [{"value":60000,"description":"Log out idle users after a certain number of minutes","category":"Setting::Auth","settings_type":"integer","default":60,"created_at":"2016-08-10 12:38:11 UTC","updated_at":"2016-08-10 13:34:48 UTC","id":99,"name":"idle_timeout"}] |
|
257 |
} |
|
258 |
http_version: |
|
259 |
recorded_at: Tue, 23 Aug 2016 12:27:08 GMT |
|
260 |
- request: |
|
261 |
method: put |
|
262 |
uri: http://admin:changeme@katello:3000/api/settings/99 |
|
263 |
body: |
|
264 |
encoding: UTF-8 |
|
265 |
string: '{"setting":{"value":"60000"}}' |
|
266 |
headers: |
|
267 |
Accept: |
|
268 |
- application/json;version=2 |
|
269 |
Accept-Encoding: |
|
270 |
- gzip, deflate |
|
271 |
Content-Type: |
|
272 |
- application/json |
|
273 |
Content-Length: |
|
274 |
- '29' |
|
275 |
User-Agent: |
|
276 |
- Ruby |
|
277 |
response: |
|
278 |
status: |
|
279 |
code: 200 |
|
280 |
message: OK |
|
281 |
headers: |
|
282 |
X-Frame-Options: |
|
283 |
- SAMEORIGIN |
|
284 |
X-Xss-Protection: |
|
285 |
- 1; mode=block |
|
286 |
X-Content-Type-Options: |
|
287 |
- nosniff |
|
288 |
Foreman-Version: |
|
289 |
- 1.13.0-develop |
|
290 |
Foreman-Api-Version: |
|
291 |
- '2' |
|
292 |
Content-Type: |
|
293 |
- application/json; charset=utf-8 |
|
294 |
Apipie-Checksum: |
|
295 |
- e98945ba1db6bdbb4c25ce4988912344 |
|
296 |
Etag: |
|
297 |
- W/"076d4507efa74eb8790faa1c97e1c713" |
|
298 |
Cache-Control: |
|
299 |
- max-age=0, private, must-revalidate |
|
300 |
Set-Cookie: |
|
301 |
- _session_id=2db127278d1d58e8edacf000b8807c04; path=/; HttpOnly |
|
302 |
- request_method=PUT; path=/ |
|
303 |
X-Request-Id: |
|
304 |
- 9f7e6bbd-61d7-45d7-9bb6-73875ebb50d1 |
|
305 |
X-Runtime: |
|
306 |
- '0.322533' |
|
307 |
Transfer-Encoding: |
|
308 |
- chunked |
|
309 |
body: |
|
310 |
encoding: UTF-8 |
|
311 |
string: '{"value":60000,"description":"Log out idle users after a certain number |
|
312 |
of minutes","category":"Setting::Auth","settings_type":"integer","default":60,"created_at":"2016-08-10 |
|
313 |
12:38:11 UTC","updated_at":"2016-08-10 13:34:48 UTC","id":99,"name":"idle_timeout"}' |
|
314 |
http_version: |
|
315 |
recorded_at: Tue, 23 Aug 2016 12:27:09 GMT |
|
316 |
recorded_with: VCR 3.0.3 |
test/resources/content_hosts_test.rb | ||
---|---|---|
16 | 16 |
csv content-hosts [OPTIONS] |
17 | 17 |
|
18 | 18 |
Options: |
19 |
--continue-on-error Continue processing even if individual resource error |
|
19 | 20 |
--export Export current data instead of importing |
20 | 21 |
--file FILE_NAME CSV file (default to /dev/stdout with --export, otherwise required) |
21 | 22 |
--organization ORGANIZATION Only process organization matching this name |
test/resources/settings_test.rb | ||
---|---|---|
16 | 16 |
csv settings [OPTIONS] |
17 | 17 |
|
18 | 18 |
Options: |
19 |
--continue-on-error Continue processing even if individual resource error |
|
19 | 20 |
--export Export current data instead of importing |
20 | 21 |
--file FILE_NAME CSV file (default to /dev/stdout with --export, otherwise required) |
21 | 22 |
--organization ORGANIZATION Only process organization matching this name |
... | ... | |
50 | 51 |
file.unlink |
51 | 52 |
stop_vcr |
52 | 53 |
end |
54 |
|
|
55 |
def test_update_settings_continue |
|
56 |
start_vcr |
|
57 |
set_user 'admin' |
|
58 |
|
|
59 |
name = "settings#{rand(10000)}" |
|
60 |
|
|
61 |
file = Tempfile.new('settings_test') |
|
62 |
# rubocop:disable LineLength |
|
63 |
file.write <<-FILE |
|
64 |
Name,Count,Value |
|
65 |
badsetting,1,1234 |
|
66 |
idle_timeout,1,60000 |
|
67 |
FILE |
|
68 |
file.rewind |
|
69 |
|
|
70 |
stdout,stderr = capture { |
|
71 |
hammer.run(%W{csv settings --verbose --continue-on-error --file #{file.path}}) |
|
72 |
} |
|
73 |
stderr.must_equal "Error: Setting 'badsetting' not found\nbadsetting,1,1234\n" |
|
74 |
lines = stdout.split("\n") |
|
75 |
assert_equal lines[0], "Updating setting 'idle_timeout'...done" |
|
76 |
file.unlink |
|
77 |
stop_vcr |
|
78 |
end |
|
53 | 79 |
end |
54 | 80 |
|
55 | 81 |
end |
test/resources/subscriptions_test.rb | ||
---|---|---|
16 | 16 |
csv subscriptions [OPTIONS] |
17 | 17 |
|
18 | 18 |
Options: |
19 |
--continue-on-error Continue processing even if individual resource error |
|
19 | 20 |
--export Export current data instead of importing |
20 | 21 |
--file FILE_NAME CSV file (default to /dev/stdout with --export, otherwise required) |
21 | 22 |
--organization ORGANIZATION Only process organization matching this name |
Also available in: Unified diff
fixes #15752 - continue processing even if error