Project

General

Profile

Revision c050ae44

Added by Partha Aji over 7 years ago

Refs #7617 - Fixed a docker distributor issue

The docker distributor previously didnot properly communicate
protected/redirect_url/repo-registry-id attributes to pulp.
This commit aims to fix that

View differences:

lib/runcible/models/docker_distributor.rb
43 43
        to_ret = as_json
44 44
        to_ret.delete('auto_publish')
45 45
        to_ret.delete('id')
46
        to_ret.delete("repo_registry_id")
47
        to_ret["repo-registry-id"] = repo_registry_id
46 48
        to_ret
47 49
      end
48 50
    end
test/extensions/docker_repository_test.rb
75 75

  
76 76
    def test_create_with_distributor_object
77 77
      repo_id = RepositorySupport.repo_id + '_distro'
78
      mock_distro = Runcible::Models::DockerDistributor.new(:docker_publish_directory => '/path', :id => '123')
78
      url = "http://acme.org"
79
      repo_registry_id = "busybox"
80
      mock_distro = Runcible::Models::DockerDistributor.new(:docker_publish_directory => '/path',
81
                                                            :id => '123',
82
                                                            :redirect_url => url,
83
                                                            :repo_registry_id => repo_registry_id)
79 84
      response = @extension.create_with_distributors(repo_id, [mock_distro])
80 85
      assert_equal 201, response.code
81 86
      response = @extension.retrieve(repo_id, :details => true)
82 87
      assert_equal repo_id, response['id']
83 88
      assert_equal 'docker_distributor_web', response['distributors'].first['distributor_type_id']
89
      assert_equal url, response['distributors'].first['config']["redirect_url"]
90
      assert_equal repo_registry_id, response['distributors'].first['config']["repo-registry-id"]
84 91
    ensure
85 92
      @support.destroy_repo(repo_id)
86 93
    end
test/fixtures/vcr_cassettes/extensions/docker_repository_create/create_with_distributor_object.yml
1
--- 
2
http_interactions: 
3
- request: 
1
---
2
http_interactions:
3
- request:
4 4
    method: post
5 5
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/
6
    body: 
6
    body:
7 7
      encoding: US-ASCII
8
      string: "{\"id\":\"integration_test_id_distro\",\"distributors\":[{\"distributor_type_id\":\"docker_distributor_web\",\"distributor_config\":{\"docker_publish_directory\":\"/path\"},\"auto_publish\":false,\"distributor_id\":\"123\"}]}"
9
    headers: 
10
      Accept: 
8
      string: '{"id":"integration_test_id_distro","distributors":[{"distributor_type_id":"docker_distributor_web","distributor_config":{"docker_publish_directory":"/path"},"auto_publish":false,"distributor_id":"123"}]}'
9
    headers:
10
      Accept:
11 11
      - application/json
12
      Accept-Encoding: 
12
      Accept-Encoding:
13 13
      - gzip, deflate
14
      Content-Type: 
14
      Content-Type:
15 15
      - application/json
16
      Content-Length: 
17
      - "203"
18
      User-Agent: 
16
      Content-Length:
17
      - '203'
18
      User-Agent:
19 19
      - Ruby
20
  response: 
21
    status: 
20
  response:
21
    status:
22 22
      code: 201
23 23
      message: Created
24
    headers: 
25
      Date: 
24
    headers:
25
      Date:
26 26
      - Wed, 15 Oct 2014 14:24:28 GMT
27
      Server: 
27
      Server:
28 28
      - Apache/2.2.15 (Red Hat)
29
      Location: 
29
      Location:
30 30
      - integration_test_id_distro
31
      Vary: 
31
      Vary:
32 32
      - Accept-Encoding
33
      Content-Length: 
34
      - "340"
35
      Connection: 
33
      Content-Length:
34
      - '340'
35
      Connection:
36 36
      - close
37
      Content-Type: 
37
      Content-Type:
38 38
      - application/json
39
    body: 
39
    body:
40 40
      encoding: ASCII-8BIT
41
      string: "{\"scratchpad\": {}, \"display_name\": \"integration_test_id_distro\", \"description\": null, \"last_unit_added\": null, \"notes\": {}, \"last_unit_removed\": null, \"content_unit_counts\": {}, \"_ns\": \"repos\", \"_id\": {\"$oid\": \"543e839c47078708d9ecb41d\"}, \"id\": \"integration_test_id_distro\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id_distro/\"}"
41
      string: '{"scratchpad": {}, "display_name": "integration_test_id_distro", "description":
42
        null, "last_unit_added": null, "notes": {}, "last_unit_removed": null, "content_unit_counts":
43
        {}, "_ns": "repos", "_id": {"$oid": "543e839c47078708d9ecb41d"}, "id": "integration_test_id_distro",
44
        "_href": "/pulp/api/v2/repositories/integration_test_id_distro/"}'
42 45
    http_version: 
43 46
  recorded_at: Wed, 15 Oct 2014 14:24:28 GMT
44
- request: 
47
- request:
45 48
    method: get
46
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id_distro/?details=true
47
    body: 
49
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/8c06329f-6946-433f-a608-dc2c14ba84b8/
50
    body:
48 51
      encoding: US-ASCII
49
      string: ""
50
    headers: 
51
      Accept: 
52
      string: ''
53
    headers:
54
      Accept:
52 55
      - application/json
53
      Accept-Encoding: 
56
      Accept-Encoding:
54 57
      - gzip, deflate
55
      Content-Type: 
58
      Content-Type:
56 59
      - application/json
57
      User-Agent: 
60
      User-Agent:
58 61
      - Ruby
59
  response: 
60
    status: 
62
  response:
63
    status:
61 64
      code: 200
62 65
      message: OK
63
    headers: 
64
      Date: 
65
      - Wed, 15 Oct 2014 14:24:28 GMT
66
      Server: 
66
    headers:
67
      Date:
68
      - Wed, 15 Oct 2014 14:24:29 GMT
69
      Server:
67 70
      - Apache/2.2.15 (Red Hat)
68
      Vary: 
71
      Vary:
69 72
      - Accept-Encoding
70
      Content-Length: 
71
      - "674"
72
      Connection: 
73
      Content-Length:
74
      - '618'
75
      Connection:
73 76
      - close
74
      Content-Type: 
77
      Content-Type:
75 78
      - application/json
76
    body: 
79
    body:
77 80
      encoding: ASCII-8BIT
78
      string: "{\"scratchpad\": {}, \"display_name\": \"integration_test_id_distro\", \"description\": null, \"distributors\": [{\"repo_id\": \"integration_test_id_distro\", \"_ns\": \"repo_distributors\", \"last_publish\": null, \"auto_publish\": false, \"scheduled_publishes\": [], \"distributor_type_id\": \"docker_distributor_web\", \"_id\": {\"$oid\": \"543e839c47078708d9ecb41e\"}, \"config\": {\"docker_publish_directory\": \"/path\"}, \"id\": \"123\"}], \"last_unit_added\": null, \"notes\": {}, \"last_unit_removed\": null, \"content_unit_counts\": {}, \"_ns\": \"repos\", \"importers\": [], \"_id\": {\"$oid\": \"543e839c47078708d9ecb41d\"}, \"id\": \"integration_test_id_distro\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id_distro/\"}"
81
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
82
        "_href": "/pulp/api/v2/tasks/8c06329f-6946-433f-a608-dc2c14ba84b8/", "task_id":
83
        "8c06329f-6946-433f-a608-dc2c14ba84b8", "tags": ["pulp:repository:integration_test_id_distro",
84
        "pulp:action:delete"], "finish_time": "2014-10-15T14:24:29Z", "_ns": "task_status",
85
        "start_time": "2014-10-15T14:24:29Z", "traceback": null, "spawned_tasks":
86
        [], "progress_report": {}, "queue": "reserved_resource_worker-0@box.devel.com.dq",
87
        "state": "finished", "result": null, "error": null, "_id": {"$oid": "543e839d505c6f3b4b509b46"},
