Rewrite NTS Framework.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran / yang / o-ran-processing-element.yang
@@ -180,12 +180,15 @@ module o-ran-processing-element {
           description "the interface name ";
         }
         container aliasmac-flow {
-          when "../../../transport-session-type = 'ALIASMAC-INTERFACE'";
+          when "../../../transport-session-type = 'ALIASMAC-INTERFACE'";          
           if-feature o-ran-int:ALIASMAC-BASED-CU-PLANE;
+          //checkAS add presence, because it has mandatory child
+          presence "Contains AliasMAC details.";
           description "leafs for virtual mac type data flows";
           leaf ru-aliasmac-address {
             type leafref {
-              path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:alias-macs";
+              //checkAL added o-ran-elements:  before interface-name
+              path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/o-ran-int:alias-macs";
             }
             mandatory true;
             description
@@ -193,7 +196,8 @@ module o-ran-processing-element {
           }
           leaf vlan-id {
             type leafref {
-              path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
+              //checkAL added o-ran-elements:  before interface-name
+              path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/o-ran-int:vlan-id";
             }
             description
               "O-RU's VLAN-ID used for alias MAC based flow";
@@ -207,10 +211,13 @@ module o-ran-processing-element {
         }
         container eth-flow {
           when "../../../transport-session-type = 'ETH-INTERFACE'";
+          //checkAS add presence, because it has mandatory child
+          presence "Contains ETH details.";
           description "leafs for mac + vlan-id type data flows";
           leaf ru-mac-address {
             type leafref {
-              path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:mac-address";
+              //checkAL added o-ran-elements:  before interface-name
+              path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/o-ran-int:mac-address";
             }
             mandatory true;
             description
@@ -218,7 +225,8 @@ module o-ran-processing-element {
           }
           leaf vlan-id {
             type leafref {
-              path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/o-ran-int:vlan-id";
+              //checkAL added o-ran-elements:  before interface-name
+              path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/o-ran-int:vlan-id";
             }
             mandatory true;
             description
@@ -233,17 +241,21 @@ module o-ran-processing-element {
         }
         container udpip-flow {
           when "../../../transport-session-type = 'UDPIP-INTERFACE'";
+          //checkAL added presence
+          presence "contains updip details";
           description "leafs for UDP/IP type data flows";
           choice address {
             leaf ru-ipv4-address {
               type leafref {
-                path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv4/ip:address/ip:ip";
+                //checkAL added o-ran-elements:  before interface-name
+                path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/ip:ipv4/ip:address/ip:ip";
               }
               description "O-RU's IPv4 address";
             }
             leaf ru-ipv6-address {
               type leafref {
-                path "/if:interfaces/if:interface[if:name = current()/../../interface-name]/ip:ipv6/ip:address/ip:ip";
+                //checkAL added o-ran-elements:  before interface-name
+                path "/if:interfaces/if:interface[if:name = current()/../../o-ran-elements:interface-name]/ip:ipv6/ip:address/ip:ip";
               }
               description "O-RU's IPv6 address";
             }