Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add customization to alter scalar parsing behavior #1015

Merged
merged 2 commits into from
Nov 20, 2014

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Nov 20, 2014

This fixes #1001. This also fixes a regression we had
when displaying binary content (this comment has more info).

As mentioned on the github issue, we were previously always
showing binary content as base64 encoded. This PR adds back
this behavior.

In addition, this also gives us a hook into changing the
timestamp parsing so we can later add a config option to
unify the way timestamps are displayed.

Also fixes #970, and closes #1005.

I've also added an integration test for #1001 to ensure
we are in fact displaying a response that can be printed to
stdout.

$ aws kms generate-random --number-of-bytes 128
{
    "Plaintext": "N5o3prE4nGiYupVofIvnUGW+YVtohX7qJGcV09G0y6d04mZ9YmnmSdm+7QN7Jlx0wTsJJKUfjMtt2SIwZmbalzDk8H6P+WXtgiMTwzlyuBoQNkJ5+r/n3l3ggsAkyAEmByW1L+cerug7dA2cnItmi7WsL/ojWbVlgy6gNJWwjZM="
}

Depends on boto/botocore#386

cc @kyleknap @danielgtaylor

This fixes aws#1001.  This also fixes a regression we had
when displaying binary content.

As mentioned on the github issue, we were previously always
showing binary content as base64 encoded.  This PR adds back
this behavior.

In addition, this also gives us a hook into changing the
timestamp parsing so we can later add a config option to
unify the way timestamps are displayed.

Also fixes aws#970, and closes aws#1005.

I've also added an integration test for aws#1001 to ensure
we are in fact displaying a response that can be printed to
stdout.
@danielgtaylor
Copy link
Contributor

LGTM 🚢-it! Would be nice to see the tests pass and the updated coverage once the Botocore change goes in.

# language governing permissions and limitations under the License.
"""Change the scalar response parsing behavior for the AWS CLI.

The underlying library used by botoc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

botoc --> botocore

@kyleknap
Copy link
Contributor

Looks good as well. Just found that one typo. 🚢

@jamesls
Copy link
Member Author

jamesls commented Nov 20, 2014

boto/botocore#386 has been merged and I've expanded the module docstring for scalarparse. I'll wait on the travis build to ensure that all tests are passing before I merge.

@jamesls jamesls merged commit 6833b4b into aws:develop Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants