Merge "Allow lower case protocol values"
This commit is contained in:
@@ -42,6 +42,10 @@ def env(*vars, **kwargs):
|
||||
return kwargs.get('default', '')
|
||||
|
||||
|
||||
def convert_to_uppercase(string):
|
||||
return string.upper()
|
||||
|
||||
|
||||
def get_client_class(api_name, version, version_map):
|
||||
"""Returns the client class for the requested API version.
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
from neutronclient.common import utils
|
||||
from neutronclient.i18n import _
|
||||
from neutronclient.neutron import v2_0 as neutronV20
|
||||
|
||||
@@ -82,6 +83,7 @@ class CreateListener(neutronV20.CreateCommand):
|
||||
'--protocol',
|
||||
required=True,
|
||||
choices=['TCP', 'HTTP', 'HTTPS', 'TERMINATED_HTTPS'],
|
||||
type=utils.convert_to_uppercase,
|
||||
help=_('Protocol for the listener.'))
|
||||
parser.add_argument(
|
||||
'--protocol-port',
|
||||
|
||||
@@ -82,6 +82,7 @@ class CreatePool(neutronV20.CreateCommand):
|
||||
'--protocol',
|
||||
required=True,
|
||||
choices=['HTTP', 'HTTPS', 'TCP'],
|
||||
type=utils.convert_to_uppercase,
|
||||
help=_('Protocol for balancing.'))
|
||||
|
||||
def args2body(self, parsed_args):
|
||||
|
||||
Reference in New Issue
Block a user