1
|
[{"id":"265c832a.f5cfbc","type":"dgstart","name":"DGSTART","outputs":1,"x":115,"y":38.75,"z":"fd58ae68.836fa","wires":[["653d3555.5792dc"]]},{"id":"16b8762a.13cc5a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":158.72620391845703,"y":157.52779006958008,"z":"fd58ae68.836fa","wires":[["921c901.432aa7","a7d755ef.e8eb38","70e601d5.4ada9","2ef22046.3c4f6"]]},{"id":"4969f8c5.953108","type":"method","name":"method self-serve-vnf-unassign","xml":"<method rpc='self-serve-vnf-unassign' mode='sync'>\n","comments":"","outputs":1,"x":231.76190948486328,"y":93.45635509490967,"z":"fd58ae68.836fa","wires":[["16b8762a.13cc5a"]]},{"id":"653d3555.5792dc","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<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}'>","outputs":1,"x":390.23819732666016,"y":38.94049263000488,"z":"fd58ae68.836fa","wires":[["4969f8c5.953108"]]},{"id":"866b94c8.dd9848","type":"for","name":"foreach vnf-parameters-data.param[]","xml":"<for index='pidx' start='0' end='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param_length`' >\n","comments":"","outputs":1,"x":744.1312026977539,"y":533.4523887634277,"z":"fd58ae68.836fa","wires":[["c16b8018.42fc2","edb4d199.2281b"]]},{"id":"af5fdc25.c5d8b","type":"switchNode","name":"switch resource-resolution-data.status","xml":"<switch test='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`'>\n","comments":"","outputs":1,"x":484.17897033691406,"y":780.25013256073,"z":"fd58ae68.836fa","wires":[["3b550fad.ec11c","e3f296cc.e715b8","f3d7eee7.30b7"]]},{"id":"3b550fad.ec11c","type":"other","name":"SUCCESS","xml":"<outcome value='SUCCESS'>\n","comments":"","outputs":1,"x":759.5719718933105,"y":780.9643878936768,"z":"fd58ae68.836fa","wires":[["4df5d1db.a40f6"]]},{"id":"921c901.432aa7","type":"for","name":"foreach capability-order[]","xml":"<for index='cidx' start='0' end='`$ss.capability.execution-order_length`' >\n","comments":"","outputs":1,"x":413.0357894897461,"y":238.64282417297363,"z":"fd58ae68.836fa","wires":[["68c2afb3.11397","c6abc7.56f42438","e7eb32f7.2606b","866b94c8.dd9848"]]},{"id":"c16b8018.42fc2","type":"switchNode","name":"switch param capability-name == execution","xml":"<switch test='`$ss.capability-name == $tmp.param.capability-name`'>\n","comments":"","outputs":1,"x":1100.024024963379,"y":533.8452081680298,"z":"fd58ae68.836fa","wires":[["505a26f.1f5efd8"]]},{"id":"505a26f.1f5efd8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1363.524024963379,"y":534.0952081680298,"z":"fd58ae68.836fa","wires":[["af5fdc25.c5d8b"]]},{"id":"4df5d1db.a40f6","type":"call","name":"call ss.capability-dg","xml":"<call module='GENERIC-RESOURCE-API' rpc='`$ss.capability-dg`' mode='sync' >\n","comments":"","outputs":1,"x":964.6907043457031,"y":780.7262392044067,"z":"fd58ae68.836fa","wires":[["c6f47da0.0f373","dd980216.42d38"]]},{"id":"68c2afb3.11397","type":"set","name":"ss.capability-name","xml":"<set>\n<parameter name='ss.capability-name' value='`$ss.capability.execution-order[$cidx]`' />\n\n<!--\nss.capability.execution-order[]\n-->\n","comments":"","x":691.3928451538086,"y":238.59527587890625,"z":"fd58ae68.836fa","wires":[]},{"id":"edb4d199.2281b","type":"set","name":"tmp.param.capability-name","xml":"<set>\n<parameter name='tmp.param.capability-name' value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.capability-name`' />\n","comments":"","x":1049.3810501098633,"y":488.45241832733154,"z":"fd58ae68.836fa","wires":[]},{"id":"e7eb32f7.2606b","type":"set","name":"set ss.capability.action = unassign","xml":"<set>\n<parameter name='ss.capability-action' value='unassign' />\n","comments":"","x":740.1069869995117,"y":285.5118598937988,"z":"fd58ae68.836fa","wires":[]},{"id":"c6f47da0.0f373","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1149.5832138061523,"y":780.726300239563,"z":"fd58ae68.836fa","wires":[["307bb657.9e848a"]]},{"id":"71758b14.465cf4","type":"set","name":"set capability-dg","xml":"<set>\n<parameter name='ss.capability-dg' value=\"`'self-serve-' + $ss.capability.execution-order[$cidx]`\" />\n","comments":"","x":1132.8690567016602,"y":432.73809242248535,"z":"fd58ae68.836fa","wires":[]},{"id":"c6abc7.56f42438","type":"switchNode","name":"switch ss.capability-name","xml":"<switch test='`$ss.capability-name`'>\n","comments":"","outputs":1,"x":715.3690567016602,"y":334.4881000518799,"z":"fd58ae68.836fa","wires":[["79a97e33.1370c","34b852b1.9da43e","5e67013a.6bc83"]]},{"id":"79a97e33.1370c","type":"other","name":"alts-entitlement-assign","xml":"<outcome value='alts-entitlement-assign'>\n","comments":"","outputs":1,"x":998.1191787719727,"y":334.98809242248535,"z":"fd58ae68.836fa","wires":[["c4c2f7b4.7641d8"]]},{"id":"34b852b1.9da43e","type":"other","name":"alts-license-assign","xml":"<outcome value='alts-license-assign'>\n","comments":"","outputs":1,"x":987.3691787719727,"y":382.73809242248535,"z":"fd58ae68.836fa","wires":[["c4c2f7b4.7641d8"]]},{"id":"5e67013a.6bc83","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":953.369140625,"y":432.9880828857422,"z":"fd58ae68.836fa","wires":[["71758b14.465cf4"]]},{"id":"c4c2f7b4.7641d8","type":"set","name":"set capability-dg","xml":"<set>\n<parameter name='ss.capability-dg' value='self-serve-alts-assignment' />\n","comments":"","x":1256.8690567016602,"y":334.48809242248535,"z":"fd58ae68.836fa","wires":[]},{"id":"b83de260.2209e","type":"execute","name":"generate ss-vnf url replace service-instance-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$prop.restapi.ss-vnf-assignments`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vnf-url\"/>\n <parameter name=\"target\" value=\"{service-instance-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.service-instance-id`\"/>\n","comments":"","outputs":1,"x":1632.4405975341797,"y":834.6080255508423,"z":"fd58ae68.836fa","wires":[[]]},{"id":"45669e55.1a95","type":"execute","name":"execute RestApiCallNode - PUT vnf","xml":"<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.ss.vnf.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.controller.url + $tmp.ss-vnf-url`' />\n <parameter name='restapiUser' value='`$prop.controller.user`' />\n <parameter name='restapiPassword' value='`$prop.controller.pwd`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name=\"responsePrefix\" value=\"mdsal-ss-vnf\" />\n\n","comments":"","outputs":1,"x":1601.9048919677734,"y":937.4652471542358,"z":"fd58ae68.836fa","wires":[["6a25a838.b89808","6385a97e.ee45e8","28036de8.2897e2"]]},{"id":"6a25a838.b89808","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1876.4985580444336,"y":991.4634008407593,"z":"fd58ae68.836fa","wires":[["d889fcc3.1ce5a"]]},{"id":"6385a97e.ee45e8","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1868.9271926879883,"y":937.9634208679199,"z":"fd58ae68.836fa","wires":[["d889fcc3.1ce5a"]]},{"id":"28036de8.2897e2","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1872.6771850585938,"y":884.3205184936523,"z":"fd58ae68.836fa","wires":[["7b8b1e58.88c6d"]]},{"id":"7b8b1e58.88c6d","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":2049.0474166870117,"y":884.2269997596741,"z":"fd58ae68.836fa","wires":[[]]},{"id":"d889fcc3.1ce5a","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2071.0595169067383,"y":937.6076755523682,"z":"fd58ae68.836fa","wires":[["47577c8a.088694"]]},{"id":"47577c8a.088694","type":"configure","name":"set error-message","xml":"<set>\n<parameter name=\"error-message\" value=\"Error persisting self-serve vnf assignments in MD-SAL during unassign\" />\n","comments":"","outputs":1,"x":2289.345283508301,"y":937.7505388259888,"z":"fd58ae68.836fa","wires":[[]]},{"id":"d4392346.c91d5","type":"set","name":"set vf data for restapi-call-node","xml":"<set>\n<parameter name='vf.vnf-id'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-id`' />\n<parameter name='vf.vnf-data.sdnc-request-header.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.sdnc-request-header.`' />\n<parameter name='vf.vnf-data.request-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.request-information.`' />\n<parameter name='vf.vnf-data.service-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.service-information.`' />\n<parameter name='vf.vnf-data.vnf-information.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-information.`' />\n<parameter name='vf.vnf-data.vnf-request-input.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.`' />\n<parameter name='vf.vnf-data.vnf-request-input.vnf-input-parameters.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-request-input.vnf-input-parameters.`' />\n<parameter name='vf.vnf-data.vnf-topology.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.`' />\n<parameter name='vf.vnf-data.vnf-level-oper-status.'\n value='`$service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-level-oper-status.`' />","comments":"","x":1584.8928985595703,"y":780.7025375366211,"z":"fd58ae68.836fa","wires":[]},{"id":"16673b2e.a31d15","type":"execute","name":"generate ss-vnf url - replace vnf-id","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='replace' >\n <parameter name=\"source\" value=\"`$tmp.ss-vnf-url`\"/>\n <parameter name=\"outputPath\" value=\"tmp.ss-vnf-url\"/>\n <parameter name=\"target\" value=\"{vnf-id}\"/>\n <parameter name=\"replacement\" value=\"`$service-data.vnfs.vnf[$vnf-index].vnf-id`\"/>\n","comments":"","outputs":1,"x":1596.726303100586,"y":885.4167938232422,"z":"fd58ae68.836fa","wires":[[]]},{"id":"307bb657.9e848a","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":1310.535888671875,"y":780.4644117355347,"z":"fd58ae68.836fa","wires":[["b83de260.2209e","45669e55.1a95","d4392346.c91d5","16673b2e.a31d15","7f6d0abe.2057e4"]]},{"id":"7f6d0abe.2057e4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to unassign self-serve vnf assignments for ' + $ss.capability-dg + ' with error: ' + $error-message`\" />\n","comments":"","x":1531.4408569335938,"y":1065.238195180893,"z":"fd58ae68.836fa","wires":[]},{"id":"2ef22046.3c4f6","type":"execute","name":"printContext","xml":"<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='printContext' >\n<parameter name='filename' value='/var/tmp/ss-vnf-assign.log' />\n","comments":"","outputs":1,"x":372.4526596069336,"y":363.14298248291016,"z":"fd58ae68.836fa","wires":[[]]},{"id":"a7d755ef.e8eb38","type":"set","name":"set ss.capability.execution-order[]","xml":"<set>\n<parameter name='ss.capability.execution-order[0]' value='mac-address-assign' />\n<parameter name='ss.capability.execution-order[1]' value='eipam-ip-assign' />\n<parameter name='ss.capability.execution-order[2]' value='vlan-tag-assign' />\n<parameter name='ss.capability.execution-order[3]' value='alts-license-assign' />\n<parameter name='ss.capability.execution-order[4]' value='alts-entitlement-assign' />\n<parameter name='ss.capability.execution-order[5]' value='generate-name' />\n<parameter name='ss.capability.execution-order_length' value='6' />","comments":"","x":438.25003814697266,"y":157.75000381469727,"z":"fd58ae68.836fa","wires":[]},{"id":"e3f296cc.e715b8","type":"other","name":"DELETED","xml":"<outcome value='DELETED'>\n","comments":"","outputs":1,"x":760.0714416503906,"y":847.4999847412109,"z":"fd58ae68.836fa","wires":[["65e72d4e.a402b4"]]},{"id":"70e601d5.4ada9","type":"set","name":"set ss.capability-type = vnf","xml":"<set>\n<parameter name='ss.capability-type' value='vnf' />\n","comments":"","x":417.85713958740234,"y":197.3214340209961,"z":"fd58ae68.836fa","wires":[]},{"id":"dd980216.42d38","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1151.25,"y":725,"z":"fd58ae68.836fa","wires":[["1097874e.d2d249"]]},{"id":"1097874e.d2d249","type":"set","name":"set capability-dg to UNASSIGNED","xml":"<set>\n<parameter name='`$ss.capability-dg`' value='UNASSIGNED' />\n","comments":"","x":1376.999984741211,"y":724.7499723434448,"z":"fd58ae68.836fa","wires":[]},{"id":"f221686f.d189a8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='error-code' value='500' />\n<parameter name='error-message' value=\"`'Failed to unassign self-serve vnf assignments because the status for ' + $ss.capability-name + ' is ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`\"/>","comments":"","x":1142.1428833007812,"y":957.7143857138499,"z":"fd58ae68.836fa","wires":[]},{"id":"65e72d4e.a402b4","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":916.5714340209961,"y":847.4999732971191,"z":"fd58ae68.836fa","wires":[[]]},{"id":"f3d7eee7.30b7","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":751.1428375244141,"y":905.7142868041992,"z":"fd58ae68.836fa","wires":[["fe6afcfd.d977d"]]},{"id":"277ee929.a0ea46","type":"record","name":"record","xml":"<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\">\n<parameter name=\"logger\" value=\"message-log\"/>\n<parameter name=\"field1\" value=\"`'SS: resource-resolution-data.status: ' + $service-data.vnfs.vnf[$vnf-index].vnf-data.vnf-topology.vnf-parameters-data.param[$pidx].resource-resolution-data.status`\"/>\n<parameter name=\"field2\" value=\"`'SS: ss.capability-name: ' + $ss.capability-name`\"/>","comments":"","outputs":1,"x":1121.4285888671875,"y":905.7143923895701,"z":"fd58ae68.836fa","wires":[[]]},{"id":"fe6afcfd.d977d","type":"block","name":"block : atomic","xml":"<block atomic='true'>","atomic":"true","comments":"","outputs":1,"x":937.8571319580078,"y":905.7143383026123,"z":"fd58ae68.836fa","wires":[["277ee929.a0ea46","f221686f.d189a8"]]}]
|