seshukm | d2cfa86 | 2019-08-08 13:03:06 +0530 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 |
| 2 | .. International License. http://creativecommons.org/licenses/by/4.0 |
| 3 | .. Copyright 2019 ONAP Contributors. All rights reserved. |
| 4 | |
| 5 | .. _doc_guide_user_ser_inst_so2: |
| 6 | |
| 7 | |
| 8 | Macro mode Service Instantiation via ONAP SO API |
| 9 | ================================================ |
| 10 | |
| 11 | Using Macro mode, you have to build and send only one request to ONAP SO |
| 12 | |
| 13 | In that request you need to indicate all object instances |
| 14 | that you want to be instantiated. |
| 15 | |
| 16 | Reminder : ONAP SO in Macro mode will perform the VNF parameters/values |
| 17 | assignment based on CDS Blueprint templates |
| 18 | that are supposed to be defined during Design and Onboard steps. |
| 19 | That means ONAP has all information |
| 20 | to be able to get all necessary values by itself (there is no longer need |
| 21 | for an Operator to provide "SDNC preload"). |
| 22 | |
| 23 | Additional info in: |
| 24 | |
| 25 | .. toctree:: |
| 26 | :maxdepth: 1 |
| 27 | :titlesonly: |
| 28 | |
| 29 | CDS Documentation <../../../../../submodules/ccsdk/cds.git/docs/index.rst> |
| 30 | CDS vDNS E2E Automation <https://wiki.onap.org/display/DW/vDNS+CDS+Dublin> |
| 31 | |
| 32 | |
| 33 | Request Example : |
| 34 | |
| 35 | :: |
| 36 | |
| 37 | curl -X POST \ |
| 38 | 'http://{{k8s}}:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances' \ |
| 39 | -H 'Content-Type: application/json' \ |
| 40 | -H 'cache-control: no-cache' \ |
| 41 | -d '{ |
| 42 | "requestDetails": { |
| 43 | "subscriberInfo": { |
| 44 | "globalSubscriberId": "Demonstration" |
| 45 | }, |
| 46 | "requestInfo": { |
| 47 | "suppressRollback": false, |
| 48 | "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", |
| 49 | "requestorId": "adt", |
| 50 | "instanceName": "{{cds-instance-name}}", |
| 51 | "source": "VID" |
| 52 | }, |
| 53 | "cloudConfiguration": { |
| 54 | "lcpCloudRegionId": "fr1", |
| 55 | "tenantId": "6270eaa820934710960682c506115453" |
| 56 | }, |
| 57 | "requestParameters": { |
| 58 | "subscriptionServiceType": "vFW", |
| 59 | "userParams": [ |
| 60 | { |
| 61 | "Homing_Solution": "none" |
| 62 | }, |
| 63 | { |
| 64 | "service": { |
| 65 | "instanceParams": [ |
| 66 | |
| 67 | ], |
| 68 | "instanceName": "{{cds-instance-name}}", |
| 69 | "resources": { |
| 70 | "vnfs": [ |
| 71 | { |
| 72 | "modelInfo": { |
| 73 | "modelName": "{{vnf-modelinfo-modelname}}", |
| 74 | "modelVersionId": "{{vnf-modelinfo-modeluuid}}", |
| 75 | "modelInvariantUuid": "{{vnf-modelinfo-modelinvariantuuid}}", |
| 76 | "modelVersion": "1.0", |
| 77 | "modelCustomizationId": "{{vnf-modelinfo-modelcustomizationuuid}}", |
| 78 | "modelInstanceName": "{{vnf-modelinfo-modelinstancename}}" |
| 79 | }, |
| 80 | "cloudConfiguration": { |
| 81 | "lcpCloudRegionId": "fr1", |
| 82 | "tenantId": "6270eaa820934710960682c506115453" |
| 83 | }, |
| 84 | "platform": { |
| 85 | "platformName": "test" |
| 86 | }, |
| 87 | "lineOfBusiness": { |
| 88 | "lineOfBusinessName": "someValue" |
| 89 | }, |
| 90 | "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", |
| 91 | "instanceName": "{{vnf-modelinfo-modelinstancename}}", |
| 92 | "instanceParams": [ |
| 93 | { |
| 94 | "onap_private_net_id": "olc-private", |
| 95 | "onap_private_subnet_id": "olc-private", |
| 96 | "pub_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwj7uJMyKiP1ogEsZv5kKDFw9mFNhxI+woR3Tuv8vjfNnqdB1GfSnvTFyNbdpyNdR8BlljkiZ1SlwJLEkvPk0HpOoSVVek/QmBeGC7mxyRcpMB2cNQwjXGfsVrforddXOnOkj+zx1aNdVGMc52Js3pex8B/L00H68kOcwP26BI1o77Uh+AxjOkIEGs+wlWNUmXabLDCH8l8IJk9mCTruKEN9KNj4NRZcaNC+XOz42SyHV9RT3N6efp31FqKzo8Ko63QirvKEEBSOAf9VlJ7mFMrGIGH37AP3JJfFYEHDdOA3N64ZpJLa39y25EWwGZNlWpO/GW5bNjTME04dl4eRyd", |
| 97 | "image_name": "Ubuntu 14.04", |
| 98 | "flavor_name":"s1.cw.small-1" |
| 99 | } |
| 100 | ], |
| 101 | "vfModules": [ |
| 102 | { |
| 103 | "modelInfo": { |
| 104 | "modelName": "{{vnf-vfmodule-0-modelinfo-modelname}}", |
| 105 | "modelVersionId": "{{vnf-vfmodule-0-modelinfo-modeluuid}}", |
| 106 | "modelInvariantUuid": "{{vnf-vfmodule-0-modelinfo-modelinvariantuuid}}", |
| 107 | "modelVersion": "1", |
| 108 | "modelCustomizationId": "{{vnf-vfmodule-0-modelinfo-modelcustomizationuuid}}" |
| 109 | }, |
| 110 | "instanceName": "{{vnf-vfmodule-0-modelinfo-modelname}}", |
| 111 | "instanceParams": [ |
| 112 | { |
| 113 | "sec_group": "olc-open", |
| 114 | "public_net_id": "olc-net" |
| 115 | } |
| 116 | ] |
| 117 | }, |
| 118 | { |
| 119 | "modelInfo": { |
| 120 | "modelName": "{{vnf-vfmodule-1-modelinfo-modelname}}", |
| 121 | "modelVersionId": "{{vnf-vfmodule-1-modelinfo-modeluuid}}", |
| 122 | "modelInvariantUuid": "{{vnf-vfmodule-1-modelinfo-modelinvariantuuid}}", |
| 123 | "modelVersion": "1", |
| 124 | "modelCustomizationId": "{{vnf-vfmodule-1-modelinfo-modelcustomizationuuid}}" |
| 125 | }, |
| 126 | "instanceName": "{{vnf-vfmodule-1-modelinfo-modelname}}", |
| 127 | "instanceParams": [ |
| 128 | { |
| 129 | "sec_group": "olc-open", |
| 130 | "public_net_id": "olc-net" |
| 131 | } |
| 132 | ] |
| 133 | }, |
| 134 | { |
| 135 | "modelInfo": { |
| 136 | "modelName": "{{vnf-vfmodule-2-modelinfo-modelname}}", |
| 137 | "modelVersionId": "{{vnf-vfmodule-2-modelinfo-modeluuid}}", |
| 138 | "modelInvariantUuid": "{{vnf-vfmodule-2-modelinfo-modelinvariantuuid}}", |
| 139 | "modelVersion": "1", |
| 140 | "modelCustomizationId": "{{vnf-vfmodule-2-modelinfo-modelcustomizationuuid}}" |
| 141 | }, |
| 142 | "instanceName": "{{vnf-vfmodule-2-modelinfo-modelname}}", |
| 143 | "instanceParams": [ |
| 144 | { |
| 145 | "sec_group": "olc-open", |
| 146 | "public_net_id": "olc-net" |
| 147 | } |
| 148 | ] |
| 149 | }, |
| 150 | { |
| 151 | "modelInfo": { |
| 152 | "modelName": "{{vnf-vfmodule-3-modelinfo-modelname}}", |
| 153 | "modelVersionId": "{{vnf-vfmodule-3-modelinfo-modeluuid}}", |
| 154 | "modelInvariantUuid": "{{vnf-vfmodule-3-modelinfo-modelinvariantuuid}}", |
| 155 | "modelVersion": "1", |
| 156 | "modelCustomizationId": "{{vnf-vfmodule-3-modelinfo-modelcustomizationuuid}}" |
| 157 | }, |
| 158 | "instanceName": "{{vnf-vfmodule-3-modelinfo-modelname}}", |
| 159 | "instanceParams": [ |
| 160 | { |
| 161 | "sec_group": "olc-open", |
| 162 | "public_net_id": "olc-net" |
| 163 | } |
| 164 | ] |
| 165 | } |
| 166 | ] |
| 167 | } |
| 168 | ] |
| 169 | }, |
| 170 | "modelInfo": { |
| 171 | "modelVersion": "1.0", |
| 172 | "modelVersionId": "{{service-uuid}}", |
| 173 | "modelInvariantId": "{{service-invariantUUID}}", |
| 174 | "modelName": "{{service-name}}", |
| 175 | "modelType": "service" |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | ], |
| 180 | "aLaCarte": false |
| 181 | }, |
| 182 | "project": { |
| 183 | "projectName": "Project-Demonstration" |
| 184 | }, |
| 185 | "owningEntity": { |
| 186 | "owningEntityId": "24ef5425-bec4-4fa3-ab03-c0ecf4eaac96", |
| 187 | "owningEntityName": "OE-Demonstration" |
| 188 | }, |
| 189 | "modelInfo": { |
| 190 | "modelVersion": "1.0", |
| 191 | "modelVersionId": "{{service-uuid}}", |
| 192 | "modelInvariantId": "{{service-invariantUUID}}", |
| 193 | "modelName": "{{service-name}}", |
| 194 | "modelType": "service" |
| 195 | } |
| 196 | } |
| 197 | }' |