def _convert_ip_address(self, ip, field_name):
        try:
            return netaddr.IPAddress(ip)
        except (netaddr.AddrFormatError, __HOLE__):
            msg = (_('%(field_name)s: Invalid IP address (value=%(ip)s)')
                   % {'field_name': field_name, 'ip': ip})
            raise forms.ValidationError(msg)
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/project/networks/workflows.py/CreateSubnetDetailAction._convert_ip_address