rosi-shapeblue commented on PR #10790: URL: https://github.com/apache/cloudstack/pull/10790#issuecomment-3396032037
Test results: **1. CSV Type – alert.email.addresses** 1.1. Missing value parameter (should error) ``` (localcloud) 🐱 > update configuration name='alert.email.addresses' 💩 Missing required parameters: value ``` 1.2. Set a non-empty value: ``` (localcloud) 🐱 > update configuration name='alert.email.addresses' value='[email protected]' { "configuration": { "category": "Alert", "component": "management-server", "description": "Comma separated list of email addresses which are going to receive alert emails.", "displaytext": "Alert email addresses", "group": "Management Server", "isdynamic": false, "name": "alert.email.addresses", "subgroup": "Alerts", "type": "CSV", "value": "[email protected]" } } ``` - value in DB ``` mysql> SELECT value FROM cloud.configuration WHERE name='alert.email.addresses'; +------------------+ | value | +------------------+ | [email protected] | +------------------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/96ca92a5-2c68-4e62-a4ba-777c8ac31c5a" /> 1.2. Reset to default (should store "") ``` (localcloud) 🐱 > reset configuration name='alert.email.addresses' { "configuration": { "category": "Alert", "component": "management-server", "description": "Comma separated list of email addresses which are going to receive alert emails.", "displaytext": "Alert email addresses", "group": "Management Server", "isdynamic": false, "name": "alert.email.addresses", "subgroup": "Alerts", "type": "CSV" } } ``` Value in DB: ``` mysql> SELECT value FROM cloud.configuration WHERE name='alert.email.addresses'; +-------+ | value | +-------+ | NULL | +-------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/e220656d-5f86-4cf7-851d-611321e9a72e" /> 1.3. Update with space (should store NULL) ``` (localcloud) 🐱 > update configuration name='alert.email.addresses' value=' ' { "configuration": { "category": "Alert", "component": "management-server", "description": "Comma separated list of email addresses which are going to receive alert emails.", "displaytext": "Alert email addresses", "group": "Management Server", "isdynamic": false, "name": "alert.email.addresses", "subgroup": "Alerts", "type": "CSV", "value": " " } } ``` - Value in DB: ``` mysql> SELECT value FROM cloud.configuration WHERE name='alert.email.addresses'; +-------+ | value | +-------+ | NULL | +-------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/419685fd-7bc2-4ee3-a02d-96b049debe90" /> **2. String Type – instance.name** 2.1. Missing value parameter (should error) ``` (localcloud) 🐱 > update configuration name='instance.name' 💩 Missing required parameters: value (localcloud) 🐱 > ``` 2.2. Set a non-empty value (different from default) ``` (localcloud) 🐱 > update configuration name='instance.name' value='test.instance' { "configuration": { "category": "Advanced", "component": "AgentManager", "defaultvalue": "VM", "description": "Name of the deployment instance.", "displaytext": "Instance name", "group": "Compute", "isdynamic": false, "name": "instance.name", "subgroup": "Virtual Machine", "type": "String", "value": "test.instance" } } (localcloud) 🐱 > - Value in DB ``` mysql> SELECT value FROM cloud.configuration WHERE name='instance.name'; +---------------+ | value | +---------------+ | test.instance | +---------------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/0358ea9b-bd03-4943-8252-2044b6a142e9" /> 2.3. Reset configuration (should revert to default "VM") ``` (localcloud) 🐱 > reset configuration name='instance.name' { "configuration": { "category": "Advanced", "component": "AgentManager", "defaultvalue": "VM", "description": "Name of the deployment instance.", "displaytext": "Instance name", "group": "Compute", "isdynamic": false, "name": "instance.name", "subgroup": "Virtual Machine", "type": "String", "value": "VM" } } (localcloud) 🐱 > ``` - Value in DB ``` mysql> SELECT value FROM cloud.configuration WHERE name='instance.name'; +-------+ | value | +-------+ | VM | +-------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/6d5fb9b8-e0dc-48da-aba5-db84d2e0f126" /> 2.4. Update configuration with single space (NULL in DB) ``` (localcloud) 🐱 > update configuration name='instance.name' value=' ' { "configuration": { "category": "Advanced", "component": "AgentManager", "defaultvalue": "VM", "description": "Name of the deployment instance.", "displaytext": "Instance name", "group": "Compute", "isdynamic": false, "name": "instance.name", "subgroup": "Virtual Machine", "type": "String", "value": " " } } ``` - Value in DB ``` mysql> SELECT value FROM cloud.configuration WHERE name='instance.name'; +-------+ | value | +-------+ | NULL | +-------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/4ea2a5d0-8dd6-4112-a68d-9c5b1093db3b" /> **3. Order Type – 'security.checkers.order'** 3.1. Missing 'value' param (should error) ``` (localcloud) 🐱 > update configuration name='security.checkers.order' 💩 Missing required parameters: value ``` 3.2. Set a non-empty value (reverse order for testing) ``` (localcloud) 🐱 > update configuration name='security.checkers.order' value='DomainChecker,AffinityGroupAccessChecker' { "configuration": { "category": "Advanced", "component": "ExtensionRegistry", "defaultvalue": "AffinityGroupAccessChecker,DomainChecker", "description": "The order of precedence for the extensions", "displaytext": "Security checkers order", "group": "Management Server", "isdynamic": false, "name": "security.checkers.order", "options": "AffinityGroupAccessChecker,DomainChecker", "subgroup": "Security", "type": "Order", "value": "DomainChecker,AffinityGroupAccessChecker" } } (localcloud) 🐱 > ``` - Value in DB: ``` mysql> SELECT value FROM cloud.configuration WHERE name='security.checkers.order'; +------------------------------------------+ | value | +------------------------------------------+ | DomainChecker,AffinityGroupAccessChecker | +------------------------------------------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/730791cb-0a4c-4324-ba7a-12614ebb2700" /> 3.3. Reset configuration (should revert to default) ``` (localcloud) 🐱 > reset configuration name='security.checkers.order' { "configuration": { "category": "Advanced", "component": "ExtensionRegistry", "defaultvalue": "AffinityGroupAccessChecker,DomainChecker", "description": "The order of precedence for the extensions", "displaytext": "Security checkers order", "group": "Management Server", "isdynamic": false, "name": "security.checkers.order", "options": "AffinityGroupAccessChecker,DomainChecker", "subgroup": "Security", "type": "Order", "value": "AffinityGroupAccessChecker,DomainChecker" } } ``` - Value in DB: ``` mysql> SELECT value FROM cloud.configuration WHERE name='security.checkers.order'; +------------------------------------------+ | value | +------------------------------------------+ | AffinityGroupAccessChecker,DomainChecker | +------------------------------------------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/f2176783-58e0-47c3-83f5-79483b40b709" /> 3.4. Update configuration with single space (should set NULL) ``` (localcloud) 🐱 > update configuration name='security.checkers.order' value=' ' { "configuration": { "category": "Advanced", "component": "ExtensionRegistry", "defaultvalue": "AffinityGroupAccessChecker,DomainChecker", "description": "The order of precedence for the extensions", "displaytext": "Security checkers order", "group": "Management Server", "isdynamic": false, "name": "security.checkers.order", "options": "AffinityGroupAccessChecker,DomainChecker", "subgroup": "Security", "type": "Order", "value": " " } } ``` - Value in DB: ``` mysql> SELECT value FROM cloud.configuration WHERE name='security.checkers.order'; +-------+ | value | +-------+ | NULL | +-------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/2a3bd246-a915-4d25-b19b-6d4d4ac09e3e" /> **4. WhitespaceSeparatedListWithOptions – alert.smtp.enabledSecurityProtocols** 4.1. Missing value parameter (should error) ``` (localcloud) 🐱 > update configuration name='alert.smtp.enabledSecurityProtocols' 💩 Missing required parameters: value ``` 4.2. Set a non-empty value ``` (localcloud) 🐱 > update configuration name='alert.smtp.enabledSecurityProtocols' value='TLSv1 TLSv1.2' { "configuration": { "category": "Advanced", "component": "AlertManager", "defaultvalue": "", "description": "White-space separated security protocols; ex: \"TLSv1 TLSv1.1\". Supported protocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1 and TLSv1.2", "displaytext": "Alert smtp enabledSecurityProtocols", "group": "Management Server", "isdynamic": true, "name": "alert.smtp.enabledSecurityProtocols", "options": "SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2", "subgroup": "Alerts", "type": "WhitespaceSeparatedListWithOptions", "value": "TLSv1 TLSv1.2" } } ``` - Value in DB: ``` mysql> SELECT value FROM cloud.configuration WHERE name='alert.smtp.enabledSecurityProtocols'; +---------------+ | value | +---------------+ | TLSv1 TLSv1.2 | +---------------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2510" height="667" alt="image" src="https://github.com/user-attachments/assets/4888cfb6-b8da-466c-a98d-36c56f7caae0" /> 4.3. Reset configuration (should revert to empty string default) ``` (localcloud) 🐱 > reset configuration name='alert.smtp.enabledSecurityProtocols' { "configuration": { "category": "Advanced", "component": "AlertManager", "defaultvalue": "", "description": "White-space separated security protocols; ex: \"TLSv1 TLSv1.1\". Supported protocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1 and TLSv1.2", "displaytext": "Alert smtp enabledSecurityProtocols", "group": "Management Server", "isdynamic": true, "name": "alert.smtp.enabledSecurityProtocols", "options": "SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2", "subgroup": "Alerts", "type": "WhitespaceSeparatedListWithOptions", "value": "" } } ``` - Value in DB: ``` mysql> SELECT value FROM cloud.configuration WHERE name='alert.smtp.enabledSecurityProtocols'; +-------+ | value | +-------+ | | +-------+ 1 row in set (0.00 sec) ``` - Value in UI: <img width="2519" height="676" alt="image" src="https://github.com/user-attachments/assets/4a8e9e21-da5e-4fe9-b00f-160302deab8e" /> 4.4. Update configuration with single space (should set NULL) ``` (localcloud) 🐱 > update configuration name='alert.smtp.enabledSecurityProtocols' value=' ' { "configuration": { "category": "Advanced", "component": "AlertManager", "defaultvalue": "", "description": "White-space separated security protocols; ex: \"TLSv1 TLSv1.1\". Supported protocols: SSLv2Hello, SSLv3, TLSv1, TLSv1.1 and TLSv1.2", "displaytext": "Alert smtp enabledSecurityProtocols", "group": "Management Server", "isdynamic": true, "name": "alert.smtp.enabledSecurityProtocols", "options": "SSLv2Hello,SSLv3,TLSv1,TLSv1.1,TLSv1.2", "subgroup": "Alerts", "type": "WhitespaceSeparatedListWithOptions", "value": " " } } ``` - value in DB: ``` mysql> SELECT value FROM cloud.configuration WHERE name='alert.smtp.enabledSecurityProtocols'; +-------+ | value | +-------+ | NULL | +-------+ 1 row in set (0.00 sec) ``` - Value in the UI: <img width="2519" height="676" alt="image" src="https://github.com/user-attachments/assets/fa038ee7-5668-446a-b714-d9062cc0eabd" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
