Repository: aws/aws-cli

Issue:
Match input / output JSON casing and word separaters



Discussion:

Resolving patch:
diff --git a/awscli/argprocess.py b/awscli/argprocess.py
--- a/awscli/argprocess.py
+++ b/awscli/argprocess.py
@@ -176,7 +176,7 @@ def _list_scalar_list_parse(self, param, value):
         # We're looking for key=val1,val2,val3,key2=val1,val2.
         arg_types = {}
         for arg in param.members.members:
-            arg_types[arg.py_name] = arg.type
+            arg_types[arg.name] = arg.type
         parsed = []
         for v in value:
             parts = self._split_on_commas(v)
@@ -212,7 +212,7 @@ def _list_scalar_parse(self, param, value):
         parsed = []
         # We know that value is a list in this case.
         for v in value:
-            parsed.append({single_param.py_name: v})
+            parsed.append({single_param.name: v})
         return parsed
 
     def _list_key_value_parse(self, param, value):
@@ -251,7 +251,7 @@ def _key_value_parse(self, param, value):
 
     def _create_name_to_params(self, param):
         if param.type == 'structure':
-            return dict([(p.py_name, p) for p in param.members])
+            return dict([(p.name, p) for p in param.members])
         elif param.type == 'map':
             return dict([(v, None) for v in param.keys.enum])
 
@@ -262,30 +262,30 @@ def _docs_list_scalar_list_parse(self, param):
         scalar_params = [p for p in inner_params if p.type in SCALAR_TYPES]
         list_params = [p for p in inner_params if p.type == 'list']
         for param in scalar_params:
-            s += '%s=%s1,' % (param.py_name, param.type)
+            s += '%s=%s1,' % (param.name, param.type)
         for param in list_params[:-1]:
             param_type = param.members.type
-            s += '%s=%s1,%s2,' % (param.py_name, param_type, param_type)
+            s += '%s=%s1,%s2,' % (param.name, param_type, param_type)
         last_param = list_params[-1]
         param_type = last_param.members.type
-        s += '%s=%s1,%s2' % (last_param.py_name, param_type, param_type)
+        s += '%s=%s1,%s2' % (last_param.name, param_type, param_type)
         return s
 
     def _docs_list_scalar_parse(self, param):
-        name = param.members.members[0].py_name
+        name = param.members.members[0].name
         return '%s %s1 %s2 %s3' % (param.cli_name, name, name, name)
 
     def _docs_list_key_value_parse(self, param):
         s = "Key value pairs, with multiple values separated by a space.\n"
         s += '%s ' % param.cli_name
