Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The service-topology-operation rpc is used to create an initial service instance ID and do varous service level resource assignments. There are several sub-graphs used in the directed graph

Service-Topology-Operation (main)

Notice that this DG has 4 sub DG's 

  • validate-service-input
  • service-topology-operation-assign
  • service-topology-operation-deactivate
  • service-topology-operation-delete


Image Added

Here are json string forms of the directed graphs that can be imported into DGBuilder. You can use them for testing if your instance doesn't have them loaded yet. Simply SAVE , Upload xml and Activate the DG. You will need the main DG, the validate-service-input and the service-toplogy-operation-assign DG to test the sunny day thread through the API.

Expand
titleGENERIC-RESOURCE-API:service-topology-operation

[{"id":"d3b12978.a07958","type":"dgstart","name":"DGSTART","outputs":1,"x":155,"y":131.4136562347412,"z":"e8bc9b98.816858","wires":[["b7396d0e.8f0cc"]]},{"id":"b7396d0e.8f0cc","type":"service-logic","name":"GENERIC-RESOURCE-API 0.0.1","module":"GENERIC-RESOURCE-API","version":"0.0.1","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='0.0.1'>","outputs":1,"x":230.28570556640625,"y":171.6517677307129,"z":"e8bc9b98.816858","wires":[["9949b950.d0ee7"]]},{"id":"9949b950.d0ee7","type":"method","name":"method service-topology-operation","xml":"<method rpc='service-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":233.42862701416016,"y":211.4136505126953,"z":"e8bc9b98.816858","wires":[["f463b94c.1017b8"]]},{"id":"676a3420.723724","type":"comment","name":"service-topology-operation","info":"","comments":"","x":549.344856262207,"y":79,"z":"e8bc9b98.816858","wires":[]},{"id":"f463b94c.1017b8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":229.5000457763672,"y":412.44050788879395,"z":"e8bc9b98.816858","wires":[["1e77fab1.a6aa75","825f49a.dfd4db8","2cafd6e.5e4402a","768022b2.920c34"]]},{"id":"1e77fab1.a6aa75","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":513.3332977294922,"y":587.8426446914673,"z":"e8bc9b98.816858","wires":[]},{"id":"2cafd6e.5e4402a","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":520.0475387573242,"y":464.9374351501465,"z":"e8bc9b98.816858","wires":[["8afe9b00.96b448","bebf36ec.06d6a8","b6d909b3.c8e398","b20f571f.7a617"]]},{"id":"8afe9b00.96b448","type":"outcome","name":"assign","xml":"<outcome value='assign'>\n","comments":"","outputs":1,"x":730.8570785522461,"y":390.22325325012207,"z":"e8bc9b98.816858","wires":[["31220371.b6a3dc"]]},{"id":"bebf36ec.06d6a8","type":"outcome","name":"delete","xml":"<outcome value='delete'>\n","comments":"","outputs":1,"x":730.2380599975586,"y":484.747296333313,"z":"e8bc9b98.816858","wires":[["1cf1bc7b.a24e2c"]]},{"id":"b20f571f.7a617","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":729.2855987548828,"y":533.604061126709,"z":"e8bc9b98.816858","wires":[["d982d4e4.a1cbc8"]]},{"id":"825f49a.dfd4db8","type":"set","name":"copy input to service-data","xml":"<set>\n<parameter name='service-data.sdnc-request-header.' value='`$service-topology-operation-input.sdnc-request-header.`' />\n<parameter name='service-data.request-information.' value='`$service-topology-operation-input.request-information.`' />\n<parameter name='service-data.service-information.' value='`$service-topology-operation-input.service-information.`' />\n<parameter name='service-data.service-request-input.' value='`$service-topology-operation-input.service-request-input.`' />\n","comments":"","x":548.1547317504883,"y":332.63989543914795,"z":"e8bc9b98.816858","wires":[]},{"id":"d982d4e4.a1cbc8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`$service-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n","comments":"","x":905.4760437011719,"y":533.6041259765625,"z":"e8bc9b98.816858","wires":[]},{"id":"768022b2.920c34","type":"call","name":"call GENERIC-RESOURCE-API:validate-service-input","xml":"<call module='GENERIC-RESOURCE-API' rpc='validate-service-input' mode='sync' >\n","comments":"","outputs":1,"x":635.416633605957,"y":284.4613552093506,"z":"e8bc9b98.816858","wires":[[]]},{"id":"31220371.b6a3dc","type":"call","name":"call GENERIC-RESOURCE-API:service-topology-operation-assign","xml":"<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-assign' mode='sync' >\n","comments":"","outputs":1,"x":1071.9999313354492,"y":389.794713973999,"z":"e8bc9b98.816858","wires":[[]]},{"id":"3303275.e799858","type":"call","name":"call GENERIC-RESOURCE-API:service-topology-operation-deactivate","xml":"<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-deactivate' mode='sync' >\n","comments":"","outputs":1,"x":1084.999885559082,"y":436.7947082519531,"z":"e8bc9b98.816858","wires":[[]]},{"id":"1cf1bc7b.a24e2c","type":"call","name":"call GENERIC-RESOURCE-API:service-topology-operation-delete","xml":"<call module='GENERIC-RESOURCE-API' rpc='service-topology-operation-delete' mode='sync' >\n","comments":"","outputs":1,"x":1073.3331565856934,"y":485.46142768859863,"z":"e8bc9b98.816858","wires":[[]]},{"id":"b6d909b3.c8e398","type":"outcome","name":"deactivate","xml":"<outcome value='deactivate'>\n","comments":"","outputs":1,"x":741.6665267944336,"y":438.4613838195801,"z":"e8bc9b98.816858","wires":[["3303275.e799858"]]}]

Expand
titleGENERCIGENERIC-RESOURCE-API:validate-service-topology-assigninput