88
        "id": "543e839d47078708d9ecb421"}'
79 89
    http_version: 
80
  recorded_at: Wed, 15 Oct 2014 14:24:28 GMT
81
- request: 
90
  recorded_at: Wed, 15 Oct 2014 14:24:29 GMT
91
- request:
92
    method: post
93
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/
94
    body:
95
      encoding: UTF-8
96
      string: '{"id":"integration_test_id_distro","distributors":[{"distributor_type_id":"docker_distributor_web","distributor_config":{"docker_publish_directory":"/path","redirect_url":"http://acme.org","repo-registry-id":"busybox"},"auto_publish":false,"distributor_id":"123"}]}'
97
    headers:
98
      Accept:
99
      - application/json
100
      Accept-Encoding:
101
      - gzip, deflate
102
      Content-Type:
103
      - application/json
104
      Content-Length:
105
      - '265'
106
      User-Agent:
107
      - Ruby
108
  response:
109
    status:
110
      code: 201
111
      message: Created
112
    headers:
113
      Date:
114
      - Fri, 16 Jan 2015 18:50:00 GMT
115
      Server:
116
      - Apache/2.4.6 (CentOS)
117
      Location:
118
      - integration_test_id_distro
119
      Content-Length:
120
      - '340'
121
      Connection:
122
      - close
123
      Content-Type:
124
      - application/json
125
    body:
126
      encoding: UTF-8
127
      string: '{"scratchpad": {}, "display_name": "integration_test_id_distro", "description":
128
        null, "last_unit_added": null, "notes": {}, "last_unit_removed": null, "content_unit_counts":
129
        {}, "_ns": "repos", "_id": {"$oid": "54b95d588963d70799dd8f82"}, "id": "integration_test_id_distro",
130
        "_href": "/pulp/api/v2/repositories/integration_test_id_distro/"}'
131
    http_version: 
132
  recorded_at: Fri, 16 Jan 2015 18:50:00 GMT
133
- request:
134
    method: get
135
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/integration_test_id_distro/?details=true
136
    body:
137
      encoding: US-ASCII
138
      string: ''
139
    headers:
140
      Accept:
141
      - application/json
142
      Accept-Encoding:
143
      - gzip, deflate
144
      Content-Type:
145
      - application/json
146
      User-Agent:
147
      - Ruby
148
  response:
149
    status:
150
      code: 200
151
      message: OK
152
    headers:
153
      Date:
154
      - Fri, 16 Jan 2015 18:50:00 GMT
155
      Server:
156
      - Apache/2.4.6 (CentOS)
157
      Content-Length:
158
      - '740'
159
      Connection:
160
      - close
161
      Content-Type:
162
      - application/json
163
    body:
164
      encoding: UTF-8
165
      string: '{"scratchpad": {}, "display_name": "integration_test_id_distro", "description":
166
        null, "distributors": [{"repo_id": "integration_test_id_distro", "_ns": "repo_distributors",
167
        "last_publish": null, "auto_publish": false, "scheduled_publishes": [], "distributor_type_id":
168
        "docker_distributor_web", "_id": {"$oid": "54b95d588963d70799dd8f83"}, "config":
169
        {"repo-registry-id": "busybox", "docker_publish_directory": "/path", "redirect_url":
170
        "http://acme.org"}, "id": "123"}], "last_unit_added": null, "notes": {}, "last_unit_removed":
171
        null, "content_unit_counts": {}, "_ns": "repos", "importers": [], "_id": {"$oid":
172
        "54b95d588963d70799dd8f82"}, "id": "integration_test_id_distro", "_href":
173
        "/pulp/api/v2/repositories/integration_test_id_distro/"}'
174
    http_version: 
175
  recorded_at: Fri, 16 Jan 2015 18:50:00 GMT
176
- request:
82 177
    method: delete
83
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id_distro/
84
    body: 
178
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/integration_test_id_distro/
179
    body:
85 180
      encoding: US-ASCII
86
      string: ""
87
    headers: 
88
      Accept: 
181
      string: ''
182
    headers:
183
      Accept:
89 184
      - application/json
90
      Accept-Encoding: 
185
      Accept-Encoding:
91 186
      - gzip, deflate
92
      Content-Type: 
187
      Content-Type:
93 188
      - application/json
94
      User-Agent: 
189
      User-Agent:
95 190
      - Ruby
96
  response: 
97
    status: 
191
  response:
192
    status:
98 193
      code: 202
99 194
      message: Accepted
100
    headers: 
101
      Date: 
102
      - Wed, 15 Oct 2014 14:24:28 GMT
103
      Server: 
104
      - Apache/2.2.15 (Red Hat)
105
      Content-Encoding: 
195
    headers:
196
      Date:
197
      - Fri, 16 Jan 2015 18:50:00 GMT
198
      Server:
199
      - Apache/2.4.6 (CentOS)
200
      Content-Encoding:
106 201
      - utf-8
107
      Content-Length: 
108
      - "172"
109
      Connection: 
202
      Content-Length:
203
      - '172'
204
      Connection:
110 205
      - close
111
      Content-Type: 
206
      Content-Type:
112 207
      - application/json
113
    body: 
114
      encoding: US-ASCII
115
      string: "{\"spawned_tasks\": [{\"_href\": \"/pulp/api/v2/tasks/8c06329f-6946-433f-a608-dc2c14ba84b8/\", \"task_id\": \"8c06329f-6946-433f-a608-dc2c14ba84b8\"}], \"result\": null, \"error\": null}"
208
    body:
209
      encoding: UTF-8
210
      string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/c5d87b6c-c459-4c8a-bc59-df9da6fbda09/",
211
        "task_id": "c5d87b6c-c459-4c8a-bc59-df9da6fbda09"}], "result": null, "error":
212
        null}'
116 213
    http_version: 
117
  recorded_at: Wed, 15 Oct 2014 14:24:29 GMT
118
- request: 
214
  recorded_at: Fri, 16 Jan 2015 18:50:00 GMT
215
- request:
119 216
    method: get
120
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/8c06329f-6946-433f-a608-dc2c14ba84b8/
121
    body: 
217
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/tasks/c5d87b6c-c459-4c8a-bc59-df9da6fbda09/
218
    body:
122 219
      encoding: US-ASCII
123
      string: ""
124
    headers: 
125
      Accept: 
220
      string: ''
221
    headers:
222
      Accept:
126 223
      - application/json
127
      Accept-Encoding: 
224
      Accept-Encoding:
128 225
      - gzip, deflate
129
      Content-Type: 
226
      Content-Type:
130 227
      - application/json
131
      User-Agent: 
228
      User-Agent:
132 229
      - Ruby
133
  response: 
134
    status: 
230
  response:
231
    status:
135 232
      code: 200
136 233
      message: OK
137
    headers: 
138
      Date: 
139
      - Wed, 15 Oct 2014 14:24:29 GMT
140
      Server: 
141
      - Apache/2.2.15 (Red Hat)
142
      Vary: 
143
      - Accept-Encoding
144
      Content-Length: 
145
      - "618"
146
      Connection: 
234
    headers:
235
      Date:
236
      - Fri, 16 Jan 2015 18:50:01 GMT
237
      Server:
238
      - Apache/2.4.6 (CentOS)
239
      Content-Length:
240
      - '631'
241
      Connection:
147 242
      - close
148
      Content-Type: 
243
      Content-Type:
149 244
      - application/json
150
    body: 
151
      encoding: ASCII-8BIT
