Bug 746641

Summary: CLI: product promoted to next env without defining the changeset
Product: [Retired] Katello Reporter: Sachin Ghai <sghai>
Component: Webservice APIAssignee: Bryan Kearney <bkearney>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.XCC: tstrachota
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-03 08:50:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sachin Ghai 2011-10-17 11:16:00 UTC
Description of problem:
I was trying to promote a product from one env to another from cli. 

As per UI help text first we need to create a "changeset" and then add the product to that changeset for promoting it to other env.


However in katello-cli, I can directly promote the product from one env to other, without adding the product to changeset. 

------
katello> product promote --name=aeolus --org=sghai_org --environment=dev
Product [ aeolus ] promoted to environment [ dev ]
katello> exit
[root@dhcp201-158 ~]# cd /var/lib/pul
pulp/  pulse/ 
[root@dhcp201-158 ~]# cd /var/lib/pulp/
init.flag  packages/  plugins/   published/ repos/     
[root@dhcp201-158 ~]# cd /var/lib/pulp/repos/sghai_org/dev/
[root@dhcp201-158 dev]# ls
aeolus
-------

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

[root@dhcp201-158 ~]# rpm -qa | grep katello
katello-cli-0.1.10-1.git.712.be6830e.fc15.noarch
katello-0.1.93-1.git.0.6934d37.fc15.noarch
katello-all-0.1.93-1.git.0.6934d37.fc15.noarch
katello-configure-0.1.6-1.git.5.76ba627.fc15.noarch
katello-repos-0.1.3-1.git.0.db2bd1d.fc15.noarch
[root@dhcp201-158 ~]# rpm -qa | grep pulp
pulp-common-0.0.237-5.fc15.noarch
pulp-0.0.237-5.fc15.noarch
m2crypto-0.21.1.pulp-5.fc15.x86_64


How reproducible:
always

Steps to Reproduce:
1. create an org 'A' and define env like "dev-==> test==>prod"
1. create a product in  org 'A'
2. promote it to next env 'dev' using cli
3.
  
Actual results:
No need to add the product to a changset, product can directly be promoted to next env

Expected results:
In CLI, proudct promote process should be same as in UI. In the UI process, first we need to create a changset and then need to add the product to that changset before promoting it to next env. However if this is the correct process then same we should follow for katello-cli.

Additional info:

Comment 1 Tomas Strachota 2011-11-02 11:25:27 UTC
What happens here is that when you do 'product promote' a changeset is actually created in the background, product added and promoted. We delete the temporary changeset right after the promotion. Standard way of promoting products via changesets is still there.

This command was added in the past to simplify the product promotion and test if such concept would be good for users. I agree that it is not fully in line of the ui way of promotion but on the other hand it saves you 2 commands.

Removing the command is easy. We only have to decide whether we want it or not.

Comment 2 Bryan Kearney 2011-11-02 11:51:57 UTC
I vote keep it in. If we want, ensure the help text says create a change set and promote it.

Comment 3 Tomas Strachota 2011-11-03 08:50:42 UTC
Added better description to the command, closing as not a bug.

commit 8c20cbb6d679d1eb93b2800609f03cfe4440d944
Author: Tomas Strachota <tstrachota>
Date:   Wed Nov 2 19:04:50 2011 +0100

    cli - better description for 'product promote'