def _get_fixed_ip_address(self, port_uuid, client):
    "Get a port's fixed ip address.\n\n        :param port_uuid: Neutron port id.\n        :param client: Neutron client instance.\n        :returns: Neutron port ip address.\n        :raises: FailedToGetIPAddressOnPort\n        :raises: InvalidIPv4Address\n        "
    ip_address = None
    try:
        neutron_port = client.show_port(port_uuid).get('port')
    except neutron_client_exc.NeutronClientException:
        LOG.exception(_LE('Failed to Get IP address on Neutron port %s.'), port_uuid)
        raise exception.FailedToGetIPAddressOnPort(port_id=port_uuid)
    fixed_ips = neutron_port.get('fixed_ips')
    if fixed_ips:
        ip_address = fixed_ips[0].get('ip_address', None)
    if ip_address:
        if netutils.is_valid_ipv4(ip_address):
            return ip_address
        else:
            LOG.error(_LE('Neutron returned invalid IPv4 address %s.'), ip_address)
            raise exception.InvalidIPv4Address(ip_address=ip_address)
    else:
        LOG.error(_LE('No IP address assigned to Neutron port %s.'), port_uuid)
        raise exception.FailedToGetIPAddressOnPort(port_id=port_uuid)
Get a port's fixed ip address.

:param port_uuid: Neutron port id.
:param client: Neutron client instance.
:returns: Neutron port ip address.
:raises: FailedToGetIPAddressOnPort
:raises: InvalidIPv4Address
def _get_fixed_ip_address(self, port_uuid, client):
    "Get a port's fixed ip address.\n\n        :param port_uuid: Neutron port id.\n        :param client: Neutron client instance.\n        :returns: Neutron port ip address.\n        :raises: FailedToGetIPAddressOnPort\n        :raises: InvalidIPv4Address\n        "
    ip_address = None
    try:
        neutron_port = client.show_port(port_uuid).get('port')
    except neutron_client_exc.NeutronClientException:
        LOG.exception(_LE('Failed to Get IP address on Neutron port %s.'), port_uuid)
        raise exception.FailedToGetIPAddressOnPort(port_id=port_uuid)
    fixed_ips = neutron_port.get('fixed_ips')
    if fixed_ips:
        ip_address = fixed_ips[0].get('ip_address', None)
    if ip_address:
        if netutils.is_valid_ipv4(ip_address):
            return ip_address
        else:
            LOG.error(_LE('Neutron returned invalid IPv4 address %s.'), ip_address)
            raise exception.InvalidIPv4Address(ip_address=ip_address)
    else:
        LOG.error(_LE('No IP address assigned to Neutron port %s.'), port_uuid)
        raise exception.FailedToGetIPAddressOnPort(port_id=port_uuid)