Project

General

Profile

Revision 524638e4

Added by Partha Aji over 5 years ago

Fixes #18076 - Can set OSTree repo depth

Enables one to set the importer depth value for the ostree repo.
look at http://projects.theforeman.org/issues/18076 for more info.

View differences:

test/fixtures/vcr_cassettes/extensions/ostree_repository_create/create_with_importer_object.yml
1 1
---
2 2
http_interactions:
3 3
- request:
4
    method: get
5
    uri: https://admin:HeQSzZgm6ZEKG8aHrJEGW7aGD85Wrj57@runcible.example.com/pulp/api/v2/tasks/47d90f49-5f23-44fb-9a8a-af8ce279bc5e/
6
    body:
7
      encoding: US-ASCII
8
      string: ''
9
    headers:
10
      Accept:
11
      - application/json
12
      Accept-Encoding:
13
      - gzip, deflate
14
      Content-Type:
15
      - application/json
16
      User-Agent:
17
      - Ruby
18
  response:
19
    status:
20
      code: 200
21
      message: OK
22
    headers:
23
      Date:
24
      - Fri, 29 Apr 2016 16:21:42 GMT
25
      Server:
26
      - Apache/2.4.6 (CentOS)
27
      Vary:
28
      - Accept-Encoding
29
      Content-Length:
30
      - '684'
31
      Content-Type:
32
      - application/json; charset=utf-8
33
    body:
34
      encoding: ASCII-8BIT
35
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
36
        "_href": "/pulp/api/v2/tasks/47d90f49-5f23-44fb-9a8a-af8ce279bc5e/", "task_id":
37
        "47d90f49-5f23-44fb-9a8a-af8ce279bc5e", "tags": ["pulp:repository:integration_test_id",
38
        "pulp:action:delete"], "finish_time": "2016-04-29T16:21:41Z", "_ns": "task_status",
39
        "start_time": "2016-04-29T16:21:41Z", "traceback": null, "spawned_tasks":
40
        [], "progress_report": {}, "queue": "reserved_resource_worker-0@runcible.example.com.dq",
41
        "state": "finished", "worker_name": "reserved_resource_worker-0@runcible.example.com",
42
        "result": null, "error": null, "_id": {"$oid": "57238a15898f5c862fa3ea81"},
43
        "id": "57238a15898f5c862fa3ea81"}'
44
    http_version: 
45
  recorded_at: Fri, 29 Apr 2016 16:21:42 GMT
46
- request:
47
    method: get
48
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/tasks/1ea5089a-d04f-4f4c-bf3f-0ef139599568/
49
    body:
50
      encoding: US-ASCII
51
      string: ''
52
    headers:
53
      Accept:
54
      - application/json
55
      Accept-Encoding:
56
      - gzip, deflate
57
      Content-Type:
58
      - application/json
59
      User-Agent:
60
      - Ruby
61
  response:
62
    status:
63
      code: 200
64
      message: OK
65
    headers:
66
      Date:
67
      - Wed, 01 Feb 2017 12:26:47 GMT
68
      Server:
69
      - Apache/2.4.6 (CentOS)
70
      Vary:
71
      - Accept-Encoding
72
      Content-Length:
73
      - '680'
74
      Connection:
75
      - close
76
      Content-Type:
77
      - application/json; charset=utf-8
78
    body:
79
      encoding: ASCII-8BIT
80
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
81
        "_href": "/pulp/api/v2/tasks/1ea5089a-d04f-4f4c-bf3f-0ef139599568/", "task_id":
82
        "1ea5089a-d04f-4f4c-bf3f-0ef139599568", "tags": ["pulp:repository:integration_test_id",
83
        "pulp:action:delete"], "finish_time": "2017-02-01T12:26:47Z", "_ns": "task_status",
84
        "start_time": "2017-02-01T12:26:47Z", "traceback": null, "spawned_tasks":
85
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@obelix.example.com.dq",
86
        "state": "finished", "worker_name": "reserved_resource_worker-1@obelix.example.com",
87
        "result": null, "error": null, "_id": {"$oid": "5891d4074b92d9e3004e81c3"},
88
        "id": "5891d4074b92d9e3004e81c3"}'
89
    http_version: 
90
  recorded_at: Wed, 01 Feb 2017 12:26:47 GMT
91
- request:
92
    method: get
93
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/tasks/fcd009ea-b358-4d7f-9d46-5be327e35d1b/
94
    body:
95
      encoding: US-ASCII
