@classmethod
def create_port_forwarding(cls, fip_id, internal_port_id, internal_port,
    external_port, internal_ip_address=None, protocol='tcp', client=None):
    """Creates a port forwarding.

        Create a port forwarding and schedule it for later deletion.
        If a client is passed, then it is used for deleting the PF too.

        :param fip_id: The ID of the floating IP address.

        :param internal_port_id: The ID of the Neutron port associated to
        the floating IP port forwarding.

        :param internal_port: The TCP/UDP/other protocol port number of the
        Neutron port fixed IP address associated to the floating ip
        port forwarding.

        :param external_port: The TCP/UDP/other protocol port number of
        the port forwarding floating IP address.

        :param internal_ip_address: The fixed IPv4 address of the Neutron
        port associated to the floating IP port forwarding.

        :param protocol: The IP protocol used in the floating IP port
        forwarding.

        :param client: network client to be used for creating and cleaning up
        the floating IP port forwarding.
        """
    client = client or cls.client
    pf = client.create_port_forwarding(fip_id, internal_port_id,
        internal_port, external_port, internal_ip_address, protocol)[
        'port_forwarding']
    pf['floatingip_id'] = fip_id
    pf['client'] = client
    cls.port_forwardings.append(pf)
    return pf
