

def _format_dhcp_options(context, dhcp_options):
    dhcp_configuration = []
    for (key, values) in dhcp_options['dhcp_configuration'].items():
        items = [{
            'value': v,
        } for v in values]
        dhcp_configuration.append({
            'key': key,
            'valueSet': items,
        })
    return {
        'dhcpOptionsId': dhcp_options['id'],
        'dhcpConfigurationSet': dhcp_configuration,
    }

dataset/ETHPy150Open openstack/ec2-api/ec2api/api/dhcp_options.py _format_dhcp_options/original