96
      string: ''
97
    headers:
98
      Accept:
99
      - application/json
100
      Accept-Encoding:
101
      - gzip, deflate
102
      Content-Type:
103
      - application/json
104
      User-Agent:
105
      - Ruby
106
  response:
107
    status:
108
      code: 200
109
      message: OK
110
    headers:
111
      Date:
112
      - Wed, 01 Feb 2017 12:28:32 GMT
113
      Server:
114
      - Apache/2.4.6 (CentOS)
115
      Vary:
116
      - Accept-Encoding
117
      Content-Length:
118
      - '680'
119
      Connection:
120
      - close
121
      Content-Type:
122
      - application/json; charset=utf-8
123
    body:
124
      encoding: ASCII-8BIT
125
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
126
        "_href": "/pulp/api/v2/tasks/fcd009ea-b358-4d7f-9d46-5be327e35d1b/", "task_id":
127
        "fcd009ea-b358-4d7f-9d46-5be327e35d1b", "tags": ["pulp:repository:integration_test_id",
128
        "pulp:action:delete"], "finish_time": "2017-02-01T12:28:31Z", "_ns": "task_status",
129
        "start_time": "2017-02-01T12:28:31Z", "traceback": null, "spawned_tasks":
130
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@obelix.example.com.dq",
131
        "state": "finished", "worker_name": "reserved_resource_worker-1@obelix.example.com",
132
        "result": null, "error": null, "_id": {"$oid": "5891d46f4b92d9e3004e81ca"},
133
        "id": "5891d46f4b92d9e3004e81ca"}'
134
    http_version: 
135
  recorded_at: Wed, 01 Feb 2017 12:28:32 GMT
136
- request:
137
    method: get
138
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/tasks/3d93c7c8-5148-4889-b784-6a06ff31469e/
139
    body:
140
      encoding: US-ASCII
141
      string: ''
142
    headers:
143
      Accept:
144
      - application/json
145
      Accept-Encoding:
146
      - gzip, deflate
147
      Content-Type:
148
      - application/json
149
      User-Agent:
150
      - Ruby
151
  response:
152
    status:
153
      code: 200
154
      message: OK
155
    headers:
156
      Date:
157
      - Wed, 01 Feb 2017 12:28:59 GMT
158
      Server:
159
      - Apache/2.4.6 (CentOS)
160
      Vary:
161
      - Accept-Encoding
162
      Content-Length:
163
      - '680'
164
      Connection:
165
      - close
166
      Content-Type:
167
      - application/json; charset=utf-8
168
    body:
169
      encoding: ASCII-8BIT
170
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
171
        "_href": "/pulp/api/v2/tasks/3d93c7c8-5148-4889-b784-6a06ff31469e/", "task_id":
172
        "3d93c7c8-5148-4889-b784-6a06ff31469e", "tags": ["pulp:repository:integration_test_id",
173
        "pulp:action:delete"], "finish_time": "2017-02-01T12:28:58Z", "_ns": "task_status",
174
        "start_time": "2017-02-01T12:28:58Z", "traceback": null, "spawned_tasks":
175
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@obelix.example.com.dq",
176
        "state": "finished", "worker_name": "reserved_resource_worker-1@obelix.example.com",
177
        "result": null, "error": null, "_id": {"$oid": "5891d48a4b92d9e3004e81d4"},
178
        "id": "5891d48a4b92d9e3004e81d4"}'
179
    http_version: 
180
  recorded_at: Wed, 01 Feb 2017 12:28:59 GMT
181
- request:
4 182
    method: post
5
    uri: https://admin:HeQSzZgm6ZEKG8aHrJEGW7aGD85Wrj57@runcible.example.com/pulp/api/v2/repositories/
183
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/repositories/
6 184
    body:
7 185
      encoding: UTF-8
8 186
      string: '{"id":"integration_test_id","importer_type_id":"ostree_web_importer","importer_config":{"feed":"http://cdn.qa.redhat.com/content/htb/rhel/server/7/x86_64/extras/ostree/","branches":["redhat-atomic-host/el7.0/x86_64/base","redhat-atomic-host/el7.0/x86_64/medium"]},"notes":{"_repo-type":"OSTREE"}}'
......
23 201
      message: CREATED
24 202
    headers:
25 203
      Date:
26
      - Fri, 29 Apr 2016 16:21:41 GMT
204
      - Wed, 01 Feb 2017 12:30:52 GMT
27 205
      Server:
