Bug 970785 - Need a way to update the auto publish flag on a distributor
Need a way to update the auto publish flag on a distributor
Product: Pulp
Classification: Community
Component: API/integration (Show other bugs)
Unspecified Unspecified
medium Severity unspecified
: ---
: 2.3.0
Assigned To: Michael Hrivnak
Preethi Thomas
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-06-04 17:32 EDT by Partha Aji
Modified: 2013-12-09 09:30 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-09 09:30:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Partha Aji 2013-06-04 17:32:10 EDT
Looking at the documentation provided at

I do not see any way to update the auto-publish flag of a distributor associated to a repository. The cli also does not seem to allow this. This functionality is much desired in Katello.
Comment 1 Partha Aji 2013-06-05 10:01:41 EDT
Relevance w.r.t Katello
In katello we used to set the auto publish attribute false for repositories in the library environment. This was done as an optimization thing since never had any consumers register to library (so we never needed to do the somewhat expensive publish op). However we now want a feature that will let one to register consumers to library and consume content from there. For that to happen we need to either enable auto publish or periodically call the publish operation directly.
Comment 2 Jeremy Cline 2013-08-08 16:52:32 EDT
Comment 3 Jeff Ortel 2013-09-12 18:35:33 EDT
build: 2.3.0-0.10.alpha
Comment 4 Preethi Thomas 2013-09-19 17:23:14 EDT

In [45]: pic.PUT('/v2/repositories/upload/distributors/yum_distributor/', {'distributor_config':{"http": True},"delta": {"auto_publish": False}})
Request Body
  "distributor_config": {
    "http": true
  "delta": {
    "auto_publish": false
Response Body
    "task_group_id": "6b0f9a37-e4d2-4332-87aa-fb219a72002c", 
    "call_request_id": "5383657d-a1e3-47a2-96a9-575980312456", 
    "exception": null, 
    "_href": "/pulp/api/v2/task_groups/6b0f9a37-e4d2-4332-87aa-fb219a72002c/", 
    "task_id": "5383657d-a1e3-47a2-96a9-575980312456", 
    "call_request_tags": [
    "reasons": [], 
    "start_time": null, 
    "traceback": null, 
    "schedule_id": null, 
    "finish_time": null, 
    "state": "waiting", 
    "result": null, 
    "dependency_failures": {}, 
    "call_request_group_id": "6b0f9a37-e4d2-4332-87aa-fb219a72002c", 
    "progress": {}, 
    "principal_login": "admin", 
    "response": "accepted", 
    "tags": [
 [{u'_href': u'/pulp/api/v2/task_groups/6b0f9a37-e4d2-4332-87aa-fb219a72002c/',
   u'call_request_group_id': u'6b0f9a37-e4d2-4332-87aa-fb219a72002c',
   u'call_request_id': u'5383657d-a1e3-47a2-96a9-575980312456',
   u'call_request_tags': [u'pulp:repository:upload',
   u'dependency_failures': {},
   u'exception': None,
   u'finish_time': None,
   u'principal_login': u'admin',
   u'progress': {},
   u'reasons': [],
   u'response': u'accepted',
   u'result': None,
   u'schedule_id': None,
   u'start_time': None,
   u'state': u'waiting',
   u'tags': [u'pulp:repository:upload',
   u'task_group_id': u'6b0f9a37-e4d2-4332-87aa-fb219a72002c',
   u'task_id': u'5383657d-a1e3-47a2-96a9-575980312456',
   u'traceback': None}])

In [46]: pic.GET('/v2/repositories/upload/distributors/')Response Body
    "repo_id": "upload", 
    "_ns": "repo_distributors", 
    "last_publish": "2013-09-19T13:44:05-04:00", 
    "auto_publish": false, 
    "scheduled_publishes": [], 
    "distributor_type_id": "yum_distributor", 
    "scratchpad": {}, 
    "_id": {
      "$oid": "523b3262d669f043f70000a8"
    "config": {
      "http": true, 
      "relative_url": "upload", 
      "https": true
    "id": "yum_distributor"
    "repo_id": "upload", 
    "_ns": "repo_distributors", 
    "last_publish": null, 
    "auto_publish": false, 
    "scheduled_publishes": [], 
    "distributor_type_id": "export_distributor", 
    "scratchpad": null, 
    "_id": {
      "$oid": "523b3262d669f043f70000a9"
    "config": {
      "http": false, 
      "https": true
    "id": "export_distributor"
 [{u'_id': {u'$oid': u'523b3262d669f043f70000a8'},
   u'_ns': u'repo_distributors',
   u'auto_publish': False,
   u'config': {u'http': True, u'https': True, u'relative_url': u'upload'},
   u'distributor_type_id': u'yum_distributor',
   u'id': u'yum_distributor',
   u'last_publish': u'2013-09-19T13:44:05-04:00',
   u'repo_id': u'upload',
   u'scheduled_publishes': [],
   u'scratchpad': {}},
  {u'_id': {u'$oid': u'523b3262d669f043f70000a9'},
   u'_ns': u'repo_distributors',
   u'auto_publish': False,
   u'config': {u'http': False, u'https': True},
   u'distributor_type_id': u'export_distributor',
   u'id': u'export_distributor',
   u'last_publish': None,
   u'repo_id': u'upload',
   u'scheduled_publishes': [],
   u'scratchpad': None}])

In [47]:
Comment 5 Preethi Thomas 2013-12-09 09:30:09 EST
Pulp 2.3 released.

Note You need to log in before you can comment on or make changes to this bug.