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
This commit is contained in:
Gregory Thiemonge 2019-07-23 17:35:52 +02:00
parent 6ee3d0d7ef
commit 0e190f92d7
7 changed files with 35 additions and 11 deletions

View File

@ -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();
});
});
});
});
})();

View File

@ -61,7 +61,7 @@
</div>
<div class="row">
<div class="row" ng-if="model.spec.listener.protocol !== 'UDP'">
<div class="col-xs-12 col-sm-8 col-md-6">
<div class="form-group required">
@ -91,7 +91,7 @@
</div>
<div class="row">
<div class="row" ng-if="model.spec.listener.protocol !== 'UDP'">
<div class="col-xs-12 col-sm-8 col-md-6">
<div class="form-group required">

View File

@ -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: [],

View File

@ -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);
});
});

View File

@ -22,7 +22,7 @@
<p>
<strong translate>Protocol:</strong>
<translate>
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.
</translate>
</p>
<p>

View File

@ -63,9 +63,13 @@
<translate>Session Persistence</translate>
</label>
<select class="form-control" name="type" id="type"
ng-options="type for type in model.types"
ng-model="model.spec.pool.session_persistence.type">
<option value="">None</option>
<option ng-repeat="type in model.types"
ng-disabled="model.spec.listener.protocol === 'UDP' && type !== 'SOURCE_IP'"
value="{$ type $}">
{$ type $}
</option>
</select>
</div>
</div>

View File

@ -0,0 +1,5 @@
---
features:
- |
Added UDP protocol support in listeners and pools, added UDP-CONNECT method
for health-monitor resources.