28 206
      - Apache/2.4.6 (CentOS)
29 207
      Content-Length:
30 208
      - '341'
31 209
      Location:
32
      - https://runcible.example.com/pulp/api/v2/repositories/integration_test_id/
210
      - https://obelix.example.com/pulp/api/v2/repositories/integration_test_id/
211
      Connection:
212
      - close
33 213
      Content-Type:
34 214
      - application/json; charset=utf-8
35 215
    body:
36 216
      encoding: UTF-8
37 217
      string: '{"scratchpad": {}, "display_name": "integration_test_id", "description":
38 218
        null, "last_unit_added": null, "notes": {"_repo-type": "OSTREE"}, "last_unit_removed":
39
        null, "content_unit_counts": {}, "_ns": "repos", "_id": {"$oid": "57238a15aca4886d952eea9b"},
219
        null, "content_unit_counts": {}, "_ns": "repos", "_id": {"$oid": "5891d4fc70be6f18c88f24c0"},
40 220
        "id": "integration_test_id", "_href": "/pulp/api/v2/repositories/integration_test_id/"}'
41 221
    http_version: 
42
  recorded_at: Fri, 29 Apr 2016 16:21:41 GMT
222
  recorded_at: Wed, 01 Feb 2017 12:30:52 GMT
43 223
- request:
44 224
    method: get
45
    uri: https://admin:HeQSzZgm6ZEKG8aHrJEGW7aGD85Wrj57@runcible.example.com/pulp/api/v2/repositories/integration_test_id/?details=true
225
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/repositories/integration_test_id/?details=true
46 226
    body:
47 227
      encoding: US-ASCII
48 228
      string: ''
......
61 241
      message: OK
62 242
    headers:
63 243
      Date:
64
      - Fri, 29 Apr 2016 16:21:41 GMT
244
      - Wed, 01 Feb 2017 12:30:52 GMT
65 245
      Server:
66 246
      - Apache/2.4.6 (CentOS)
67 247
      Vary:
68 248
      - Accept-Encoding
69 249
      Content-Length:
70
      - '930'
250
      - '998'
251
      Connection:
252
      - close
71 253
      Content-Type:
72 254
      - application/json; charset=utf-8
73 255
    body:
......
75 257
      string: '{"scratchpad": {}, "display_name": "integration_test_id", "description":
76 258
        null, "distributors": [], "last_unit_added": null, "notes": {"_repo-type":
77 259
        "OSTREE"}, "last_unit_removed": null, "content_unit_counts": {}, "_ns": "repos",
78
        "importers": [{"scratchpad": null, "_href": "/pulp/api/v2/repositories/integration_test_id/importers/ostree_web_importer/",
79
        "_ns": "repo_importers", "importer_type_id": "ostree_web_importer", "last_sync":
80
        null, "repo_id": "integration_test_id", "_id": {"$oid": "57238a15aca4886d952eea9c"},
260
        "importers": [{"repo_id": "integration_test_id", "last_updated": "2017-02-01T12:30:52Z",
261
        "_href": "/pulp/api/v2/repositories/integration_test_id/importers/ostree_web_importer/",
262
        "_ns": "repo_importers", "importer_type_id": "ostree_web_importer", "last_override_config":
263
        {}, "last_sync": null, "scratchpad": null, "_id": {"$oid": "5891d4fc70be6f18c88f24c1"},
81 264
        "config": {"feed": "http://cdn.qa.redhat.com/content/htb/rhel/server/7/x86_64/extras/ostree/",
82 265
        "branches": ["redhat-atomic-host/el7.0/x86_64/base", "redhat-atomic-host/el7.0/x86_64/medium"]},
83 266
        "id": "ostree_web_importer"}], "locally_stored_units": 0, "_id": {"$oid":
84
        "57238a15aca4886d952eea9b"}, "total_repository_units": 0, "id": "integration_test_id",
267
        "5891d4fc70be6f18c88f24c0"}, "total_repository_units": 0, "id": "integration_test_id",
85 268
        "_href": "/pulp/api/v2/repositories/integration_test_id/"}'
86 269
    http_version: 
87
  recorded_at: Fri, 29 Apr 2016 16:21:41 GMT
270
  recorded_at: Wed, 01 Feb 2017 12:30:52 GMT
88 271
- request:
89 272
    method: delete
90
    uri: https://admin:HeQSzZgm6ZEKG8aHrJEGW7aGD85Wrj57@runcible.example.com/pulp/api/v2/repositories/integration_test_id/
