From: Avan Thakkar Date: Mon, 14 Feb 2022 12:18:39 +0000 (+0530) Subject: mgr/dashboard: change privacy protocol field from required to optional X-Git-Tag: v16.2.8~195^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cba0c9205fcee5674b9a0939e3979d3124006e59;p=ceph.git mgr/dashboard: change privacy protocol field from required to optional Fixes: https://tracker.ceph.com/issues/54270 Signed-off-by: Avan Thakkar Privacy protocol field shouldn't be a required field. (cherry picked from commit 2d8f2b8195a0f0c7a21d4ec5061b1b51a3aade2c) --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/services.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/services.po.ts index 6987b6f20f52..d1c100ed3354 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/services.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/services.po.ts @@ -37,7 +37,13 @@ export class ServicesPageHelper extends PageHelper { }); } - addService(serviceType: string, exist?: boolean, count = '1', snmpVersion?: string) { + addService( + serviceType: string, + exist?: boolean, + count = '1', + snmpVersion?: string, + snmpPrivProtocol?: boolean + ) { cy.get(`${this.pages.create.id}`).within(() => { this.selectServiceType(serviceType); switch (serviceType) { @@ -67,12 +73,14 @@ export class ServicesPageHelper extends PageHelper { } else { cy.get('#engine_id').type('800C53F00000'); this.selectOption('auth_protocol', 'SHA'); - this.selectOption('privacy_protocol', 'DES'); + if (snmpPrivProtocol) { + this.selectOption('privacy_protocol', 'DES'); + cy.get('#snmp_v3_priv_password').type('testencrypt'); + } // Credentials cy.get('#snmp_v3_auth_username').type('test'); cy.get('#snmp_v3_auth_password').type('testpass'); - cy.get('#snmp_v3_priv_password').type('testencrypt'); } break; diff --git a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/09-services.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/09-services.e2e-spec.ts index 0c1eecb2b8a5..80fce476c2b0 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/09-services.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/09-services.e2e-spec.ts @@ -40,7 +40,20 @@ describe('Services page', () => { it('should create and delete snmp-gateway service with version V3', () => { services.navigateTo('create'); - services.addService('snmp-gateway', false, '1', 'V3'); + services.addService('snmp-gateway', false, '1', 'V3', true); + services.checkExist('snmp-gateway', true); + + services.clickServiceTab('snmp-gateway', 'Details'); + cy.get('cd-service-details').within(() => { + services.checkServiceStatus('snmp-gateway'); + }); + + services.deleteService('snmp-gateway'); + }); + + it('should create and delete snmp-gateway service with version V3 and w/o privacy protocol', () => { + services.navigateTo('create'); + services.addService('snmp-gateway', false, '1', 'V3', false); services.checkExist('snmp-gateway', true); services.clickServiceTab('snmp-gateway', 'Details'); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html index e1e8317e9bf6..24dac8871f74 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html @@ -63,7 +63,8 @@ -
+