From: Anantha Ramaiah <[email protected]>
Signed-off-by: Anantha Ramaiah <[email protected]>
Signed-off-by: FUJITA Tomonori <[email protected]>
---
ryu/services/protocols/vrrp/event.py | 2 ++
ryu/services/protocols/vrrp/router.py | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ryu/services/protocols/vrrp/event.py
b/ryu/services/protocols/vrrp/event.py
index 49d3692..1eb4426 100644
--- a/ryu/services/protocols/vrrp/event.py
+++ b/ryu/services/protocols/vrrp/event.py
@@ -115,6 +115,7 @@ class VRRPConfig(object):
advertmisement_interval is in seconds as float. (Not in centiseconds)
"""
def __init__(self, version=vrrp.VRRP_VERSION_V3, vrid=None,
+ admin_state=None,
priority=vrrp.VRRP_PRIORITY_BACKUP_DEFAULT, ip_addresses=None,
advertisement_interval=vrrp.VRRP_MAX_ADVER_INT_DEFAULT_IN_SEC,
preempt_mode=True, preempt_delay=0, accept_mode=False):
@@ -124,6 +125,7 @@ class VRRPConfig(object):
super(VRRPConfig, self).__init__()
self.version = version
+ self.admin_state = admin_state
self.vrid = vrid
self.priority = priority
self.ip_addresses = ip_addresses
diff --git a/ryu/services/protocols/vrrp/router.py
b/ryu/services/protocols/vrrp/router.py
index 601c91b..88b6ce9 100644
--- a/ryu/services/protocols/vrrp/router.py
+++ b/ryu/services/protocols/vrrp/router.py
@@ -657,7 +657,9 @@ class VRRPRouterV3(VRRPRouter):
def start(self):
self.state_change(vrrp_event.VRRP_STATE_INITIALIZE)
- if self.config.address_owner:
+ # Check role here and change accordingly
+ # Check config.admin_state
+ if self.config.address_owner or self.config.admin_state == 'master':
self.send_advertisement()
# This action should be done router on
--
1.8.3.4 (Apple Git-47)
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel