# Path: invtool/lib/options.py
# def build_extractor(field_name, nas_name):
#     def extractor(nas):
#         if not getattr(nas, nas_name):
#             return {}
#         data = {field_name: getattr(nas, nas_name)}
#         return data
#     return extractor
# 
# Path: invtool/tests/test_data.py
# TEST_MAC = lambda: '{0}{0}:{1}{1}:{2}{2}:{3}{3}:{4}{4}:{5}{5}'.format(
#     random.randint(0, 9),
#     random.randint(0, 9),
#     random.randint(0, 9),
#     random.randint(0, 9),
#     random.randint(0, 9),
#     random.randint(0, 9)
# )


from invtool.lib.options import build_extractor
from invtool.tests.test_data import TEST_MAC


def group_argument(field_name):
    def add_group_argument(parser, required=False):
        parser.add_argument(
            '--dhcp-group', type=str, dest='group',
            default='', required=required, help="The name of an existing dhcp "
            "group"
        )
    test_data = lambda: ''


# Path: invtool/lib/options.py
# def build_extractor(field_name, nas_name):
#     def extractor(nas):
#         if not getattr(nas, nas_name):
#             return {}
#         data = {field_name: getattr(nas, nas_name)}
#         return data
#     return extractor
# 
# Path: invtool/tests/test_data.py
# TEST_MAC = lambda: '{0}{0}:{1}{1}:{2}{2}:{3}{3}:{4}{4}:{5}{5}'.format(
#     random.randint(0, 9),
#     random.randint(0, 9),
#     random.randint(0, 9),
#     random.randint(0, 9),
#     random.randint(0, 9),
#     random.randint(0, 9)
# )


# Path: invtool/lib/hw_options.py
from invtool.lib.options import build_extractor
from invtool.tests.test_data import TEST_MAC



def group_argument(field_name):
    def add_group_argument(parser, required=False):
        parser.add_argument(
            '--dhcp-group', type=str, dest='group',
            default='', required=required, help="The name of an existing dhcp "
            "group"
        )
    test_data = lambda: ''


    extractor = build_extractor(field_name, field_name)