lita-pulp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/Gemfile +3 -0
  4. data/README.md +35 -0
  5. data/Rakefile +8 -0
  6. data/lib/lita-pulp.rb +15 -0
  7. data/lib/lita/handlers/pulp.rb +369 -0
  8. data/lib/pulphelper/misc.rb +16 -0
  9. data/lib/pulphelper/repo.rb +356 -0
  10. data/lib/pulphelper/unit.rb +107 -0
  11. data/lita-pulp.gemspec +28 -0
  12. data/locales/en.yml +23 -0
  13. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_copy_puppet_between_repo/copy_puppet_module.yml +86 -0
  14. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_copy_puppet_between_repo/copy_puppet_module_delete_new_and_publish.yml +217 -0
  15. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_copy_rpm_between_repo/copy_rpm_package.yml +86 -0
  16. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_copy_rpm_between_repo/copy_rpm_package_delete_new_and_publish.yml +264 -0
  17. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_puppet_repos/list_puppet_repos.yml +88 -0
  18. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_puppet_search/search_puppet_with_repo.yml +134 -0
  19. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_puppet_search/search_puppet_without_author_name.yml +134 -0
  20. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_puppet_search/search_puppet_without_repo.yml +134 -0
  21. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_rpm_repos/list_rpm_repos.yml +593 -0
  22. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_rpm_search/search_rpm_with_repo.yml +152 -0
  23. data/spec/fixtures/cassettes/Lita_Handlers_Pulp/_rpm_search/search_rpm_without_repo.yml +152 -0
  24. data/spec/lita/handlers/pulp_repo_spec.rb +35 -0
  25. data/spec/lita/handlers/pulp_unit_spec.rb +79 -0
  26. data/spec/spec_helper.rb +28 -0
  27. data/templates/.gitkeep +0 -0
  28. metadata +226 -0
