Signed-off-by: ISHIDA Wataru <[email protected]>
---
ryu/services/protocols/bgp/peer.py    |   14 ++++++--------
ryu/services/protocols/bgp/speaker.py |    1 -
2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/ryu/services/protocols/bgp/peer.py 
b/ryu/services/protocols/bgp/peer.py
index 9c511dc..14115de 100644
--- a/ryu/services/protocols/bgp/peer.py
+++ b/ryu/services/protocols/bgp/peer.py
@@ -412,9 +412,8 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
        enabled = conf_evt.value
        # If we do not have any protocol bound and configuration asks us to
        # enable this peer, we try to establish connection again.
-        LOG.debug('Peer %s configuration update event, enabled: %s.' %
-                  (self, enabled))
        if enabled:
+            LOG.info('%s enabled' % self)
            if self._protocol and self._protocol.started:
                LOG.error('Tried to enable neighbor that is already enabled')
            else:
@@ -424,6 +423,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
                    self._connect_retry_event.set()
                    LOG.debug('Starting connect loop as neighbor is enabled.')
        else:
+            LOG.info('%s disabled' % self)
            if self._protocol:
                # Stopping protocol will eventually trigger connection_lost
                # handler which will do some clean-up.
@@ -439,8 +439,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
                self.state.bgp_state = const.BGP_FSM_IDLE
            # If this peer is not enabled any-more we stop trying to make any
            # connection.
-            LOG.debug('Disabling connect-retry as neighbor was disabled (%s)' %
-                      (not enabled))
+            LOG.debug('Disabling connect-retry as neighbor was disabled')
            self._connect_retry_event.clear()

    def on_update_med(self, conf_evt):
@@ -932,8 +931,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
        # Stop connect_loop retry timer as we are now connected
        if self._protocol and self._connect_retry_event.is_set():
            self._connect_retry_event.clear()
-            LOG.debug('Connect retry event for %s is now set: %s' %
-                      (self, self._connect_retry_event.is_set()))
+            LOG.debug('Connect retry event for %s is cleared' % self)

        if self._protocol and self.outgoing_msg_event.is_set():
            # Start processing sink.
@@ -1760,7 +1758,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
    def connection_made(self):
        """Protocols connection established handler
        """
-        LOG.critical(
+        LOG.info(
            'Connection to peer: %s established',
            self._neigh_conf.ip_address,
            extra={
@@ -1772,7 +1770,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
    def connection_lost(self, reason):
        """Protocols connection lost handler.
        """
-        LOG.critical(
+        LOG.info(
            'Connection to peer %s lost, reason: %s Resetting '
            'retry connect loop: %s' %
            (self._neigh_conf.ip_address, reason,
diff --git a/ryu/services/protocols/bgp/speaker.py 
b/ryu/services/protocols/bgp/speaker.py
index cfa8be7..f66ea41 100644
--- a/ryu/services/protocols/bgp/speaker.py
+++ b/ryu/services/protocols/bgp/speaker.py
@@ -583,7 +583,6 @@ class BgpProtocol(Protocol, Activity):
        self.sent_open_msg = open_msg
        self.send(open_msg)
        self._peer.connection_made()
-        LOG.debug('Sent open message %s' % open_msg)

    def connection_lost(self, reason):
        """Stops all timers and notifies peer that connection is lost.
-- 
1.7.10.4



------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to