@@ -815,6 +815,7 @@ def test_get_subnets_filters_and_has_gateway_true(
815815 subnet1 .ip_version = 4
816816 subnet1 .gateway_ip = "10.0.0.1"
817817 subnet1 .enable_dhcp = True
818+ subnet1 .is_dhcp_enabled = True
818819 subnet1 .allocation_pools = []
819820 subnet1 .dns_nameservers = []
820821 subnet1 .host_routes = []
@@ -830,6 +831,7 @@ def test_get_subnets_filters_and_has_gateway_true(
830831 subnet2 .ip_version = 4
831832 subnet2 .gateway_ip = None
832833 subnet2 .enable_dhcp = False
834+ subnet2 .is_dhcp_enabled = False
833835 subnet2 .allocation_pools = []
834836 subnet2 .dns_nameservers = []
835837 subnet2 .host_routes = []
@@ -888,6 +890,7 @@ def test_get_subnets_has_gateway_false(
888890 subnet1 .ip_version = 4
889891 subnet1 .gateway_ip = "10.0.0.1"
890892 subnet1 .enable_dhcp = True
893+ subnet1 .is_dhcp_enabled = True
891894 subnet1 .allocation_pools = []
892895 subnet1 .dns_nameservers = []
893896 subnet1 .host_routes = []
@@ -903,6 +906,7 @@ def test_get_subnets_has_gateway_false(
903906 subnet2 .ip_version = 4
904907 subnet2 .gateway_ip = None
905908 subnet2 .enable_dhcp = False
909+ subnet2 .is_dhcp_enabled = False
906910 subnet2 .allocation_pools = []
907911 subnet2 .dns_nameservers = []
908912 subnet2 .host_routes = []
@@ -935,6 +939,7 @@ def test_create_subnet_success(
935939 subnet .ip_version = 4
936940 subnet .gateway_ip = "10.0.0.1"
937941 subnet .enable_dhcp = True
942+ subnet .is_dhcp_enabled = True
938943 subnet .allocation_pools = [{"start" : "10.0.0.10" , "end" : "10.0.0.20" }]
939944 subnet .dns_nameservers = ["8.8.8.8" ]
940945 subnet .host_routes = []
@@ -989,6 +994,7 @@ def test_get_subnet_detail_success(
989994 subnet .ip_version = 4
990995 subnet .gateway_ip = "10.0.0.1"
991996 subnet .enable_dhcp = True
997+ subnet .is_dhcp_enabled = True
992998 subnet .allocation_pools = []
993999 subnet .dns_nameservers = []
9941000 subnet .host_routes = []
@@ -1018,6 +1024,7 @@ def test_update_subnet_success(
10181024 subnet .ip_version = 4
10191025 subnet .gateway_ip = "10.0.0.254"
10201026 subnet .enable_dhcp = False
1027+ subnet .is_dhcp_enabled = False
10211028 subnet .allocation_pools = []
10221029 subnet .dns_nameservers = []
10231030 subnet .host_routes = []
@@ -1078,6 +1085,7 @@ def test_set_and_clear_subnet_gateway(
10781085 updated .ip_version = 4
10791086 updated .gateway_ip = "10.0.0.254"
10801087 updated .enable_dhcp = True
1088+ updated .is_dhcp_enabled = True
10811089 updated .allocation_pools = []
10821090 updated .dns_nameservers = []
10831091 updated .host_routes = []
@@ -1109,6 +1117,7 @@ def test_set_and_toggle_subnet_dhcp(
11091117 updated .ip_version = 4
11101118 updated .gateway_ip = "10.0.0.1"
11111119 updated .enable_dhcp = True
1120+ updated .is_dhcp_enabled = True
11121121 updated .allocation_pools = []
11131122 updated .dns_nameservers = []
11141123 updated .host_routes = []
@@ -1120,6 +1129,7 @@ def test_set_and_toggle_subnet_dhcp(
11201129 assert res1 .is_dhcp_enabled is True
11211130
11221131 updated .enable_dhcp = False
1132+ updated .is_dhcp_enabled = False
11231133 res2 = tools .update_subnet ("subnet-1" , is_dhcp_enabled = False )
11241134 assert res2 .is_dhcp_enabled is False
11251135
0 commit comments