# Path: raxcli/apps/registry/utils.py
# class BaseRegistryCommand(BaseCommand):
#     def get_parser(self, prog_name):
#         parser = super(BaseRegistryCommand, self) \
#             .get_parser(prog_name=prog_name)
#         parser.add_argument('--region', dest='region')
#         return parser
# 
# Path: raxcli/apps/registry/utils.py
# def get_client(parsed_args):
#     config = get_config()
# 
#     username = config['username']
#     api_key = config['api_key']
# 
#     if parsed_args.username:
#         username = parsed_args.username
# 
#     if parsed_args.api_key:
#         api_key = parsed_args.api_key
# 
#     api_url = parsed_args.api_url
#     region = parsed_args.region
# 
#     if not username:
#         raise ValueError('Missing required argument: username')
# 
#     if not api_key:
#         raise ValueError('Missing required argument: api-key')
# 
#     kwargs = {}
# 
#     if api_url is not None:
#         kwargs['base_url'] = api_url
# 
#     if region is not None:
#         kwargs['region'] = region
# 
#     c = Client(username=username, api_key=api_key, **kwargs)
#     return c


import logging
from raxcli.apps.registry.utils import BaseRegistryCommand
from raxcli.apps.registry.utils import get_client
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.




class RemoveCommand(BaseRegistryCommand):
    """
    Remove a configuration value.
    """
    log = logging.getLogger(__name__)

    def get_parser(self, prog_name):
        parser = super(RemoveCommand, self).get_parser(prog_name=prog_name)
        parser.add_argument('--id', dest='id', required=True)
        return parser

    def take_action(self, parsed_args):

# Path: raxcli/apps/registry/utils.py
# class BaseRegistryCommand(BaseCommand):
#     def get_parser(self, prog_name):
#         parser = super(BaseRegistryCommand, self) \
#             .get_parser(prog_name=prog_name)
#         parser.add_argument('--region', dest='region')
#         return parser
# 
# Path: raxcli/apps/registry/utils.py
# def get_client(parsed_args):
#     config = get_config()
# 
#     username = config['username']
#     api_key = config['api_key']
# 
#     if parsed_args.username:
#         username = parsed_args.username
# 
#     if parsed_args.api_key:
#         api_key = parsed_args.api_key
# 
#     api_url = parsed_args.api_url
#     region = parsed_args.region
# 
#     if not username:
#         raise ValueError('Missing required argument: username')
# 
#     if not api_key:
#         raise ValueError('Missing required argument: api-key')
# 
#     kwargs = {}
# 
#     if api_url is not None:
#         kwargs['base_url'] = api_url
# 
#     if region is not None:
#         kwargs['region'] = region
# 
#     c = Client(username=username, api_key=api_key, **kwargs)
#     return c


# Path: raxcli/apps/registry/commands/configuration/remove.py
import logging
from raxcli.apps.registry.utils import BaseRegistryCommand
from raxcli.apps.registry.utils import get_client

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.




class RemoveCommand(BaseRegistryCommand):
    """
    Remove a configuration value.
    """
    log = logging.getLogger(__name__)

    def get_parser(self, prog_name):
        parser = super(RemoveCommand, self).get_parser(prog_name=prog_name)
        parser.add_argument('--id', dest='id', required=True)
        return parser

    def take_action(self, parsed_args):

        client = get_client(parsed_args)