Bug 865023

Summary: CLI - delete org shows error
Product: Red Hat Satellite Reporter: Hayk Hovsepyan <hhovsepy>
Component: APIAssignee: Bryan Kearney <bkearney>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: ehelms, msuchy
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-18 14:38:36 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 Hayk Hovsepyan 2012-10-10 16:14:02 UTC
Description of problem:
When you have created 2 templates one is child of another, It does not allow to delete organization.

Version-Release number of selected component (if applicable):
katello-configure-1.1.10-1.git.48.b44a09b.el6.noarch
katello-glue-candlepin-1.1.13-1.git.87.be28459.el6.noarch
katello-agent-1.1.2-1.el6.noarch
katello-repos-1.1.2-1.el6.noarch
katello-glue-pulp-1.1.13-1.git.87.be28459.el6.noarch
katello-selinux-1.1.2-1.el6.noarch
katello-1.1.13-1.git.87.be28459.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-1.1.9-1.git.51.edfca34.el6.noarch
katello-common-1.1.13-1.git.87.be28459.el6.noarch
katello-glue-foreman-1.1.13-1.git.87.be28459.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-1.1.9-1.git.51.edfca34.el6.noarch
katello-certs-tools-1.1.8-1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Create organization.
2. Create template in that org.
3. Create child template to first template.
4. Try to delete organization by CLI. It will show error "Organization [ test ] deletion failed: The template has children templates". Which is bug. 
  
Actual results: 
Error is thrown.

Expected results:
It should delete organization.

Additional info:
When just deleting parent template it shows the same error which is correct.

Comment 1 Miroslav Suchý 2012-10-10 21:09:05 UTC
Hayk,
can you elaborate why do you think this is bug? It seems as correct behaviour to me.

Comment 2 Hayk Hovsepyan 2012-10-11 07:48:44 UTC
Both templates are related to only that organization, and when we do not need this organization we do not need those templates anymore, as they can not be applied to other organizations.
Similar behaviour is when we delete promoted repo, it shows error. But when we delete that repo's organization, it deletes that repos, environments and whole stuff related to that organization without checks.
So when we delete organization it should force delete all entities (repo, environment, template, provider ....) related to that org.

Comment 3 Miroslav Suchý 2012-12-04 13:03:26 UTC
Discussed here:
https://www.redhat.com/archives/katello-devel/2012-November/msg00003.html

Comment 4 Miroslav Suchý 2012-12-04 13:14:07 UTC
Ignore #3

Comment 6 Mike McCune 2013-08-16 18:01:14 UTC
getting rid of 6.0.0 version since that doesn't exist

Comment 7 Bryan Kearney 2014-02-18 14:38:21 UTC
this is against the katello-cli which we are not using any more, closing.