273
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/repositories/integration_test_id/
91 274
    body:
92 275
      encoding: US-ASCII
93 276
      string: ''
......
106 289
      message: ACCEPTED
107 290
    headers:
108 291
      Date:
109
      - Fri, 29 Apr 2016 16:21:41 GMT
292
      - Wed, 01 Feb 2017 12:30:52 GMT
110 293
      Server:
111 294
      - Apache/2.4.6 (CentOS)
112 295
      Content-Length:
113 296
      - '172'
297
      Connection:
298
      - close
114 299
      Content-Type:
115 300
      - application/json; charset=utf-8
116 301
    body:
117 302
      encoding: UTF-8
118
      string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/47d90f49-5f23-44fb-9a8a-af8ce279bc5e/",
119
        "task_id": "47d90f49-5f23-44fb-9a8a-af8ce279bc5e"}], "result": null, "error":
303
      string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/c1f81209-23f8-4998-91ab-c1a9e042e1cc/",
304
        "task_id": "c1f81209-23f8-4998-91ab-c1a9e042e1cc"}], "result": null, "error":
120 305
        null}'
121 306
    http_version: 
122
  recorded_at: Fri, 29 Apr 2016 16:21:41 GMT
307
  recorded_at: Wed, 01 Feb 2017 12:30:53 GMT
123 308
- request:
124 309
    method: get
125
    uri: https://admin:HeQSzZgm6ZEKG8aHrJEGW7aGD85Wrj57@runcible.example.com/pulp/api/v2/tasks/47d90f49-5f23-44fb-9a8a-af8ce279bc5e/
310
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/tasks/c1f81209-23f8-4998-91ab-c1a9e042e1cc/
126 311
    body:
127 312
      encoding: US-ASCII
128 313
      string: ''
......
141 326
      message: OK
142 327
    headers:
143 328
      Date:
144
      - Fri, 29 Apr 2016 16:21:42 GMT
329
      - Wed, 01 Feb 2017 12:30:53 GMT
145 330
      Server:
146 331
      - Apache/2.4.6 (CentOS)
147 332
      Vary:
148 333
      - Accept-Encoding
149 334
      Content-Length:
150
      - '684'
335
      - '680'
336
      Connection:
337
      - close
151 338
      Content-Type:
152 339
      - application/json; charset=utf-8
153 340
    body:
154 341
      encoding: ASCII-8BIT
155 342
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
156
        "_href": "/pulp/api/v2/tasks/47d90f49-5f23-44fb-9a8a-af8ce279bc5e/", "task_id":
157
        "47d90f49-5f23-44fb-9a8a-af8ce279bc5e", "tags": ["pulp:repository:integration_test_id",
158
        "pulp:action:delete"], "finish_time": "2016-04-29T16:21:41Z", "_ns": "task_status",
159
        "start_time": "2016-04-29T16:21:41Z", "traceback": null, "spawned_tasks":
160
        [], "progress_report": {}, "queue": "reserved_resource_worker-0@runcible.example.com.dq",
161
        "state": "finished", "worker_name": "reserved_resource_worker-0@runcible.example.com",
162
        "result": null, "error": null, "_id": {"$oid": "57238a15898f5c862fa3ea81"},
163
        "id": "57238a15898f5c862fa3ea81"}'
343
        "_href": "/pulp/api/v2/tasks/c1f81209-23f8-4998-91ab-c1a9e042e1cc/", "task_id":
344
        "c1f81209-23f8-4998-91ab-c1a9e042e1cc", "tags": ["pulp:repository:integration_test_id",
345
        "pulp:action:delete"], "finish_time": "2017-02-01T12:30:53Z", "_ns": "task_status",
346
        "start_time": "2017-02-01T12:30:53Z", "traceback": null, "spawned_tasks":
347
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@obelix.example.com.dq",
348
        "state": "finished", "worker_name": "reserved_resource_worker-1@obelix.example.com",
349
        "result": null, "error": null, "_id": {"$oid": "5891d4fd4b92d9e3004e81df"},
350
        "id": "5891d4fd4b92d9e3004e81df"}'
164 351
    http_version: 
165
  recorded_at: Fri, 29 Apr 2016 16:21:42 GMT
166
recorded_with: VCR 3.0.1
352
  recorded_at: Wed, 01 Feb 2017 12:30:53 GMT
353
recorded_with: VCR 3.0.3

Also available in: Unified diff