152
      string: "{\"exception\": null, \"task_type\": \"pulp.server.tasks.repository.delete\", \"_href\": \"/pulp/api/v2/tasks/8c06329f-6946-433f-a608-dc2c14ba84b8/\", \"task_id\": \"8c06329f-6946-433f-a608-dc2c14ba84b8\", \"tags\": [\"pulp:repository:integration_test_id_distro\", \"pulp:action:delete\"], \"finish_time\": \"2014-10-15T14:24:29Z\", \"_ns\": \"task_status\", \"start_time\": \"2014-10-15T14:24:29Z\", \"traceback\": null, \"spawned_tasks\": [], \"progress_report\": {}, \"queue\": \"reserved_resource_worker-0@box.devel.com.dq\", \"state\": \"finished\", \"result\": null, \"error\": null, \"_id\": {\"$oid\": \"543e839d505c6f3b4b509b46\"}, \"id\": \"543e839d47078708d9ecb421\"}"
245
    body:
246
      encoding: UTF-8
247
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
248
        "_href": "/pulp/api/v2/tasks/c5d87b6c-c459-4c8a-bc59-df9da6fbda09/", "task_id":
249
        "c5d87b6c-c459-4c8a-bc59-df9da6fbda09", "tags": ["pulp:repository:integration_test_id_distro",
250
        "pulp:action:delete"], "finish_time": "2015-01-16T18:50:00Z", "_ns": "task_status",
251
        "start_time": "2015-01-16T18:50:00Z", "traceback": null, "spawned_tasks":
252
        [], "progress_report": {}, "queue": "reserved_resource_worker-0@katello-edison.example.com.dq",
253
        "state": "finished", "result": null, "error": null, "_id": {"$oid": "54b95d584399fa849d11d44e"},
254
        "id": "54b95d588963d70799dd8f86"}'
153 255
    http_version: 
154
  recorded_at: Wed, 15 Oct 2014 14:24:29 GMT
155
- request: 
256
  recorded_at: Fri, 16 Jan 2015 18:50:01 GMT
257
- request:
156 258
    method: delete
157
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id/
158
    body: 
259
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/integration_test_id/
260
    body:
159 261
      encoding: US-ASCII
160
      string: ""
161
    headers: 
162
      Accept: 
262
      string: ''
263
    headers:
264
      Accept:
163 265
      - application/json
164
      Accept-Encoding: 
266
      Accept-Encoding:
165 267
      - gzip, deflate
166
      Content-Type: 
268
      Content-Type:
167 269
      - application/json
168
      User-Agent: 
270
      User-Agent:
169 271
      - Ruby
170
  response: 
171
    status: 
272
  response:
273
    status:
172 274
      code: 404
173 275
      message: Not Found
174
    headers: 
175
      Date: 
176
      - Wed, 15 Oct 2014 14:24:29 GMT
177
      Server: 
178
      - Apache/2.2.15 (Red Hat)
179
      Content-Encoding: 
276
    headers:
277
      Date:
278
      - Fri, 16 Jan 2015 18:50:01 GMT
279
      Server:
280
      - Apache/2.4.6 (CentOS)
281
      Content-Encoding:
180 282
      - utf-8
181
      Content-Length: 
182
      - "442"
183
      Connection: 
283
      Content-Length:
284
      - '442'
285
      Connection:
184 286
      - close
185
      Content-Type: 
287
      Content-Type:
186 288
      - application/json
187
    body: 
188
      encoding: US-ASCII
189
      string: "{\"http_request_method\": \"DELETE\", \"exception\": null, \"error_message\": \"Missing resource(s): repo_id=integration_test_id\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id/\", \"http_status\": 404, \"error\": {\"code\": \"PLP0009\", \"data\": {\"resources\": {\"repo_id\": \"integration_test_id\"}}, \"description\": \"Missing resource(s): repo_id=integration_test_id\", \"sub_errors\": []}, \"traceback\": null, \"resources\": {\"repo_id\": \"integration_test_id\"}}"
289
    body:
290
      encoding: UTF-8
291
      string: '{"http_request_method": "DELETE", "exception": null, "error_message":
292
        "Missing resource(s): repo_id=integration_test_id", "_href": "/pulp/api/v2/repositories/integration_test_id/",
293
        "http_status": 404, "error": {"code": "PLP0009", "data": {"resources": {"repo_id":
294
        "integration_test_id"}}, "description": "Missing resource(s): repo_id=integration_test_id",
295
        "sub_errors": []}, "traceback": null, "resources": {"repo_id": "integration_test_id"}}'
190 296
    http_version: 
191
  recorded_at: Wed, 15 Oct 2014 14:24:29 GMT
297
  recorded_at: Fri, 16 Jan 2015 18:50:01 GMT
192 298
recorded_with: VCR 2.9.3
test/fixtures/vcr_cassettes/extensions/docker_repository_create/create_with_distributors.yml
1
--- 
2
http_interactions: 
3
- request: 
4
    method: post
5
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/
6
    body: 
1
---
2
http_interactions:
3
- request:
4
    method: get
5
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/209d50bd-8966-4c7e-8a12-9b2006e3c739/
6
    body:
7 7
      encoding: US-ASCII
8
      string: "{\"id\":\"integration_test_id\",\"distributors\":[{\"distributor_type_id\":\"docker_distributor_web\",\"distributor_config\":{\"docker_publish_directory\":\"/path\"},\"auto_publish\":true,\"distributor_id\":\"123\"}]}"
9
    headers: 
10
      Accept: 
8
      string: ''
9
    headers:
10
      Accept:
11 11
      - application/json
12
      Accept-Encoding: 
12
      Accept-Encoding:
13 13
      - gzip, deflate
14
      Content-Type: 
14
      Content-Type:
15 15
      - application/json
16
      Content-Length: 
17
      - "195"
18
      User-Agent: 
16
      User-Agent:
19 17
      - Ruby
20
  response: 
21
    status: 
22
      code: 201
23
      message: Created
24
    headers: 
25
      Date: 
26
      - Wed, 15 Oct 2014 14:24:33 GMT
27
      Server: 
18
  response:
19
    status:
20
      code: 200
21
      message: OK
22
    headers:
23
      Date:
24
      - Wed, 15 Oct 2014 14:24:34 GMT
25
      Server:
28 26
      - Apache/2.2.15 (Red Hat)
29
      Location: 
30
      - integration_test_id
31
      Vary: 
27
      Vary:
32 28
      - Accept-Encoding
33
      Content-Length: 
34
      - "319"
35
      Connection: 
29
      Content-Length:
30
      - '611'
31
      Connection:
36 32
      - close
37
      Content-Type: 
33
      Content-Type:
38 34
      - application/json
39
    body: 
35
    body:
40 36
      encoding: ASCII-8BIT
41
      string: "{\"scratchpad\": {}, \"display_name\": \"integration_test_id\", \"description\": null, \"last_unit_added\": null, \"notes\": {}, \"last_unit_removed\": null, \"content_unit_counts\": {}, \"_ns\": \"repos\", \"_id\": {\"$oid\": \"543e83a147078708d9ecb437\"}, \"id\": \"integration_test_id\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id/\"}"
37
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
38
        "_href": "/pulp/api/v2/tasks/209d50bd-8966-4c7e-8a12-9b2006e3c739/", "task_id":
39
        "209d50bd-8966-4c7e-8a12-9b2006e3c739", "tags": ["pulp:repository:integration_test_id",
40
        "pulp:action:delete"], "finish_time": "2014-10-15T14:24:34Z", "_ns": "task_status",
41
        "start_time": "2014-10-15T14:24:34Z", "traceback": null, "spawned_tasks":
42
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@box.devel.com.dq",
43
        "state": "finished", "result": null, "error": null, "_id": {"$oid": "543e83a2505c6f3b4b509b4a"},
44
        "id": "543e83a247078708d9ecb43a"}'
45
    http_version: 
46
  recorded_at: Wed, 15 Oct 2014 14:24:34 GMT
47
- request:
48
    method: post
49
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/
50
    body:
51
      encoding: UTF-8
52
      string: '{"id":"integration_test_id","distributors":[{"distributor_type_id":"docker_distributor_web","distributor_config":{"docker_publish_directory":"/path"},"auto_publish":true,"distributor_id":"123"}]}'
53
    headers:
54
      Accept:
55
      - application/json
56
      Accept-Encoding:
57
      - gzip, deflate
