Created
April 3, 2018 04:03
-
-
Save dhollinger/3535013835adcd9f215d0cc77c80d701 to your computer and use it in GitHub Desktop.
Pulp API tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@pulp ~]# pulp-admin tasks details --task-id 07443b8f-6296-4039-8d32-e907a7b4fd94 | |
+----------------------------------------------------------------------+ | |
Task Details | |
+----------------------------------------------------------------------+ | |
Operations: import_upload | |
Resources: test_modules (repository) | |
State: Failed | |
Start Time: 2018-04-03T03:58:33Z | |
Finish Time: 2018-04-03T03:58:33Z | |
Result: N/A | |
Task Id: 07443b8f-6296-4039-8d32-e907a7b4fd94 | |
Worker Name: [email protected] | |
Progress Report: | |
Traceback: Traceback (most recent call last): File | |
"/usr/lib/python2.7/site-packages/celery/app/trace.py", line | |
240, in trace_task R = retval = fun(*args, **kwargs) | |
File | |
"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", | |
line 529, in __call__ return super(Task, | |
self).__call__(*args, **kwargs) File | |
"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", | |
line 107, in __call__ return super(PulpTask, | |
self).__call__(*args, **kwargs) File | |
"/usr/lib/python2.7/site-packages/celery/app/trace.py", line | |
438, in __protected_call__ return self.run(*args, | |
**kwargs) File | |
"/usr/lib/python2.7/site-packages/pulp/server/managers/content | |
/upload.py", line 218, in import_uploaded_unit | |
unit_metadata, file_path, conduit, call_config) File | |
"/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importer | |
s/importer.py", line 82, in upload_unit conduit) File | |
"/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importer | |
s/upload.py", line 38, in handle_uploaded_unit | |
extracted_data = metadata_parser.extract_metadata(file_path, | |
repo.working_dir) File | |
"/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importer | |
s/metadata.py", line 52, in extract_metadata metadata = | |
_extract_json(filename, temp_dir) File | |
"/usr/lib/python2.7/site-packages/pulp_puppet/plugins/importer | |
s/metadata.py", line 97, in _extract_json tgz = | |
tarfile.open(name=filename) File | |
"/usr/lib64/python2.7/tarfile.py", line 1665, in open | |
raise ReadError("file could not be opened successfully") | |
InvalidTarball: Could not extract Puppet module. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST https://admin:[email protected]/pulp/api/v2/content/uploads/ -k | |
{"upload_id": "1350e9fb-e9ba-4642-a114-2f803b640dd2", "_href": "/pulp/api/v2/content/uploads/1350e9fb-e9ba-4642-a114-2f803b640dd2/"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST https://admin:[email protected]/pulp/api/v2/repositories/test_modules/actions/import_upload/ -k -d '{ "override_config": {}, "upload_id": "95661b23-a309-4cef-b09d-c9873ef21896", "unit_type_id": "puppet_module", "unit_key": "" }' | |
{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/07443b8f-6296-4039-8d32-e907a7b4fd94/", "task_id": "07443b8f-6296-4039-8d32-e907a7b4fd94"}], "result": null, "error": null} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT https://admin:[email protected]/pulp/api/v2/content/uploads/95661b23-a309-4cef-b09d-c9873ef21896/ -k -d '{ "offset": 0, "content": "/home/dhollinger/workspace/puppet/puppet-r10k/pkg/puppet-r10k-6.3.2.tar.gz" }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment