@@ -172,7 +172,7 @@ def handle_network_change(self):
172
172
with self .network_lock :
173
173
174
174
# if the topology hasn't changed, ignore
175
- if self .network . topology == self .prev_network . topology :
175
+ if self .network == self .prev_network :
176
176
return
177
177
178
178
# otherwise copy the network object
@@ -656,9 +656,7 @@ def nuclear_install(classifier):
656
656
:param classifier: the input classifer
657
657
:type classifier: Classifier
658
658
"""
659
- switch_attrs_tuples = self .network .topology .nodes (data = True )
660
- switch_to_attrs = { k : v for (k ,v ) in switch_attrs_tuples }
661
- switches = switch_to_attrs .keys ()
659
+ switches = self .network .switches ()
662
660
classifier = switchify (classifier ,switches )
663
661
classifier = concretize (classifier )
664
662
classifier = check_OF_rules (classifier )
@@ -699,9 +697,7 @@ def install_diff_rules(classifier):
699
697
"""
700
698
with self .old_rules_lock :
701
699
old_rules = self .old_rules
702
- switch_attrs_tuples = self .network .topology .nodes (data = True )
703
- switch_to_attrs = { k : v for (k ,v ) in switch_attrs_tuples }
704
- switches = switch_to_attrs .keys ()
700
+ switches = self .network .switches ()
705
701
classifier = switchify (classifier ,switches )
706
702
classifier = concretize (classifier )
707
703
classifier = OF_inportize (classifier )
@@ -786,7 +782,7 @@ def pull_bucket_stats():
786
782
if 'switch' in concrete_pred :
787
783
switch_list .append (concrete_pred ['switch' ])
788
784
else :
789
- switch_list = self .network .topology . nodes ()
785
+ switch_list = self .network .switches ()
790
786
break
791
787
for s in switch_list :
792
788
bucket .add_outstanding_switch_query (s )
@@ -889,7 +885,7 @@ def send_clear(self,switch):
889
885
890
886
def clear_all (self ):
891
887
def f ():
892
- switches = self .network .topology . nodes ()
888
+ switches = self .network .switches ()
893
889
for s in switches :
894
890
self .send_barrier (s )
895
891
self .send_clear (s )
0 commit comments