Browse Source

Remove unnecessary code

The population of mac address on creating port is unnecessary
because the mac address will be updated on creating endpoint.

Related-Bug: #1800375
Change-Id: Iee23b16fd4905e3ce21ff8a463253641dc191541
Hongbin Lu 5 months ago
parent
commit
f0e48ebaa0
2 changed files with 0 additions and 6 deletions
  1. 0
    2
      kuryr_libnetwork/controllers.py
  2. 0
    4
      kuryr_libnetwork/tests/unit/test_kuryr_ipam.py

+ 0
- 2
kuryr_libnetwork/controllers.py View File

@@ -1704,8 +1704,6 @@ def ipam_request_address():
1704 1704
                     'admin_state_up': True,
1705 1705
                     'network_id': neutron_network_id,
1706 1706
                 }
1707
-                if req_mac_address:
1708
-                    port['mac_address'] = req_mac_address
1709 1707
                 fixed_ips = port['fixed_ips'] = []
1710 1708
                 fixed_ip = {'subnet_id': subnet['id']}
1711 1709
                 filtered_ports = []

+ 0
- 4
kuryr_libnetwork/tests/unit/test_kuryr_ipam.py View File

@@ -668,7 +668,6 @@ class TestKuryrIpam(base.TestKuryrBase):
668 668
             'name': const.KURYR_UNBOUND_PORT,
669 669
             'admin_state_up': True,
670 670
             'network_id': neutron_network_id,
671
-            'mac_address': fake_mac_address,
672 671
         }
673 672
         fixed_ips = port_request['fixed_ips'] = []
674 673
         fixed_ip = {'subnet_id': subnet_v4_id}
@@ -776,7 +775,6 @@ class TestKuryrIpam(base.TestKuryrBase):
776 775
             'name': const.KURYR_UNBOUND_PORT,
777 776
             'admin_state_up': True,
778 777
             'network_id': neutron_network_id,
779
-            'mac_address': fake_mac_address,
780 778
         }
781 779
         fixed_ips = port_request['fixed_ips'] = []
782 780
         fixed_ip = {'subnet_id': subnet_v4_id,
@@ -1104,7 +1102,6 @@ class TestKuryrIpam(base.TestKuryrBase):
1104 1102
             'name': const.KURYR_UNBOUND_PORT,
1105 1103
             'admin_state_up': True,
1106 1104
             'network_id': neutron_network_id,
1107
-            'mac_address': fake_mac_address,
1108 1105
         }
1109 1106
         port_request['fixed_ips'] = []
1110 1107
         fixed_ip = {'subnet_id': neutron_subnet_v4_id}
@@ -1262,7 +1259,6 @@ class TestKuryrIpam(base.TestKuryrBase):
1262 1259
             'name': const.KURYR_UNBOUND_PORT,
1263 1260
             'admin_state_up': True,
1264 1261
             'network_id': neutron_network_id,
1265
-            'mac_address': fake_mac_address,
1266 1262
         }
1267 1263
         port_request['fixed_ips'] = []
1268 1264
         fixed_ip = {'subnet_id': neutron_subnet_v4_id}

Loading…
Cancel
Save