-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow listeners for different protocols on the same port
Added 'protocol' name in the unique constraint list for listeners, updated conflicting/duplicate entries detection in API. Added alembic migration script. Story: 2005070 Task: 29643 Change-Id: If85b59bddb8d6dc9916c3fef5155e838f1af63b6
- Loading branch information
1 parent
6e4da85
commit b42a64a
Showing
7 changed files
with
113 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...ia/db/migration/alembic_migrations/versions/a5762a99609a_add_protocol_in_listener_keys.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright (c) 2019 Red Hat, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
"""add protocol in listener keys | ||
Revision ID: a5762a99609a | ||
Revises: 392fb85b4419 | ||
Create Date: 2019-06-28 14:02:11.415292 | ||
""" | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'a5762a99609a' | ||
down_revision = '392fb85b4419' | ||
|
||
|
||
def upgrade(): | ||
op.execute("ALTER TABLE `listener` " | ||
"DROP INDEX `uq_listener_load_balancer_id_protocol_port`, " | ||
"ADD UNIQUE KEY " | ||
"`uq_listener_load_balancer_id_protocol_port` " | ||
"(`load_balancer_id`, `protocol`, `protocol_port`)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixed bug which prevented the creation of listeners for different protocols | ||
on the same port (i.e: tcp port 53, and udp port 53). |