Hi all:
Please take some time to read over the code in the data-export branch. Relevant code lives in the org.fedoraproject.candlepin.sync package.
The exporter entry point is on ConsumerResource. The importer entry point is on OwnerResource.
To create and consume your own export, try the following:
* Make your 'upstream' candlepin * run the deploy script with import dir and gendb set. * register a consumer, note the consumer's uuid * subscribe the consumer to some pools * download your export with: curl -k -u admin:admin https://localhost:8443/candlepin/consumers/$UUID/export > export.zip * Turn your 'upstream' candlepin into your new 'downstream' candlepin * run the deploy script without import dir, but with gendb (to empty out the db) * import your export with: curl -u admin:admin -k -F export=@export.zip https://localhost:8443/candlepin/owners/1/import
Besides the new package, we also added an upstreamUuid field to Owner to track consumer to owner mapping, and an upstreamPoolId to Subscription to track the flow of upstream pool -> entitlement -> downstream subscription. Why is Subscription not using upstreamEntitlementId? this way, if you unentitle then reentitle your candlepin, the entitlement object will have changed, but syncing will ignore it. Devan may wish to point you at some of the work he did for products, specifically on the ProductCurator.
Related doc - https://fedorahosted.org/candlepin/wiki/DataTransferFormat
Thanks!
-James