Deepcopy port dict in dhcp rpc handler
Added deepcopy of port dict in dhcp rpc handler to prevent operating on
changed dict in case of raising retry request.
Change-Id: Ie1816fe819ba77061e71bd61de2fd9ebe4574cef
Related-Bug: #1494351
(cherry picked from commit a7b976e652
)
This commit is contained in:
parent
68e88eb28a
commit
4b23b68a65
|
@ -13,6 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import copy
|
||||
import itertools
|
||||
import operator
|
||||
|
||||
|
@ -217,7 +218,9 @@ class DhcpRpcCallback(object):
|
|||
|
||||
"""
|
||||
host = kwargs.get('host')
|
||||
port = kwargs.get('port')
|
||||
# Note(pbondar): Create deep copy of port to prevent operating
|
||||
# on changed dict if RetryRequest is raised
|
||||
port = copy.deepcopy(kwargs.get('port'))
|
||||
LOG.debug('Create dhcp port %(port)s '
|
||||
'from %(host)s.',
|
||||
{'port': port,
|
||||
|
|
Loading…
Reference in New Issue