-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.17.2.0
CONFIGURATION
Standard install
OS / ENVIRONMENT
Rocky Linux 8
SUMMARY
Account's network domain cannot be unset in CloudStack management UI
STEPS TO REPRODUCE
- Log in as an admin
- Navigate to 'Accounts'
- Click on any account
- Click on the edit button on the account. The edit dialog box should appear to allow changing the account name and network domain. Set this to something non-empty and click OK.
- Click on the edit button on the account again and set the network domain field empty and then click OK.
- Note that the network domain is still set.
EXPECTED RESULTS
Setting the network domain empty should remove the account's network domain. This is stated in the UI by the field's placeholder text: "Network domain for the account's networks; empty string will update domainName with NULL value"
This is not happening.
ACTUAL RESULTS
Setting the network domain empty doesn't remove the network domain on the account. I have to use cmk to manually set the account's networkdomain to an empty string in order to clear it. Eg. cmk update account id=4ba2c4d2-ef7d-414d-8668-1c3805ecd308 networkdomain=""
According to the network traffic, when the network domain field is set to an empty string, the empty networkdomain value isn't passed to the API:
Here's what is sent as a payload to the API when I set the network domain:
id: 4ba2c4d2-ef7d-414d-8668-1c3805ecd308
domainid: a03c9ece-9b15-4638-a1d4-ee9e05edf81f
newname: Test
networkdomain: hello
account: Test
command: updateAccount
response: json
Here's what's sent as the payload when I try to clear the network domain by setting it to an empty string. Note the API request leaves out the networkdomain field, so it never gets updated.
id: 4ba2c4d2-ef7d-414d-8668-1c3805ecd308
domainid: a03c9ece-9b15-4638-a1d4-ee9e05edf81f
newname: Test
account: Test
command: updateAccount
response: json