aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/xml
diff options
context:
space:
mode:
authorMarcus G K Williams <marcus.williams@intel.com>2017-11-07 11:35:10 -0800
committerMarcus G K Williams <marcus.williams@intel.com>2017-11-07 12:54:50 -0800
commit8ffe87ec3f8dff87f88a1fff7452e2b263363039 (patch)
tree60fd4874a81c64714958804af33977301eadb503 /platform-logic/generic-resource-api/src/main/xml
parent39edb53aa9b16b0175de571111a422087bbe227c (diff)
Save brg service to md-sal in DG
Issue-Id: SDNC-176 Change-Id: I406f53a00512ef5c656149d2090b94e12328398b Signed-off-by: Marcus G K Williams <marcus.williams@intel.com> Former-commit-id: 204da530ab853b8825c1acec5a68e11194bd24d0
Diffstat (limited to 'platform-logic/generic-resource-api/src/main/xml')
-rw-r--r--platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml73
1 files changed, 73 insertions, 0 deletions
diff --git a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml
index 7536425a..49524e79 100644
--- a/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml
+++ b/platform-logic/generic-resource-api/src/main/xml/GENERIC-RESOURCE-API_brg-topology-operation-activate.xml
@@ -203,6 +203,79 @@
</return>
</outcome>
</execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.vnf-api.service-information`"/>
+ <parameter name="outputPath" value="tmp.vnf-api-url"/>
+ <parameter name="target" value="{vnf-id}"/>
+ <parameter name="replacement" value="`$tmp.ar.brg-vnf-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.vnf-api-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="service-data" />
+ <outcome value='success'>
+ <block atomic="true">
+ <set>
+ <parameter name='bk-service-data' value='$service-data.' />
+ </set>
+ <switch test='`$service-data.service-data_length`'>
+ <outcome value='1'>
+ <block atomic='true'>
+ <set>
+ <parameter name='tmp.service-data.' value='$service-data.service-data[0].' />
+ </set>
+ <switch test='`$tmp.service-data.order-status`'>
+ <outcome value='Created'>
+ <block></block>
+ </outcome>
+ <outcome value='Other'>
+ <block></block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ </switch>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <block atomic="true"></block>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >
+ <parameter name="source" value="`$prop.restapi.services`"/>
+ <parameter name="outputPath" value="tmp.services-url"/>
+ <parameter name="target" value="{service-instance-id}"/>
+ <parameter name="replacement" value="`$tmp.service-data.service-information.service-instance-id`"/>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.services.templatefile`" />
+ <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.services-url`' />
+ <parameter name='restapiUser' value='`$prop.controller.user`' />
+ <parameter name='restapiPassword' value='`$prop.controller.pwd`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name="responsePrefix" value="mdsal-ar" />
+ <outcome value='success'>
+ <block></block>
+ </outcome>
+ <outcome value='failure'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating md-sal for brg-allotted-resource" />
+ </return>
+ </outcome>
+ <outcome value='not-found'>
+ <return status='failure'>
+ <parameter name='ack-final' value='Y'/>
+ <parameter name="error-code" value="500" />
+ <parameter name="error-message" value="Error updating md-sal for brg-allotted-resource" />
+ </return>
+ </outcome>
+ </execute>
<set>
<parameter name='allotted-resource-id' value='`$tmp.ar.allotted-resource-id`' />
<parameter name='brg-object-path' value="`$tmp.ar.self-link`"/>