Skip to content

Commit

Permalink
#127 - Adding a few more logs related to Initial Rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Donovan committed Nov 26, 2019
1 parent fa8be46 commit e282a84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions sdxctlr/RuleManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def get_breakdown_rules_by_LC(self, lc):
startup by the SDXController.
Returns a list of broken down rules.
'''
self.logger.info("get_breakdown_rules_by_LC(%s)" % lc)
bd_list = []
# Get all rules
all_rules = self.rule_table.find()
Expand All @@ -289,7 +290,10 @@ def get_breakdown_rules_by_LC(self, lc):
# If Breakdown is for this LC, add to bd_list
rule_lc = bd.get_lc()
if rule_lc == lc:
self.logger.info(" Adding %s" % bd)
bd_list += bd.get_list_of_rules()
self.logger.info("get_breakdown_rules_by_LC(%s) - Returning %d rules" %
(lc, len(bd_list)))
return bd_list

def get_rule_details(self, rule_hash):
Expand Down
6 changes: 4 additions & 2 deletions shared/SDXControllerConnectionManagerConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ def transition_to_main_phase_LC(self, name, capabilities,
# Send hello with name, transition to Capabilities
hello = SDXMessageHello(self.name)
self.send_protocol(hello)
self.logger.warning("%s - %s - Sent HELLO message, transition to CAPABILITIES" % (
id(self), self.connection_state))
self.logger.warning("%s - %s - Sent HELLO message for %s, transition to CAPABILITIES" % (
id(self), self.connection_state, self.name))
self.connection_state = 'CAPABILITIES'

# Wait for Request Capabilities
Expand Down Expand Up @@ -775,6 +775,8 @@ def transition_to_main_phase_SDX(self, set_name_callback,

self.name = hello.get_data()['name']
set_name_callback(self.name)
self.logger.warning("%s - %s - Getting initial rules for %s" % (
id(self), self.connection_state, self.name))
initial_rules = get_initial_rule_callback(self.name)

# Transition to Capabilities, send request capabilities
Expand Down

0 comments on commit e282a84

Please sign in to comment.