Bug 1385590

Summary: CLI: Unable to remove all locations|organizations from a domain
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: HammerAssignee: Rahul Bajaj <rabajaj>
Status: CLOSED WONTFIX QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: high    
Version: 6.3.0CC: dhlavacd, inecas, jcallaha, mhulan, rabajaj, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 17:44:19 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:

Description Roman Plevka 2016-10-17 11:13:54 UTC
Description of problem:
the parameters --organizations|--locations; --organization-ids|--location-ids obviously can't handle an empty string passed as a parameter. Despite the resulting message is "Domain updated".


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

How reproducible:


Steps to Reproduce:
# hammer -u admin -p changeme domain info --id 7
Id:          7
Name:        rplevka_dom_3
Description: 
DNS Id:      
Subnets:     

Parameters:  

Created at:  2016/10/17 11:08:16
Updated at:  2016/10/17 11:08:16

[root]# hammer -u admin -p changeme domain update --id 7 --location-ids="2,4"
Domain [rplevka_dom_3] updated
[root]# hammer -u admin -p changeme domain info --id 7
Id:          7
Name:        rplevka_dom_3
Description: 
DNS Id:      
Subnets:     

Locations:   
    Default Location
    rplevka_loc
Parameters:  

Created at:  2016/10/17 11:08:16
Updated at:  2016/10/17 11:08:16

[root]# hammer -u admin -p changeme domain update --id 7 --location-ids="4"
Domain [rplevka_dom_3] updated
[root]# hammer -u admin -p changeme domain info --id 7
Id:          7
Name:        rplevka_dom_3
Description: 
DNS Id:      
Subnets:     

Locations:   
    rplevka_loc
Parameters:  

Created at:  2016/10/17 11:08:16
Updated at:  2016/10/17 11:08:16

[root]# hammer -u admin -p changeme domain update --id 7 --location-ids=""
Domain [rplevka_dom_3] updated
[root]# hammer -u admin -p changeme domain info --id 7
Id:          7
Name:        rplevka_dom_3
Description: 
DNS Id:      
Subnets:     

Locations:   
    rplevka_loc
Parameters:  

Created at:  2016/10/17 11:08:16
Updated at:  2016/10/17 11:08:16

Comment 2 Tomas Strachota 2016-11-07 13:03:14 UTC
Created redmine issue http://projects.theforeman.org/issues/17250 from this bug

Comment 4 Rahul Bajaj 2018-07-05 15:07:08 UTC
Hello,

This issue is fixed as a part of: https://projects.theforeman.org/issues/21768/
So upstream, this issue is fixed.

Thanks,

Comment 5 Bryan Kearney 2018-09-04 17:44:19 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.