[{"id":"78d12d0eb4fc2dd5.b112f46b6bf","type":"dgstartblock","name":"DGSTARTblock : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":174214,"y":138475.413656234741250000422341486,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["d3f20878.e78588"a6bc9deb.538c4","bdfe69fe.c6c47","e88114d7.4c9498","f20c42b1.167ee8"]]},{"id":"d3f20878a6bc9deb.e78588538c4","type":"service-logicswitchNode","name":"GENERICswitch svc-RESOURCE-API 0.0.1request-id","modulexml":"GENERIC-RESOURCE-API","version":"0.0.1<switch test='`$service-topology-operation-input.sdnc-request-header.svc-request-id`'>\n","comments":"","xmloutputs":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='0.0.1'>","outputs":1,"x":249.28570556640625,"y":178.65176773071291,"x":501.04764011928,"y":381.4374895095825,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["dd896e2b98ae5dd0.6b1c88c3c708"]]},{"id":"dd896e2b98ae5dd0.6b1c88c3c708","type":"methodoutcome","name":"method service-topology-operation-assign","NULL","xml":"<method rpc<outcome value='service-topology-operation-assign' mode='sync'>\n","comments":"","outputs":1,"x":278726.428627014160167619345528738,"y":218381.41365623474124374933242798,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["b53bfbb0bdd5f431.f9d8a8d19f48"]]},{"id":"8c7dd591bdd5f431.f5413d19f48","type":"commentreturnFailure","name":"service-topology-operation-assignreturn failure","infoxml":"","comments":"","x":568.344856262207<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"sdnc-request-header.svc-request-id is a required input\" />\n","comments":"","x":878.1905005318777,"y":86381.43749141693115,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[]},{"id":"b53bfbb0bdfe69fe.f9d8a8c6c47","type":"blockswitchNode","name":"block : atomicswitch svc-action","xml":"<block atomic=\"true\">","atomic<switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"true","outputs":1,"x":290489.857124328613361900329589844,"y":809340.175601959228500892107827326,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["eed4a4bbeaa51b42.4ff4c863f578"]]},{"b5a07cf7.622aa8id",:"7ddf70bceaa51b42.04d96863f578","19cb8a62.21245e","ff8f09db.fa31a8","d9bc037.5a8a28","808a05d8.77b83","1a5d5129.f380cf","8e1f0de6.26b1e"]]},{"id":"eed4a4bb.4ff4c8","type":"switchNodetype":"outcome","name":"switch request-actionNULL","xml":"<switch test<outcome value='`$service-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":573725.23811340332033333549499512,"y":320338.12794780731258031885964533,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["160c429.fdbff3d","b16ff0b4.57f52dd86cfd.f7c07c"]]},{"id":"160c4292dd86cfd.fdbff3df7c07c","type":"outcomereturnFailure","name":"CreateServiceInstancereturn failure","xml":"<outcome value<return status='CreateServiceInstancefailure'>\n","comments":"","outputs":1\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"sdnc-request-header.svc-action is a required input\" />\n","comments":"","x":810875.38092803955083333282470703,"y":294338.41365623474125803283963885,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["bc5512a3.62569"]]},{"id":"b16ff0b4e88114d7.57f54c9498","type":"otherswitchNode","name":"otherswitch request-action","xml":"<outcome value='Other'>\n"<switch test='`$service-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":760499.380950927734461905670166016,"y":338424.461295127868652946361814227,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["351b94433da7f637.f5869cad5072"]]},{"id":"bc5512a33da7f637.62569ad5072","type":"blockoutcome","name":"blockNULL","xml":"<block>\n","atomic":"false<outcome value=''>","comments":"","outputs":1,"x":988726.952384948730576193019322,"y":294424.413691520690929464708055775,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["70411b09.9fd59c"]]},{"id":"351b944370411b09.f5869c9fd59c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-information.request-action must be 'CreateServiceInstance'is a required input\" />\n","comments":"","x":967878.76189804077151904961722239,"y":338424.461306571960452946451732091,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[]},{"id":"a947803537b4a24b.5f0fbf5ad46","type":"get-resourceswitchNode","name":"get-resource SERVICE_MODELswitch subscription-service-type","xml":"<get-resource plugin='org.openecomp.sdnc.sli.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service<switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-uuid'\n  pfx='db.subscription-service-modeltype`'>\n\n","comments":"","outputs":1,"x":6091051.7856292724609940594264439,"y":543546.22323608398444375510896955,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["ebfe18e9464dac2c.9d4ed","a218a76b.7acc68"66c35c"]]},{"id":"558753d6464dac2c.22bd5466c35c","type":"returnFailureoutcome","name":"return failureNULL","xml":"<return status='failure'>\n\t<parameter name='ack-final' <outcome value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'No model found for service UUID ' + $service-topology-operation-input.service-information.ecomp-model-information.model-uuid`\" />\n","comments":"">","comments":"","outputs":1,"x":10241247.07129669189456548886980327,"y":568546.0802860260014375482286725,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["f0b78eed.c3e4a8"]]},{"id":"b5a07cf7f0b78eed.622aa8c3e4a8","type":"switchNodereturnFailure","name":"switch input service-instance-namereturn failure","xml":"<switch test<return status='`$service-topology-operation-input.service-request-input.service-instance-name`''failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"service-information.subscription-service-type is a required input\" />\n","comments":"","outputs":1,"x":6171399.19036102294920834394182475,"y":839546.53266525268554375377382551,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["fa26bb1c.fab59","6a2acb8b.f308d4"]]},{"id":"fa26bb1cb84f8eb8.fab59a730e8","type":"outcomeswitchNode","name":"NULLswitch global-customer-id","xml":"<outcome value<switch test='`$service-topology-operation-input.service-information.global-customer-id`'>\n","comments":"","outputs":1,"x":8381031.35692214965829406476702006,"y":764587.88980960845958661514009748,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["a1460fd334f0a34a.88252417b5c"]]},{"id":"ca1b790f34f0a34a.25d6f8417b5c","type":"switchNodeoutcome","name":"switch ecomp-namingNULL","xml":"<switch test<outcome value='`$db.service-model.ecomp-naming`'>\n","comments":"","outputs":1,"x":12171247.64298248291026548963274272,"y":657587.27089405059818661533083234,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["6683f762d7d58094.e027b","50f6496a.ffe23","40fd15fa.84da4c"6c4408"]]},{"id":"a1460fd3d7d58094.882526c4408","type":"blockreturnFailure","name":"block : atomicreturn failure","xml":"<block atomic=\"true\">","atomic":"true","outputs":1<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"service-information.global-customer-id is a required input\" />\n","comments":"","x":9841399.0714225769043083462306431,"y":764587.88992691040048661514009748,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["9c81a56.0cea0d8","23c933b.2cfc14c","ca1b790f.25d6f8"]]},{"id":"50f6496aaa67a0b.ffe23540e8e","type":"outcomeswitchNode","name":"Nswitch model-invariant-uuid","xml":"<outcome value='N'><switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-invariant-uuid`'>\n","comments":"","outputs":1,"x":14661037.9286422729492654865809849,"y":659629.17560291290282947231020246,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["89106143dc95a39f.b1a07821d758"]]},{"id":"89106143dc95a39f.b1a07821d758","type":"returnFailureoutcome","name":"return failureNULL","xml":"<return status='failure'>\n\t<parameter name='ack-final' <outcome value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"No service-instance-name was received but ecomp-naming is not Y\" />\n","comments":"","x":1621.214427947998>","comments":"","outputs":1,"x":1247.6548734392436,"y":677629.74704742431642947498049055,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["edf15c8.258802"]]},{"id":"6683f762edf15c8.e027b258802","type":"outcomereturnFailure","name":"Yreturn failure","xml":"<outcome <return status='failure'>\n\t<parameter name='ack-final' value='Y'/>","comments":"","outputs":1,"x":1466.9286079406738\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"service-information.ecomp-model-information.model-invariant-uuid is a required input\" />\n","comments":"","x":1399.0834394182475,"y":614629.88992404937742947478975568,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["a82712a1.8243d8"]]},{"id":"40fd15fa4546dafe.84da4c824704","type":"otherswitchNode","name":"otherswitch model-uuid","xml":"<outcome value='Other<switch test='`$service-topology-operation-input.service-information.ecomp-model-information.model-uuid`'>\n","comments":"","outputs":1,"x":14661007.9285697937012654964991978,"y":704670.88992214202887233367647443,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["89106143d4dc57e8.b1a0780a1be8"]]},{"id":"a82712a1d4dc57e8.8243d80a1be8","type":"blockoutcome","name":"blockNULL","xml":"<block>\n<outcome value=''>","atomiccomments":"false","comments":"","outputs":1,"x":16041247.0715522766113654964991978,"y":614670.88992404937747233195986066,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["1b274014.f978a8"]]},{"id":"6a2acb8b1b274014.f308d4f978a8","type":"otherreturnFailure","name":"otherreturn failure","xml":"<outcome <return status='failure'>\n\t<parameter name='ack-final' value='Other'Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n ","comments":"","outputs":1   <parameter name=\"error-message\" value=\"service-information.ecomp-model-information.model-uuid is a required input\" />\n","comments":"","x":8401399.92860412597660835309709819,"y":911670.1755485534668723317691258,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["3bcfb2c8.11039e"]]},{"id":"3b698a923b0664b7.087b7ee26dc4","type":"setswitchNode","name":"set tmp.service-instance-switch model-name","xml":"<set>\n<parameter name='tmp.service-instance-name' value=\"<switch test='`$service-topology-operation-input.service-information.ecomp-requestmodel-inputinformation.servicemodel-instance-name`\" /'>\n","comments":"","outputs":1,"x":18821010.64287567138675120435442241,"y":958712.60419464111331518474306379,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["2b9746c8.9323b2"]]},{"id":"19cb8a622b9746c8.21245e9323b2","type":"updateoutcome","name":"update AAI service instanceNULL","xml":"<update plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\t\tresource=\"service-instance\" \n\t\tkey=\"customer.global-customer-id = $service-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-topology-operation-input.service-information.service-instance-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"service-instance-name\" value=\"`$tmp.service-instance-name`\" />\n\t<parameter name=\"selflink\" value=\"`$service-object-path`\" />\n","comments":"","outputs":1,"x":591.4524154663086,"y":1065.9374208450317,"z":"573bd44.832f22c","wires":[["a7941b57.780c48","212a10f.c55d27"]<outcome value=''>","comments":"","outputs":1,"x":1246.2263608660014,"y":712.1518817629133,"z":"ebb27e2e.2e9568","wires":[["ab7f9811.9eb678"]]},{"id":"ab7f9811.9eb678","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"service-information.ecomp-model-information.model-name is a required input\" />\n","comments":"","x":1397.6549268450053,"y":712.1518798555646,"z":"ebb27e2e.2e9568","wires":[]},{"id":"a7941b5765141aaf.780c48742774","type":"failurecomment","name":"failureValidation of required fields","xmlinfo":"<outcome value='failure'>\n"","comments":"","outputs":1,"x":803649.2142829895026190131051198,"y":1041295.17557525634777232036590576,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["db0cc330.28062"]]},{"id":"db0cc330f20c42b1.28062167ee8","type":"returnFailureswitchNode","name":"return failureswitch svc-action","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":""<switch test='`$service-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":953484.214248657226685707310267844,"y":1041628.17565345764166994934082031,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["f4c1d91b.1279c"]]},{"id":"8e1f0de6f4c1d91b.26b1e1279c","type":"setoutcome","name":"set service-level-oper-status to Createdassign","xml":"<set>\n<parameter name='service-data.service-level-oper-status.order-status' <outcome value='Createdassign' />\n<parameter name='service-data.service-level-oper-status.last-rpc-action' value='assign' />\n<parameter name='service-data.service-level-oper-status.last-action' value='CreateServiceInstance' />\n","comments":"","x":626.7380981445312,"y":1314.6277723312378,"z":"573bd44.832f22c","wires":[>\n","comments":"","outputs":1,"x":647.3570731026784,"y":628.6994934082031,"z":"ebb27e2e.2e9568","wires":[["5e4680a3.739a8"]]},{"id":"1a5d51295e4680a3.f380cf739a8","type":"setblock","name":"set service-object-pathblock : atomic","xml":"<set>\n<parameter name='service-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $service-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n","comments":""<block atomic=\"true\">","atomic":"true","outputs":1,"x":575802.97604370117193570731026784,"y":1001628.88977146148686994934082031,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["37b4a24b.f5ad46","b84f8eb8.a730e8","aa67a0b.540e8e","4546dafe.824704","3b0664b7.e26dc4","a3644471.cb6f2"]]},{"id":"7ddf70bc19d551f4.04d968a5b54e","type":"switchNodedgstart","name":"switch order-statusDGSTART","xmloutputs":"<switch test='`$service-data.service-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":566.38090896606451,"x":157.7500098092214,"y":431145.08041954040534136562347412,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["ce4b4db7.fee0c","660a8480.99e1c4","6b5f29ae.188e98ae1dd75d.ec6f6"]]},{"id":"ce4b4db7ae1dd75d.fee0cec6f6","type":"outcomeservice-logic","name":"CreatedGENERIC-RESOURCE-API 0.0.1","xmlmodule":"<outcome value='Created'>\nGENERIC-RESOURCE-API","commentsversion":"0.0.1","outputscomments":1,"x":762.3333587646484,"y":430.74701595306396xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='0.0.1'>","outputs":1,"x":233.03571537562766,"y":185.6517677307129,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["b51ba79c97704d54.316bf309ea"]]},{"id":"b51ba79c97704d54.316bf309ea","type":"returnFailuremethod","name":"return failuremethod validate-service-input","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"The requested service already exists\" />\n","comments":""<method rpc='validate-service-input' mode='sync'>\n","comments":"","outputs":1,"x":964222.47618865966842863682338157,"y":430226.318550109863366365242004395,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["b4fc2dd5.6b6bf"]]},{"id":"ff8f09db58515ef1.fa31a8d0a0d","type":"setcomment","name":"set validate-service-topology identifiersinput","xmlinfo":"<set>\n<parameter name='service-data.service-topology.service-topology-identifier.service-instance-id'\n  value"","comments":"","x":552.0948660714284,"y":93,"z":"ebb27e2e.2e9568","wires":[]},{"id":"a3644471.cb6f2","type":"switchNode","name":"switch service-id","xml":"<switch test='`$service-topology-operation-input.service-information.service-instance-id`' />\n<parameter name='service-data.service-topology.service-topology-identifier.service-type'\n  value='`$service-topology-operation-input.service-information.subscription-service-type`' />\n<parameter name='service-data.service-topology.service-topology-identifier.service-instance-name'\n  value='`$tmp.service-instance-name`' />\n<parameter name='service-data.service-topology.service-topology-identifier.global-customer-id'\n  value='`$service-topology-operation-input.service-information.global-customer-id`' />\n","comments":""\n","comments":"","outputs":1,"x":6021003.71432495117196428473336355,"y":1134505.2707147598267928599357605,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["e428bc22.cdee3"]]},{"id":"791f39fae428bc22.05ac68cdee3","type":"foroutcome","name":"for each service-input-parametersNULL","xml":"<for index='idx' start='0' end='`$service-topology-operation-input.service-request-input.service-input-parameters.param_length`' >\n<outcome value=''>","comments":"","outputs":1,"x":10321244.5237541198730714285714284,"y":1272505.3661537170419285955429077,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[["8b8629f3981c2b36.cdd8789827b"]]},{"id":"8b8629f3981c2b36.cdd8789827b","type":"setreturnFailure","name":"set parameter name/valuereturn failure","xml":"<set>\n<parameter <return status='failure'>\n\t<parameter name='service-data.service-topology.service-parameters[$idx].service-parameter-name'\n  value='`$service-topology-operation-input.service-request-input.service-input-parameters.param[$idx].name`' />\n<parameter name='service-data.service-topology.service-parameters[$idx].service-parameter-value'\n  value='`$service-topology-operation-input.service-request-input.service-input-parameters.param[$idx].value`' />ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"service-information.service-id is a required input\" />\n","comments":"","x":13131395.95221710205084999945504323,"y":1272505.36610031127939285936355591,"z":"573bd44ebb27e2e.832f22c2e9568","wires":[]},]

Expand
titleGENERCI-RESOURCE-API:service-topology-assign

[{"id":"d9bc03778d12d0e.5a8a28b112f4","type":"switchNodedgstart","name":"switch input parameter length","xml":"<switch test='`$service-topology-operation-input.service-request-input.service-input-parameters.param_length`'>\nDGSTART","comments":"","outputs":1,"x":595.3333282470703174,"y":1244138.74687385559084136562347412,"z":"573bd44.832f22c","wires":[["6a4426e0.aa51d","35f72c92.6d34ccd3f20878.e78588"]]},{"id":"6a4426e0d3f20878.aa51de78588","type":"outcomeservice-logic","name":"NULLGENERIC-RESOURCE-API 0.0.1","xmlmodule":"<outcome value=''>GENERIC-RESOURCE-API","commentsversion":"0.0.1","outputscomments":1,"x":810.237907409668,"yxml":1220.9375076293945,"z":"573bd44.832f22c","wires":[["308e9af1.186aee"]]},{"id":"308e9af1.186aee","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":""<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='0.0.1'>","outputs":1,"x":948249.809299468994128570556640625,"y":1220178.93749046325686517677307129,"z":"573bd44.832f22c","wires":[["dd896e2b.6b1c88"]]},{"id":"35f72c92dd896e2b.6d34cc6b1c88","type":"othermethod","name":"othermethod service-topology-operation-assign","xml":"<outcome value<method rpc='service-topology-operation-assign' mode='Othersync'>\n","comments":"","outputs":1,"x":808278.809318542480542862701416016,"y":1272218.3660964965824136562347412,"z":"573bd44.832f22c","wires":[["791f39fab53bfbb0.05ac68f9d8a8"]]},{"id":"808a05d88c7dd591.77b83f5413","type":"setcomment","name":"set service-topology ecomp-modeloperation-informationassign","xmlinfo":"<set>\n<parameter name='service-data.service-topology.ecomp-model-information.'\n  value='`$service-topology-operation-input.service-information.ecomp-model-information.`' />\n","comments":"","x":652568.7143096923828344856262207,"y":1178.556288719177286,"z":"573bd44.832f22c","wires":[]},{"id":"212a10fb53bfbb0.c55d27f9d8a8","type":"failureblock","name":"not-foundblock : atomic","xml":"<outcome value='not-found'>\n<block atomic=\"true\">","commentsatomic":"true","outputs":1,"x":809290.52371215820318571243286133,"y":1089809.74699306488041756019592285,"z":"573bd44.832f22c","wires":[["92e69062eed4a4bb.b6227"]4ff4c8","b5a07cf7.622aa8","7ddf70bc.04d968","19cb8a62.21245e","ff8f09db.fa31a8","d9bc037.5a8a28","808a05d8.77b83","1a5d5129.f380cf","8e1f0de6.26b1e"]]},{"id":"92e69062eed4a4bb.b62274ff4c8","type":"returnFailureswitchNode","name":"return failureswitch request-action","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"The service instance does not exist in AAI\" />\n","comments":""<switch test='`$service-topology-operation-input.request-information.request-action`'>\n","comments":"","outputs":1,"x":952573.85700988769532381134033203,"y":1088320.0803670883179127947807312,"z":"573bd44.832f22c","wires":[["160c429.fdbff3d","b16ff0b4.57f5"]]},{"id":"9c81a56160c429.0cea0d8fdbff3d","type":"calloutcome","name":"call GENERIC-RESOURCE-API:generate-unique-nameCreateServiceInstance","xml":"<call module<outcome value='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' CreateServiceInstance'>\n","comments":"","outputs":1,"x":1323810.19047546386723809280395508,"y":814294.88981914520264136562347412,"z":"573bd44.832f22c","wires":[["26b42ec9.82f8ba","4e7d6be0.902e04bc5512a3.62569"]]},{"id":"26b42ec9b16ff0b4.82f8ba57f5","type":"failureother","name":"failureother","xml":"<outcome value='failureOther'>\n","comments":"","outputs":1,"x":1663760.19044876098633809509277344,"y":789338.889878273010346129512786865,"z":"573bd44.832f22c","wires":[["21b353c8351b9443.d1d184f5869c"]]},{"id":"4e7d6be0bc5512a3.902e0462569","type":"successblock","name":"successblock","xml":"<outcome value='success'><block>\n","atomic":"false","comments":"","outputs":1,"x":1666988.52379862467439523849487305,"y":839294.55652141571044136915206909,"z":"573bd44.832f22c","wires":[["c3c9c1c1.1901e8"]]},{"id":"23c933b351b9443.2cfc14cf5869c","type":"setreturnFailure","name":"set variables for generating unique namereturn failure","xml":"<set>\n<parameter <return status='failure'>\n\t<parameter name='generate-unique-name-input.index-table-nameack-final' value='SERVICE_INSTANCE_NAME_INDEXY'/>\n\n<parameter t<parameter name='generate-unique-name-input.index-table-prefix-column' value='service_instance_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='SERVICE_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$db.service-model.service-instance-name-prefix + '_'`\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"If svc-action is 'assign' then request-action must be 'CreateServiceInstance'\" />\n","comments":"","x":1278967.1905593872077618980407715,"y":754338.556629180908246130657196045,"z":"573bd44.832f22c","wires":[]},{"id":"c3c9c1c1a9478035.1901e85f0fb","type":"setget-resource","name":"set tmp.service-instance-name to generated nameget-resource SERVICE_MODEL","xml":"<set>\n<parameter name='tmp.service-instance-name' value='`$generate-unique-name-output.generated-name`' />\n<get-resource plugin='org.openecomp.sdnc.sli.resource.sql.SqlResource' resource='SQL'\n  key='SELECT * from SERVICE_MODEL WHERE service_uuid = $service-topology-operation-input.service-information.ecomp-model-information.model-uuid'\n  pfx='db.service-model'>\n\n","comments":"","outputs":1,"x":1950609.57135009765627856292724609,"y":838543.60410213470462232360839844,"z":"573bd44.832f22c","wires":[["ebfe18e9.9d4ed","a218a76b.7acc68"]]},{"id":"21b353c8558753d6.d1d18422bd54","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message``'No model found for service UUID ' + $service-topology-operation-input.service-information.ecomp-model-information.model-uuid`\" />\n","comments":"","x":18311024.04756164550780712966918945,"y":789568.3183898925781080286026001,"z":"573bd44.832f22c","wires":[]},{"id":"3bcfb2c8b5a07cf7.11039e622aa8","type":"blockswitchNode","name":"block : atomicswitch input service-instance-name","xml":"<block atomic=\"true\"><switch test='`$service-topology-operation-input.service-request-input.service-instance-name`'>\n","atomiccomments":"true","outputs":1,"x":988617.85713195800781903610229492,"y":909839.84223556518555326652526855,"z":"573bd44.832f22c","wires":[["78963995fa26bb1c.6cc0afab59","be4997df6a2acb8b.1f332f308d4"]]},{"id":"be4997dffa26bb1c.1f332fab59","type":"calloutcome","name":"call GENERIC-RESOURCE-API:generate-unique-nameNULL","xml":"<call module<outcome value='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1319838.8571777343753569221496582,"y":957764.50891113281258898096084595,"z":"573bd44.832f22c","wires":[["9f464d6ba1460fd3.aff938","ae91a50b.b8231"88252"]]},{"id":"9f464d6bca1b790f.aff93825d6f8","type":"failureswitchNode","name":"failureswitch ecomp-naming","xml":"<outcome value<switch test='failure`$db.service-model.ecomp-naming`'>\n","comments":"","outputs":1,"x":16581217.8571052551276429824829102,"y":907657.84229469299322708940505981,"z":"573bd44.832f22c","wires":[["52e3a7ce.0d766"6683f762.e027b","50f6496a.ffe23","40fd15fa.84da4c"]]},{"id":"ae91a50ba1460fd3.b823188252","type":"successblock","name":"successblock : atomic","xml":"<outcome value='success'>\n<block atomic=\"true\">","commentsatomic":"true","outputs":1,"x":1662984.1904551188150714225769043,"y":959764.50893783569348899269104004,"z":"573bd44.832f22c","wires":[["3b698a929c81a56.087b7e"0cea0d8","23c933b.2cfc14c","ca1b790f.25d6f8"]]},{"id":"7896399550f6496a.6cc0affe23","type":"setoutcome","name":"set variables for generating unique nameN","xml":"<set>\n<parameter name='generate-unique-name-input.name-table-type' value='SERVICE_INSTANCE' />\n<parameter name='generate-unique-name-input.supplied-name' value='`$service-topology-operation-input.service-request-input.service-instance-name`' />\n<outcome value='N'>","comments":"","outputs":1,"x":12771466.19052124023449286422729492,"y":886659.17559242248541756029129028,"z":"573bd44.832f22c","wires":[["89106143.b1a078"]]},{"id":"52e3a7ce89106143.0d766b1a078","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`$generateNo service-uniqueinstance-name -output.error-message`was received but ecomp-naming is not Y\" />\n","comments":"","x":18261621.7142181396484214427947998,"y":907677.2708063125617470474243164,"z":"573bd44.832f22c","wires":[]},{"id":"ebfe18e96683f762.9d4ede027b","type":"failureoutcome","name":"failureY","xml":"<outcome value='failureY'>\n","comments":"","outputs":1,"x":8501466.57133102416999286079406738,"y":524614.60410118103038899240493774,"z":"573bd44.832f22c","wires":[["4098d552a82712a1.aeef4c8243d8"]]},{"id":"a218a76b40fd15fa.7acc6884da4c","type":"not-foundother","name":"not-foundother","xml":"<outcome value='not-foundOther'>\n","comments":"","outputs":1,"x":8591466.14276123046889285697937012,"y":567704.8898143768318899221420288,"z":"573bd44.832f22c","wires":[["558753d689106143.22bd54b1a078"]]},{"id":"4098d552a82712a1.aeef4c8243d8","type":"returnFailureblock","name":"return failureblock","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error reading SERVICE_MODEL table\" />\n","comments":""<block>\n","atomic":"false","comments":"","outputs":1,"x":10231604.42849731445310715522766113,"y":523614.17554473876958899240493774,"z":"573bd44.832f22c","wires":[[]]},{"id":"660a84806a2acb8b.99e1c4f308d4","type":"outcomeother","name":"NULLother","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":760840.33328247070319286041259766,"y":386911.080337524414061755485534668,"z":"573bd44.832f22c","wires":[["334d5f6e3bcfb2c8.9e0ac11039e"]]},{"id":"6b5f29ae3b698a92.188e98087b7e","type":"otherset","name":"PendingDeleteset tmp.service-instance-name","xml":"<outcome value<set>\n<parameter name='PendingDelete'>\n","comments":"","outputs":1tmp.service-instance-name' value=\"`$service-topology-operation-input.service-request-input.service-instance-name`\" />\n","comments":"","x":7831882.00001144409186428756713867,"y":474958.74699592590336041946411133,"z":"573bd44.832f22c","wires":[["c4f908c4.ddc838"]]},{"id":"c4f908c419cb8a62.ddc83821245e","type":"returnFailureupdate","name":"return failureupdate AAI service instance","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"The requested service is pending deletion\" />\n","comments":"","x":965.333309173584,"y":474.7470064163208<update plugin=\"org.openecomp.sdnc.sli.aai.AAIService\" \n\t\tresource=\"service-instance\" \n\t\tkey=\"customer.global-customer-id = $service-topology-operation-input.service-information.global-customer-id AND\n\t\t\tservice-subscription.service-type = $service-topology-operation-input.service-information.subscription-service-type AND\n\t\t\tservice-instance.service-instance-id = $service-topology-operation-input.service-information.service-instance-id\"\n        pfx='pfx' local-only='false' force='false'>\n\t<parameter name=\"service-instance-name\" value=\"`$tmp.service-instance-name`\" />\n\t<parameter name=\"selflink\" value=\"`$service-object-path`\" />\n","comments":"","outputs":1,"x":591.4524154663086,"y":1065.9374208450317,"z":"573bd44.832f22c","wires":[["a7941b57.780c48","212a10f.c55d27"]]},{"id":"334d5f6ea7941b57.9e0ac780c48","type":"blockfailure","name":"blockfailure","xml":"<block><outcome value='failure'>\n","atomic":"false","comments":"","outputs":1,"x":946803.9999923706055214282989502,"y":3851041.08035659790041755752563477,"z":"573bd44.832f22c","wires":[["db0cc330.28062"]]},{"id":"7d9ead4adb0cc330.c2484c28062","type":"commentreturnFailure","name":"SERVICE_MODEL not in sdnc yetreturn failure","info":""xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"AAI failed\" />\n","comments":"","x":608953.2142486572266,"y":6081041.1756534576416,"z":"573bd44.832f22c","wires":[]}]

...

,{"id":"8e1f0de6.26b1e","type":"set","name":"set service-level-oper-status to Created","xml":"<set>\n<parameter name='service-data.service-level-oper-status.order-status' value='Created' />\n<parameter name='service-data.service-level-oper-status.last-rpc-action' value='assign' />\n<parameter name='service-data.service-level-oper-status.last-action' value='CreateServiceInstance' />\n","comments":"","x":626.7380981445312,"y":1314.6277723312378,"z":"573bd44.832f22c","wires":[]},{"id":"1a5d5129.f380cf","type":"set","name":"set service-object-path","xml":"<set>\n<parameter name='service-object-path'\n value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $service-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'`\"/>\n","comments":"","x":575.9760437011719,"y":1001.8897714614868,"z":"573bd44.832f22c","wires":[]},{"id":"7ddf70bc.04d968","type":"switchNode","name":"switch order-status","xml":"<switch test='`$service-data.service-level-oper-status.order-status`'>\n","comments":"","outputs":1,"x":566.3809089660645,"y":431.0804195404053,"z":"573bd44.832f22c","wires":[["ce4b4db7.fee0c","660a8480.99e1c4","6b5f29ae.188e98"]]},{"id":"ce4b4db7.fee0c","type":"outcome","name":"Created","xml":"<outcome value='Created'>\n","comments":"","outputs":1,"x":762.3333587646484,"y":430.74701595306396,"z":"573bd44.832f22c","wires":[["b51ba79c.316bf"]]},{"id":"b51ba79c.316bf","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"The requested service already exists\" />\n","comments":"","x":964.476188659668,"y":430.3185501098633,"z":"573bd44.832f22c","wires":[]},{"id":"ff8f09db.fa31a8","type":"set","name":"set service-topology identifiers","xml":"<set>\n<parameter name='service-data.service-topology.service-topology-identifier.service-instance-id'\n  value='`$service-topology-operation-input.service-information.service-instance-id`' />\n<parameter name='service-data.service-topology.service-topology-identifier.service-type'\n  value='`$service-topology-operation-input.service-information.subscription-service-type`' />\n<parameter name='service-data.service-topology.service-topology-identifier.service-instance-name'\n  value='`$tmp.service-instance-name`' />\n<parameter name='service-data.service-topology.service-topology-identifier.global-customer-id'\n  value='`$service-topology-operation-input.service-information.global-customer-id`' />\n","comments":"","x":602.7143249511719,"y":1134.2707147598267,"z":"573bd44.832f22c","wires":[]},{"id":"791f39fa.05ac68","type":"for","name":"for each service-input-parameters","xml":"<for index='idx' start='0' end='`$service-topology-operation-input.service-request-input.service-input-parameters.param_length`' >\n","comments":"","outputs":1,"x":1032.523754119873,"y":1272.366153717041,"z":"573bd44.832f22c","wires":[["8b8629f3.cdd878"]]},{"id":"8b8629f3.cdd878","type":"set","name":"set parameter name/value","xml":"<set>\n<parameter name='service-data.service-topology.service-parameters[$idx].service-parameter-name'\n  value='`$service-topology-operation-input.service-request-input.service-input-parameters.param[$idx].name`' />\n<parameter name='service-data.service-topology.service-parameters[$idx].service-parameter-value'\n  value='`$service-topology-operation-input.service-request-input.service-input-parameters.param[$idx].value`' />\n","comments":"","x":1313.9522171020508,"y":1272.3661003112793,"z":"573bd44.832f22c","wires":[]},{"id":"d9bc037.5a8a28","type":"switchNode","name":"switch input parameter length","xml":"<switch test='`$service-topology-operation-input.service-request-input.service-input-parameters.param_length`'>\n","comments":"","outputs":1,"x":595.3333282470703,"y":1244.7468738555908,"z":"573bd44.832f22c","wires":[["6a4426e0.aa51d","35f72c92.6d34cc"]]},{"id":"6a4426e0.aa51d","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":810.237907409668,"y":1220.9375076293945,"z":"573bd44.832f22c","wires":[["308e9af1.186aee"]]},{"id":"308e9af1.186aee","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":948.8092994689941,"y":1220.9374904632568,"z":"573bd44.832f22c","wires":[[]]},{"id":"35f72c92.6d34cc","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":808.8093185424805,"y":1272.366096496582,"z":"573bd44.832f22c","wires":[["791f39fa.05ac68"]]},{"id":"808a05d8.77b83","type":"set","name":"set service-topology ecomp-model-information","xml":"<set>\n<parameter name='service-data.service-topology.ecomp-model-information.'\n  value='`$service-topology-operation-input.service-information.ecomp-model-information.`' />\n","comments":"","x":652.7143096923828,"y":1178.5562887191772,"z":"573bd44.832f22c","wires":[]},{"id":"212a10f.c55d27","type":"failure","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":809.5237121582031,"y":1089.7469930648804,"z":"573bd44.832f22c","wires":[["92e69062.b6227"]]},{"id":"92e69062.b6227","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"The service instance does not exist in AAI\" />\n","comments":"","x":952.8570098876953,"y":1088.0803670883179,"z":"573bd44.832f22c","wires":[]},{"id":"9c81a56.0cea0d8","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1323.1904754638672,"y":814.8898191452026,"z":"573bd44.832f22c","wires":[["26b42ec9.82f8ba","4e7d6be0.902e04"]]},{"id":"26b42ec9.82f8ba","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1663.1904487609863,"y":789.8898782730103,"z":"573bd44.832f22c","wires":[["21b353c8.d1d184"]]},{"id":"4e7d6be0.902e04","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1666.5237986246743,"y":839.5565214157104,"z":"573bd44.832f22c","wires":[["c3c9c1c1.1901e8"]]},{"id":"23c933b.2cfc14c","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.index-table-name' value='SERVICE_INSTANCE_NAME_INDEX' />\n<parameter name='generate-unique-name-input.index-table-prefix-column' value='service_instance_name_prefix' />\n<parameter name='generate-unique-name-input.name-table-type' value='SERVICE_INSTANCE' />\n<parameter name='generate-unique-name-input.prefix' value=\"`$db.service-model.service-instance-name-prefix + '_'`\" />\n","comments":"","x":1278.190559387207,"y":754.5566291809082,"z":"573bd44.832f22c","wires":[]},{"id":"c3c9c1c1.1901e8","type":"set","name":"set tmp.service-instance-name to generated name","xml":"<set>\n<parameter name='tmp.service-instance-name' value='`$generate-unique-name-output.generated-name`' />\n","comments":"","x":1950.5713500976562,"y":838.6041021347046,"z":"573bd44.832f22c","wires":[]},{"id":"21b353c8.d1d184","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1831.0475616455078,"y":789.3183898925781,"z":"573bd44.832f22c","wires":[]},{"id":"3bcfb2c8.11039e","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":988.8571319580078,"y":909.8422355651855,"z":"573bd44.832f22c","wires":[["78963995.6cc0a","be4997df.1f332"]]},{"id":"be4997df.1f332","type":"call","name":"call GENERIC-RESOURCE-API:generate-unique-name","xml":"<call module='GENERIC-RESOURCE-API' rpc='generate-unique-name' mode='sync' >\n","comments":"","outputs":1,"x":1319.857177734375,"y":957.5089111328125,"z":"573bd44.832f22c","wires":[["9f464d6b.aff938","ae91a50b.b8231"]]},{"id":"9f464d6b.aff938","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1658.857105255127,"y":907.8422946929932,"z":"573bd44.832f22c","wires":[["52e3a7ce.0d766"]]},{"id":"ae91a50b.b8231","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1662.190455118815,"y":959.5089378356934,"z":"573bd44.832f22c","wires":[["3b698a92.087b7e"]]},{"id":"78963995.6cc0a","type":"set","name":"set variables for generating unique name","xml":"<set>\n<parameter name='generate-unique-name-input.name-table-type' value='SERVICE_INSTANCE' />\n<parameter name='generate-unique-name-input.supplied-name' value='`$service-topology-operation-input.service-request-input.service-instance-name`' />\n","comments":"","x":1277.1905212402344,"y":886.1755924224854,"z":"573bd44.832f22c","wires":[]},{"id":"52e3a7ce.0d766","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`$generate-unique-name-output.error-message`\" />\n","comments":"","x":1826.7142181396484,"y":907.270806312561,"z":"573bd44.832f22c","wires":[]},{"id":"ebfe18e9.9d4ed","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":850.5713310241699,"y":524.6041011810303,"z":"573bd44.832f22c","wires":[["4098d552.aeef4c"]]},{"id":"a218a76b.7acc68","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":859.1427612304688,"y":567.889814376831,"z":"573bd44.832f22c","wires":[["558753d6.22bd54"]]},{"id":"4098d552.aeef4c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Error reading SERVICE_MODEL table\" />\n","comments":"","x":1023.4284973144531,"y":523.1755447387695,"z":"573bd44.832f22c","wires":[]},{"id":"660a8480.99e1c4","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":760.3332824707031,"y":386.08033752441406,"z":"573bd44.832f22c","wires":[["334d5f6e.9e0ac"]]},{"id":"6b5f29ae.188e98","type":"other","name":"PendingDelete","xml":"<outcome value='PendingDelete'>\n","comments":"","outputs":1,"x":783.0000114440918,"y":474.7469959259033,"z":"573bd44.832f22c","wires":[["c4f908c4.ddc838"]]},{"id":"c4f908c4.ddc838","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"The requested service is pending deletion\" />\n","comments":"","x":965.333309173584,"y":474.7470064163208,"z":"573bd44.832f22c","wires":[]},{"id":"334d5f6e.9e0ac","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":946.9999923706055,"y":385.0803565979004,"z":"573bd44.832f22c","wires":[[]]},{"id":"7d9ead4a.c2484c","type":"comment","name":"SERVICE_MODEL not in sdnc yet","info":"","comments":"","x":608,"y":608,"z":"573bd44.832f22c","wires":[]}]


VNF-Toplogy-Operation


VNF-Toplogy-Operation (Main)

The vnf-topology-operation has several sub DGs. These DGs also have sub DGs that are called for re-useable functions like generate-unique-name that is used for assigning resource names according to engineering rules like encoded hostnames.

  • validate-vnf-input
  • vnf-topology-operation-assign
  • vnf-topology-operation-activate
  • vnf-topology-operation-deactivate
  • vnf-topology-operation-delete


Image Added


Expand
titlevnf-topology-operation

[{"id":"ee84697b.f9bfb","type":"dgstart","name":"DGSTART","outputs":1,"x":151,"y":112.41365623474121,"z":"1840bd3e.8d49eb","wires":[["35e2ecc9.c20204"]]},{"id":"35e2ecc9.c20204","type":"service-logic","name":"GENERIC-RESOURCE-API 0.0.1","module":"GENERIC-RESOURCE-API","version":"0.0.1","comments":"","xml":"<service-logic xmlns='http://www.openecomp.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='0.0.1'>","outputs":1,"x":226.28570556640625,"y":152.6517677307129,"z":"1840bd3e.8d49eb","wires":[["7124ccc.b38d4b4"]]},{"id":"7124ccc.b38d4b4","type":"method","name":"method vnf-topology-operation","xml":"<method rpc='vnf-topology-operation' mode='sync'>\n","comments":"","outputs":1,"x":219.42862701416016,"y":192.4136505126953,"z":"1840bd3e.8d49eb","wires":[["595554df.09155c"]]},{"id":"7c27b88d.9472e8","type":"comment","name":"vnf-topology-operation","info":"","comments":"","x":545.344856262207,"y":60,"z":"1840bd3e.8d49eb","wires":[]},{"id":"595554df.09155c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":232.16670989990234,"y":360.1071662902832,"z":"1840bd3e.8d49eb","wires":[["25d010fc.7e2f1","5d15a133.379f58","64bf86f7.3089a8"]]},{"id":"25d010fc.7e2f1","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n","comments":"","x":524.6666641235352,"y":510.2711992263794,"z":"1840bd3e.8d49eb","wires":[]},{"id":"5d15a133.379f58","type":"switchNode","name":"switch svc-action","xml":"<switch test='`$vnf-topology-operation-input.sdnc-request-header.svc-action`'>\n","comments":"","outputs":1,"x":527.5713806152344,"y":358.31840991973877,"z":"1840bd3e.8d49eb","wires":[["b58e135c.b8f748","d1a2bd1b.0d78","d69f110.8e798f","af0a9f81.f3f74","29c69e98.d7512a"]]},{"id":"b58e135c.b8f748","type":"outcome","name":"assign","xml":"<outcome value='assign'>\n","comments":"","outputs":1,"x":726.3808898925781,"y":290.93755531311035,"z":"1840bd3e.8d49eb","wires":[["ba53cb8c.fe79e8"]]},{"id":"d1a2bd1b.0d78","type":"outcome","name":"unassign","xml":"<outcome value='unassign'>\n","comments":"","outputs":1,"x":730.4285125732422,"y":421.1282787322998,"z":"1840bd3e.8d49eb","wires":[["5a3b1db4.d397ec"]]},{"id":"af0a9f81.f3f74","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":725.1427383422852,"y":465.3183546066284,"z":"1840bd3e.8d49eb","wires":[["53442356.45c18c"]]},{"id":"53442356.45c18c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`$vnf-topology-operation-input.sdnc-request-header.svc-action + ' is not a valid svc-action'`\" />\n","comments":"","x":911.3331832885742,"y":465.31841945648193,"z":"1840bd3e.8d49eb","wires":[]},{"id":"64bf86f7.3089a8","type":"call","name":"call GENERIC-RESOURCE-API:validate-vnf-input","xml":"<call module='GENERIC-RESOURCE-API' rpc='validate-vnf-input' mode='sync' >\n","comments":"","outputs":1,"x":633.416633605957,"y":249.7946949005127,"z":"1840bd3e.8d49eb","wires":[[]]},{"id":"ba53cb8c.fe79e8","type":"call","name":"call GENERIC-RESOURCE-API:vnf-topology-operation-assign","xml":"<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-assign' mode='sync' >\n","comments":"","outputs":1,"x":1068.5237426757812,"y":290.5090160369873,"z":"1840bd3e.8d49eb","wires":[[]]},{"id":"ce2e9f02.787cc","type":"call","name":"call GENERIC-RESOURCE-API:vnf-topology-operation-deactivate","xml":"<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-deactivate' mode='sync' >\n","comments":"","outputs":1,"x":1079.8570098876953,"y":374.84236431121826,"z":"1840bd3e.8d49eb","wires":[[]]},{"id":"5a3b1db4.d397ec","type":"call","name":"call GENERIC-RESOURCE-API:vnf-topology-operation-unassign","xml":"<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-unassign' mode='sync' >\n","comments":"","outputs":1,"x":1075.523609161377,"y":420.84241008758545,"z":"1840bd3e.8d49eb","wires":[[]]},{"id":"d69f110.8e798f","type":"outcome","name":"deactivate","xml":"<outcome value='deactivate'>\n","comments":"","outputs":1,"x":735.5236511230469,"y":375.5090398788452,"z":"1840bd3e.8d49eb","wires":[["ce2e9f02.787cc"]]},{"id":"bbbde572.cfa078","type":"call","name":"call GENERIC-RESOURCE-API:vnf-topology-operation-activate","xml":"<call module='GENERIC-RESOURCE-API' rpc='vnf-topology-operation-activate' mode='sync' >\n","comments":"","outputs":1,"x":1072.6665878295898,"y":332.41364765167236,"z":"1840bd3e.8d49eb","wires":[[]]},{"id":"29c69e98.d7512a","type":"outcome","name":"activate","xml":"<outcome value='activate'>\n","comments":"","outputs":1,"x":729.3332290649414,"y":333.0803232192993,"z":"1840bd3e.8d49eb","wires":[["bbbde572.cfa078"]]}]



Testing the Directed Graphs

Testing Service-Topology-Operation with SLI-API

Use the SLI-API if your SDNC instance doesn't have the GENERIC-RESOURCE-API karaf feature bundle loaded (it will be on apidoc/explorer if it is loaded). Pre-Amsterdam release versions of ONAP SDNC don't have the GENERIC-RESOURCE-API.

Copy the following json body and use in the apidoc/explorer interface on the SDNC 

http://10.0.7.1:8282/apidoc/explorer/index.html#!/SLI-API(2016-11-10)/


Paste the string into the input box for the SLI-API:execute-graph


Image Added


Expand
titleservice-topology-operation:sli-api-input

{
"input": {
"mode": "sync",
"module-name": "GENERIC-RESOURCE-API",
"rpc-name": "service-topology-operation",
"sli-parameter": [
{
"parameter-name": "service-data.request-information.order-version",
"string-value": "1.0"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param[1].key.name",
"string-value": "Some name1"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-instance-name",
"string-value": "0003"
},
{
"parameter-name": "service-topology-operation-input.request-information.order-number",
"string-value": "0001"
},
{
"parameter-name": "service-data.service-information.global-customer-id",
"string-value": "0001"
},
{
"parameter-name": "service-data.sdnc-request-header.svc-request-id",
"string-value": "10001"
},
{
"parameter-name": "service-topology-operation-input.request-information.request-id",
"string-value": "10001"
},
{
"parameter-name": "service-data.service-information.ecomp-model-information.model-uuid",
"string-value": "0000-0000-0000000"
},
{
"parameter-name":1.0"
},
{
"parameter-name": "service-data.request-information.order-number",
"string-value": "10001"
},
{
"parameter-name": "service-topology-operation-input.request-information.request-action",
"string-value": "CreateServiceInstance"
},
{
"parameter-name": "service-topology-operation-input.sdnc-request-header.svc-notification-url",
"string-value": "Some svc-notification-url"
},
{
"parameter-name": "service-data.service-request-input.service-input-parameters.param_length",
"string-value": "1"
},
{
"parameter-name": "service-topology-operation-input.request-information.order-version",
"string-value": "1.0"
},
{
"parameter-name": "service-topology-operation-input.service-information.ecomp-model-information.model-invariant-uuid",
"string-value": "S000-000-00000"
},
{
"parameter-name": "service-topology-operation-input.service-information.ecomp-model-information.model-customization-uuid",
"string-value": "S000-000-00000"
},
{
"parameter-name": "service-topology-operation-input.service-information.ecomp-model-information.model-name",
"string-value": "Some model-name"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param_length",
"string-value": "2"
},
{
"parameter-name": "service-topology-operation-input.service-information.global-customer-id",
"string-value": "10001"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param[0].key.name",
"string-value": "Some name"
},
{
"parameter-name": "service-topology-operation-input.sdnc-request-header.svc-action",
"string-value": "assign"
},
{
"parameter-name": "service-topology-operation-input.request-information.source",
"string-value": "so"
},
{
"parameter-name": "service-data.service-request-input.service-instance-name",
"string-value": "Some service-instance-name"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param[0].value",
"string-value": "Some value"
},
{
"parameter-name": "service-data.sdnc-request-header.svc-action",
"string-value": "Reserve"
},
{
"parameter-name": "service-data.request-information.notification-url",
"string-value": "Some notification-url"
},
{
"parameter-name": "service-topology-operation-input.service-information.subscription-service-type",
"string-value": "Some subscription-service-type"
},
{
"parameter-name": "service-topology-operation-input.service-information.ecomp-model-information.model-version",
"string-value": "Some model-version"
},
{
"parameter-name": "service-topology-operation-input.service-information.ecomp-model-information.model-uuid",
"string-value": "Some model-uuid"
},
{
"parameter-name": "service-data.service-request-input.service-input-parameters.param[0].value",
"string-value": "Some value"
},
{
"parameter-name": "service-data.service-information.service-instance-id",
"string-value": "10001"
},
{
"parameter-name": "service-data.request-information.source",
"string-value": "so"
},
{
"parameter-name": "service-topology-operation-input.service-information.subscriber-name",
"string-value": "Some subscriber-name1"
},
{
"parameter-name": "service-data.service-information.ecomp-model-information.model-name",
"string-value": "Some model-name"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param[1].key"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param[0].name",
"string-value": "Some name"
},
{
"parameter-name": "service-data.service-request-input.service-input-parameters.param[0].key"
},
{
"parameter-name": "service-data.service-request-input.service-input-parameters.param[0].name",
"string-value": "Some name"
},
{
"parameter-name": "service-data.request-information.request-action",
"string-value": "CreateNetworkInstance"
},
{
"parameter-name": "service-data.sdnc-request-header.svc-notification-url",
"string-value": "Some svc-notification-url"
},
{
"parameter-name": "service-topology-operation-input.sdnc-request-header.svc-request-id",
"string-value": "Some svc-request-id"
},
{
"parameter-name": "service-data.service-information.service-id",
"string-value": "Some service-id"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param[1].name",
"string-value": "Some name1"
},
{
"parameter-name": "service-data.service-information.subscription-service-type",
"string-value": "Some subscription-service-type"
},
{
"parameter-name": "service-data.request-information.request-id",
"string-value": "Some request-id"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param[0].key"
},
{
"parameter-name": "service-topology-operation-input.service-information.service-id",
"string-value": "Some service-id"
},
{
"parameter-name": "service-data.service-information.subscriber-name",
"string-value": "Some subscriber-name"
},
{
"parameter-name": "service-topology-operation-input.service-request-input.service-input-parameters.param[1].value",
"string-value": "Some value1"
},
{
"parameter-name": "service-topology-operation-input.request-information.notification-url",
"string-value": "Some notification-url"
},
{
"parameter-name": "currentGraph"
},
{
"parameter-name": "service-data.service-request-input.service-input-parameters.param[0].key.name",
"string-value": "Some name"
},
{
"parameter-name": "service-data.service-information.ecomp-model-information.model-invariant-uuid",
"string-value": "Some model-invariant-uuid"
},
{
"parameter-name": "service-topology-operation-input.service-information.service-instance-id",
"string-value": "Some service-instance-id"
},
{
"parameter-name": "service-data.service-information.ecomp-model-information.model-customization-uuid",
"string-value": "Some model-customization-uuid"
}
]
}
}


Testing with the GENERIC-RESOURCE-API


Copy the following json body and use in the apidoc/explorer interface on the SDNC 

http://10.0.7.1:8282/apidoc/explorer/index.html#!/GENERIC-RESOURCE-API/


Paste the string into the input box for the GENERIC-RESOURCE-API:service-topology-operation


Expand
titleinput for generic-resource-api:service-topology-operation

PASTE IN service-topology-operation assign