58
      Content-Type:
59
      - application/json
60
      Content-Length:
61
      - '195'
62
      User-Agent:
63
      - Ruby
64
  response:
65
    status:
66
      code: 201
67
      message: Created
68
    headers:
69
      Date:
70
      - Fri, 16 Jan 2015 18:50:02 GMT
71
      Server:
72
      - Apache/2.4.6 (CentOS)
73
      Location:
74
      - integration_test_id
75
      Content-Length:
76
      - '319'
77
      Connection:
78
      - close
79
      Content-Type:
80
      - application/json
81
    body:
82
      encoding: UTF-8
83
      string: '{"scratchpad": {}, "display_name": "integration_test_id", "description":
84
        null, "last_unit_added": null, "notes": {}, "last_unit_removed": null, "content_unit_counts":
85
        {}, "_ns": "repos", "_id": {"$oid": "54b95d5a8963d70799dd8f8e"}, "id": "integration_test_id",
86
        "_href": "/pulp/api/v2/repositories/integration_test_id/"}'
42 87
    http_version: 
43
  recorded_at: Wed, 15 Oct 2014 14:24:33 GMT
44
- request: 
88
  recorded_at: Fri, 16 Jan 2015 18:50:02 GMT
89
- request:
45 90
    method: delete
46
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id/
47
    body: 
91
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/integration_test_id/
92
    body:
48 93
      encoding: US-ASCII
49
      string: ""
50
    headers: 
51
      Accept: 
94
      string: ''
95
    headers:
96
      Accept:
52 97
      - application/json
53
      Accept-Encoding: 
98
      Accept-Encoding:
54 99
      - gzip, deflate
55
      Content-Type: 
100
      Content-Type:
56 101
      - application/json
57
      User-Agent: 
102
      User-Agent:
58 103
      - Ruby
59
  response: 
60
    status: 
104
  response:
105
    status:
61 106
      code: 202
62 107
      message: Accepted
63
    headers: 
64
      Date: 
65
      - Wed, 15 Oct 2014 14:24:33 GMT
66
      Server: 
67
      - Apache/2.2.15 (Red Hat)
68
      Content-Encoding: 
108
    headers:
109
      Date:
110
      - Fri, 16 Jan 2015 18:50:02 GMT
111
      Server:
112
      - Apache/2.4.6 (CentOS)
113
      Content-Encoding:
69 114
      - utf-8
70
      Content-Length: 
71
      - "172"
72
      Connection: 
115
      Content-Length:
116
      - '172'
117
      Connection:
73 118
      - close
74
      Content-Type: 
119
      Content-Type:
75 120
      - application/json
76
    body: 
77
      encoding: US-ASCII
78
      string: "{\"spawned_tasks\": [{\"_href\": \"/pulp/api/v2/tasks/209d50bd-8966-4c7e-8a12-9b2006e3c739/\", \"task_id\": \"209d50bd-8966-4c7e-8a12-9b2006e3c739\"}], \"result\": null, \"error\": null}"
121
    body:
122
      encoding: UTF-8
123
      string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/8d7c532f-edbd-43d7-9679-0cf9c41c52e8/",
124
        "task_id": "8d7c532f-edbd-43d7-9679-0cf9c41c52e8"}], "result": null, "error":
125
        null}'
79 126
    http_version: 
80
  recorded_at: Wed, 15 Oct 2014 14:24:34 GMT
81
- request: 
127
  recorded_at: Fri, 16 Jan 2015 18:50:03 GMT
128
- request:
82 129
    method: get
83
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/209d50bd-8966-4c7e-8a12-9b2006e3c739/
84
    body: 
130
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/tasks/8d7c532f-edbd-43d7-9679-0cf9c41c52e8/
131
    body:
85 132
      encoding: US-ASCII
86
      string: ""
87
    headers: 
88
      Accept: 
133
      string: ''
134
    headers:
135
      Accept:
89 136
      - application/json
90
      Accept-Encoding: 
137
      Accept-Encoding:
91 138
      - gzip, deflate
92
      Content-Type: 
139
      Content-Type:
93 140
      - application/json
94
      User-Agent: 
141
      User-Agent:
95 142
      - Ruby
96
  response: 
97
    status: 
143
  response:
144
    status:
98 145
      code: 200
99 146
      message: OK
100
    headers: 
101
      Date: 
102
      - Wed, 15 Oct 2014 14:24:34 GMT
103
      Server: 
104
      - Apache/2.2.15 (Red Hat)
105
      Vary: 
106
      - Accept-Encoding
107
      Content-Length: 
108
      - "611"
109
      Connection: 
147
    headers:
148
      Date:
149
      - Fri, 16 Jan 2015 18:50:03 GMT
150
      Server:
151
      - Apache/2.4.6 (CentOS)
152
      Content-Length:
153
      - '624'
154
      Connection:
110 155
      - close
111
      Content-Type: 
156
      Content-Type:
112 157
      - application/json
113
    body: 
114
      encoding: ASCII-8BIT
115
      string: "{\"exception\": null, \"task_type\": \"pulp.server.tasks.repository.delete\", \"_href\": \"/pulp/api/v2/tasks/209d50bd-8966-4c7e-8a12-9b2006e3c739/\", \"task_id\": \"209d50bd-8966-4c7e-8a12-9b2006e3c739\", \"tags\": [\"pulp:repository:integration_test_id\", \"pulp:action:delete\"], \"finish_time\": \"2014-10-15T14:24:34Z\", \"_ns\": \"task_status\", \"start_time\": \"2014-10-15T14:24:34Z\", \"traceback\": null, \"spawned_tasks\": [], \"progress_report\": {}, \"queue\": \"reserved_resource_worker-1@box.devel.com.dq\", \"state\": \"finished\", \"result\": null, \"error\": null, \"_id\": {\"$oid\": \"543e83a2505c6f3b4b509b4a\"}, \"id\": \"543e83a247078708d9ecb43a\"}"
158
    body:
159
      encoding: UTF-8
160
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
161
        "_href": "/pulp/api/v2/tasks/8d7c532f-edbd-43d7-9679-0cf9c41c52e8/", "task_id":
162
        "8d7c532f-edbd-43d7-9679-0cf9c41c52e8", "tags": ["pulp:repository:integration_test_id",
163
        "pulp:action:delete"], "finish_time": "2015-01-16T18:50:03Z", "_ns": "task_status",
164
        "start_time": "2015-01-16T18:50:03Z", "traceback": null, "spawned_tasks":
165
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@katello-edison.example.com.dq",
166
        "state": "finished", "result": null, "error": null, "_id": {"$oid": "54b95d5b4399fa849d11d454"},
167
        "id": "54b95d5b8963d70799dd8f91"}'
116 168
    http_version: 
117
  recorded_at: Wed, 15 Oct 2014 14:24:34 GMT
169
  recorded_at: Fri, 16 Jan 2015 18:50:03 GMT
118 170
recorded_with: VCR 2.9.3
test/fixtures/vcr_cassettes/extensions/docker_repository_create/create_with_importer.yml
1
--- 
2
http_interactions: 
3
- request: 
4
    method: post
5
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/
6
    body: 
1
---
2
http_interactions:
3
- request:
4
    method: get
5
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/38e7ab50-079b-4a65-8918-9bc1ebdfb65b/
6
    body:
7 7
      encoding: US-ASCII
8
      string: "{\"id\":\"integration_test_id\",\"importer_type_id\":\"docker_importer\",\"importer_config\":{}}"
9
    headers: 
10
      Accept: 
8
      string: ''
9
    headers:
10
      Accept:
11 11
      - application/json
12
      Accept-Encoding: 
12
      Accept-Encoding:
13 13
      - gzip, deflate
14
      Content-Type: 
14
      Content-Type:
15 15
      - application/json
16
      Content-Length: 
17
      - "86"
18
      User-Agent: 
16
      User-Agent:
19 17
      - Ruby
20
  response: 
21
    status: 
22
      code: 201
