diff --git a/src/device/service/drivers/openconfig/templates/EndPoints.py b/src/device/service/drivers/openconfig/templates/EndPoints.py
index 718a02d193531924bef863f5ccd2cbb999388dbd..9bd2e75ac4da0965c91b9154046694fd352dc4f6 100644
--- a/src/device/service/drivers/openconfig/templates/EndPoints.py
+++ b/src/device/service/drivers/openconfig/templates/EndPoints.py
@@ -44,6 +44,7 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]:
         component_type = xml_component.find(
             'ocpp:port/ocpp:breakout-mode/ocpp:state/ocpp:channel-speed', namespaces=NAMESPACES)
         add_value_from_tag(endpoint, 'type', component_type)
+        if 'type' not in endpoint: endpoint['type'] = '-'
 
         sample_types = {
             ORM_KpiSampleTypeEnum.BYTES_RECEIVED.value     : XPATH_IFACE_COUNTER.format(endpoint['uuid'], 'in-octets' ),
diff --git a/src/device/service/drivers/openconfig/templates/network_instance/edit_config.xml b/src/device/service/drivers/openconfig/templates/network_instance/edit_config.xml
index 17b07df7233e94f16923c5da49eef2b8b5ccda82..6b6b733dab12a107bf0420907da9c9683173faeb 100644
--- a/src/device/service/drivers/openconfig/templates/network_instance/edit_config.xml
+++ b/src/device/service/drivers/openconfig/templates/network_instance/edit_config.xml
@@ -5,29 +5,30 @@
         <config>
             <name>{{name}}</name>
             <type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:{{type}}</type>
-            {% if type=='L3VRF' %}
             {% if description is defined %}<description>{{description}}</description>{% endif %}
+            <enabled>true</enabled>
+            {% if type=='L3VRF' %}
             {% if router_id is defined %}<router-id>{{router_id}}</router-id>{% endif %}
             <route-distinguisher>{{route_distinguisher}}</route-distinguisher>
-            <enabled>true</enabled>
-        </config>
-        <encapsulation>
-            <config>
-                <encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
-                <label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:INSTANCE_LABEL</label-allocation-mode>
-            </config>
-        </encapsulation>
             {% endif %}
             {% if type=='L2VSI' %}
-            {% if description is defined %}<description>{{description}}</description>{% endif %}
-            <enabled>true</enabled>
             <mtu>1500</mtu>
+            {% endif %}
         </config>
+        {% if type=='L3VRF' or type=='L2VSI' %}
         <encapsulation>
             <config>
+                {% if type=='L3VRF' %}
                 <encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
+                <label-allocation-mode xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:INSTANCE_LABEL</label-allocation-mode>
+                {% endif %}
+                {% if type=='L2VSI' %}
+                <encapsulation-type xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types">oc-ni-types:MPLS</encapsulation-type>
+                {% endif %}
             </config>
         </encapsulation>
+        {% endif %}
+        {% if type=='L2VSI' %}
         <fdb>
             <config>
                 <mac-learning>true</mac-learning>
@@ -35,8 +36,7 @@
                 <mac-aging-time>300</mac-aging-time>
             </config>
         </fdb>
-            {% endif %}
-
+        {% endif %}
         {% endif %}
     </network-instance>
 </network-instances>