# 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
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Command-line interface sub-commands related to secrets.
"""




class DeleteSecret(command.Command):
    """Delete a secret by providing its URI."""

    def get_parser(self, prog_name):
        parser = super(DeleteSecret, self).get_parser(prog_name)
        parser.add_argument('URI', help='The URI reference for the secret')
        return parser

    def take_action(self, args):

# 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

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Command-line interface sub-commands related to secrets.
"""




class DeleteSecret(command.Command):
    """Delete a secret by providing its URI."""

    def get_parser(self, prog_name):
        parser = super(DeleteSecret, self).get_parser(prog_name)
        parser.add_argument('URI', help='The URI reference for the secret')
        return parser

    def take_action(self, args):

        self.app.client_manager.key_manager.secrets.delete(args.URI)