Comment 23 for bug 1697000

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

Reviewed: https://review.opencontrail.org/33460
Committed: http://github.com/Juniper/contrail-controller/commit/55345b8f7cbc2e36141874dbbecbb978cb24197e
Submitter: Zuul (<email address hidden>)
Branch: master

commit 55345b8f7cbc2e36141874dbbecbb978cb24197e
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