Bug 1311717

Summary: Red Hat repositories can edit neither "Mirror On Sync" nor "Download Policy" in UI
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: WebUIAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: daviddavis, ehelms, jmatthew, jsherril, mmccune, rplevka, sthirugn
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/13889
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:02:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom McKay 2016-02-24 19:49:36 UTC
These two options should be editable even for Red Hat products.

Comment 1 Tom McKay 2016-02-24 19:49:38 UTC
Created from redmine issue http://projects.theforeman.org/issues/13889

Comment 3 David Davis 2016-02-29 11:52:21 UTC
I would also test out the CLI as part of this bug. It should just work once this is fixed but it's worth testing out.

Comment 4 Bryan Kearney 2016-03-08 05:12:43 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/13889 has been closed
-------------
Justin Sherrill
Applied in changeset commit:katello|d7ad5dc027e3a5f97c5f016df4a64df0baf95d53.

Comment 5 Roman Plevka 2016-03-22 14:20:21 UTC
VERIFIED
on sat6.2 snap4.

download_policy and mirror_on_sync can now be set with all UI, Hammer and API methods:


DOWNLOAD POLICY:
```
# hammer -u admin -p changeme repository update --id 3 --download-policy on_demand
Repository updated
# hammer -u admin -p changeme repository info --id 3
...
Download Policy:    on_demand
...
```
```
# curl -u admin:changeme 'https://my.sat6.server/katello/api/v2/repositories/3' -X PUT -H 'Content-Type: application/json;charset=utf-8' -d '{"download_policy":"background"}'
  {...,"download_policy":"background",...}
```

MIRROR ON SYNC:
```
# hammer -u admin -p changeme repository update --id 3 --mirror-on-sync false
Repository updated
# hammer -u admin -p changeme repository update --id 3 --mirror-on-sync true
Repository updated

```
```
# curl -u admin:changeme 'https://my.sat6.server/katello/api/v2/repositories/3' -X PUT -H 'Content-Type: application/json;charset=utf-8' -d '{"mirror_on_sync":false}'
  {"content_type":"yum","docker_upstream_name":null,"mirror_on_sync":false,...}

# curl -u admin:changeme 'https://my.sat6.server/katello/api/v2/repositories/3' -X PUT -H 'Content-Type: application/json;charset=utf-8' -d '{"mirror_on_sync":true}'
  {"content_type":"yum","docker_upstream_name":null,"mirror_on_sync":true,...}

```

Comment 8 errata-xmlrpc 2016-07-27 09:02:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1500