23
      message: Created
24
    headers: 
25
      Date: 
26
      - Wed, 15 Oct 2014 14:24:31 GMT
27
      Server: 
18
  response:
19
    status:
20
      code: 200
21
      message: OK
22
    headers:
23
      Date:
24
      - Wed, 15 Oct 2014 14:24:32 GMT
25
      Server:
28 26
      - Apache/2.2.15 (Red Hat)
29
      Location: 
30
      - integration_test_id
31
      Vary: 
27
      Vary:
32 28
      - Accept-Encoding
33
      Content-Length: 
34
      - "319"
35
      Connection: 
29
      Content-Length:
30
      - '611'
31
      Connection:
36 32
      - close
37
      Content-Type: 
33
      Content-Type:
38 34
      - application/json
39
    body: 
35
    body:
40 36
      encoding: ASCII-8BIT
41
      string: "{\"scratchpad\": {}, \"display_name\": \"integration_test_id\", \"description\": null, \"last_unit_added\": null, \"notes\": {}, \"last_unit_removed\": null, \"content_unit_counts\": {}, \"_ns\": \"repos\", \"_id\": {\"$oid\": \"543e839f47078708d9ecb42a\"}, \"id\": \"integration_test_id\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id/\"}"
37
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
38
        "_href": "/pulp/api/v2/tasks/38e7ab50-079b-4a65-8918-9bc1ebdfb65b/", "task_id":
39
        "38e7ab50-079b-4a65-8918-9bc1ebdfb65b", "tags": ["pulp:repository:integration_test_id",
40
        "pulp:action:delete"], "finish_time": "2014-10-15T14:24:31Z", "_ns": "task_status",
41
        "start_time": "2014-10-15T14:24:31Z", "traceback": null, "spawned_tasks":
42
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@box.devel.com.dq",
43
        "state": "finished", "result": null, "error": null, "_id": {"$oid": "543e839f505c6f3b4b509b48"},
44
        "id": "543e839f47078708d9ecb42e"}'
45
    http_version: 
46
  recorded_at: Wed, 15 Oct 2014 14:24:32 GMT
47
- request:
48
    method: post
49
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/
50
    body:
51
      encoding: UTF-8
52
      string: '{"id":"integration_test_id","importer_type_id":"docker_importer","importer_config":{}}'
53
    headers:
54
      Accept:
55
      - application/json
56
      Accept-Encoding:
57
      - gzip, deflate
58
      Content-Type:
59
      - application/json
60
      Content-Length:
61
      - '86'
62
      User-Agent:
63
      - Ruby
64
  response:
65
    status:
66
      code: 201
67
      message: Created
68
    headers:
69
      Date:
70
      - Fri, 16 Jan 2015 18:50:01 GMT
71
      Server:
72
      - Apache/2.4.6 (CentOS)
73
      Location:
74
      - integration_test_id
75
      Content-Length:
76
      - '319'
77
      Connection:
78
      - close
79
      Content-Type:
80
      - application/json
81
    body:
82
      encoding: UTF-8
83
      string: '{"scratchpad": {}, "display_name": "integration_test_id", "description":
84
        null, "last_unit_added": null, "notes": {}, "last_unit_removed": null, "content_unit_counts":
85
        {}, "_ns": "repos", "_id": {"$oid": "54b95d598963d70799dd8f88"}, "id": "integration_test_id",
86
        "_href": "/pulp/api/v2/repositories/integration_test_id/"}'
42 87
    http_version: 
43
  recorded_at: Wed, 15 Oct 2014 14:24:31 GMT
44
- request: 
88
  recorded_at: Fri, 16 Jan 2015 18:50:01 GMT
89
- request:
45 90
    method: get
46
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id/?details=true
47
    body: 
91
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/integration_test_id/?details=true
92
    body:
48 93
      encoding: US-ASCII
49
      string: ""
50
    headers: 
51
      Accept: 
94
      string: ''
95
    headers:
96
      Accept:
52 97
      - application/json
53
      Accept-Encoding: 
98
      Accept-Encoding:
54 99
      - gzip, deflate
55
      Content-Type: 
100
      Content-Type:
56 101
      - application/json
57
      User-Agent: 
102
      User-Agent:
58 103
      - Ruby
59
  response: 
60
    status: 
104
  response:
105
    status:
61 106
      code: 200
62 107
      message: OK
63
    headers: 
64
      Date: 
65
      - Wed, 15 Oct 2014 14:24:31 GMT
66
      Server: 
67
      - Apache/2.2.15 (Red Hat)
68
      Vary: 
69
      - Accept-Encoding
70
      Content-Length: 
71
      - "580"
72
      Connection: 
108
    headers:
109
      Date:
110
      - Fri, 16 Jan 2015 18:50:01 GMT
111
      Server:
112
      - Apache/2.4.6 (CentOS)
113
      Content-Length:
114
      - '580'
115
      Connection:
73 116
      - close
74
      Content-Type: 
117
      Content-Type:
75 118
      - application/json
76
    body: 
77
      encoding: ASCII-8BIT
78
      string: "{\"scratchpad\": {}, \"display_name\": \"integration_test_id\", \"description\": null, \"distributors\": [], \"last_unit_added\": null, \"notes\": {}, \"last_unit_removed\": null, \"content_unit_counts\": {}, \"_ns\": \"repos\", \"importers\": [{\"repo_id\": \"integration_test_id\", \"_ns\": \"repo_importers\", \"importer_type_id\": \"docker_importer\", \"last_sync\": null, \"scheduled_syncs\": [], \"_id\": {\"$oid\": \"543e839f47078708d9ecb42b\"}, \"config\": {}, \"id\": \"docker_importer\"}], \"_id\": {\"$oid\": \"543e839f47078708d9ecb42a\"}, \"id\": \"integration_test_id\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id/\"}"
119
    body:
120
      encoding: UTF-8
121
      string: '{"scratchpad": {}, "display_name": "integration_test_id", "description":
122
        null, "distributors": [], "last_unit_added": null, "notes": {}, "last_unit_removed":
123
        null, "content_unit_counts": {}, "_ns": "repos", "importers": [{"repo_id":
124
        "integration_test_id", "_ns": "repo_importers", "importer_type_id": "docker_importer",
125
        "last_sync": null, "scheduled_syncs": [], "_id": {"$oid": "54b95d598963d70799dd8f89"},
126
        "config": {}, "id": "docker_importer"}], "_id": {"$oid": "54b95d598963d70799dd8f88"},
127
        "id": "integration_test_id", "_href": "/pulp/api/v2/repositories/integration_test_id/"}'
79 128
    http_version: 
80
  recorded_at: Wed, 15 Oct 2014 14:24:31 GMT
81
- request: 
129
  recorded_at: Fri, 16 Jan 2015 18:50:01 GMT
130
- request:
82 131
    method: delete
83
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id/
84
    body: 
132
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/integration_test_id/
133
    body:
85 134
      encoding: US-ASCII
86
      string: ""
87
    headers: 
88
      Accept: 
135
      string: ''
136
    headers:
137
      Accept:
89 138
      - application/json
90
      Accept-Encoding: 
139
      Accept-Encoding:
91 140
      - gzip, deflate
92
      Content-Type: 
141
      Content-Type:
93 142
      - application/json
94
      User-Agent: 
143
      User-Agent:
95 144
      - Ruby
96
  response: 
97
    status: 
145
  response:
146
    status:
98 147
      code: 202
99 148
      message: Accepted
100
    headers: 
101
      Date: 
102
      - Wed, 15 Oct 2014 14:24:31 GMT
103
      Server: 
104
      - Apache/2.2.15 (Red Hat)
105
      Content-Encoding: 
149
    headers:
150
      Date:
151
      - Fri, 16 Jan 2015 18:50:01 GMT
152
      Server:
153
      - Apache/2.4.6 (CentOS)
154
      Content-Encoding:
106 155
      - utf-8
107
      Content-Length: 
108
      - "172"
109
      Connection: 
