Hello everyone,
If I create a repository myself via the API I cannot subsequently copy content
units into it. If I create a repository via pulp-admin I can. I can't work
out what the difference is.
For example, from my python code:
<snip>
new_repo_name = 'paultest5'
payload = {'display_name': 'paultest5', 'id': 'paultest5', 'notes':
{'_repo-type': 'rpm-repo'}}
response = requests.post(api_url+'/repositories/',
cert='/tmp/pulp-session-cert.pem', verify=False, data=json.dumps(payload))
</snip>
This creates a repo just fine.
<snip>
{"display_name": "paultest5"
"description": null
"_ns": "repos"
"notes": {"_repo-type": "rpm-repo"}
"content_unit_counts": {}
"_id": {"$oid": "52dd4f79ca546a0b5265a567"}
"id": "paultest5"
"_href": "/pulp/api/v2/repositories/paultest5/"}
</snip>
But if I try and copy content units into it, either via the API directory or
via pulp-admin, it fails:
<snip>
# pulp-admin rpm repo copy rpm --from-repo-id=rhel6-pulp-stable
--to-repo-id=paultest5
This command may be exited via ctrl+c without affecting the request.
[-]
Waiting to begin...
[-]
Running...
Task Failed
[u'MissingResource: Missing resource(s):
repository=paultest5\n']
{u'repository': u'paultest5'}
</snip>
But if I create the repo via pulp-admin the copy works just fine:
<snip>
[root@shou18l585g5_13 pulp]# pulp-admin rpm repo create --repo-id=paultest2
--display-name='paultest2'
Successfully created repository [paultest2]
[root@shou18l585g5_13 pulp]# pulp-admin rpm repo copy rpm
--from-repo-id=rhel6-pulp-stable --to-repo-id=paultest2
This command may be exited via ctrl+c without affecting the request.
[-]
Waiting to begin...
[-]
Running...
Units:
createrepo-0.9.9-21.2.pulp.el6-noarch
gofer-0.77.1-1.el6-noarch
m2crypto-0.21.1.pulp-8.el6-x86_64
</snip>
Does anyone know what I'm doing wrong?
Thanks,
Paul
This communication is for informational purposes only. It is not intended as an
offer or solicitation for the purchase or sale of any financial instrument or
as an official confirmation of any transaction. All market prices, data and
other information are not warranted as to completeness or accuracy and are
subject to change without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and
affiliates.
This transmission may contain information that is proprietary, privileged,
confidential and/or exempt from disclosure under applicable law. If you are not
the intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect that might
affect any computer system into which it is received and opened, it is the
responsibility of the recipient to ensure that it is virus free and no
responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and
affiliates, as applicable, for any loss or damage arising in any way from its
use. If you received this transmission in error, please immediately contact the
sender and destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures
relating to European legal entities.
_______________________________________________
Pulp-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/pulp-list