'Associate or disassociate a floating IP address.
:param address_id: The ID of the floating IP address to associate
or disassociate.
:param port_id: The ID of the port to associate.'

@rest_utils.ajax(data_required=True)
def patch(self, request):

    address = request.DATA['address_id']
    port = request.DATA.get('port_id')
    if (port is None):
        api.neutron.floating_ip_disassociate(request, address)
    else:
        api.neutron.floating_ip_associate(request, address, port)
