From 82ec61525ba153b1fb4dd527fde7db5e41ac8785 Mon Sep 17 00:00:00 2001 From: Sachin Bansal Date: Tue, 18 Nov 2014 16:51:52 -0800 Subject: [PATCH] Add a new property to routing instance to indicate that it is a default routing instance for the network Change-Id: I7f36587045c0ad0257a8f3e63cef3fa28775c82d Partial-Bug: 1380750 --- src/config/schema-transformer/to_bgp.py | 3 +++ src/schema/bgp_schema.xsd | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/config/schema-transformer/to_bgp.py b/src/config/schema-transformer/to_bgp.py index 8835dc7ed84..d3c7583d6ef 100644 --- a/src/config/schema-transformer/to_bgp.py +++ b/src/config/schema-transformer/to_bgp.py @@ -553,6 +553,7 @@ def locate_routing_instance(self, rinst_name, service_chain=None): if rinst_name in self.rinst: return self.rinst[rinst_name] + is_default = (rinst_name == self._default_ri_name) alloc_new = False rinst_fq_name_str = '%s:%s' % (self.obj.get_fq_name_str(), rinst_name) old_rtgt = None @@ -586,12 +587,14 @@ def locate_routing_instance(self, rinst_name, service_chain=None): rinst_obj = None else: rinst_obj.set_route_target(rtgt_obj, inst_tgt_data) + rinst_obj.set_routing_instance_is_default(is_default) _vnc_lib.routing_instance_update(rinst_obj) except NoIdError: rinst_obj = None if rinst_obj is None: rinst_obj = RoutingInstance(rinst_name, self.obj) rinst_obj.set_route_target(rtgt_obj, inst_tgt_data) + rinst_obj.set_routing_instance_is_default(is_default) _vnc_lib.routing_instance_create(rinst_obj) except HttpError as he: _sandesh._logger.error( diff --git a/src/schema/bgp_schema.xsd b/src/schema/bgp_schema.xsd index 684e7ee6085..7d5e818d338 100644 --- a/src/schema/bgp_schema.xsd +++ b/src/schema/bgp_schema.xsd @@ -139,6 +139,10 @@ + + +