Bug 1112859

Summary: [RFE] allow pulp-admin to set export_dir and auto_publish for export distributor
Product: [Retired] Pulp Reporter: Justin Garrison <justin.garrison>
Component: user-experienceAssignee: pulp-bugs
Status: CLOSED UPSTREAM QA Contact: pulp-qe-list
Severity: medium Docs Contact:
Priority: low    
Version: 2.3CC: skarmark
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-19 01:13:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Justin Garrison 2014-06-24 20:20:42 UTC
Description of problem: When trying to auto publish a repo using the export distributor there is no way to configure it except for via the API. Pulp-admin allows for --export and --export_dir but those must be run interactively and cannot be scheduled/auto published

Version-Release number of selected component (if applicable): 2.3


How reproducible: always


Steps to Reproduce:
1. create repo
2. use pulp-admin --export will only run export one time and is not scheduled. Auto publish does not have an option in pulp-admin

Actual results: export_dir is not configured and not saved in the database. because export_dir is not saved this causes exports to publish an iso to http(s) instead of exporting the packages to the filesystem

Expected results: repo exported to the filesystem after sync (auto_publish)

Additional info: Using the API the setting is configurable with 
curl -E ~/pulp.pem -k -X PUT -d '{"distributor_config": {}, "delta": {"export_dir": "/repos/", "auto_publish": true }}' https://pulp/pulp/api/v2/repositories/rhel-7-workstation-optional-rpms-x86_64/distributors/export_distributor/

the request is accepted but upon retrieving the settings the export_dir is still not set

curl -E ~/pulp.pem -k -X GET https://pulp/pulp/api/v2/repositories/rhel-7-workstation-optional-rpms-x86_64/distributors/export_distributor/

{
    "_id": {
        "$oid": "53a9a36abbea5770c8d1cd42"
    }, 
    "_ns": "repo_distributors", 
    "auto_publish": true, 
    "config": {
        "http": false, 
        "https": false
    }, 
    "distributor_type_id": "export_distributor", 
    "id": "export_distributor", 
    "last_publish": null, 
    "repo_id": "rhel-7-workstation-optional-rpms-x86_64", 
    "scheduled_publishes": [], 
    "scratchpad": null
}

Comment 1 Brian Bouterse 2015-02-19 01:13:52 UTC
Moved to https://pulp.plan.io/issues/238