I'm having an issue where incoming validation of a complex type with a an 
attribute of type IPv4Address is failing validation when it is a correct ipv4 
address.  Same is happening for UuidType and IPv6AddressType.  I am using using 
Pecan with WSME 0.6.1 and python 2.7.6.

Complex Type:
class LoadBalancer(wtypes.Base):
    ip_address = wtypes.wsattr(wtypes.IPv4AddressType)

Controller Method:
@pecan.wsexpose(v1types.LoadBalancer, body=v1types.LoadBalancer)
def post(self, load_balancer):
   return load_balancer


When doing a POST to the correct resource with this body:

{"ip_address": "10.0.0.1"}

I am getting this error:

{
debuginfo: null
faultcode: "Server"
faultstring: "Value should be IPv4 format"
}


it looks like in the fromjson method when it starts validating the actual ip 
"10.0.0.1" it is sending an instantiation of the IPv4AddressType instead of the 
actual ip address "10.0.0.1" to wsme.types.validate_value.  Am I doing 
something wrong or is this a bug?  The stack trace did not yield anymore 
information, unless you want the actual methods called.  I can provide that if 
needed.

Thanks,
Brandon
_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to