Make payload_content_type in keep default to

'text/plain' for secrets and 'application/octet-stream'
for orders, and stop constraining the content options.

Stop displaying payload_content_type when displaying secrets.
This commit is contained in:
Arash Ghoreyshi
2013-08-09 14:40:15 -05:00
parent 6920404a8d
commit 23537d652f
2 changed files with 11 additions and 12 deletions

View File

@@ -64,13 +64,13 @@ class Keep:
'e a payload_content_type (only used for se'
'crets)')
create_parser.add_argument('--payload_content_type', '-t',
choices=["text/plain",
"text/plain; charset=utf-8",
"application/octet-stream"],
default='text/plain',
help='the type/format of the provided '
'secret data; "text/plain" is assumed to be'
' UTF-8; required when --payload is su'
'pplied (only used for secrets)')
'pplied (only used for secrets; orders are '
'assumed to be "application/octet-stream") '
'(default: %(default)s)')
create_parser.add_argument('--payload_content_encoding', '-d',
choices=["base64"],
help='required if --payload_content_type is'

View File

@@ -47,13 +47,12 @@ class Secret(object):
" reference: {1}\n"
" name: {2}\n"
" created: {3}\n"
" payload content type: {4}\n"
" status: {5}\n"
" bit length: {6}\n"
" algorithm: {7}\n"
" cypher type: {8}\n"
" expiration: {9}\n"
" status: {4}\n"
" bit length: {5}\n"
" algorithm: {6}\n"
" cypher type: {7}\n"
" expiration: {8}\n"
.format(self.id, self.secret_ref, self.name, self.created,
self.payload_content_type, self.status, self.bit_length,
self.algorithm, self.cypher_type, self.expiration)
self.status, self.bit_length, self.algorithm,
self.cypher_type, self.expiration)
)