Comment 22 for bug 1697000

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/33493
Committed: http://github.com/Juniper/contrail-controller/commit/3822548b64c0906586a962275705d7cdafa4f6b4
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 3822548b64c0906586a962275705d7cdafa4f6b4
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
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.

Closes-Bug: #1697000
Change-Id: I2a80977c3f36bea52fdbcd8c6f0a9fd3aa2121af