From 2d8f2b8195a0f0c7a21d4ec5061b1b51a3aade2c Mon Sep 17 00:00:00 2001 From: Avan Thakkar Date: Mon, 14 Feb 2022 17:48:39 +0530 Subject: [PATCH] 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. --- .../integration/cluster/services.po.ts | 14 +++++++++--- .../workflow/09-services.e2e-spec.ts | 15 ++++++++++++- .../service-form/service-form.component.html | 3 ++- .../service-form/service-form.component.ts | 22 ++++++------------- 4 files changed, 34 insertions(+), 20 deletions(-) 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 e4f4561e820..cbc900813dc 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 c5fd7cb9733..c266c81b712 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 @@ -77,7 +77,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 e1e8317e9bf..24dac8871f7 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 @@ -
+