# Path: barbicanclient/v1/cas.py
# LOG = logging.getLogger(__name__)
# def lazy(func):
#     def wrapper(self, *args):
#     def _get_formatted_data(self):
#     def __init__(self, api, meta=None, expiration=None,
#                  plugin_name=None, plugin_ca_id=None,
#                  ca_ref=None, created=None, updated=None,
#                  status=None, creator_id=None):
#     def ca_ref(self):
#     def name(self):
#     def expiration(self):
#     def description(self):
#     def plugin_name(self):
#     def plugin_ca_id(self):
#     def created(self):
#     def updated(self):
#     def status(self):
#     def _fill_from_data(self, meta=None, expiration=None,
#                         plugin_name=None, plugin_ca_id=None, created=None,
#                         updated=None, status=None, creator_id=None):
#     def _fill_lazy_properties(self):
#     def __repr__(self):
#     def __init__(self, api):
#     def get(self, ca_ref):
#     def list(self, limit=10, offset=0, name=None):
# class CAFormatter(formatter.EntityFormatter):
# class CA(CAFormatter):
# class CAManager(base.BaseEntityManager):


from cliff import lister
from cliff import show
from barbicanclient.v1 import cas
# 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 cas.
"""



class GetCA(show.ShowOne):
    """Retrieve a CA by providing its URI."""

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

    def take_action(self, args):

# Path: barbicanclient/v1/cas.py
# LOG = logging.getLogger(__name__)
# def lazy(func):
#     def wrapper(self, *args):
#     def _get_formatted_data(self):
#     def __init__(self, api, meta=None, expiration=None,
#                  plugin_name=None, plugin_ca_id=None,
#                  ca_ref=None, created=None, updated=None,
#                  status=None, creator_id=None):
#     def ca_ref(self):
#     def name(self):
#     def expiration(self):
#     def description(self):
#     def plugin_name(self):
#     def plugin_ca_id(self):
#     def created(self):
#     def updated(self):
#     def status(self):
#     def _fill_from_data(self, meta=None, expiration=None,
#                         plugin_name=None, plugin_ca_id=None, created=None,
#                         updated=None, status=None, creator_id=None):
#     def _fill_lazy_properties(self):
#     def __repr__(self):
#     def __init__(self, api):
#     def get(self, ca_ref):
#     def list(self, limit=10, offset=0, name=None):
# class CAFormatter(formatter.EntityFormatter):
# class CA(CAFormatter):
# class CAManager(base.BaseEntityManager):


# Path: barbicanclient/barbican_cli/v1/cas.py
from cliff import lister
from cliff import show
from barbicanclient.v1 import cas

# 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 cas.
"""



class GetCA(show.ShowOne):
    """Retrieve a CA by providing its URI."""

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

    def take_action(self, args):

        entity = self.app.client_manager.key_manager.cas.get(ca_ref=args.URI)