# Path: dyndnsc/common/six.py
# def ipaddress(addr):
# def ipnetwork(addr):


import logging
import textwrap
from .six import getargspec
        name = kls.configuration_key
        if getattr(args, "%s_%s" % (prefix, name), False):
            logging.debug(
                "Gathering initargs for '%s.%s'", prefix, name)
            initargs = {}
            for arg_name in kls.init_argnames():
                val = getattr(args, "%s_%s_%s" %
                              (prefix, name, arg_name))
                if val is not None:
                    initargs[arg_name] = val
            if prefix not in parsed_args:
                parsed_args[prefix] = []
            parsed_args[prefix].append((name, initargs))
    return parsed_args


class DynamicCliMixin(object):
    """Base class providing functionality to register and handle CLI args."""

    @classmethod
    def init_argnames(cls):
        """
        Inspect the __init__ arguments of the given cls.

        :param cls: a class with an __init__ method
        """
        return getargspec(cls.__init__).args[1:]

    @classmethod
    def _init_argdefaults(cls):

# Path: dyndnsc/common/six.py
# def ipaddress(addr):
# def ipnetwork(addr):


# Path: dyndnsc/common/dynamiccli.py
import logging
import textwrap
from .six import getargspec

        name = kls.configuration_key
        if getattr(args, "%s_%s" % (prefix, name), False):
            logging.debug(
                "Gathering initargs for '%s.%s'", prefix, name)
            initargs = {}
            for arg_name in kls.init_argnames():
                val = getattr(args, "%s_%s_%s" %
                              (prefix, name, arg_name))
                if val is not None:
                    initargs[arg_name] = val
            if prefix not in parsed_args:
                parsed_args[prefix] = []
            parsed_args[prefix].append((name, initargs))
    return parsed_args


class DynamicCliMixin(object):
    """Base class providing functionality to register and handle CLI args."""

    @classmethod
    def init_argnames(cls):
        """
        Inspect the __init__ arguments of the given cls.

        :param cls: a class with an __init__ method
        """
        return getargspec(cls.__init__).args[1:]

    @classmethod
    def _init_argdefaults(cls):

        defaults = getargspec(cls.__init__).defaults