diff options
author | Jan Gelety <jgelety@cisco.com> | 2020-03-11 03:16:24 +0100 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2020-03-13 16:32:45 +0000 |
commit | ee33baa6d09b759876441ecde725da95f604fedd (patch) | |
tree | ae726367d71e0f792d19d8c2cceb08865bab813a /resources/libraries/python/GBP.py | |
parent | 10cd5da7d0e84c8d3bb48a6d671219ea87aeadf4 (diff) |
Use separate module for ip address object
Reason: with upcomming vpp api changes the ip object will be used
in more csit python libraries, e.g. InterfaceUtil.py, so we need
to avoid circular import issue
(e.g. InterfaceUtil.pyu <-> IPUtil.py)
Change-Id: Ia658b187d4e326f58e33019dd54f8ac7b9137d78
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/GBP.py')
-rw-r--r-- | resources/libraries/python/GBP.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/resources/libraries/python/GBP.py b/resources/libraries/python/GBP.py index f0d07a12b7..9d56d4475b 100644 --- a/resources/libraries/python/GBP.py +++ b/resources/libraries/python/GBP.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -17,7 +17,7 @@ from enum import IntEnum from ipaddress import ip_address -from resources.libraries.python.IPUtil import IPUtil +from resources.libraries.python.IPAddress import IPAddress from resources.libraries.python.L2Util import L2Util from resources.libraries.python.PapiExecutor import PapiSocketExecutor @@ -205,9 +205,9 @@ class GBP: err_msg = f"Failed to add GBP endpoint on {node[u'host']}!" ips = list() - ips.append(IPUtil.create_ip_address_object(ip_address(ip_addr))) - tun_src = IPUtil.create_ip_address_object(ip_address(u"0.0.0.0")) - tun_dst = IPUtil.create_ip_address_object(ip_address(u"0.0.0.0")) + ips.append(IPAddress.create_ip_address_object(ip_address(ip_addr))) + tun_src = IPAddress.create_ip_address_object(ip_address(u"0.0.0.0")) + tun_dst = IPAddress.create_ip_address_object(ip_address(u"0.0.0.0")) args_in = dict( endpoint=dict( @@ -287,7 +287,7 @@ class GBP: sw_if_index=sw_if_index, sclass=sclass, prefix=dict( - address=IPUtil.create_ip_address_object( + address=IPAddress.create_ip_address_object( ip_address(address) ), len=int(subnet_length) |