Bug #17250

Unable to remove all locations or organizations from a domain

Added by Tomáš Strachota 11 months ago. Updated 11 months ago.

Status:New
Priority:High
Assigned To:-
Category:Other commands
Target version:Foreman - Team Marek backlog
Difficulty: Bugzilla link:1385590
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

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):
hammer-cli 0.8.0
hammer-cli-foreman 0.8.0
foreman 1.13.0

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

# hammer -u admin -p changeme domain update --id 7 --location-ids="2,4" 
Domain [rplevka_dom_3] updated

# 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

# hammer -u admin -p changeme domain update --id 7 --location-ids="4" 
Domain [rplevka_dom_3] updated

# 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

# hammer -u admin -p changeme domain update --id 7 --location-ids="" 
Domain [rplevka_dom_3] updated

# 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


Related issues

Related to Hammer CLI - Bug #17252: Unable to set empty parameter via hammer New 11/07/2016

History

#1 Updated by Tomáš Strachota 11 months ago

  • Subject changed from Unable to remove all locations or organizations from a domain to Unable to remove all locations or organizations from a domain
  • Target version set to Team Marek backlog

#2 Updated by Tomáš Strachota 11 months ago

  • Related to Bug #17252: Unable to set empty parameter via hammer added

Also available in: Atom PDF