156
      Content-Length:
157
      - '172'
158
      Connection:
110 159
      - close
111
      Content-Type: 
160
      Content-Type:
112 161
      - application/json
113
    body: 
114
      encoding: US-ASCII
115
      string: "{\"spawned_tasks\": [{\"_href\": \"/pulp/api/v2/tasks/38e7ab50-079b-4a65-8918-9bc1ebdfb65b/\", \"task_id\": \"38e7ab50-079b-4a65-8918-9bc1ebdfb65b\"}], \"result\": null, \"error\": null}"
162
    body:
163
      encoding: UTF-8
164
      string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/b6729f24-fc27-41aa-8e59-af56de3d51ef/",
165
        "task_id": "b6729f24-fc27-41aa-8e59-af56de3d51ef"}], "result": null, "error":
166
        null}'
116 167
    http_version: 
117
  recorded_at: Wed, 15 Oct 2014 14:24:31 GMT
118
- request: 
168
  recorded_at: Fri, 16 Jan 2015 18:50:01 GMT
169
- request:
119 170
    method: get
120
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/38e7ab50-079b-4a65-8918-9bc1ebdfb65b/
121
    body: 
171
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/tasks/b6729f24-fc27-41aa-8e59-af56de3d51ef/
172
    body:
122 173
      encoding: US-ASCII
123
      string: ""
124
    headers: 
125
      Accept: 
174
      string: ''
175
    headers:
176
      Accept:
126 177
      - application/json
127
      Accept-Encoding: 
178
      Accept-Encoding:
128 179
      - gzip, deflate
129
      Content-Type: 
180
      Content-Type:
130 181
      - application/json
131
      User-Agent: 
182
      User-Agent:
132 183
      - Ruby
133
  response: 
134
    status: 
184
  response:
185
    status:
135 186
      code: 200
136 187
      message: OK
137
    headers: 
138
      Date: 
139
      - Wed, 15 Oct 2014 14:24:32 GMT
140
      Server: 
141
      - Apache/2.2.15 (Red Hat)
142
      Vary: 
143
      - Accept-Encoding
144
      Content-Length: 
145
      - "611"
146
      Connection: 
188
    headers:
189
      Date:
190
      - Fri, 16 Jan 2015 18:50:02 GMT
191
      Server:
192
      - Apache/2.4.6 (CentOS)
193
      Content-Length:
194
      - '624'
195
      Connection:
147 196
      - close
148
      Content-Type: 
197
      Content-Type:
149 198
      - application/json
150
    body: 
151
      encoding: ASCII-8BIT
152
      string: "{\"exception\": null, \"task_type\": \"pulp.server.tasks.repository.delete\", \"_href\": \"/pulp/api/v2/tasks/38e7ab50-079b-4a65-8918-9bc1ebdfb65b/\", \"task_id\": \"38e7ab50-079b-4a65-8918-9bc1ebdfb65b\", \"tags\": [\"pulp:repository:integration_test_id\", \"pulp:action:delete\"], \"finish_time\": \"2014-10-15T14:24:31Z\", \"_ns\": \"task_status\", \"start_time\": \"2014-10-15T14:24:31Z\", \"traceback\": null, \"spawned_tasks\": [], \"progress_report\": {}, \"queue\": \"reserved_resource_worker-1@box.devel.com.dq\", \"state\": \"finished\", \"result\": null, \"error\": null, \"_id\": {\"$oid\": \"543e839f505c6f3b4b509b48\"}, \"id\": \"543e839f47078708d9ecb42e\"}"
199
    body:
200
      encoding: UTF-8
201
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
202
        "_href": "/pulp/api/v2/tasks/b6729f24-fc27-41aa-8e59-af56de3d51ef/", "task_id":
203
        "b6729f24-fc27-41aa-8e59-af56de3d51ef", "tags": ["pulp:repository:integration_test_id",
204
        "pulp:action:delete"], "finish_time": "2015-01-16T18:50:01Z", "_ns": "task_status",
205
        "start_time": "2015-01-16T18:50:01Z", "traceback": null, "spawned_tasks":
206
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@katello-edison.example.com.dq",
207
        "state": "finished", "result": null, "error": null, "_id": {"$oid": "54b95d594399fa849d11d451"},
208
        "id": "54b95d598963d70799dd8f8c"}'
153 209
    http_version: 
154
  recorded_at: Wed, 15 Oct 2014 14:24:32 GMT
210
  recorded_at: Fri, 16 Jan 2015 18:50:02 GMT
155 211
recorded_with: VCR 2.9.3
test/fixtures/vcr_cassettes/extensions/docker_repository_create/create_with_importer_and_distributors.yml
1
--- 
2
http_interactions: 
3
- request: 
4
    method: post
5
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/
6
    body: 
1
---
2
http_interactions:
3
- request:
4
    method: get
5
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/3a502419-3ffb-442a-b45e-123d6ef8a1c9/
6
    body:
7 7
      encoding: US-ASCII
8
      string: "{\"id\":\"integration_test_id\",\"importer_type_id\":\"docker_importer\",\"importer_config\":{},\"distributors\":[{\"distributor_type_id\":\"docker_distributor_web\",\"distributor_config\":{},\"auto_publish\":true,\"distributor_id\":\"123\"}]}"
9
    headers: 
10
      Accept: 
8
      string: ''
9
    headers:
10
      Accept:
11 11
      - application/json
12
      Accept-Encoding: 
12
      Accept-Encoding:
13 13
      - gzip, deflate
14
      Content-Type: 
14
      Content-Type:
15 15
      - application/json
16
      Content-Length: 
17
      - "219"
18
      User-Agent: 
16
      User-Agent:
19 17
      - Ruby
20
  response: 
21
    status: 
22
      code: 201
23
      message: Created
24
    headers: 
25
      Date: 
26
      - Wed, 15 Oct 2014 14:24:29 GMT
27
      Server: 
18
  response:
19
    status:
20
      code: 200
21
      message: OK
22
    headers:
23
      Date:
24
      - Wed, 15 Oct 2014 14:24:31 GMT
25
      Server:
28 26
      - Apache/2.2.15 (Red Hat)
29
      Location: 
30
      - integration_test_id
31
      Vary: 
27
      Vary:
32 28
      - Accept-Encoding
33
      Content-Length: 
34
      - "319"
35
      Connection: 
29
      Content-Length:
30
      - '611'
31
      Connection:
36 32
      - close
37
      Content-Type: 
33
      Content-Type:
38 34
      - application/json
39
    body: 
35
    body:
40 36
      encoding: ASCII-8BIT
41
      string: "{\"scratchpad\": {}, \"display_name\": \"integration_test_id\", \"description\": null, \"last_unit_added\": null, \"notes\": {}, \"last_unit_removed\": null, \"content_unit_counts\": {}, \"_ns\": \"repos\", \"_id\": {\"$oid\": \"543e839d47078708d9ecb423\"}, \"id\": \"integration_test_id\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id/\"}"
37
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
38
        "_href": "/pulp/api/v2/tasks/3a502419-3ffb-442a-b45e-123d6ef8a1c9/", "task_id":
39
        "3a502419-3ffb-442a-b45e-123d6ef8a1c9", "tags": ["pulp:repository:integration_test_id",
40
        "pulp:action:delete"], "finish_time": "2014-10-15T14:24:30Z", "_ns": "task_status",
41
        "start_time": "2014-10-15T14:24:30Z", "traceback": null, "spawned_tasks":
42
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@box.devel.com.dq",
43
        "state": "finished", "result": null, "error": null, "_id": {"$oid": "543e839e505c6f3b4b509b47"},
44
        "id": "543e839e47078708d9ecb428"}'
45
    http_version: 
46
  recorded_at: Wed, 15 Oct 2014 14:24:31 GMT
47
- request:
48
    method: post
49
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/
50
    body:
51
      encoding: UTF-8
