# Path: barbicanclient/v1/secrets.py
# LOG = logging.getLogger(__name__)
# def lazy(func):
#     def wrapper(self, *args):
# def immutable_after_save(func):
#     def wrapper(self, *args):
#     def _get_formatted_data(self):
#     def __init__(self, api, name=None, expiration=None, algorithm=None,
#                  bit_length=None, mode=None, payload=None,
#                  payload_content_type=None, payload_content_encoding=None,
#                  secret_ref=None, created=None, updated=None,
#                  content_types=None, status=None, secret_type=None,
#                  creator_id=None):
#     def secret_ref(self):
#     def name(self):
#     def expiration(self):
#     def algorithm(self):
#     def bit_length(self):
#     def secret_type(self):
#     def mode(self):
#     def payload_content_encoding(self):
#     def created(self):
#     def updated(self):
#     def content_types(self):
#     def status(self):
#     def payload_content_type(self):
#     def payload(self):
#     def acls(self):
#     def name(self, value):
#     def expiration(self, value):
#     def algorithm(self, value):
#     def bit_length(self, value):
#     def secret_type(self, value):
#     def mode(self, value):
#     def payload(self, value):
#     def payload_content_type(self, value):
#     def payload_content_encoding(self, value):
#     def _fetch_payload(self):
#     def store(self):
#     def update(self):
#     def delete(self):
#     def _fill_from_data(self, name=None, expiration=None, algorithm=None,
#                         bit_length=None, secret_type=None, mode=None,
#                         payload=None, payload_content_type=None,
#                         payload_content_encoding=None, created=None,
#                         updated=None, content_types=None, status=None,
#                         creator_id=None):
#     def _fill_lazy_properties(self):
#     def __repr__(self):
#     def __init__(self, api):
#     def get(self, secret_ref, payload_content_type=None):
#     def update(self, secret_ref, payload=None):
#     def create(self, name=None, payload=None,
#                payload_content_type=None, payload_content_encoding=None,
#                algorithm=None, bit_length=None, secret_type=None,
#                mode=None, expiration=None):
#     def delete(self, secret_ref):
#     def list(self, limit=10, offset=0, name=None, algorithm=None, mode=None,
#              bits=0, secret_type=None, created=None, updated=None,
#              expiration=None, sort=None):
# class SecretFormatter(formatter.EntityFormatter):
# class Secret(SecretFormatter):
# class SecretManager(base.BaseEntityManager):


import os
from cliff import command
from cliff import lister
from cliff import show
from barbicanclient import secrets
                            help='required if --payload-content-type is '
                                 '"application/octet-stream".')
        parser.add_argument('--algorithm', '-a', default='aes',
                            help='the algorithm (default: '
                                 '%(default)s).')
        parser.add_argument('--bit-length', '-b', default=256,
                            help='the bit length '
                                 '(default: %(default)s).',
                            type=int)
        parser.add_argument('--mode', '-m', default='cbc',
                            help='the algorithm mode; used only for '
                                 'reference (default: %(default)s)')
        parser.add_argument('--expiration', '-x',
                            help='the expiration time for the secret in '
                                 'ISO 8601 format.')
        payload_params = parser.add_mutually_exclusive_group(required=False)
        payload_params.add_argument('--payload', '-p',
                                    help='the unencrypted secret data.')
        payload_params.add_argument('--file', '-F', metavar='<filename>',
                                    help='file containing the secret payload')
        return parser

    def take_action(self, args):
        data = None
        if args.file:
            with open(args.file, 'rb') as f:
                data = f.read()

        payload = args.payload.encode('utf-8') if args.payload else data


# Path: barbicanclient/v1/secrets.py
# LOG = logging.getLogger(__name__)
# def lazy(func):
#     def wrapper(self, *args):
# def immutable_after_save(func):
#     def wrapper(self, *args):
#     def _get_formatted_data(self):
#     def __init__(self, api, name=None, expiration=None, algorithm=None,
#                  bit_length=None, mode=None, payload=None,
#                  payload_content_type=None, payload_content_encoding=None,
#                  secret_ref=None, created=None, updated=None,
#                  content_types=None, status=None, secret_type=None,
#                  creator_id=None):
#     def secret_ref(self):
#     def name(self):
#     def expiration(self):
#     def algorithm(self):
#     def bit_length(self):
#     def secret_type(self):
#     def mode(self):
#     def payload_content_encoding(self):
#     def created(self):
#     def updated(self):
#     def content_types(self):
#     def status(self):
#     def payload_content_type(self):
#     def payload(self):
#     def acls(self):
#     def name(self, value):
#     def expiration(self, value):
#     def algorithm(self, value):
#     def bit_length(self, value):
#     def secret_type(self, value):
#     def mode(self, value):
#     def payload(self, value):
#     def payload_content_type(self, value):
#     def payload_content_encoding(self, value):
#     def _fetch_payload(self):
#     def store(self):
#     def update(self):
#     def delete(self):
#     def _fill_from_data(self, name=None, expiration=None, algorithm=None,
#                         bit_length=None, secret_type=None, mode=None,
#                         payload=None, payload_content_type=None,
#                         payload_content_encoding=None, created=None,
#                         updated=None, content_types=None, status=None,
#                         creator_id=None):
#     def _fill_lazy_properties(self):
#     def __repr__(self):
#     def __init__(self, api):
#     def get(self, secret_ref, payload_content_type=None):
#     def update(self, secret_ref, payload=None):
#     def create(self, name=None, payload=None,
#                payload_content_type=None, payload_content_encoding=None,
#                algorithm=None, bit_length=None, secret_type=None,
#                mode=None, expiration=None):
#     def delete(self, secret_ref):
#     def list(self, limit=10, offset=0, name=None, algorithm=None, mode=None,
#              bits=0, secret_type=None, created=None, updated=None,
#              expiration=None, sort=None):
# class SecretFormatter(formatter.EntityFormatter):
# class Secret(SecretFormatter):
# class SecretManager(base.BaseEntityManager):


# Path: barbicanclient/barbican_cli/v1/secrets.py
import os
from cliff import command
from cliff import lister
from cliff import show
from barbicanclient import secrets

                            help='required if --payload-content-type is '
                                 '"application/octet-stream".')
        parser.add_argument('--algorithm', '-a', default='aes',
                            help='the algorithm (default: '
                                 '%(default)s).')
        parser.add_argument('--bit-length', '-b', default=256,
                            help='the bit length '
                                 '(default: %(default)s).',
                            type=int)
        parser.add_argument('--mode', '-m', default='cbc',
                            help='the algorithm mode; used only for '
                                 'reference (default: %(default)s)')
        parser.add_argument('--expiration', '-x',
                            help='the expiration time for the secret in '
                                 'ISO 8601 format.')
        payload_params = parser.add_mutually_exclusive_group(required=False)
        payload_params.add_argument('--payload', '-p',
                                    help='the unencrypted secret data.')
        payload_params.add_argument('--file', '-F', metavar='<filename>',
                                    help='file containing the secret payload')
        return parser

    def take_action(self, args):
        data = None
        if args.file:
            with open(args.file, 'rb') as f:
                data = f.read()

        payload = args.payload.encode('utf-8') if args.payload else data


        entity = self.app.client_manager.key_manager.secrets.create(