-        s += ','.join(['%s=%s' % (sub_param.py_name, sub_param.type)
+        s += ','.join(['%s=%s' % (sub_param.name, sub_param.type)
                        for sub_param in param.members.members])
         return s
 
     def _docs_key_value_parse(self, param):
         s = '%s ' % param.cli_name
         if param.type == 'structure':
-            s += ','.join(['%s=value' % sub_param.py_name
+            s += ','.join(['%s=value' % sub_param.name
                             for sub_param in param.members])
         elif param.type == 'map':
             s += 'key_name=string,key_name2=string'


Test patch:
diff --git a/tests/unit/cloudformation/test_create_stack.py b/tests/unit/cloudformation/test_create_stack.py
--- a/tests/unit/cloudformation/test_create_stack.py
+++ b/tests/unit/cloudformation/test_create_stack.py
@@ -28,8 +28,8 @@ def test_basic_create_stack(self):
     def test_create_stack_string_params(self):
         cmdline = self.prefix
         cmdline += ' --stack-name test-stack --template-url http://foo'
-        cmdline += ' --parameters parameter_key=foo,parameter_value=bar'
-        cmdline += ' parameter_key=foo2,parameter_value=bar2'
+        cmdline += ' --parameters ParameterKey=foo,ParameterValue=bar'
+        cmdline += ' ParameterKey=foo2,ParameterValue=bar2'
         result = {'StackName': 'test-stack', 'TemplateURL': 'http://foo',
                   'Parameters.member.1.ParameterKey': 'foo',
                   'Parameters.member.1.ParameterValue': 'bar',
@@ -42,7 +42,7 @@ def test_create_stack_for_csv_params_escaping(self):
         # we need to be able to quote the value or escape the comma.
         cmdline = self.prefix
         cmdline += ' --stack-name test-stack --template-url http://foo'
-        cmdline += ' --parameters parameter_key=foo,parameter_value=one\,two'
+        cmdline += ' --parameters ParameterKey=foo,ParameterValue=one\,two'
         result = {'StackName': 'test-stack', 'TemplateURL': 'http://foo',
                   'Parameters.member.1.ParameterKey': 'foo',
                   'Parameters.member.1.ParameterValue': 'one,two',
@@ -53,7 +53,7 @@ def test_create_stack_for_csv_with_quoting(self):
         cmdline = self.prefix
         cmdline += ' --stack-name test-stack --template-url http://foo'
         # Note how we're quoting the value of parameter_value.
-        cmdline += ' --parameters parameter_key=foo,parameter_value="one,two"'
+        cmdline += ' --parameters ParameterKey=foo,ParameterValue="one,two"'
         result = {'StackName': 'test-stack', 'TemplateURL': 'http://foo',
                   'Parameters.member.1.ParameterKey': 'foo',
                   'Parameters.member.1.ParameterValue': 'one,two',
diff --git a/tests/unit/docs/test_help_output.py b/tests/unit/docs/test_help_output.py
--- a/tests/unit/docs/test_help_output.py
+++ b/tests/unit/docs/test_help_output.py
@@ -112,14 +112,14 @@ def test_arguments_with_example_json_syntax(self):
         self.driver.main(['ec2', 'run-instances', 'help'])
         self.assert_contains('``--iam-instance-profile``')
         self.assert_contains('JSON Syntax')
-        self.assert_contains('"arn": "string"')
-        self.assert_contains('"name": "string"')
+        self.assert_contains('"Arn": "string"')
+        self.assert_contains('"Name": "string"')
 
     def test_arguments_with_example_shorthand_syntax(self):
         self.driver.main(['ec2', 'run-instances', 'help'])
         self.assert_contains('``--iam-instance-profile``')
         self.assert_contains('Shorthand Syntax')
-        self.assert_contains('--iam-instance-profile arn=value,name=value')
+        self.assert_contains('--iam-instance-profile Arn=value,Name=value')
 
     def test_required_args_come_before_optional_args(self):
         self.driver.main(['ec2', 'run-instances', 'help'])
diff --git a/tests/unit/ec2/test_associate_address.py b/tests/unit/ec2/test_associate_address.py
--- a/tests/unit/ec2/test_associate_address.py
+++ b/tests/unit/ec2/test_associate_address.py
@@ -12,7 +12,6 @@
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
 from tests.unit import BaseAWSCommandParamsTest
-import awscli.clidriver
 
 
 class TestAssociateAddress(BaseAWSCommandParamsTest):
diff --git a/tests/unit/ec2/test_attach_internet_gateway.py b/tests/unit/ec2/test_attach_internet_gateway.py
--- a/tests/unit/ec2/test_attach_internet_gateway.py
+++ b/tests/unit/ec2/test_attach_internet_gateway.py
@@ -12,7 +12,6 @@
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
 from tests.unit import BaseAWSCommandParamsTest
-import awscli.clidriver
 
 
 class TestAttachInternetGateway(BaseAWSCommandParamsTest):
diff --git a/tests/unit/ec2/test_describe_instance_attribute.py b/tests/unit/ec2/test_describe_instance_attribute.py
--- a/tests/unit/ec2/test_describe_instance_attribute.py
+++ b/tests/unit/ec2/test_describe_instance_attribute.py
@@ -13,7 +13,6 @@
 # language governing permissions and limitations under the License.
 from tests.unit import BaseAWSCommandParamsTest
 import unittest
-import awscli.clidriver
 
 
 class TestDescribeInstanceAttribute(BaseAWSCommandParamsTest):
diff --git a/tests/unit/ec2/test_describe_instances.py b/tests/unit/ec2/test_describe_instances.py
--- a/tests/unit/ec2/test_describe_instances.py
+++ b/tests/unit/ec2/test_describe_instances.py
@@ -12,7 +12,6 @@
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
 from tests.unit import BaseAWSCommandParamsTest
-import awscli.clidriver
 
 
 class TestDescribeInstances(BaseAWSCommandParamsTest):
@@ -44,19 +43,19 @@ def test_instance_ids_alternate(self):
         self.assert_params_for_cmd(cmdline, result)
 
     def test_filter_json(self):
-        args = """ --filters {"name":"group-name","values":["foobar"]}"""
+        args = """ --filters {"Name":"group-name","Values":["foobar"]}"""
         cmdline = self.prefix + args
         result = {'Filter.1.Value.1': 'foobar', 'Filter.1.Name': 'group-name'}
         self.assert_params_for_cmd(cmdline, result)
 
     def test_filter_simple(self):
-        args = """ --filters name=group-name,values=foobar"""
+        args = """ --filters Name=group-name,Values=foobar"""
         cmdline = self.prefix + args
         result = {'Filter.1.Value.1': 'foobar', 'Filter.1.Name': 'group-name'}
         self.assert_params_for_cmd(cmdline, result)
 
     def test_filter_values(self):
-        args = """ --filters name=group-name,values=foobar,fiebaz"""
+        args = """ --filters Name=group-name,Values=foobar,fiebaz"""
         cmdline = self.prefix + args
         result = {'Filter.1.Value.2': 'fiebaz',
                   'Filter.1.Value.1': 'foobar',
@@ -64,8 +63,8 @@ def test_filter_values(self):
         self.assert_params_for_cmd(cmdline, result)
 
     def test_multiple_filters(self):
-        args = (' --filters name=group-name,values=foobar '
-                'name=instance-id,values=i-12345')
+        args = (' --filters Name=group-name,Values=foobar '
+                'Name=instance-id,Values=i-12345')
         cmdline = self.prefix + args
         result = {
             'Filter.1.Name': 'group-name',
@@ -78,8 +77,8 @@ def test_multiple_filters(self):
     def test_multiple_filters_alternate(self):
         cmdlist = 'ec2 describe-instances'.split()
         cmdlist.extend(['--filters',
-                        'name = group-name, values= foobar',
-                        'name=instance-id,values=i-12345'])
+                        'Name = group-name, Values= foobar',
+                        'Name=instance-id,Values=i-12345'])
         result = {
             'Filter.1.Name': 'group-name',
             'Filter.1.Value.1': 'foobar',
diff --git a/tests/unit/ec2/test_modify_image_attribute.py b/tests/unit/ec2/test_modify_image_attribute.py
--- a/tests/unit/ec2/test_modify_image_attribute.py
+++ b/tests/unit/ec2/test_modify_image_attribute.py
@@ -12,7 +12,6 @@
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
 from tests.unit import BaseAWSCommandParamsTest
-import awscli.clidriver
 
 
 class TestModifyInstanceAttribute(BaseAWSCommandParamsTest):
@@ -32,8 +31,8 @@ def test_one(self):
     def test_two(self):
         cmdline = self.prefix
         cmdline += ' --image-id ami-d00dbeef'
-        cmdline += (' --launch-permission {"add":[{"user_id":"123456789012"}],'
-                    '"remove":[{"group":"all"}]}')
+        cmdline += (' --launch-permission {"Add":[{"UserId":"123456789012"}],'
+                    '"Remove":[{"Group":"all"}]}')
         result = {'ImageId': 'ami-d00dbeef',
                   'LaunchPermission.Add.1.UserId': '123456789012',
                   'LaunchPermission.Remove.1.Group': 'all',
diff --git a/tests/unit/ec2/test_run_instances.py b/tests/unit/ec2/test_run_instances.py
--- a/tests/unit/ec2/test_run_instances.py
+++ b/tests/unit/ec2/test_run_instances.py
@@ -12,7 +12,6 @@
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
 from tests.unit import BaseAWSCommandParamsTest
-import awscli.clidriver
 
 
 class TestDescribeInstances(BaseAWSCommandParamsTest):
@@ -28,7 +27,7 @@ def test_block_device_mapping(self):
         # (note the space between ``'`` and ``[``)
         args_list.append('--block-device-mapping')
         args_list.append(
-            ' [{"device_name":"/dev/sda1","ebs":{"volume_size":20}}]')
+            ' [{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":20}}]')
         result = {
             'BlockDeviceMapping.1.DeviceName': '/dev/sda1',
             'BlockDeviceMapping.1.Ebs.VolumeSize': '20',
diff --git a/tests/unit/elasticbeanstalk/new_keypair_config.json b/tests/unit/elasticbeanstalk/new_keypair_config.json
--- a/tests/unit/elasticbeanstalk/new_keypair_config.json
+++ b/tests/unit/elasticbeanstalk/new_keypair_config.json
@@ -1,12 +1,12 @@
 [
     {
-	"namespace": "aws:autoscaling:launchconfiguration",
-	"option_name": "EC2KeyName",
-	"value": "webapps"
+	"Namespace": "aws:autoscaling:launchconfiguration",
+	"OptionName": "EC2KeyName",
+	"Value": "webapps"
     },
     {
-	"namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions",
-	"option_name": "Xms",
-	"value": "1256m"
+	"Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions",
+	"OptionName": "Xms",
+	"Value": "1256m"
     }
 ]
diff --git a/tests/unit/elasticbeanstalk/test_update_configuration_template.py b/tests/unit/elasticbeanstalk/test_update_configuration_template.py
--- a/tests/unit/elasticbeanstalk/test_update_configuration_template.py
+++ b/tests/unit/elasticbeanstalk/test_update_configuration_template.py
@@ -13,7 +13,6 @@
 # language governing permissions and limitations under the License.
 from tests.unit import BaseAWSCommandParamsTest
 import os
-import awscli.clidriver
 
 
 class TestUpdateConfigurationTemplate(BaseAWSCommandParamsTest):
diff --git a/tests/unit/elb/test.json b/tests/unit/elb/test.json
--- a/tests/unit/elb/test.json
+++ b/tests/unit/elb/test.json
@@ -1,2 +1,2 @@
-[{"instance_id": "i-12345678"},
- {"instance_id": "i-87654321"}]
+[{"InstanceId": "i-12345678"},
+ {"InstanceId": "i-87654321"}]
diff --git a/tests/unit/elb/test_register_instances_with_load_balancer.py b/tests/unit/elb/test_register_instances_with_load_balancer.py
--- a/tests/unit/elb/test_register_instances_with_load_balancer.py
+++ b/tests/unit/elb/test_register_instances_with_load_balancer.py
@@ -13,7 +13,6 @@
 # language governing permissions and limitations under the License.
 from tests.unit import BaseAWSCommandParamsTest
 import os
-import awscli.clidriver
 
 
 TWO_INSTANCE_EXPECTED = {
@@ -30,7 +29,7 @@ class TestRegisterInstancesWithLoadBalancer(BaseAWSCommandParamsTest):
     def test_one_instance(self):
         cmdline = self.prefix
         cmdline += ' --load-balancer-name my-lb'
-        cmdline += ' --instances {"instance_id":"i-12345678"}'
+        cmdline += ' --instances {"InstanceId":"i-12345678"}'
         result = {'LoadBalancerName': 'my-lb',
                   'Instances.member.1.InstanceId': 'i-12345678'}
         self.assert_params_for_cmd(cmdline, result)
@@ -46,15 +45,15 @@ def test_shorthand(self):
     def test_two_instance(self):
         cmdline = self.prefix
         cmdline += ' --load-balancer-name my-lb'
-        cmdline += ' --instances {"instance_id":"i-12345678"}'
-        cmdline += ' {"instance_id":"i-87654321"}'
+        cmdline += ' --instances {"InstanceId":"i-12345678"}'
+        cmdline += ' {"InstanceId":"i-87654321"}'
         self.assert_params_for_cmd(cmdline, TWO_INSTANCE_EXPECTED)
 
     def test_two_instance_as_json(self):
         cmdline = self.prefix
         cmdline += ' --load-balancer-name my-lb'
-        cmdline += ' --instances [{"instance_id":"i-12345678"},'
-        cmdline += '{"instance_id":"i-87654321"}]'
+        cmdline += ' --instances [{"InstanceId":"i-12345678"},'
+        cmdline += '{"InstanceId":"i-87654321"}]'
         self.assert_params_for_cmd(cmdline, TWO_INSTANCE_EXPECTED)
 
     def test_two_instance_from_file(self):
diff --git a/tests/unit/test_argprocess.py b/tests/unit/test_argprocess.py
--- a/tests/unit/test_argprocess.py
+++ b/tests/unit/test_argprocess.py
@@ -11,10 +11,8 @@
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
 from tests import unittest
-from argparse import Namespace
 
 import botocore.session
-import six
 
 from awscli.clidriver import CLIArgument
 from awscli.help import OperationHelpCommand
@@ -81,7 +79,7 @@ def test_list_structure_scalars(self):
             'elb.RegisterInstancesWithLoadBalancer.Instances',
             'list-structure(scalar)')
 
-    def test_list_structure_scalars(self):
+    def test_list_structure_scalars_2(self):
         self.assert_shape_type(
             'elb.CreateLoadBalancer.Listeners',
             'list-structure(scalars)')
@@ -103,8 +101,8 @@ def setUp(self):
     def test_simplify_structure_scalars(self):
         p = self.get_param_object(
             'elasticbeanstalk.CreateConfigurationTemplate.SourceConfiguration')
-        value = 'application_name=foo,template_name=bar'
-        json_value = '{"application_name": "foo", "template_name": "bar"}'
+        value = 'ApplicationName=foo,TemplateName=bar'
+        json_value = '{"ApplicationName": "foo", "TemplateName": "bar"}'
         returned = self.simplify(p, value)
         json_version = unpack_cli_arg(p, json_value)
         self.assertEqual(returned, json_version)
@@ -123,84 +121,85 @@ def test_list_structure_scalars(self):
         # with argparse which means the value will be presented
         # to us as a list.
         returned = self.simplify(p, ['instance-1',  'instance-2'])
-        self.assertEqual(returned, [{'instance_id': 'instance-1'},
-                                    {'instance_id': 'instance-2'}])
+        self.assertEqual(returned, [{'InstanceId': 'instance-1'},
+                                    {'InstanceId': 'instance-2'}])
 
     def test_list_structure_list_scalar(self):
         p = self.get_param_object('ec2.DescribeInstances.Filters')
-        expected = [{"name": "instance-id", "values": ["i-1", "i-2"]},
-                    {"name": "architecture", "values": ["i386"]}]
+        expected = [{"Name": "instance-id", "Values": ["i-1", "i-2"]},
+                    {"Name": "architecture", "Values": ["i386"]}]
         returned = self.simplify(
-            p, ["name=instance-id,values=i-1,i-2",
-                "name=architecture,values=i386"])
+            p, ["Name=instance-id,Values=i-1,i-2",
+                "Name=architecture,Values=i386"])
         self.assertEqual(returned, expected)
 
         # With spaces around the comma.
         returned2 = self.simplify(
-            p, ["name=instance-id, values=i-1,i-2",
-                "name=architecture, values=i386"])
+            p, ["Name=instance-id, Values=i-1,i-2",
+                "Name=architecture, Values=i386"])
         self.assertEqual(returned2, expected)
 
         # Strip off leading/trailing spaces.
         returned3 = self.simplify(
-            p, ["name = instance-id, values = i-1,i-2",
-                "name = architecture, values = i386"])
-        self.assertEqual(returned2, expected)
+            p, ["Name = instance-id, Values = i-1,i-2",
+                "Name = architecture, Values = i386"])
+        self.assertEqual(returned3, expected)
 
     def test_list_structure_list_multiple_scalar(self):
         p = self.get_param_object('elastictranscoder.CreateJob.Playlists')
         returned = self.simplify(
-            p, ['name=foo,format=hslv3,output_keys=iphone1,iphone2'])
-        self.assertEqual(returned, [{'output_keys': ['iphone1', 'iphone2'],
-                                     'name': 'foo', 'format': 'hslv3'}])
+            p, ['Name=foo,Format=hslv3,OutputKeys=iphone1,iphone2'])
+        self.assertEqual(returned, [{'OutputKeys': ['iphone1', 'iphone2'],
+                                     'Name': 'foo', 'Format': 'hslv3'}])
 
-    def test_list_structure_scalars(self):
+    def test_list_structure_scalars_2(self):
         p = self.get_param_object('elb.CreateLoadBalancer.Listeners')
         expected = [
-            {"protocol": "protocol1",
-             "load_balancer_port": 1,
-             "instance_protocol": "instance_protocol1",
-             "instance_port": 2,
-             "ssl_certificate_id": "ssl_certificate_id1"},
-            {"protocol": "protocol2",
-             "load_balancer_port": 3,
-             "instance_protocol": "instance_protocol2",
-             "instance_port": 4,
-             "ssl_certificate_id": "ssl_certificate_id2"},
+            {"Protocol": "protocol1",
+             "LoadBalancerPort": 1,
+             "InstanceProtocol": "instance_protocol1",
+             "InstancePort": 2,
+             "SSLCertificateId": "ssl_certificate_id1"},
+            {"Protocol": "protocol2",
+             "LoadBalancerPort": 3,
+             "InstanceProtocol": "instance_protocol2",
+             "InstancePort": 4,
+             "SSLCertificateId": "ssl_certificate_id2"},
         ]
         returned = unpack_cli_arg(
-            p, ['{"protocol": "protocol1", "load_balancer_port": 1, '
-                '"instance_protocol": "instance_protocol1", '
-                '"instance_port": 2, "ssl_certificate_id": '
+            p, ['{"Protocol": "protocol1", "LoadBalancerPort": 1, '
+                '"InstanceProtocol": "instance_protocol1", '
+                '"InstancePort": 2, "SSLCertificateId": '
                 '"ssl_certificate_id1"}',
-                '{"protocol": "protocol2", "load_balancer_port": 3, '
-                '"instance_protocol": "instance_protocol2", '
-                '"instance_port": 4, "ssl_certificate_id": '
+                '{"Protocol": "protocol2", "LoadBalancerPort": 3, '
+                '"InstanceProtocol": "instance_protocol2", '
+                '"InstancePort": 4, "SSLCertificateId": '
                 '"ssl_certificate_id2"}',
             ])
+        self.maxDiff = None
         self.assertEqual(returned, expected)
         simplified = self.simplify(p, [
-            'protocol=protocol1,load_balancer_port=1,'
-            'instance_protocol=instance_protocol1,'
-            'instance_port=2,ssl_certificate_id=ssl_certificate_id1',
-            'protocol=protocol2,load_balancer_port=3,'
-            'instance_protocol=instance_protocol2,'
-            'instance_port=4,ssl_certificate_id=ssl_certificate_id2'
+            'Protocol=protocol1,LoadBalancerPort=1,'
+            'InstanceProtocol=instance_protocol1,'
+            'InstancePort=2,SSLCertificateId=ssl_certificate_id1',
+            'Protocol=protocol2,LoadBalancerPort=3,'
+            'InstanceProtocol=instance_protocol2,'
+            'InstancePort=4,SSLCertificateId=ssl_certificate_id2'
         ])
         self.assertEqual(simplified, expected)
 
     def test_keyval_with_long_values(self):
         p = self.get_param_object(
             'dynamodb.UpdateTable.ProvisionedThroughput')
-        value = 'write_capacity_units=10,read_capacity_units=10'
+        value = 'WriteCapacityUnits=10,ReadCapacityUnits=10'
         returned = self.simplify(p, value)
-        self.assertEqual(returned, {'write_capacity_units': 10,
-                                    'read_capacity_units': 10})
+        self.assertEqual(returned, {'WriteCapacityUnits': 10,
+                                    'ReadCapacityUnits': 10})
 
     def test_error_messages_for_structure_scalar(self):
         p = self.get_param_object(
             'elasticbeanstalk.CreateConfigurationTemplate.SourceConfiguration')
-        value = 'application_names==foo,template_name=bar'
+        value = 'ApplicationName==foo,TemplateName=bar'
         error_msg = "Error parsing parameter --source-configuration.*should be"
         with self.assertRaisesRegexp(ParamError, error_msg):
             self.simplify(p, value)
@@ -208,17 +207,17 @@ def test_error_messages_for_structure_scalar(self):
     def test_mispelled_param_name(self):
         p = self.get_param_object(
             'elasticbeanstalk.CreateConfigurationTemplate.SourceConfiguration')
-        error_msg = 'valid choices.*application_name'
+        error_msg = 'valid choices.*ApplicationName'
         with self.assertRaisesRegexp(ParamUnknownKeyError, error_msg):
-            # Typo in 'application_names'
-            self.simplify(p, 'application_namess=foo, template_name=bar')
+            # Typo in 'ApplicationName'
+            self.simplify(p, 'ApplicationNames=foo, TemplateName=bar')
 
     def test_improper_separator(self):
         # If the user uses ':' instead of '=', we should give a good
         # error message.
         p = self.get_param_object(
             'elasticbeanstalk.CreateConfigurationTemplate.SourceConfiguration')
-        value = 'application_names:foo,template_name:bar'
+        value = 'ApplicationName:foo,TemplateName:bar'
         error_msg = "Error parsing parameter --source-configuration.*should be"
         with self.assertRaisesRegexp(ParamError, error_msg):
             self.simplify(p, value)
@@ -228,36 +227,36 @@ def test_improper_separator_for_filters_param(self):
         error_msg = "Error parsing parameter --filters.*should be"
         with self.assertRaisesRegexp(ParamError, error_msg):
             returned = self.simplify(
-                p, ["name:tag:Name,values:foo"])
+                p, ["Name:tag:Name,Values:foo"])
 
     def test_unknown_key_for_filters_param(self):
         p = self.get_param_object('ec2.DescribeInstances.Filters')
         with self.assertRaisesRegexp(ParamUnknownKeyError,
-                                     'valid choices.*name'):
-            self.simplify(p, ["names=instance-id,values=foo,bar"])
+                                     'valid choices.*Name'):
+            self.simplify(p, ["Names=instance-id,Values=foo,bar"])
 
     def test_csv_syntax_escaped(self):
         p = self.get_param_object('cloudformation.CreateStack.Parameters')
         returned = self.simplify(
-            p, ["parameter_key=key,parameter_value=foo\,bar"])
-        expected = [{"parameter_key": "key",
-                     "parameter_value": "foo,bar"}]
+            p, ["ParameterKey=key,ParameterValue=foo\,bar"])
+        expected = [{"ParameterKey": "key",
+                     "ParameterValue": "foo,bar"}]
         self.assertEqual(returned, expected)
 
     def test_csv_syntax_double_quoted(self):
         p = self.get_param_object('cloudformation.CreateStack.Parameters')
         returned = self.simplify(
-            p, ['parameter_key=key,parameter_value="foo,bar"'])
-        expected = [{"parameter_key": "key",
-                     "parameter_value": "foo,bar"}]
+            p, ['ParameterKey=key,ParameterValue="foo,bar"'])
+        expected = [{"ParameterKey": "key",
+                     "ParameterValue": "foo,bar"}]
         self.assertEqual(returned, expected)
 
     def test_csv_syntax_single_quoted(self):
         p = self.get_param_object('cloudformation.CreateStack.Parameters')
         returned = self.simplify(
-            p, ["parameter_key=key,parameter_value='foo,bar'"])
-        expected = [{"parameter_key": "key",
-                     "parameter_value": "foo,bar"}]
+            p, ["ParameterKey=key,ParameterValue='foo,bar'"])
+        expected = [{"ParameterKey": "key",
+                     "ParameterValue": "foo,bar"}]
         self.assertEqual(returned, expected)
 
     def test_csv_syntax_errors(self):
@@ -265,16 +264,16 @@ def test_csv_syntax_errors(self):
         error_msg = "Error parsing parameter --parameters.*should be"
         with self.assertRaisesRegexp(ParamError, error_msg):
             returned = self.simplify(
-                p, ['parameter_key=key,parameter_value="foo,bar'])
+                p, ['ParameterKey=key,ParameterValue="foo,bar'])
         with self.assertRaisesRegexp(ParamError, error_msg):
             returned = self.simplify(
-                p, ['parameter_key=key,parameter_value=foo,bar"'])
+                p, ['ParameterKey=key,ParameterValue=foo,bar"'])
         with self.assertRaisesRegexp(ParamError, error_msg):
             returned = self.simplify(
-                p, ['parameter_key=key,parameter_value=""foo,bar"'])
+                p, ['ParameterKey=key,ParameterValue=""foo,bar"'])
         with self.assertRaisesRegexp(ParamError, error_msg):
             returned = self.simplify(
-                p, ['parameter_key=key,parameter_value="foo,bar\''])
+                p, ['ParameterKey=key,ParameterValue="foo,bar\''])
 
 
 class TestDocGen(BaseArgProcessTest):
