@@ -925,20 +925,25 @@ def test_overwrite_options(self):
925925 {'host_routes' : [{'destination' : '10.20.20.0/24' ,
926926 'nexthop' : '10.20.20.1' }],
927927 'allocation_pools' : [{'start' : '8.8.8.200' ,
928- 'end' : '8.8.8.250' }], })
928+ 'end' : '8.8.8.250' }],
929+ 'dns_nameservers' : ["10.0.0.1" ], })
929930 self .network .find_subnet = mock .Mock (return_value = _testsubnet )
930931 arglist = [
931932 '--host-route' , 'destination=10.30.30.30/24,gateway=10.30.30.1' ,
932933 '--no-host-route' ,
933934 '--allocation-pool' , 'start=8.8.8.100,end=8.8.8.150' ,
934935 '--no-allocation-pool' ,
936+ '--dns-nameserver' , '10.1.10.1' ,
937+ '--no-dns-nameservers' ,
935938 _testsubnet .name ,
936939 ]
937940 verifylist = [
938941 ('host_routes' , [{
939942 "destination" : "10.30.30.30/24" , "gateway" : "10.30.30.1" }]),
940943 ('allocation_pools' , [{
941944 'start' : '8.8.8.100' , 'end' : '8.8.8.150' }]),
945+ ('dns_nameservers' , ['10.1.10.1' ]),
946+ ('no_dns_nameservers' , True ),
942947 ('no_host_route' , True ),
943948 ('no_allocation_pool' , True ),
944949 ]
@@ -948,6 +953,7 @@ def test_overwrite_options(self):
948953 'host_routes' : [{
949954 "destination" : "10.30.30.30/24" , "nexthop" : "10.30.30.1" }],
950955 'allocation_pools' : [{'start' : '8.8.8.100' , 'end' : '8.8.8.150' }],
956+ 'dns_nameservers' : ["10.1.10.1" ],
951957 }
952958 self .network .update_subnet .assert_called_once_with (
953959 _testsubnet , ** attrs )
0 commit comments