While creating a new port, the allowed_address_pairs parameter of
the port structure was only set if the allowed_address_pairs is
mentioned in the input parameters. Due to this, at the time of
updating port with allowed_address_pairs the code tried to
iterate NoneType object and generated and error.
Made sure that at the time of creating port, allowed_address_pairs
is an empty list if not mentioned in input parameters instead
of None.
Wrote testcase to instantiate a port object and assert that the value
of allowed_address_pairs is not None.
Reviewed: https:/ /review. opencontrail. org/33493 github. com/Juniper/ contrail- controller/ commit/ 3822548b64c0906 586a962275705d7 cdafa4f6b4
Committed: http://
Submitter: Zuul (<email address hidden>)
Branch: R3.2
commit 3822548b64c0906 586a962275705d7 cdafa4f6b4
Author: Keyur Golani <email address hidden>
Date: Thu Jul 6 13:37:08 2017 -0700
Fixed NoneType issue with Allowed IPs
While creating a new port, the allowed_ address_ pairs parameter of address_ pairs is address_ pairs the code tried to
the port structure was only set if the allowed_
mentioned in the input parameters. Due to this, at the time of
updating port with allowed_
iterate NoneType object and generated and error.
Made sure that at the time of creating port, allowed_ address_ pairs
is an empty list if not mentioned in input parameters instead
of None.
Wrote testcase to instantiate a port object and assert that the value address_ pairs is not None.
of allowed_
Closes-Bug: #1697000 a52fdbcd8c6f0a9 fd3aa2121af
Change-Id: I2a80977c3f36be