From 0e190f92d74cbb2677a390a00b4826b6835b1e93 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Tue, 23 Jul 2019 17:35:52 +0200 Subject: [PATCH] Added UDP support for listener and health-monitor - Added UDP protocol for listener and pool - Added UDP-CONNECT method for health-monitor Story: 1657091 Task: 23225 Change-Id: I3c25a1a69ef2e5ce0a994744a6a3a4fb5a3c3312 --- .../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 | 10 ++++++---- .../project/lbaasv2/workflow/pool/pool.help.html | 2 +- .../project/lbaasv2/workflow/pool/pool.html | 6 +++++- .../notes/add-udp-support-acb1a22fb605d3a8.yaml | 5 +++++ 7 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 releasenotes/notes/add-udp-support-acb1a22fb605d3a8.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 9eb9f574..a31e5c60 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 @@ -68,6 +68,11 @@ expect(listener.protocol_port).toBeUndefined(); }); + it('should update port on protocol change to UDP', function() { + ctrl.protocolChange('UDP'); + expect(listener.protocol_port).toBeUndefined(); + }); + it('should update member ports on protocol change to TERMINATED_HTTPS', function() { ctrl.protocolChange('TERMINATED_HTTPS'); @@ -92,6 +97,14 @@ }); }); + it('should update member ports on protocol change to UDP', function() { + ctrl.protocolChange('UDP'); + + 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 f5d2fd4d..87ce38c2 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 42c1cbeb..ee394ea0 100644 --- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js +++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/model.service.js @@ -86,15 +86,15 @@ members: [], networks: {}, flavors: {}, - listenerProtocols: ['HTTP', 'TCP', 'TERMINATED_HTTPS', 'HTTPS'], + listenerProtocols: ['HTTP', 'TCP', 'TERMINATED_HTTPS', 'HTTPS', 'UDP'], 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', 'TCP'], + poolProtocols: ['HTTP', 'HTTPS', 'PROXY', 'TCP', 'UDP'], methods: ['LEAST_CONNECTIONS', 'ROUND_ROBIN', 'SOURCE_IP'], types: ['SOURCE_IP', 'HTTP_COOKIE', 'APP_COOKIE'], - monitorTypes: ['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO'], + monitorTypes: ['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO', 'UDP-CONNECT'], 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 97e54e6b..2b8ee046 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 @@ -465,7 +465,8 @@ }); it('has array of listener protocols', function() { - expect(model.listenerProtocols).toEqual(['HTTP', 'TCP', 'TERMINATED_HTTPS', 'HTTPS']); + expect(model.listenerProtocols).toEqual(['HTTP', 'TCP', 'TERMINATED_HTTPS', 'HTTPS', + 'UDP']); }); it('has array of pool lb_algorithms', function() { @@ -477,7 +478,8 @@ }); it('has array of monitor types', function() { - expect(model.monitorTypes).toEqual(['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO']); + expect(model.monitorTypes).toEqual(['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO', + 'UDP-CONNECT']); }); it('has array of monitor http_methods', function() { @@ -833,7 +835,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(2); }); }); @@ -884,7 +886,7 @@ }); it('should initialize listener protocols', function() { - expect(model.listenerProtocols.length).toBe(3); + expect(model.listenerProtocols.length).toBe(4); 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 4ac2f545..60a2d44d 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, or TCP. + The protocol for which this pool and its members listen. A valid value is HTTP, HTTPS, PROXY, TCP or UDP.

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 6c9aabd1..402ab554 100644 --- a/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html +++ b/octavia_dashboard/static/dashboard/project/lbaasv2/workflow/pool/pool.html @@ -63,9 +63,13 @@ Session Persistence

diff --git a/releasenotes/notes/add-udp-support-acb1a22fb605d3a8.yaml b/releasenotes/notes/add-udp-support-acb1a22fb605d3a8.yaml new file mode 100644 index 00000000..52bd5a26 --- /dev/null +++ b/releasenotes/notes/add-udp-support-acb1a22fb605d3a8.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added UDP protocol support in listeners and pools, added UDP-CONNECT method + for health-monitor resources.