Merge "Allow lower case protocol values"

This commit is contained in:
Jenkins
2015-12-10 23:45:38 +00:00
committed by Gerrit Code Review
3 changed files with 7 additions and 0 deletions

View File

@@ -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.

View File

@@ -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',

View File

@@ -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):