52
      string: '{"id":"integration_test_id","importer_type_id":"docker_importer","importer_config":{},"distributors":[{"distributor_type_id":"docker_distributor_web","distributor_config":{},"auto_publish":true,"distributor_id":"123"}]}'
53
    headers:
54
      Accept:
55
      - application/json
56
      Accept-Encoding:
57
      - gzip, deflate
58
      Content-Type:
59
      - application/json
60
      Content-Length:
61
      - '219'
62
      User-Agent:
63
      - Ruby
64
  response:
65
    status:
66
      code: 201
67
      message: Created
68
    headers:
69
      Date:
70
      - Fri, 16 Jan 2015 18:50:03 GMT
71
      Server:
72
      - Apache/2.4.6 (CentOS)
73
      Location:
74
      - integration_test_id
75
      Content-Length:
76
      - '319'
77
      Connection:
78
      - close
79
      Content-Type:
80
      - application/json
81
    body:
82
      encoding: UTF-8
83
      string: '{"scratchpad": {}, "display_name": "integration_test_id", "description":
84
        null, "last_unit_added": null, "notes": {}, "last_unit_removed": null, "content_unit_counts":
85
        {}, "_ns": "repos", "_id": {"$oid": "54b95d5b8963d70799dd8f93"}, "id": "integration_test_id",
86
        "_href": "/pulp/api/v2/repositories/integration_test_id/"}'
42 87
    http_version: 
43
  recorded_at: Wed, 15 Oct 2014 14:24:29 GMT
44
- request: 
88
  recorded_at: Fri, 16 Jan 2015 18:50:03 GMT
89
- request:
45 90
    method: get
46
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id/?details=true
47
    body: 
91
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/integration_test_id/?details=true
92
    body:
48 93
      encoding: US-ASCII
49
      string: ""
50
    headers: 
51
      Accept: 
94
      string: ''
95
    headers:
96
      Accept:
52 97
      - application/json
53
      Accept-Encoding: 
98
      Accept-Encoding:
54 99
      - gzip, deflate
55
      Content-Type: 
100
      Content-Type:
56 101
      - application/json
57
      User-Agent: 
102
      User-Agent:
58 103
      - Ruby
59
  response: 
60
    status: 
104
  response:
105
    status:
61 106
      code: 200
62 107
      message: OK
63
    headers: 
64
      Date: 
65
      - Wed, 15 Oct 2014 14:24:29 GMT
66
      Server: 
67
      - Apache/2.2.15 (Red Hat)
68
      Vary: 
69
      - Accept-Encoding
70
      Content-Length: 
71
      - "834"
72
      Connection: 
108
    headers:
109
      Date:
110
      - Fri, 16 Jan 2015 18:50:03 GMT
111
      Server:
112
      - Apache/2.4.6 (CentOS)
113
      Content-Length:
114
      - '834'
115
      Connection:
73 116
      - close
74
      Content-Type: 
117
      Content-Type:
75 118
      - application/json
76
    body: 
77
      encoding: ASCII-8BIT
78
      string: "{\"scratchpad\": {}, \"display_name\": \"integration_test_id\", \"description\": null, \"distributors\": [{\"repo_id\": \"integration_test_id\", \"_ns\": \"repo_distributors\", \"last_publish\": null, \"auto_publish\": true, \"scheduled_publishes\": [], \"distributor_type_id\": \"docker_distributor_web\", \"_id\": {\"$oid\": \"543e839d47078708d9ecb425\"}, \"config\": {}, \"id\": \"123\"}], \"last_unit_added\": null, \"notes\": {}, \"last_unit_removed\": null, \"content_unit_counts\": {}, \"_ns\": \"repos\", \"importers\": [{\"repo_id\": \"integration_test_id\", \"_ns\": \"repo_importers\", \"importer_type_id\": \"docker_importer\", \"last_sync\": null, \"scheduled_syncs\": [], \"_id\": {\"$oid\": \"543e839d47078708d9ecb424\"}, \"config\": {}, \"id\": \"docker_importer\"}], \"_id\": {\"$oid\": \"543e839d47078708d9ecb423\"}, \"id\": \"integration_test_id\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id/\"}"
119
    body:
120
      encoding: UTF-8
121
      string: '{"scratchpad": {}, "display_name": "integration_test_id", "description":
122
        null, "distributors": [{"repo_id": "integration_test_id", "_ns": "repo_distributors",
123
        "last_publish": null, "auto_publish": true, "scheduled_publishes": [], "distributor_type_id":
124
        "docker_distributor_web", "_id": {"$oid": "54b95d5b8963d70799dd8f95"}, "config":
125
        {}, "id": "123"}], "last_unit_added": null, "notes": {}, "last_unit_removed":
126
        null, "content_unit_counts": {}, "_ns": "repos", "importers": [{"repo_id":
127
        "integration_test_id", "_ns": "repo_importers", "importer_type_id": "docker_importer",
128
        "last_sync": null, "scheduled_syncs": [], "_id": {"$oid": "54b95d5b8963d70799dd8f94"},
129
        "config": {}, "id": "docker_importer"}], "_id": {"$oid": "54b95d5b8963d70799dd8f93"},
130
        "id": "integration_test_id", "_href": "/pulp/api/v2/repositories/integration_test_id/"}'
79 131
    http_version: 
80
  recorded_at: Wed, 15 Oct 2014 14:24:30 GMT
81
- request: 
132
  recorded_at: Fri, 16 Jan 2015 18:50:03 GMT
133
- request:
82 134
    method: delete
83
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id/
84
    body: 
135
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/repositories/integration_test_id/
136
    body:
85 137
      encoding: US-ASCII
86
      string: ""
87
    headers: 
88
      Accept: 
138
      string: ''
139
    headers:
140
      Accept:
89 141
      - application/json
90
      Accept-Encoding: 
142
      Accept-Encoding:
91 143
      - gzip, deflate
92
      Content-Type: 
144
      Content-Type:
93 145
      - application/json
94
      User-Agent: 
146
      User-Agent:
95 147
      - Ruby
96
  response: 
97
    status: 
148
  response:
149
    status:
98 150
      code: 202
99 151
      message: Accepted
100
    headers: 
101
      Date: 
102
      - Wed, 15 Oct 2014 14:24:30 GMT
103
      Server: 
104
      - Apache/2.2.15 (Red Hat)
105
      Content-Encoding: 
152
    headers:
153
      Date:
154
      - Fri, 16 Jan 2015 18:50:03 GMT
155
      Server:
156
      - Apache/2.4.6 (CentOS)
157
      Content-Encoding:
106 158
      - utf-8
107
      Content-Length: 
108
      - "172"
109
      Connection: 
159
      Content-Length:
160
      - '172'
161
      Connection:
110 162
      - close
111
      Content-Type: 
163
      Content-Type:
112 164
      - application/json
113
    body: 
114
      encoding: US-ASCII
115
      string: "{\"spawned_tasks\": [{\"_href\": \"/pulp/api/v2/tasks/3a502419-3ffb-442a-b45e-123d6ef8a1c9/\", \"task_id\": \"3a502419-3ffb-442a-b45e-123d6ef8a1c9\"}], \"result\": null, \"error\": null}"
165
    body:
166
      encoding: UTF-8
167
      string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/3cf59bda-4223-47df-bc99-0c65f841b2c7/",
168
        "task_id": "3cf59bda-4223-47df-bc99-0c65f841b2c7"}], "result": null, "error":
169
        null}'
116 170
    http_version: 
117
  recorded_at: Wed, 15 Oct 2014 14:24:30 GMT
118
- request: 
171
  recorded_at: Fri, 16 Jan 2015 18:50:04 GMT
172
- request:
119 173
    method: get
120
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/3a502419-3ffb-442a-b45e-123d6ef8a1c9/
121
    body: 
174
    uri: https://admin:wnTfDh26NVdZY4U5fCNLnXqgXGyYnSTH@katello-edison.example.com/pulp/api/v2/tasks/3cf59bda-4223-47df-bc99-0c65f841b2c7/