@@ -307,7 +306,7 @@ def test_gen_list_scalar_docs(self):
         self.assertTrue(p.example_fn)
         doc_string = p.example_fn(p)
         self.assertEqual(doc_string,
-                         '--instances instance_id1 instance_id2 instance_id3')
+                         '--instances InstanceId1 InstanceId2 InstanceId3')
 
     def test_gen_list_structure_of_scalars_docs(self):
         p = self.get_param_object('elb.CreateLoadBalancer.Listeners')
@@ -319,11 +318,11 @@ def test_gen_list_structure_of_scalars_docs(self):
         self.assertTrue(p.example_fn)
         doc_string = p.example_fn(p)
         self.assertIn('Key value pairs, with multiple values separated by a space.', doc_string)
-        self.assertIn('protocol=string', doc_string)
-        self.assertIn('load_balancer_port=integer', doc_string)
-        self.assertIn('instance_protocol=string', doc_string)
-        self.assertIn('instance_port=integer', doc_string)
-        self.assertIn('ssl_certificate_id=string', doc_string)
+        self.assertIn('Protocol=string', doc_string)
+        self.assertIn('LoadBalancerPort=integer', doc_string)
+        self.assertIn('InstanceProtocol=string', doc_string)
+        self.assertIn('InstancePort=integer', doc_string)
+        self.assertIn('SSLCertificateId=string', doc_string)
 
     def test_gen_list_structure_multiple_scalar_docs(self):
         p = self.get_param_object('elastictranscoder.CreateJob.Playlists')
@@ -334,7 +333,7 @@ def test_gen_list_structure_multiple_scalar_docs(self):
         help_command.param_shorthand.add_example_fn(p.cli_name, help_command)
         self.assertTrue(p.example_fn)
         doc_string = p.example_fn(p)
-        s = 'Key value pairs, where values are separated by commas.\n--playlists name=string1,format=string1,output_keys=string1,string2'
+        s = 'Key value pairs, where values are separated by commas.\n--playlists Name=string1,Format=string1,OutputKeys=string1,string2'
         self.assertEqual(doc_string, s)