'Create and set up new DHCP port for the specified network.'

def _setup_new_dhcp_port(self, network, device_id, dhcp_subnets):

    LOG.debug('DHCP    port    %(device_id)s    on    network    %(network_id)s    does    not    yet    exist.    Creating    new    one.', {'device_id': device_id, 'network_id': network.id})
    if self.driver.use_gateway_ips:
        unique_ip_subnets = []
    else:
        unique_ip_subnets = [dict(subnet_id=s) for s in dhcp_subnets]
    port_dict = dict(name='', admin_state_up=True, device_id=device_id, network_id=network.id, tenant_id=network.tenant_id, fixed_ips=unique_ip_subnets)
    return self.plugin.create_dhcp_port({'port': port_dict})