@@ -0,0 +1,28 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "lita-pulp"
3
+ spec.version = "0.1.0"
4
+ spec.authors = ["Wang, Dawei"]
5
+ spec.email = ["daweiwang.gatekeeper@gmail.com"]
6
+ spec.description = "Lita bot for pulp server"
7
+ spec.summary = "Lita bot for pulp server operation, like list repositories and search rpm or puppet modules."
8
+ spec.homepage = "https://github.com/af6140/lita-pulp.git"
9
+ spec.license = "Apache-2.0"
10
+ spec.metadata = { "lita_plugin_type" => "handler" }
11
+
12
+ spec.files = `git ls-files`.split($/)
13
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
+ spec.require_paths = ["lib"]
16
+
17
+ spec.add_runtime_dependency "lita", ">= 4.7"
18
+ spec.add_runtime_dependency "runcible"
19
+ spec.add_runtime_dependency "lita-keyword-arguments"
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "pry-byebug"
23
+ spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rack-test"
25
+ spec.add_development_dependency "rspec", ">= 3.0.0"
26
+ spec.add_development_dependency "webmock"
27
+ spec.add_development_dependency "vcr"
28
+ end
@@ -0,0 +1,23 @@
1
+ en:
2
+ lita:
3
+ handlers:
4
+ pulp:
5
+ help:
6
+ rpm_repos_key: "pulp rpm repos"
7
+ rpm_repos_value: "List all rpm repositories"
8
+ puppet_repos_key: "pulp puppet repos"
9
+ puppet_repos_value: "List all puppet repositories"
10
+ publish_key: "pulp publish REPO_ID"
11
+ publish_value: "Publish specified repository"
12
+ rpm_search_key: "pulp rpm search ssh [in REPO_ID]"
13
+ rpm_search_value: "Search rpm package in specified repository"
14
+ puppet_search_key: "pulp puppet search [AUTHOR/]MODULE [in REPO_ID]"
15
+ puppet_search_value: "Search puppet module with author/name or name in repoistory with specified REPO_ID"
16
+ copy_rpm_key: "pulp rpm copy --from SRC_REPO --to DEST_REPO --name PACKAGE --version VERSION --release RELEASE --arch ARCH [--delete_new] [--publish]"
17
+ copy_rpm_value: "Copy specified rpm package from SRC_REPO to DEST_REPO, optionally delete newer versoin in DEST_REPO and publish the repo"
18
+ copy_puppet_key: "pulp puppet copy --from SRC_REPO --to DEST_REPO --author author --name PACKAGE --version VERSION [--delete_new] [--publish]"
19
+ copy_puppet_value: "Copy specified puppet module package from SRC_REPO to DEST_REPO, optionally delete newer version in DEST_REPO and publish the repo"
20
+ delete_newer_rpm_key: "pulp rpm delete newer --from SRC_REPO --name PACKAGE --version VERSION --release RELEASE --arch ARCH [--publish] [--delete_new]"
21
+ delete_newer_rpm_value: "Deletw newer version of specified rpm package from SRC_REPO , optionally publish the repo"
22
+ delete_newer_puppet_key: "pulp puppet delete newer --from SRC_REPO --author AUTHOR --name MODULE --version VERSION --arch ARCH [--publish] [--delete_new]"
23
+ delete_newer_puppet_value: "Deletw newer version of specified puppet module from SRC_REPO , optionally publish the repo"
@@ -0,0 +1,86 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://pulp.co.epi.web/pulp/api/v2/content/units/puppet_module/search/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"criteria":{"filters":{"author":"entertainment","name":"cicd_test","version":"0.1.33-pre100079-rev159b6f9"},"sort":[["version","descending"]],"limit":1,"fields":["author","name","version"]},"include_repos":true}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '212'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic YWRtaW46YWRtaW4=
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 29 Jun 2016 14:43:58 GMT
29
+ Server:
30
+ - Apache/2.2.15 (CentOS)
31
+ Content-Length:
32
+ - '314'
33
+ Connection:
34
+ - close
35
+ Content-Type:
36
+ - application/json; charset=utf-8
37
+ body:
38
+ encoding: UTF-8
39
+ string: '[{"repository_memberships": ["forge_qa", "forge_build", "forge_dev"],
40
+ "version": "0.1.33-pre100079-rev159b6f9", "_href": "/pulp/api/v2/content/units/puppet_module/c3d5f09d-88a5-472e-880b-f4dbb4b5b7c8/",
41
+ "author": "entertainment", "_id": "c3d5f09d-88a5-472e-880b-f4dbb4b5b7c8",
42
+ "children": {}, "name": "cicd_test"}]'
43
+ http_version:
44
+ recorded_at: Wed, 29 Jun 2016 14:44:09 GMT
45
+ - request:
46
+ method: post
47
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/forge_qa/actions/associate/
48
+ body:
49
+ encoding: UTF-8
50
+ string: '{"source_repo_id":"forge_dev","criteria":{"type_ids":["puppet_module"],"filters":{"association":{"unit_id":{"$in":["c3d5f09d-88a5-472e-880b-f4dbb4b5b7c8"]}}}}}'
51
+ headers:
52
+ Accept:
53
+ - application/json
54
+ Accept-Encoding:
55
+ - gzip, deflate
56
+ Content-Type:
57
+ - application/json
58
+ Content-Length:
59
+ - '159'
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic YWRtaW46YWRtaW4=
64
+ response:
65
+ status:
66
+ code: 202
67
+ message: ACCEPTED
68
+ headers:
69
+ Date:
70
+ - Wed, 29 Jun 2016 14:43:59 GMT
71
+ Server:
72
+ - Apache/2.2.15 (CentOS)
73
+ Content-Length:
74
+ - '172'
75
+ Connection:
76
+ - close
77
+ Content-Type:
78
+ - application/json; charset=utf-8
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/1e4971b6-4cab-48ad-b774-7c1467b1e2f0/",
82
+ "task_id": "1e4971b6-4cab-48ad-b774-7c1467b1e2f0"}], "result": null, "error":
83
+ null}'
84
+ http_version:
85
+ recorded_at: Wed, 29 Jun 2016 14:44:09 GMT
86
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,217 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://pulp.co.epi.web/pulp/api/v2/content/units/puppet_module/search/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"criteria":{"filters":{"author":"entertainment","name":"cicd_test","version":"0.1.33-pre100079-rev159b6f9"},"sort":[["version","descending"]],"limit":1,"fields":["author","name","version"]},"include_repos":true}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '212'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic YWRtaW46YWRtaW4=
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 29 Jun 2016 14:43:59 GMT
29
+ Server:
30
+ - Apache/2.2.15 (CentOS)
31
+ Content-Length:
32
+ - '314'
33
+ Connection:
34
+ - close
35
+ Content-Type:
36
+ - application/json; charset=utf-8
37
+ body:
38
+ encoding: UTF-8
39
+ string: '[{"repository_memberships": ["forge_qa", "forge_build", "forge_dev"],
40
+ "version": "0.1.33-pre100079-rev159b6f9", "_href": "/pulp/api/v2/content/units/puppet_module/c3d5f09d-88a5-472e-880b-f4dbb4b5b7c8/",
41
+ "author": "entertainment", "_id": "c3d5f09d-88a5-472e-880b-f4dbb4b5b7c8",
42
+ "children": {}, "name": "cicd_test"}]'
43
+ http_version:
44
+ recorded_at: Wed, 29 Jun 2016 14:44:10 GMT
45
+ - request:
46
+ method: post
47
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/forge_qa/actions/associate/
48
+ body:
49
+ encoding: UTF-8
50
+ string: '{"source_repo_id":"forge_dev","criteria":{"type_ids":["puppet_module"],"filters":{"association":{"unit_id":{"$in":["c3d5f09d-88a5-472e-880b-f4dbb4b5b7c8"]}}}}}'
51
+ headers:
52
+ Accept:
53
+ - application/json
54
+ Accept-Encoding:
55
+ - gzip, deflate
56
+ Content-Type:
57
+ - application/json
58
+ Content-Length:
59
+ - '159'
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic YWRtaW46YWRtaW4=
64
+ response:
65
+ status:
66
+ code: 202
67
+ message: ACCEPTED
68
+ headers:
69
+ Date:
70
+ - Wed, 29 Jun 2016 14:44:00 GMT
71
+ Server:
72
+ - Apache/2.2.15 (CentOS)
73
+ Content-Length:
74
+ - '172'
75
+ Connection:
76
+ - close
77
+ Content-Type:
78
+ - application/json; charset=utf-8
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/cb8d98ee-bfc7-419b-94a8-023054814330/",
82
+ "task_id": "cb8d98ee-bfc7-419b-94a8-023054814330"}], "result": null, "error":
83
+ null}'
84
+ http_version:
85
+ recorded_at: Wed, 29 Jun 2016 14:44:10 GMT
86
+ - request:
87
+ method: post
88
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/forge_qa/actions/unassociate/
89
+ body:
90
+ encoding: UTF-8
91
+ string: '{"criteria":{"filters":{"unit":{"$and":[{"name":"cicd_test"},{"author":"entertainment"},{"version":{"$gt":"0.1.33-pre100079-rev159b6f9"}}]}},"type_ids":["puppet_module"]}}'
92
+ headers:
93
+ Accept:
94
+ - application/json
95
+ Accept-Encoding:
96
+ - gzip, deflate
97
+ Content-Type:
98
+ - application/json
99
+ Content-Length:
100
+ - '171'
101
+ User-Agent:
102
+ - Ruby
103
+ Authorization:
104
+ - Basic YWRtaW46YWRtaW4=
105
+ response:
106
+ status:
107
+ code: 202
108
+ message: ACCEPTED
109
+ headers:
110
+ Date:
111
+ - Wed, 29 Jun 2016 14:44:00 GMT
112
+ Server:
113
+ - Apache/2.2.15 (CentOS)
114
+ Content-Length:
115
+ - '172'
116
+ Connection:
117
+ - close
118
+ Content-Type:
119
+ - application/json; charset=utf-8
120
+ body:
121
+ encoding: UTF-8
122
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/82fede40-ec3b-4eb8-8a2c-e46d9b61d411/",
123
+ "task_id": "82fede40-ec3b-4eb8-8a2c-e46d9b61d411"}], "result": null, "error":
124
+ null}'
125
+ http_version:
126
+ recorded_at: Wed, 29 Jun 2016 14:44:11 GMT
127
+ - request:
128
+ method: get
129
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/forge_qa/?details=true
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ Accept:
135
+ - application/json
136
+ Accept-Encoding:
137
+ - gzip, deflate
138
+ Content-Type:
139
+ - application/json
140
+ User-Agent:
141
+ - Ruby
142
+ Authorization:
143
+ - Basic YWRtaW46YWRtaW4=
144
+ response:
145
+ status:
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ Date:
150
+ - Wed, 29 Jun 2016 14:44:00 GMT
151
+ Server:
152
+ - Apache/2.2.15 (CentOS)
153
+ Content-Length:
154
+ - '1105'
155
+ Connection:
156
+ - close
157
+ Content-Type:
158
+ - application/json; charset=utf-8
159
+ body:
160
+ encoding: UTF-8
161
+ string: '{"scratchpad": {}, "display_name": "forge_qa", "description": null,
162
+ "distributors": [{"repo_id": "forge_qa", "_href": "/pulp/api/v2/repositories/forge_qa/distributors/puppet_distributor/",
163
+ "_ns": "repo_distributors", "last_publish": "2016-06-29T14:07:29Z", "distributor_type_id":
164
+ "puppet_distributor", "auto_publish": true, "scratchpad": {}, "_id": {"$oid":
165
+ "5638cb9bc20cde6bafe50ac3"}, "config": {}, "id": "puppet_distributor"}], "last_unit_added":
166
+ "2016-06-24T17:13:46Z", "notes": {"_repo-type": "puppet-repo"}, "last_unit_removed":
167
+ "2016-05-31T16:05:45Z", "content_unit_counts": {"puppet_module": 4}, "_ns":
168
+ "repos", "importers": [{"scratchpad": null, "_href": "/pulp/api/v2/repositories/forge_qa/importers/puppet_importer/",
169
+ "_ns": "repo_importers", "importer_type_id": "puppet_importer", "last_sync":
170
+ "2016-01-25T15:49:52Z", "repo_id": "forge_qa", "_id": {"$oid": "5638cb9bc20cde6bafe50ac2"},
171
+ "config": {}, "id": "puppet_importer"}], "locally_stored_units": 4, "_id":
172
+ {"$oid": "5638cb9bc20cde6bafe50ac1"}, "total_repository_units": 4, "id": "forge_qa",
173
+ "_href": "/pulp/api/v2/repositories/forge_qa/"}'
174
+ http_version:
175
+ recorded_at: Wed, 29 Jun 2016 14:44:11 GMT
176
+ - request:
177
+ method: post
178
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/forge_qa/actions/publish/
179
+ body:
180
+ encoding: UTF-8
181
+ string: '{"id":"puppet_distributor"}'
182
+ headers:
183
+ Accept:
184
+ - application/json
185
+ Accept-Encoding:
186
+ - gzip, deflate
187
+ Content-Type:
188
+ - application/json
189
+ Content-Length:
190
+ - '27'
191
+ User-Agent:
192
+ - Ruby
193
+ Authorization:
194
+ - Basic YWRtaW46YWRtaW4=
195
+ response:
196
+ status:
197
+ code: 202
198
+ message: ACCEPTED
199
+ headers:
200
+ Date:
201
+ - Wed, 29 Jun 2016 14:44:01 GMT
202
+ Server:
203
+ - Apache/2.2.15 (CentOS)
204
+ Content-Length:
205
+ - '172'
206
+ Connection:
207
+ - close
208
+ Content-Type:
209
+ - application/json; charset=utf-8
210
+ body:
211
+ encoding: UTF-8
212
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/33e9730d-056d-42d2-9fdd-085d14c03ff1/",
213
+ "task_id": "33e9730d-056d-42d2-9fdd-085d14c03ff1"}], "result": null, "error":
214
+ null}'
215
+ http_version:
216
+ recorded_at: Wed, 29 Jun 2016 14:44:12 GMT
217
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,86 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://pulp.co.epi.web/pulp/api/v2/content/units/rpm/search/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"criteria":{"filters":{"name":"cosmos-web","version":"1.0.0_SNAPSHOT","release":"b20160627.211338.63","arch":"noarch"},"sort":[["version","descending"]],"limit":1,"fields":["name","version","release","arch"]},"include_repos":true}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '231'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic YWRtaW46YWRtaW4=
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 29 Jun 2016 14:44:01 GMT
29
+ Server:
30
+ - Apache/2.2.15 (CentOS)
31
+ Content-Length:
32
+ - '310'
33
+ Connection:
34
+ - close
35
+ Content-Type:
36
+ - application/json; charset=utf-8
37
+ body:
38
+ encoding: UTF-8
39
+ string: '[{"repository_memberships": ["ent-cent7-qa", "ent-cent7-dev"], "name":
40
+ "cosmos-web", "version": "1.0.0_SNAPSHOT", "release": "b20160627.211338.63",
41
+ "_id": "c3dcddf1-3d2f-4387-b06d-0f13076c2e08", "arch": "noarch", "children":
42
+ {}, "_href": "/pulp/api/v2/content/units/rpm/c3dcddf1-3d2f-4387-b06d-0f13076c2e08/"}]'
43
+ http_version:
44
+ recorded_at: Wed, 29 Jun 2016 14:44:12 GMT
45
+ - request:
46
+ method: post
47
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/ent-cent7-qa/actions/associate/
48
+ body:
49
+ encoding: UTF-8
50
+ string: '{"source_repo_id":"ent-cent7-dev","criteria":{"type_ids":["rpm"],"filters":{"association":{"unit_id":{"$in":["c3dcddf1-3d2f-4387-b06d-0f13076c2e08"]}}}}}'
51
+ headers:
52
+ Accept:
53
+ - application/json
54
+ Accept-Encoding:
55
+ - gzip, deflate
56
+ Content-Type:
57
+ - application/json
58
+ Content-Length:
59
+ - '153'
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic YWRtaW46YWRtaW4=
64
+ response:
65
+ status:
66
+ code: 202
67
+ message: ACCEPTED
68
+ headers:
69
+ Date:
70
+ - Wed, 29 Jun 2016 14:44:02 GMT
71
+ Server:
72
+ - Apache/2.2.15 (CentOS)
73
+ Content-Length:
74
+ - '172'
75
+ Connection:
76
+ - close
77
+ Content-Type:
78
+ - application/json; charset=utf-8
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/8e456dac-ae20-4bfe-bf1f-a47f62fec9e2/",
82
+ "task_id": "8e456dac-ae20-4bfe-bf1f-a47f62fec9e2"}], "result": null, "error":
83
+ null}'
84
+ http_version:
85
+ recorded_at: Wed, 29 Jun 2016 14:44:12 GMT
86
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,264 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://pulp.co.epi.web/pulp/api/v2/content/units/rpm/search/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"criteria":{"filters":{"name":"cosmos-web","version":"1.0.0_SNAPSHOT","release":"b20160627.211338.63","arch":"noarch"},"sort":[["version","descending"]],"limit":1,"fields":["name","version","release","arch"]},"include_repos":true}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Content-Type:
15
+ - application/json
16
+ Content-Length:
17
+ - '231'
18
+ User-Agent:
19
+ - Ruby
20
+ Authorization:
21
+ - Basic YWRtaW46YWRtaW4=
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Date:
28
+ - Wed, 29 Jun 2016 14:44:02 GMT
29
+ Server:
30
+ - Apache/2.2.15 (CentOS)
31
+ Content-Length:
32
+ - '310'
33
+ Connection:
34
+ - close
35
+ Content-Type:
36
+ - application/json; charset=utf-8
37
+ body:
38
+ encoding: UTF-8
39
+ string: '[{"repository_memberships": ["ent-cent7-qa", "ent-cent7-dev"], "name":
40
+ "cosmos-web", "version": "1.0.0_SNAPSHOT", "release": "b20160627.211338.63",
41
+ "_id": "c3dcddf1-3d2f-4387-b06d-0f13076c2e08", "arch": "noarch", "children":
42
+ {}, "_href": "/pulp/api/v2/content/units/rpm/c3dcddf1-3d2f-4387-b06d-0f13076c2e08/"}]'
43
+ http_version:
44
+ recorded_at: Wed, 29 Jun 2016 14:44:13 GMT
45
+ - request:
46
+ method: post
47
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/ent-cent7-qa/actions/associate/
48
+ body:
49
+ encoding: UTF-8
50
+ string: '{"source_repo_id":"ent-cent7-dev","criteria":{"type_ids":["rpm"],"filters":{"association":{"unit_id":{"$in":["c3dcddf1-3d2f-4387-b06d-0f13076c2e08"]}}}}}'
51
+ headers:
52
+ Accept:
53
+ - application/json
54
+ Accept-Encoding:
55
+ - gzip, deflate
56
+ Content-Type:
57
+ - application/json
58
+ Content-Length:
59
+ - '153'
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic YWRtaW46YWRtaW4=
64
+ response:
65
+ status:
66
+ code: 202
67
+ message: ACCEPTED
68
+ headers:
69
+ Date:
70
+ - Wed, 29 Jun 2016 14:44:02 GMT
71
+ Server:
72
+ - Apache/2.2.15 (CentOS)
73
+ Content-Length:
74
+ - '172'
75
+ Connection:
76
+ - close
77
+ Content-Type:
78
+ - application/json; charset=utf-8
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/1cbf9de0-48d5-4e92-b6ba-996ccea506c4/",
82
+ "task_id": "1cbf9de0-48d5-4e92-b6ba-996ccea506c4"}], "result": null, "error":
83
+ null}'
84
+ http_version:
85
+ recorded_at: Wed, 29 Jun 2016 14:44:13 GMT
86
+ - request:
87
+ method: post
88
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/ent-cent7-qa/actions/unassociate/
89
+ body:
90
+ encoding: UTF-8
91
+ string: '{"criteria":{"filters":{"unit":{"$and":[{"name":"cosmos-web"},{"arch":"noarch"},{"$or":[{"version":{"$gt":"1.0.0_SNAPSHOT"},"release":{"$gt":"b20160627.211338.63"}}]}]}},"type_ids":["rpm"]}}'
92
+ headers:
93
+ Accept:
94
+ - application/json
95
+ Accept-Encoding:
96
+ - gzip, deflate
97
+ Content-Type:
98
+ - application/json
99
+ Content-Length:
100
+ - '190'
101
+ User-Agent:
102
+ - Ruby
103
+ Authorization:
104
+ - Basic YWRtaW46YWRtaW4=
105
+ response:
106
+ status:
107
+ code: 202
108
+ message: ACCEPTED
109
+ headers:
110
+ Date:
111
+ - Wed, 29 Jun 2016 14:44:03 GMT
112
+ Server:
113
+ - Apache/2.2.15 (CentOS)
114
+ Content-Length:
115
+ - '172'
116
+ Connection:
117
+ - close
118
+ Content-Type:
119
+ - application/json; charset=utf-8
120
+ body:
121
+ encoding: UTF-8
122
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/e7b9031f-ce94-4b02-9438-2e725c55ebad/",
123
+ "task_id": "e7b9031f-ce94-4b02-9438-2e725c55ebad"}], "result": null, "error":
124
+ null}'
125
+ http_version:
126
+ recorded_at: Wed, 29 Jun 2016 14:44:13 GMT
127
+ - request:
128
+ method: get
129
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/ent-cent7-qa/?details=true
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ Accept:
135
+ - application/json
136
+ Accept-Encoding:
137
+ - gzip, deflate
138
+ Content-Type:
139
+ - application/json
140
+ User-Agent:
141
+ - Ruby
142
+ Authorization:
143
+ - Basic YWRtaW46YWRtaW4=
144
+ response:
145
+ status:
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ Date:
150
+ - Wed, 29 Jun 2016 14:44:03 GMT
151
+ Server:
152
+ - Apache/2.2.15 (CentOS)
153
+ Content-Length:
154
+ - '1656'
155
+ Connection:
156
+ - close
157
+ Content-Type:
158
+ - application/json; charset=utf-8
159
+ body:
160
+ encoding: UTF-8
161
+ string: '{"scratchpad": {"checksum_type": "sha256"}, "display_name": "ent-cent7-qa",
162
+ "description": null, "distributors": [{"repo_id": "ent-cent7-qa", "_href":
163
+ "/pulp/api/v2/repositories/ent-cent7-qa/distributors/yum_distributor/", "_ns":
164
+ "repo_distributors", "last_publish": "2016-06-29T14:28:59Z", "distributor_type_id":
165
+ "yum_distributor", "auto_publish": true, "scratchpad": {}, "_id": {"$oid":
166
+ "56b5142ec20cde71a353fc80"}, "config": {"checksum_type": "sha256", "http":
167
+ true, "relative_url": "entertainment/qa/centos/7/x86_64", "https": true},
168
+ "id": "yum_distributor"}, {"repo_id": "ent-cent7-qa", "_href": "/pulp/api/v2/repositories/ent-cent7-qa/distributors/export_distributor/",
169
+ "_ns": "repo_distributors", "last_publish": "2016-06-29T14:29:12Z", "distributor_type_id":
170
+ "export_distributor", "auto_publish": false, "scratchpad": {}, "_id": {"$oid":
171
+ "56b5142ec20cde71a353fc81"}, "config": {"http": true, "relative_url": "entertainment/qa/centos/7/x86_64",
172
+ "https": true}, "id": "export_distributor"}], "last_unit_added": null, "notes":
173
+ {"_repo-type": "rpm-repo"}, "last_unit_removed": null, "content_unit_counts":
174
+ {"rpm": 23}, "_ns": "repos", "importers": [{"scratchpad": null, "_href": "/pulp/api/v2/repositories/ent-cent7-qa/importers/yum_importer/",
175
+ "_ns": "repo_importers", "importer_type_id": "yum_importer", "last_sync":
176
+ "2016-02-05T21:30:24Z", "repo_id": "ent-cent7-qa", "_id": {"$oid": "56b5142ec20cde71a353fc7f"},
177
+ "config": {"ssl_validation": false}, "id": "yum_importer"}], "locally_stored_units":
178
+ 23, "_id": {"$oid": "56b5142ec20cde71a353fc7e"}, "total_repository_units":
179
+ 23, "id": "ent-cent7-qa", "_href": "/pulp/api/v2/repositories/ent-cent7-qa/"}'
180
+ http_version:
181
+ recorded_at: Wed, 29 Jun 2016 14:44:14 GMT
182
+ - request:
183
+ method: post
184
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/ent-cent7-qa/actions/publish/
185
+ body:
186
+ encoding: UTF-8
187
+ string: '{"id":"yum_distributor"}'
188
+ headers:
189
+ Accept:
190
+ - application/json
191
+ Accept-Encoding:
192
+ - gzip, deflate
193
+ Content-Type:
194
+ - application/json
195
+ Content-Length:
196
+ - '24'
197
+ User-Agent:
198
+ - Ruby
199
+ Authorization:
200
+ - Basic YWRtaW46YWRtaW4=
201
+ response:
202
+ status:
203
+ code: 202
204
+ message: ACCEPTED
205
+ headers:
206
+ Date:
207
+ - Wed, 29 Jun 2016 14:44:04 GMT
208
+ Server:
209
+ - Apache/2.2.15 (CentOS)
210
+ Content-Length:
211
+ - '172'
212
+ Connection:
213
+ - close
214
+ Content-Type:
215
+ - application/json; charset=utf-8
216
+ body:
217
+ encoding: UTF-8
218
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/116b1480-c3db-474c-b133-a19a493d02ad/",
219
+ "task_id": "116b1480-c3db-474c-b133-a19a493d02ad"}], "result": null, "error":
220
+ null}'
221
+ http_version:
222
+ recorded_at: Wed, 29 Jun 2016 14:44:14 GMT
223
+ - request:
224
+ method: post
225
+ uri: https://pulp.co.epi.web/pulp/api/v2/repositories/ent-cent7-qa/actions/publish/
226
+ body:
227
+ encoding: UTF-8
228
+ string: '{"id":"export_distributor"}'
229
+ headers:
230
+ Accept:
231
+ - application/json
232
+ Accept-Encoding:
233
+ - gzip, deflate
234
+ Content-Type:
235
+ - application/json
236
+ Content-Length:
237
+ - '27'
238
+ User-Agent:
239
+ - Ruby
240
+ Authorization:
241
+ - Basic YWRtaW46YWRtaW4=
242
+ response:
243
+ status:
244
+ code: 202
245
+ message: ACCEPTED
246
+ headers:
247
+ Date:
248
+ - Wed, 29 Jun 2016 14:44:04 GMT
249
+ Server:
250
+ - Apache/2.2.15 (CentOS)
251
+ Content-Length:
252
+ - '172'
253
+ Connection:
254
+ - close
255
+ Content-Type:
256
+ - application/json; charset=utf-8
257
+ body:
258
+ encoding: UTF-8
259
+ string: '{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/00da7d12-8152-4fd7-96d3-b0d06e9c8840/",
260
+ "task_id": "00da7d12-8152-4fd7-96d3-b0d06e9c8840"}], "result": null, "error":
261
+ null}'
262
+ http_version:
263
+ recorded_at: Wed, 29 Jun 2016 14:44:15 GMT
264
+ recorded_with: VCR 3.0.3