1 import { HttpParams } from '@angular/common/http';
2 import { Component, Input, OnInit, ViewChild } from '@angular/core';
3 import { AbstractControl, Validators } from '@angular/forms';
4 import { ActivatedRoute, Router } from '@angular/router';
6 import { NgbActiveModal, NgbModalRef, NgbTypeahead } from '@ng-bootstrap/ng-bootstrap';
7 import _ from 'lodash';
8 import { forkJoin, merge, Observable, Subject, Subscription } from 'rxjs';
9 import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs/operators';
10 import { CreateRgwServiceEntitiesComponent } from '~/app/ceph/rgw/create-rgw-service-entities/create-rgw-service-entities.component';
11 import { RgwRealm, RgwZonegroup, RgwZone } from '~/app/ceph/rgw/models/rgw-multisite';
13 import { CephServiceService } from '~/app/shared/api/ceph-service.service';
14 import { HostService } from '~/app/shared/api/host.service';
15 import { PoolService } from '~/app/shared/api/pool.service';
16 import { RgwMultisiteService } from '~/app/shared/api/rgw-multisite.service';
17 import { RgwRealmService } from '~/app/shared/api/rgw-realm.service';
18 import { RgwZoneService } from '~/app/shared/api/rgw-zone.service';
19 import { RgwZonegroupService } from '~/app/shared/api/rgw-zonegroup.service';
20 import { SelectMessages } from '~/app/shared/components/select/select-messages.model';
21 import { SelectOption } from '~/app/shared/components/select/select-option.model';
26 } from '~/app/shared/constants/app.constants';
27 import { CdForm } from '~/app/shared/forms/cd-form';
28 import { CdFormBuilder } from '~/app/shared/forms/cd-form-builder';
29 import { CdFormGroup } from '~/app/shared/forms/cd-form-group';
30 import { CdValidators } from '~/app/shared/forms/cd-validators';
31 import { CdTableFetchDataContext } from '~/app/shared/models/cd-table-fetch-data-context';
32 import { FinishedTask } from '~/app/shared/models/finished-task';
33 import { CephServiceSpec } from '~/app/shared/models/service.interface';
34 import { ModalService } from '~/app/shared/services/modal.service';
35 import { TaskWrapperService } from '~/app/shared/services/task-wrapper.service';
36 import { TimerService } from '~/app/shared/services/timer.service';
39 selector: 'cd-service-form',
40 templateUrl: './service-form.component.html',
41 styleUrls: ['./service-form.component.scss']
43 export class ServiceFormComponent extends CdForm implements OnInit {
44 public sub = new Subscription();
46 readonly MDS_SVC_ID_PATTERN = /^[a-zA-Z_.-][a-zA-Z0-9_.-]*$/;
47 readonly SNMP_DESTINATION_PATTERN = /^[^\:]+:[0-9]/;
48 readonly SNMP_ENGINE_ID_PATTERN = /^[0-9A-Fa-f]{10,64}/g;
49 readonly INGRESS_SUPPORTED_SERVICE_TYPES = ['rgw', 'nfs'];
50 @ViewChild(NgbTypeahead, { static: false })
51 typeahead: NgbTypeahead;
53 @Input() hiddenServices: string[] = [];
55 @Input() editing = false;
57 @Input() serviceName: string;
59 @Input() serviceType: string;
61 serviceForm: CdFormGroup;
64 serviceTypes: string[] = [];
65 serviceIds: string[] = [];
68 labelClick = new Subject<string>();
69 labelFocus = new Subject<string>();
71 services: Array<CephServiceSpec> = [];
73 serviceList: CephServiceSpec[];
74 multisiteInfo: object[] = [];
76 defaultZonegroupId = '';
78 realmList: RgwRealm[] = [];
79 zonegroupList: RgwZonegroup[] = [];
80 zoneList: RgwZone[] = [];
81 bsModalRef: NgbModalRef;
82 defaultZonegroup: RgwZonegroup;
83 showRealmCreationForm = false;
84 defaultsInfo: { defaultRealmName: string; defaultZonegroupName: string; defaultZoneName: string };
86 zonegroupNames: string[];
90 public actionLabels: ActionLabelsI18n,
91 private cephServiceService: CephServiceService,
92 private formBuilder: CdFormBuilder,
93 private hostService: HostService,
94 private poolService: PoolService,
95 private router: Router,
96 private taskWrapperService: TaskWrapperService,
97 public timerService: TimerService,
98 public timerServiceVariable: TimerServiceInterval,
99 public rgwRealmService: RgwRealmService,
100 public rgwZonegroupService: RgwZonegroupService,
101 public rgwZoneService: RgwZoneService,
102 public rgwMultisiteService: RgwMultisiteService,
103 private route: ActivatedRoute,
104 public activeModal: NgbActiveModal,
105 public modalService: ModalService
108 this.resource = $localize`service`;
111 messages: new SelectMessages({
112 empty: $localize`There are no hosts.`,
113 filter: $localize`Filter hosts`
120 this.serviceForm = this.formBuilder.group({
122 service_type: [null, [Validators.required]],
126 CdValidators.composeIf(
132 CdValidators.custom('mdsPattern', (value: string) => {
133 if (_.isEmpty(value)) {
136 return !this.MDS_SVC_ID_PATTERN.test(value);
140 CdValidators.requiredIf({
143 CdValidators.requiredIf({
144 service_type: 'iscsi'
146 CdValidators.requiredIf({
147 service_type: 'ingress'
149 CdValidators.composeIf(
153 [Validators.required]
155 CdValidators.custom('uniqueName', (service_id: string) => {
156 return this.serviceIds && this.serviceIds.includes(service_id);
160 placement: ['hosts'],
164 CdValidators.requiredIf({
171 count: [null, [CdValidators.number(false)]],
177 CdValidators.requiredIf({
178 service_type: 'iscsi'
183 rgw_frontend_port: [null, [CdValidators.number(false)]],
185 zonegroup_name: [null],
188 trusted_ip_list: [null],
189 api_port: [null, [CdValidators.number(false)]],
193 CdValidators.requiredIf({
194 service_type: 'iscsi',
202 CdValidators.requiredIf({
203 service_type: 'iscsi',
212 CdValidators.requiredIf({
213 service_type: 'ingress'
220 CdValidators.requiredIf({
221 service_type: 'ingress'
228 CdValidators.number(false),
229 CdValidators.requiredIf({
230 service_type: 'ingress'
237 CdValidators.number(false),
238 CdValidators.requiredIf({
239 service_type: 'ingress'
243 virtual_interface_networks: [null],
244 // RGW, Ingress & iSCSI
249 CdValidators.composeIf(
255 [Validators.required, CdValidators.pemCert()]
257 CdValidators.composeIf(
259 service_type: 'iscsi',
263 [Validators.required, CdValidators.sslCert()]
265 CdValidators.composeIf(
267 service_type: 'ingress',
271 [Validators.required, CdValidators.pemCert()]
278 CdValidators.composeIf(
280 service_type: 'iscsi',
284 [Validators.required, CdValidators.sslPrivKey()]
292 CdValidators.requiredIf({
293 service_type: 'snmp-gateway'
301 CdValidators.requiredIf({
302 service_type: 'snmp-gateway'
304 CdValidators.custom('snmpDestinationPattern', (value: string) => {
305 if (_.isEmpty(value)) {
308 return !this.SNMP_DESTINATION_PATTERN.test(value);
316 CdValidators.requiredIf({
317 service_type: 'snmp-gateway'
319 CdValidators.custom('snmpEngineIdPattern', (value: string) => {
320 if (_.isEmpty(value)) {
323 return !this.SNMP_ENGINE_ID_PATTERN.test(value);
330 CdValidators.requiredIf({
331 service_type: 'snmp-gateway'
335 privacy_protocol: [null],
339 CdValidators.requiredIf({
344 snmp_v3_auth_username: [
347 CdValidators.requiredIf({
348 service_type: 'snmp-gateway'
352 snmp_v3_auth_password: [
355 CdValidators.requiredIf({
356 service_type: 'snmp-gateway'
360 snmp_v3_priv_password: [
363 CdValidators.requiredIf({
364 privacy_protocol: { op: '!empty' }
368 grafana_port: [null, [CdValidators.number(false)]],
369 grafana_admin_password: [null]
374 this.action = this.actionLabels.CREATE;
375 if (this.router.url.includes('services/(modal:create')) {
376 this.pageURL = 'services';
377 } else if (this.router.url.includes('services/(modal:edit')) {
379 this.pageURL = 'services';
380 this.route.params.subscribe((params: { type: string; name: string }) => {
381 this.serviceName = params.name;
382 this.serviceType = params.type;
386 this.cephServiceService
387 .list(new HttpParams({ fromObject: { limit: -1, offset: 0 } }))
388 .observable.subscribe((services: CephServiceSpec[]) => {
389 this.serviceList = services;
390 this.services = services.filter((service: any) =>
391 this.INGRESS_SUPPORTED_SERVICE_TYPES.includes(service.service_type)
395 this.cephServiceService.getKnownTypes().subscribe((resp: Array<string>) => {
396 // Remove service types:
397 // osd - This is deployed a different way.
398 // container - This should only be used in the CLI.
399 this.hiddenServices.push('osd', 'container');
401 this.serviceTypes = _.difference(resp, this.hiddenServices).sort();
403 const hostContext = new CdTableFetchDataContext(() => undefined);
404 this.hostService.list(hostContext.toParams(), 'false').subscribe((resp: object[]) => {
405 const options: SelectOption[] = [];
406 _.forEach(resp, (host: object) => {
407 if (_.get(host, 'sources.orchestrator', false)) {
408 const option = new SelectOption(false, _.get(host, 'hostname'), '');
409 options.push(option);
412 this.hosts.options = [...options];
414 this.hostService.getLabels().subscribe((resp: string[]) => {
417 this.poolService.getList().subscribe((resp: Array<object>) => {
422 this.action = this.actionLabels.EDIT;
423 this.disableForEditing(this.serviceType);
424 this.cephServiceService
425 .list(new HttpParams({ fromObject: { limit: -1, offset: 0 } }), this.serviceName)
426 .observable.subscribe((response: CephServiceSpec[]) => {
427 const formKeys = ['service_type', 'service_id', 'unmanaged'];
428 formKeys.forEach((keys) => {
429 this.serviceForm.get(keys).setValue(response[0][keys]);
431 if (!response[0]['unmanaged']) {
432 const placementKey = Object.keys(response[0]['placement'])[0];
433 let placementValue: string;
434 ['hosts', 'label'].indexOf(placementKey) >= 0
435 ? (placementValue = placementKey)
436 : (placementValue = 'hosts');
437 this.serviceForm.get('placement').setValue(placementValue);
438 this.serviceForm.get('count').setValue(response[0]['placement']['count']);
439 if (response[0]?.placement[placementValue]) {
440 this.serviceForm.get(placementValue).setValue(response[0]?.placement[placementValue]);
443 switch (this.serviceType) {
445 const specKeys = ['pool', 'api_password', 'api_user', 'trusted_ip_list', 'api_port'];
446 specKeys.forEach((key) => {
447 this.serviceForm.get(key).setValue(response[0].spec[key]);
449 this.serviceForm.get('ssl').setValue(response[0].spec?.api_secure);
450 if (response[0].spec?.api_secure) {
451 this.serviceForm.get('ssl_cert').setValue(response[0].spec?.ssl_cert);
452 this.serviceForm.get('ssl_key').setValue(response[0].spec?.ssl_key);
457 .get('rgw_frontend_port')
458 .setValue(response[0].spec?.rgw_frontend_port);
461 response[0].spec?.rgw_realm,
462 response[0].spec?.rgw_zonegroup,
463 response[0].spec?.rgw_zone
465 this.serviceForm.get('ssl').setValue(response[0].spec?.ssl);
466 if (response[0].spec?.ssl) {
469 .setValue(response[0].spec?.rgw_frontend_ssl_certificate);
473 const ingressSpecKeys = [
478 'virtual_interface_networks',
481 ingressSpecKeys.forEach((key) => {
482 this.serviceForm.get(key).setValue(response[0].spec[key]);
484 if (response[0].spec?.ssl) {
485 this.serviceForm.get('ssl_cert').setValue(response[0].spec?.ssl_cert);
486 this.serviceForm.get('ssl_key').setValue(response[0].spec?.ssl_key);
490 const snmpCommonSpecKeys = ['snmp_version', 'snmp_destination'];
491 snmpCommonSpecKeys.forEach((key) => {
492 this.serviceForm.get(key).setValue(response[0].spec[key]);
494 if (this.serviceForm.getValue('snmp_version') === 'V3') {
495 const snmpV3SpecKeys = [
499 'snmp_v3_auth_username',
500 'snmp_v3_auth_password',
501 'snmp_v3_priv_password'
503 snmpV3SpecKeys.forEach((key) => {
506 key === 'snmp_v3_auth_username' ||
507 key === 'snmp_v3_auth_password' ||
508 key === 'snmp_v3_priv_password'
510 this.serviceForm.get(key).setValue(response[0].spec['credentials'][key]);
512 this.serviceForm.get(key).setValue(response[0].spec[key]);
518 .get('snmp_community')
519 .setValue(response[0].spec['credentials']['snmp_community']);
523 this.serviceForm.get('grafana_port').setValue(response[0].spec.port);
525 .get('grafana_admin_password')
526 .setValue(response[0].spec.initial_admin_password);
534 defaultRealmId: string,
535 defaultZonegroupId: string,
536 defaultZoneId: string
537 ): { defaultRealmName: string; defaultZonegroupName: string; defaultZoneName: string } {
538 const defaultRealm = this.realmList.find((x: { id: string }) => x.id === defaultRealmId);
539 const defaultZonegroup = this.zonegroupList.find(
540 (x: { id: string }) => x.id === defaultZonegroupId
542 const defaultZone = this.zoneList.find((x: { id: string }) => x.id === defaultZoneId);
543 const defaultRealmName = defaultRealm !== undefined ? defaultRealm.name : null;
544 const defaultZonegroupName = defaultZonegroup !== undefined ? defaultZonegroup.name : 'default';
545 const defaultZoneName = defaultZone !== undefined ? defaultZone.name : 'default';
546 if (defaultZonegroupName === 'default' && !this.zonegroupNames.includes(defaultZonegroupName)) {
547 const defaultZonegroup = new RgwZonegroup();
548 defaultZonegroup.name = 'default';
549 this.zonegroupList.push(defaultZonegroup);
551 if (defaultZoneName === 'default' && !this.zoneNames.includes(defaultZoneName)) {
552 const defaultZone = new RgwZone();
553 defaultZone.name = 'default';
554 this.zoneList.push(defaultZone);
557 defaultRealmName: defaultRealmName,
558 defaultZonegroupName: defaultZonegroupName,
559 defaultZoneName: defaultZoneName
564 selectedServiceType: string,
566 zonegroup_name?: string,
569 this.serviceIds = this.serviceList
570 ?.filter((service) => service['service_type'] === selectedServiceType)
571 .map((service) => service['service_id']);
573 if (selectedServiceType === 'rgw') {
574 const observables = [
575 this.rgwRealmService.getAllRealmsInfo(),
576 this.rgwZonegroupService.getAllZonegroupsInfo(),
577 this.rgwZoneService.getAllZonesInfo()
579 this.sub = forkJoin(observables).subscribe(
580 (multisiteInfo: [object, object, object]) => {
581 this.multisiteInfo = multisiteInfo;
583 this.multisiteInfo[0] !== undefined && this.multisiteInfo[0].hasOwnProperty('realms')
584 ? this.multisiteInfo[0]['realms']
587 this.multisiteInfo[1] !== undefined &&
588 this.multisiteInfo[1].hasOwnProperty('zonegroups')
589 ? this.multisiteInfo[1]['zonegroups']
592 this.multisiteInfo[2] !== undefined && this.multisiteInfo[2].hasOwnProperty('zones')
593 ? this.multisiteInfo[2]['zones']
595 this.realmNames = this.realmList.map((realm) => {
596 return realm['name'];
598 this.zonegroupNames = this.zonegroupList.map((zonegroup) => {
599 return zonegroup['name'];
601 this.zoneNames = this.zoneList.map((zone) => {
604 this.defaultRealmId = multisiteInfo[0]['default_realm'];
605 this.defaultZonegroupId = multisiteInfo[1]['default_zonegroup'];
606 this.defaultZoneId = multisiteInfo[2]['default_zone'];
607 this.defaultsInfo = this.getDefaultsEntities(
609 this.defaultZonegroupId,
613 this.serviceForm.get('realm_name').setValue(this.defaultsInfo['defaultRealmName']);
615 .get('zonegroup_name')
616 .setValue(this.defaultsInfo['defaultZonegroupName']);
617 this.serviceForm.get('zone_name').setValue(this.defaultsInfo['defaultZoneName']);
619 if (realm_name && !this.realmNames.includes(realm_name)) {
620 const realm = new RgwRealm();
621 realm.name = realm_name;
622 this.realmList.push(realm);
624 if (zonegroup_name && !this.zonegroupNames.includes(zonegroup_name)) {
625 const zonegroup = new RgwZonegroup();
626 zonegroup.name = zonegroup_name;
627 this.zonegroupList.push(zonegroup);
629 if (zone_name && !this.zoneNames.includes(zone_name)) {
630 const zone = new RgwZone();
631 zone.name = zone_name;
632 this.zoneList.push(zone);
634 if (zonegroup_name === undefined && zone_name === undefined) {
635 zonegroup_name = 'default';
636 zone_name = 'default';
638 this.serviceForm.get('realm_name').setValue(realm_name);
639 this.serviceForm.get('zonegroup_name').setValue(zonegroup_name);
640 this.serviceForm.get('zone_name').setValue(zone_name);
642 if (this.realmList.length === 0) {
643 this.showRealmCreationForm = true;
645 this.showRealmCreationForm = false;
649 const defaultZone = new RgwZone();
650 defaultZone.name = 'default';
651 const defaultZonegroup = new RgwZonegroup();
652 defaultZonegroup.name = 'default';
653 this.zoneList.push(defaultZone);
654 this.zonegroupList.push(defaultZonegroup);
660 disableForEditing(serviceType: string) {
661 const disableForEditKeys = ['service_type', 'service_id'];
662 disableForEditKeys.forEach((key) => {
663 this.serviceForm.get(key).disable();
665 switch (serviceType) {
667 this.serviceForm.get('backend_service').disable();
671 searchLabels = (text$: Observable<string>) => {
673 text$.pipe(debounceTime(200), distinctUntilChanged()),
675 this.labelClick.pipe(filter(() => !this.typeahead.isPopupOpen()))
679 .filter((label: string) => label.toLowerCase().indexOf(value.toLowerCase()) > -1)
685 fileUpload(files: FileList, controlName: string) {
686 const file: File = files[0];
687 const reader = new FileReader();
688 reader.addEventListener('load', (event: ProgressEvent<FileReader>) => {
689 const control: AbstractControl = this.serviceForm.get(controlName);
690 control.setValue(event.target.result);
691 control.markAsDirty();
692 control.markAsTouched();
693 control.updateValueAndValidity();
695 reader.readAsText(file, 'utf8');
699 const control: AbstractControl = this.serviceForm.get('service_id');
700 const backendService = this.serviceForm.getValue('backend_service');
701 // Set Id as read-only
702 control.reset({ value: backendService, disabled: true });
707 const values: object = this.serviceForm.getRawValue();
708 const serviceType: string = values['service_type'];
709 let taskUrl = `service/${URLVerbs.CREATE}`;
711 taskUrl = `service/${URLVerbs.EDIT}`;
713 const serviceSpec: object = {
714 service_type: serviceType,
716 unmanaged: values['unmanaged']
719 if (serviceType === 'rgw') {
720 serviceSpec['rgw_realm'] = values['realm_name'] ? values['realm_name'] : null;
721 serviceSpec['rgw_zonegroup'] =
722 values['zonegroup_name'] !== 'default' ? values['zonegroup_name'] : null;
723 serviceSpec['rgw_zone'] = values['zone_name'] !== 'default' ? values['zone_name'] : null;
724 svcId = values['service_id'];
726 svcId = values['service_id'];
728 const serviceId: string = svcId;
729 let serviceName: string = serviceType;
730 if (_.isString(serviceId) && !_.isEmpty(serviceId)) {
731 serviceName = `${serviceType}.${serviceId}`;
732 serviceSpec['service_id'] = serviceId;
735 // These services has some fields to be
736 // filled out even if unmanaged is true
737 switch (serviceType) {
739 serviceSpec['backend_service'] = values['backend_service'];
740 serviceSpec['service_id'] = values['backend_service'];
741 if (_.isNumber(values['frontend_port']) && values['frontend_port'] > 0) {
742 serviceSpec['frontend_port'] = values['frontend_port'];
744 if (_.isString(values['virtual_ip']) && !_.isEmpty(values['virtual_ip'])) {
745 serviceSpec['virtual_ip'] = values['virtual_ip'].trim();
747 if (_.isNumber(values['monitor_port']) && values['monitor_port'] > 0) {
748 serviceSpec['monitor_port'] = values['monitor_port'];
753 serviceSpec['pool'] = values['pool'];
757 serviceSpec['credentials'] = {};
758 serviceSpec['snmp_version'] = values['snmp_version'];
759 serviceSpec['snmp_destination'] = values['snmp_destination'];
760 if (values['snmp_version'] === 'V3') {
761 serviceSpec['engine_id'] = values['engine_id'];
762 serviceSpec['auth_protocol'] = values['auth_protocol'];
763 serviceSpec['credentials']['snmp_v3_auth_username'] = values['snmp_v3_auth_username'];
764 serviceSpec['credentials']['snmp_v3_auth_password'] = values['snmp_v3_auth_password'];
765 if (values['privacy_protocol'] !== null) {
766 serviceSpec['privacy_protocol'] = values['privacy_protocol'];
767 serviceSpec['credentials']['snmp_v3_priv_password'] = values['snmp_v3_priv_password'];
770 serviceSpec['credentials']['snmp_community'] = values['snmp_community'];
775 if (!values['unmanaged']) {
776 switch (values['placement']) {
778 if (values['hosts'].length > 0) {
779 serviceSpec['placement']['hosts'] = values['hosts'];
783 serviceSpec['placement']['label'] = values['label'];
786 if (_.isNumber(values['count']) && values['count'] > 0) {
787 serviceSpec['placement']['count'] = values['count'];
789 switch (serviceType) {
791 if (_.isNumber(values['rgw_frontend_port']) && values['rgw_frontend_port'] > 0) {
792 serviceSpec['rgw_frontend_port'] = values['rgw_frontend_port'];
794 serviceSpec['ssl'] = values['ssl'];
796 serviceSpec['rgw_frontend_ssl_certificate'] = values['ssl_cert']?.trim();
800 if (_.isString(values['trusted_ip_list']) && !_.isEmpty(values['trusted_ip_list'])) {
801 serviceSpec['trusted_ip_list'] = values['trusted_ip_list'].trim();
803 if (_.isNumber(values['api_port']) && values['api_port'] > 0) {
804 serviceSpec['api_port'] = values['api_port'];
806 serviceSpec['api_user'] = values['api_user'];
807 serviceSpec['api_password'] = values['api_password'];
808 serviceSpec['api_secure'] = values['ssl'];
810 serviceSpec['ssl_cert'] = values['ssl_cert']?.trim();
811 serviceSpec['ssl_key'] = values['ssl_key']?.trim();
815 serviceSpec['ssl'] = values['ssl'];
817 serviceSpec['ssl_cert'] = values['ssl_cert']?.trim();
818 serviceSpec['ssl_key'] = values['ssl_key']?.trim();
820 serviceSpec['virtual_interface_networks'] = values['virtual_interface_networks'];
823 serviceSpec['port'] = values['grafana_port'];
824 serviceSpec['initial_admin_password'] = values['grafana_admin_password'];
828 this.taskWrapperService
829 .wrapTaskAroundCall({
830 task: new FinishedTask(taskUrl, {
831 service_name: serviceName
834 ? this.cephServiceService.update(serviceSpec)
835 : this.cephServiceService.create(serviceSpec)
839 self.serviceForm.setErrors({ cdSubmitButton: true });
842 this.pageURL === 'services'
843 ? this.router.navigate([this.pageURL, { outlets: { modal: null } }])
844 : this.activeModal.close();
850 const snmpVersion = this.serviceForm.getValue('snmp_version');
851 const privacyProtocol = this.serviceForm.getValue('privacy_protocol');
852 if (snmpVersion === 'V3') {
853 this.serviceForm.get('snmp_community').clearValidators();
855 this.serviceForm.get('engine_id').clearValidators();
856 this.serviceForm.get('auth_protocol').clearValidators();
857 this.serviceForm.get('privacy_protocol').clearValidators();
858 this.serviceForm.get('snmp_v3_auth_username').clearValidators();
859 this.serviceForm.get('snmp_v3_auth_password').clearValidators();
861 if (privacyProtocol === null) {
862 this.serviceForm.get('snmp_v3_priv_password').clearValidators();
866 createMultisiteSetup() {
867 this.bsModalRef = this.modalService.show(CreateRgwServiceEntitiesComponent, {
870 this.bsModalRef.componentInstance.submitAction.subscribe(() => {
871 this.getServiceIds('rgw');