Update brg-topo-activate DG + vG setup
[sdnc/oam.git] / platform-logic / generic-resource-api / src / main / xml / GENERIC-RESOURCE-API_get-tunnelxconn-ar.xml
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_get-tunnelxconn-ar.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_get-tunnelxconn-ar.xml
new file mode 100644 (file)
index 0000000..f74ec8e
--- /dev/null
@@ -0,0 +1,18 @@
+<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>
+    <method rpc='get-tunnelxconn-ar' mode='sync'>
+        <block atomic="true">
+            <get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource' resource='GENERIC-RESOURCE-API' key='tunnelxconn-allotted-resources' pfx='tmp.tunnel-ar.data' ></get-resource>
+            <for index='tunnelidx' start='0' end='`$tmp.tunnel-ar.data.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource_length`' >
+                <switch test='`$tmp.tunnel-ar.data.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[$tunnelidx].allotted-resource-data.tunnelxconn-topology.allotted-resource-identifiers.consuming-service-instance-id == $tmp.ar.consuming-service-instance-id`'>
+                    <outcome value='true'>
+                        <block>
+                            <set>
+                                <parameter name='tmp.tunnelxconn-ar.' value='`$tmp.tunnel-ar.data.tunnelxconn-allotted-resources.tunnelxconn-allotted-resource[$tunnelidx].`' />
+                            </set>
+                        </block>
+                    </outcome>
+                </switch>
+            </for>
+        </block>
+    </method>
+</service-logic>
\ No newline at end of file