Bug 1261122 - hammer cli for sync-plan info does not return the sync plan enabled state
hammer cli for sync-plan info does not return the sync plan enabled state
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.1.2
Unspecified Unspecified
unspecified Severity medium (vote)
: Beta
: --
Assigned To: Roman Plevka
Corey Welton
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-08 11:55 EDT by Roman Plevka
Modified: 2016-07-27 07:20 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:20:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 11740 None None None Never

  None (edit)
Description Roman Plevka 2015-09-08 11:55:57 EDT
Description of problem:
hammer sync-plan info output does not contain information about sync plan 'enable' state.

Version-Release number of selected component (if applicable):
sat6-Satellite-6.1.0-RHEL-7-20150828.0

# rpm -qa *hammer*
rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el7sat.noarch
rubygem-hammer_cli-0.1.4.12-1.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.4.14-1.el7sat.noarch
rubygem-hammer_cli_gutterball-0.0.1.3-1.el7sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch
rubygem-hammer_cli_import-0.10.20-1.el7sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch
rubygem-hammer_cli_katello-0.0.7.17-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. create a sync plan
2. list its info using `hammer sync-plan info`


Actual results:

# hammer sync-plan create --organization-id 46 --name test --enabled True --interval daily
Sync plan created

]# hammer sync-plan list --organization-id 46
---|------|---------------------|---------
ID | NAME | START DATE          | INTERVAL
---|------|---------------------|---------
1  | test  | 2015/09/08 17:29:01 | daily   
---|------|---------------------|---------

# hammer sync-plan info --id 1
ID:          1
Name:        test
Start Date:  2015/09/08 17:29:01
Interval:    daily
Description: 
Created at:  2015/09/08 15:29:01
Updated at:  2015/09/08 15:29:01



Expected results:
something like:

# hammer sync-plan info --id 1
ID:          1
Name:        test
Start Date:  2015/09/08 17:29:01
Interval:    daily
Description: 
Enabled:     yes
Created at:  2015/09/08 15:29:01
Updated at:  2015/09/08 15:29:01

Additional info:
Comment 2 Roman Plevka 2015-09-09 03:57:24 EDT
Created a Redmine issue:
http://projects.theforeman.org/issues/11740
Comment 3 Og Maciel 2015-09-09 14:09:34 EDT
Linked issue to Redmine issue
Comment 5 Brad Buckingham 2015-09-16 10:42:51 EDT
hammer-cli-katello PR: https://github.com/Katello/hammer-cli-katello/pull/317

result with PR:

hammer> sync-plan list --organization-id 1
---|-------|---------------------|----------|--------
ID | NAME  | START DATE          | INTERVAL | ENABLED
---|-------|---------------------|----------|--------
2  | test2 | 2015/10/01 00:00:00 | daily    | no     
1  | test  | 2015/10/31 00:00:00 | daily    | yes    
---|-------|---------------------|----------|--------

hammer> sync-plan info --id 1
ID:          1
Name:        test
Start Date:  2015/10/31 00:00:00
Interval:    daily
Enabled:     yes
Description: 
Created at:  2015/09/16 14:26:12
Updated at:  2015/09/16 14:26:12

hammer> sync-plan info --id 2
ID:          2
Name:        test2
Start Date:  2015/10/01 00:00:00
Interval:    daily
Enabled:     no
Description: 
Created at:  2015/09/16 14:40:52
Updated at:  2015/09/16 14:40:52

hammer>
Comment 6 Brad Buckingham 2015-09-17 09:15:42 EDT
Ignore the PR in comment #5.  It seems there was another PR created to address the same issue, but the bugzilla had not been updated accordingly.

The correct PR will be: https://github.com/Katello/hammer-cli-katello/pull/312
Comment 7 Bryan Kearney 2015-09-22 09:11:56 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/11740 has been closed
-------------
roman plevka
Applied in changeset commit:hammer-cli-katello|31e59e09dd87c193305e235839caacf2c08d9b5d.
Comment 8 Tazim Kolhar 2015-10-29 07:27:59 EDT
*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***
Version Tested:
# rpm -qa | grep foreman
foreman-proxy-1.11.0-0.develop.201510201341git00875b3.el7.noarch
foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch
tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch
foreman-debug-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-compute-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-release-scl-1-1.el7.x86_64
foreman-gce-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch
hp-z600-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
hp-z600-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
tfm-rubygem-foreman_discovery-4.1.2-1.fm1_11.el7.noarch
foreman-vmware-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch
tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch
hp-z600-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-ovirt-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch
foreman-release-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-libvirt-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
foreman-postgresql-1.11.0-0.develop.201510271601git4e08a71.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510201150gitab068d9.el7.noarch
tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch

steps:
# hammer sync-plan create --organization-id 1 --name test --enabled True --interval daily --sync-date '2015-11-30'
[Foreman] Password for admin: 
Sync plan created

# hammer sync-plan list --organization-id 1
[Foreman] Password for admin: 
---|------|---------------------|----------|--------
ID | NAME | START DATE          | INTERVAL | ENABLED
---|------|---------------------|----------|--------
1  | test | 2015/11/30 00:00:00 | daily    | yes    
---|------|---------------------|----------|--------

# hammer sync-plan info --id 1
[Foreman] Password for admin: 
ID:          1
Name:        test
Start Date:  2015/11/30 00:00:00
Interval:    daily
Enabled:     yes
Description: 
Created at:  2015/10/29 11:24:41
Updated at:  2015/10/29 11:24:41
Comment 11 Oleksandr Shtaier 2016-04-19 06:04:54 EDT
Verified on latest 6.2 SNAP 8.2:

hammer -u user -p pass sync-plan create --organization-id 1 --name test --enabled True --interval daily --sync-date '2016-11-30'
Sync plan created

hammer -u user -p pass sync-plan list --organization-id 1
---|------|---------------------|----------|--------
ID | NAME | START DATE          | INTERVAL | ENABLED
---|------|---------------------|----------|--------
89 | test | 2016/11/30 00:00:00 | daily    | yes    
---|------|---------------------|----------|--------

hammer -u user -p pass sync-plan info --id 89
ID:          89
Name:        test
Start Date:  2016/11/30 00:00:00
Interval:    daily
Enabled:     yes
Description: 
Created at:  2016/04/19 10:02:32
Updated at:  2016/04/19 10:02:32
Comment 13 Bryan Kearney 2016-07-27 07:20:25 EDT
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:1501

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