As json accept only string as keys - when creating int -> string field type
The key will serialize as "str" and the validate will fail when desrialzing it.
so change the extra-dhcp option to DhcpOptsDictField
(Field type that represent dhcp-opt - according to neutron extra_dhcp_opts spec)
In addtion add unit-test that validate the serialization and de-serialization..
Reviewed: https:/ /review. openstack. org/477438 /git.openstack. org/cgit/ openstack/ dragonflow/ commit/ ?id=492487b65e8 2358540b6f520fe 2d152d2671d568
Committed: https:/
Submitter: Jenkins
Branch: master
commit 492487b65e82358 540b6f520fe2d15 2d2671d568
Author: Eyal Leshem <email address hidden>
Date: Mon Jun 26 10:31:55 2017 +0300
Create field type of DhcpOptsDictField
As json accept only string as keys - when creating int -> string field type
The key will serialize as "str" and the validate will fail when desrialzing it.
so change the extra-dhcp option to DhcpOptsDictField
(Field type that represent dhcp-opt - according to neutron extra_dhcp_opts spec)
In addtion add unit-test that validate the serialization and de-serialization..
Related-bug: #1585170
Change-Id: I9b24e2968bbef0 9f5b6b630f6e7a1 ba49f3bfef7