Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions otcextensions/osclient/load_balancer/v1/health_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _get_columns(item):

HTTP_METHODS = ['GET', 'HEAD', 'POST', 'PUT', 'DELETE',
'TRACE', 'OPTIONS', 'CONNECT', 'PATCH']
TYPE_VALUES = ['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO']
TYPE_VALUES = ['HTTP', 'HTTPS', 'PING', 'TCP', 'TLS-HELLO', 'UDP_CONNECT']


class ListHealthMonitor(command.Lister):
Expand All @@ -53,7 +53,8 @@ def get_parser(self, prog_name):
type=lambda s: s.upper(),
choices=TYPE_VALUES,
help=_('Health monitor type to use as a filter\n'
'one of [`HTTP`, `HTTPS`, `PING`, `TCP`, `TLS-HELLO`]')
'one of [`HTTP`, `HTTPS`, `PING`, `TCP`, `TLS-HELLO`, '
'`UDP_CONNECT`]')
)

return parser
Expand Down Expand Up @@ -184,7 +185,8 @@ def get_parser(self, prog_name):
type=lambda s: s.upper(), # case insensitive
required=True,
help=_('The type of health monitor.\n'
'one of [`HTTP`, `HTTPS`, `PING`, `TCP`, `TLS-HELLO`]')
'one of [`HTTP`, `HTTPS`, `PING`, `TCP`, `TLS-HELLO`, '
'`UDP_CONNECT`]')
)
admin_group = parser.add_mutually_exclusive_group()
admin_group.add_argument(
Expand Down
6 changes: 3 additions & 3 deletions otcextensions/osclient/load_balancer/v1/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
LOG = logging.getLogger(__name__)


SUPPORTED_PROTOCOLS = ['TCP', 'HTTP', 'HTTPS']
SUPPORTED_PROTOCOLS = ['TCP', 'HTTP', 'HTTPS', 'UDP']

_formatters = {
'load_balancer_ids': sdk_utils.ListOfIdsColumnBR,
Expand Down Expand Up @@ -66,7 +66,7 @@ def get_parser(self, prog_name):
type=lambda s: s.upper(),
choices=SUPPORTED_PROTOCOLS,
help=_('Load balancer listener protocol to query\n'
'One of [`TCP`, `HTTP`, `HTTPS`]')
'One of [`TCP`, `HTTP`, `HTTPS`, `UDP`]')
)
parser.add_argument(
'--protocol_port',
Expand Down Expand Up @@ -158,7 +158,7 @@ def get_parser(self, prog_name):
choices=SUPPORTED_PROTOCOLS,
required=True,
help=_('The protocol for the listener. '
'One of [`TCP`, `HTTP`, `HTTPS`]')
'One of [`TCP`, `HTTP`, `HTTPS`, `UDP`]')
)
parser.add_argument(
'--protocol_port',
Expand Down
6 changes: 3 additions & 3 deletions otcextensions/osclient/load_balancer/v1/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


LB_ALGORITHM_VALUES = ['LEAST_CONNECTIONS', 'ROUND_ROBIN', 'SOURCE_IP']
PROTOCOL_VALUES = ['HTTP', 'HTTPS', 'PROXY', 'TCP']
PROTOCOL_VALUES = ['HTTP', 'HTTPS', 'PROXY', 'TCP', 'UDP']


def _get_columns(item):
Expand Down Expand Up @@ -84,7 +84,7 @@ def get_parser(self, prog_name):
type=lambda s: s.upper(),
choices=PROTOCOL_VALUES,
help=_('Load balancer pool protocol to query'
'one of [`HTTP`, `HTTPS`, `PROXY`, `TCP`]')
'one of [`HTTP`, `HTTPS`, `PROXY`, `TCP`, `UDP`]')
)
parser.add_argument(
'--load_balancer',
Expand Down Expand Up @@ -182,7 +182,7 @@ def get_parser(self, prog_name):
choices=PROTOCOL_VALUES,
required=True,
help=_('The protocol for the pool. '
'One of [`HTTP`, `HTTPS`, `PROXY`, `TCP`].')
'One of [`HTTP`, `HTTPS`, `PROXY`, `TCP`, `UDP`].')
)
parser.add_argument(
'--lb_algorithm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ def test_list_filters(self):

def test_list_filters_exceptions_proto(self):
arglist = [
'--protocol', 'UDP',
'--protocol', 'SMTP',
'--protocol_port', '12'
]

verifylist = [
('protocol', 'UDP'),
('protocol', 'SMTP'),
('protocol_port', 12)
]

Expand Down