175
    body:
122 176
      encoding: US-ASCII
123
      string: ""
124
    headers: 
125
      Accept: 
177
      string: ''
178
    headers:
179
      Accept:
126 180
      - application/json
127
      Accept-Encoding: 
181
      Accept-Encoding:
128 182
      - gzip, deflate
129
      Content-Type: 
183
      Content-Type:
130 184
      - application/json
131
      User-Agent: 
185
      User-Agent:
132 186
      - Ruby
133
  response: 
134
    status: 
187
  response:
188
    status:
135 189
      code: 200
136 190
      message: OK
137
    headers: 
138
      Date: 
139
      - Wed, 15 Oct 2014 14:24:31 GMT
140
      Server: 
141
      - Apache/2.2.15 (Red Hat)
142
      Vary: 
143
      - Accept-Encoding
144
      Content-Length: 
145
      - "611"
146
      Connection: 
191
    headers:
192
      Date:
193
      - Fri, 16 Jan 2015 18:50:04 GMT
194
      Server:
195
      - Apache/2.4.6 (CentOS)
196
      Content-Length:
197
      - '624'
198
      Connection:
147 199
      - close
148
      Content-Type: 
200
      Content-Type:
149 201
      - application/json
150
    body: 
151
      encoding: ASCII-8BIT
152
      string: "{\"exception\": null, \"task_type\": \"pulp.server.tasks.repository.delete\", \"_href\": \"/pulp/api/v2/tasks/3a502419-3ffb-442a-b45e-123d6ef8a1c9/\", \"task_id\": \"3a502419-3ffb-442a-b45e-123d6ef8a1c9\", \"tags\": [\"pulp:repository:integration_test_id\", \"pulp:action:delete\"], \"finish_time\": \"2014-10-15T14:24:30Z\", \"_ns\": \"task_status\", \"start_time\": \"2014-10-15T14:24:30Z\", \"traceback\": null, \"spawned_tasks\": [], \"progress_report\": {}, \"queue\": \"reserved_resource_worker-1@box.devel.com.dq\", \"state\": \"finished\", \"result\": null, \"error\": null, \"_id\": {\"$oid\": \"543e839e505c6f3b4b509b47\"}, \"id\": \"543e839e47078708d9ecb428\"}"
202
    body:
203
      encoding: UTF-8
204
      string: '{"exception": null, "task_type": "pulp.server.tasks.repository.delete",
205
        "_href": "/pulp/api/v2/tasks/3cf59bda-4223-47df-bc99-0c65f841b2c7/", "task_id":
206
        "3cf59bda-4223-47df-bc99-0c65f841b2c7", "tags": ["pulp:repository:integration_test_id",
207
        "pulp:action:delete"], "finish_time": "2015-01-16T18:50:04Z", "_ns": "task_status",
208
        "start_time": "2015-01-16T18:50:04Z", "traceback": null, "spawned_tasks":
209
        [], "progress_report": {}, "queue": "reserved_resource_worker-1@katello-edison.example.com.dq",
210
        "state": "finished", "result": null, "error": null, "_id": {"$oid": "54b95d5c4399fa849d11d457"},
211
        "id": "54b95d5c8963d70799dd8f98"}'
153 212
    http_version: 
154
  recorded_at: Wed, 15 Oct 2014 14:24:31 GMT
213
  recorded_at: Fri, 16 Jan 2015 18:50:05 GMT
155 214
recorded_with: VCR 2.9.3
test/fixtures/vcr_cassettes/extensions/docker_repository_create/create_with_importer_and_distributors_objects.yml
1
--- 
2
http_interactions: 
3
- request: 
1
---
2
http_interactions:
3
- request:
4 4
    method: post
5 5
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/
6
    body: 
6
    body:
7 7
      encoding: US-ASCII
8
      string: "{\"id\":\"integration_test_id\",\"importer_type_id\":\"docker_importer\",\"importer_config\":{},\"notes\":{\"_repo-type\":\"docker-repo\"},\"distributors\":[{\"distributor_type_id\":\"docker_distributor_web\",\"distributor_config\":{},\"auto_publish\":false,\"distributor_id\":\"123\"}]}"
9
    headers: 
10
      Accept: 
8
      string: '{"id":"integration_test_id","importer_type_id":"docker_importer","importer_config":{},"notes":{"_repo-type":"docker-repo"},"distributors":[{"distributor_type_id":"docker_distributor_web","distributor_config":{},"auto_publish":false,"distributor_id":"123"}]}'
9
    headers:
10
      Accept:
11 11
      - application/json
12
      Accept-Encoding: 
12
      Accept-Encoding:
13 13
      - gzip, deflate
14
      Content-Type: 
14
      Content-Type:
15 15
      - application/json
16
      Content-Length: 
17
      - "257"
18
      User-Agent: 
16
      Content-Length:
17
      - '257'
18
      User-Agent:
19 19
      - Ruby
20
  response: 
21
    status: 
20
  response:
21
    status:
22 22
      code: 201
23 23
      message: Created
24
    headers: 
25
      Date: 
24
    headers:
25
      Date:
26 26
      - Wed, 15 Oct 2014 14:24:32 GMT
27
      Server: 
27
      Server:
28 28
      - Apache/2.2.15 (Red Hat)
29
      Location: 
29
      Location:
30 30
      - integration_test_id
31
      Vary: 
31
      Vary:
32 32
      - Accept-Encoding
33
      Content-Length: 
34
      - "346"
35
      Connection: 
33
      Content-Length:
34
      - '346'
35
      Connection:
36 36
      - close
37
      Content-Type: 
37
      Content-Type:
38 38
      - application/json
39
    body: 
39
    body:
40 40
      encoding: ASCII-8BIT
41
      string: "{\"scratchpad\": {}, \"display_name\": \"integration_test_id\", \"description\": null, \"last_unit_added\": null, \"notes\": {\"_repo-type\": \"docker-repo\"}, \"last_unit_removed\": null, \"content_unit_counts\": {}, \"_ns\": \"repos\", \"_id\": {\"$oid\": \"543e83a047078708d9ecb430\"}, \"id\": \"integration_test_id\", \"_href\": \"/pulp/api/v2/repositories/integration_test_id/\"}"
41
      string: '{"scratchpad": {}, "display_name": "integration_test_id", "description":
42
        null, "last_unit_added": null, "notes": {"_repo-type": "docker-repo"}, "last_unit_removed":
43
        null, "content_unit_counts": {}, "_ns": "repos", "_id": {"$oid": "543e83a047078708d9ecb430"},
44
        "id": "integration_test_id", "_href": "/pulp/api/v2/repositories/integration_test_id/"}'
42 45
    http_version: 
43 46
  recorded_at: Wed, 15 Oct 2014 14:24:32 GMT
44
- request: 
47
- request:
45 48
    method: get
46
    uri: https://admin:admin@box.devel.com/pulp/api/v2/repositories/integration_test_id/?details=true
47
    body: 
49
    uri: https://admin:admin@box.devel.com/pulp/api/v2/tasks/73586694-4060-49b7-baf4-22d51347d5a7/
50
    body:
48 51
      encoding: US-ASCII
49
      string: ""
50
    headers: 
51
      Accept: 
52
      string: ''
53
    headers:
54
      Accept:
52 55
      - application/json
53
      Accept-Encoding: 
56
      Accept-Encoding:
54 57
      - gzip, deflate
55
      Content-Type: 
58
      Content-Type:
56 59
      - application/json
57
      User-Agent: 
60
      User-Agent:
58 61
      - Ruby
59
  response: 
60
    status: 
62
  response:
63
    status:
61 64
      code: 200
62 65
      message: OK
63
    headers: 
64
      Date: 
65
      - Wed, 15 Oct 2014 14:24:32 GMT
66
      Server: 
66
    headers:
67
      Date:
68
      - Wed, 15 Oct 2014 14:24:33 GMT
69
      Server:
67 70
      - Apache/2.2.15 (Red Hat)
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff