From 260ec7610ca6006bd2a57dbb771f6683a10c6004 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Fri, 28 Aug 2020 16:34:38 +0200 Subject: [PATCH] Add support for SCTP Add SCTP option in listener protocol and health-monitor type select boxes. Depends-On: https://review.opendev.org/#/c/738381/ Story: 2007884 Task: 40258 Change-Id: If84d6644b2c2f9c2ff0f77099f52ef48f20bcf71 --- .../workflow/listener/listener.controller.spec.js | 13 +++++++++++++ .../project/lbaasv2/workflow/listener/listener.html | 4 ++-- .../project/lbaasv2/workflow/model.service.js | 6 +++--- .../project/lbaasv2/workflow/model.service.spec.js | 8 ++++---- .../project/lbaasv2/workflow/pool/pool.help.html | 2 +- .../project/lbaasv2/workflow/pool/pool.html | 2 +- .../notes/add-sctp-support-a1ea956b7630f47d.yaml | 4 ++++ 7 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 releasenotes/notes/add-sctp-support-a1ea956b7630f47d.yaml diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.spec.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.spec.js index a31e5c60..eb9fb62b 100644 --- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.spec.js +++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.controller.spec.js @@ -73,6 +73,11 @@ expect(listener.protocol_port).toBeUndefined(); }); + it('should update port on protocol change to SCTP', function() { + ctrl.protocolChange('SCTP'); + expect(listener.protocol_port).toBeUndefined(); + }); + it('should update member ports on protocol change to TERMINATED_HTTPS', function() { ctrl.protocolChange('TERMINATED_HTTPS'); @@ -105,6 +110,14 @@ }); }); + it('should update member ports on protocol change to SCTP', function() { + ctrl.protocolChange('SCTP'); + + scope.model.members.concat(scope.model.spec.members).forEach(function(member) { + expect(member.port).toBeUndefined(); + }); + }); + }); }); })(); diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.html b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.html index 87ce38c2..70044bfa 100644 --- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.html +++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/listener/listener.html @@ -61,7 +61,7 @@ -
+
@@ -91,7 +91,7 @@
-
+
diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js index b85dca3f..5fb58c41 100644 --- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js +++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js @@ -86,16 +86,16 @@ members: [], networks: {}, flavors: {}, - listenerProtocols: ['HTTP', 'TCP', 'TERMINATED_HTTPS', 'HTTPS', 'UDP'], + listenerProtocols: ['HTTP', 'TCP', 'TERMINATED_HTTPS', 'HTTPS', 'UDP', 'SCTP'], availability_zones: {}, l7policyActions: ['REJECT', 'REDIRECT_TO_URL', 'REDIRECT_TO_POOL'], l7ruleTypes: ['HOST_NAME', 'PATH', 'FILE_TYPE', 'HEADER', 'COOKIE'], l7ruleCompareTypes: ['REGEX', 'EQUAL_TO', 'STARTS_WITH', 'ENDS_WITH', 'CONTAINS'], l7ruleFileTypeCompareTypes: ['REGEX', 'EQUAL_TO'], - poolProtocols: ['HTTP', 'HTTPS', 'PROXY', 'PROXYV2', 'TCP', 'UDP'], + poolProtocols: ['HTTP', 'HTTPS', 'PROXY', 'PROXYV2', 'TCP', 'UDP', 'SCTP'], methods: ['LEAST_CONNECTIONS', 'ROUND_ROBIN', 'SOURCE_IP'], types: ['SOURCE_IP', 'HTTP_COOKIE', 'APP_COOKIE'], - monitorTypes: ['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO', 'UDP-CONNECT'], + monitorTypes: ['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO', 'UDP-CONNECT', 'SCTP'], monitorMethods: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PATCH', 'CONNECT'], certificates: [], diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.spec.js b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.spec.js index 6070ff88..1bbd9d4f 100644 --- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.spec.js +++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.spec.js @@ -495,7 +495,7 @@ it('has array of listener protocols', function() { expect(model.listenerProtocols).toEqual(['HTTP', 'TCP', 'TERMINATED_HTTPS', 'HTTPS', - 'UDP']); + 'UDP', 'SCTP']); }); it('has array of pool lb_algorithms', function() { @@ -508,7 +508,7 @@ it('has array of monitor types', function() { expect(model.monitorTypes).toEqual(['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO', - 'UDP-CONNECT']); + 'UDP-CONNECT', 'SCTP']); }); it('has array of monitor http_methods', function() { @@ -866,7 +866,7 @@ }); it('should initialize listener protocols', function() { - expect(model.listenerProtocols.length).toBe(5); + expect(model.listenerProtocols.length).toBe(6); expect(model.listenerProtocols.indexOf('TERMINATED_HTTPS')).toBe(2); }); }); @@ -917,7 +917,7 @@ }); it('should initialize listener protocols', function() { - expect(model.listenerProtocols.length).toBe(4); + expect(model.listenerProtocols.length).toBe(5); expect(model.listenerProtocols.indexOf('TERMINATED_HTTPS')).toBe(-1); }); }); diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.help.html b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.help.html index b4108e37..6df334d5 100644 --- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.help.html +++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.help.html @@ -22,7 +22,7 @@

Protocol: - The protocol for which this pool and its members listen. A valid value is HTTP, HTTPS, PROXY, PROXYV2, TCP or UDP. + The protocol for which this pool and its members listen. A valid value is HTTP, HTTPS, PROXY, PROXYV2, TCP, UDP or SCTP.

diff --git a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html index 402ab554..a30cb788 100644 --- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html +++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html @@ -66,7 +66,7 @@ ng-model="model.spec.pool.session_persistence.type"> diff --git a/releasenotes/notes/add-sctp-support-a1ea956b7630f47d.yaml b/releasenotes/notes/add-sctp-support-a1ea956b7630f47d.yaml new file mode 100644 index 00000000..c3bb0026 --- /dev/null +++ b/releasenotes/notes/add-sctp-support-a1ea956b7630f47d.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add SCTP support in listener protocol and health-monitor type select boxes.