Rene_Robert | fb17797 | 2019-07-09 14:39:47 +0200 | [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: |
| 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 | Request Example : |
| 24 | |
| 25 | :: |
| 26 | |
| 27 | curl -X POST \ |
| 28 | 'http://{{k8s}}:30277/onap/so/infra/serviceInstantiation/v7/serviceInstances' \ |
| 29 | -H 'Content-Type: application/json' \ |
| 30 | -H 'cache-control: no-cache' \ |
| 31 | -d '{ |
| 32 | "requestDetails": { |
| 33 | "subscriberInfo": { |
| 34 | "globalSubscriberId": "Demonstration" |
| 35 | }, |
| 36 | "requestInfo": { |
| 37 | "suppressRollback": false, |
| 38 | "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", |
| 39 | "requestorId": "adt", |
| 40 | "instanceName": "{{cds-instance-name}}", |
| 41 | "source": "VID" |
| 42 | }, |
| 43 | "cloudConfiguration": { |
| 44 | "lcpCloudRegionId": "fr1", |
| 45 | "tenantId": "6270eaa820934710960682c506115453" |
| 46 | }, |
| 47 | "requestParameters": { |
| 48 | "subscriptionServiceType": "vFW", |
| 49 | "userParams": [ |
| 50 | { |
| 51 | "Homing_Solution": "none" |
| 52 | }, |
| 53 | { |
| 54 | "service": { |
| 55 | "instanceParams": [ |
| 56 | |
| 57 | ], |
| 58 | "instanceName": "{{cds-instance-name}}", |
| 59 | "resources": { |
| 60 | "vnfs": [ |
| 61 | { |
| 62 | "modelInfo": { |
| 63 | "modelName": "{{vnf-modelinfo-modelname}}", |
| 64 | "modelVersionId": "{{vnf-modelinfo-modeluuid}}", |
| 65 | "modelInvariantUuid": "{{vnf-modelinfo-modelinvariantuuid}}", |
| 66 | "modelVersion": "1.0", |
| 67 | "modelCustomizationId": "{{vnf-modelinfo-modelcustomizationuuid}}", |
| 68 | "modelInstanceName": "{{vnf-modelinfo-modelinstancename}}" |
| 69 | }, |
| 70 | "cloudConfiguration": { |
| 71 | "lcpCloudRegionId": "fr1", |
| 72 | "tenantId": "6270eaa820934710960682c506115453" |
| 73 | }, |
| 74 | "platform": { |
| 75 | "platformName": "test" |
| 76 | }, |
| 77 | "lineOfBusiness": { |
| 78 | "lineOfBusinessName": "someValue" |
| 79 | }, |
| 80 | "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", |
| 81 | "instanceName": "{{vnf-modelinfo-modelinstancename}}", |
| 82 | "instanceParams": [ |
| 83 | { |
| 84 | "onap_private_net_id": "olc-private", |
| 85 | "onap_private_subnet_id": "olc-private", |
| 86 | "pub_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwj7uJMyKiP1ogEsZv5kKDFw9mFNhxI+woR3Tuv8vjfNnqdB1GfSnvTFyNbdpyNdR8BlljkiZ1SlwJLEkvPk0HpOoSVVek/QmBeGC7mxyRcpMB2cNQwjXGfsVrforddXOnOkj+zx1aNdVGMc52Js3pex8B/L00H68kOcwP26BI1o77Uh+AxjOkIEGs+wlWNUmXabLDCH8l8IJk9mCTruKEN9KNj4NRZcaNC+XOz42SyHV9RT3N6efp31FqKzo8Ko63QirvKEEBSOAf9VlJ7mFMrGIGH37AP3JJfFYEHDdOA3N64ZpJLa39y25EWwGZNlWpO/GW5bNjTME04dl4eRyd", |
| 87 | "image_name": "Ubuntu 14.04", |
| 88 | "flavor_name":"s1.cw.small-1" |
| 89 | } |
| 90 | ], |
| 91 | "vfModules": [ |
| 92 | { |
| 93 | "modelInfo": { |
| 94 | "modelName": "{{vnf-vfmodule-0-modelinfo-modelname}}", |
| 95 | "modelVersionId": "{{vnf-vfmodule-0-modelinfo-modeluuid}}", |
| 96 | "modelInvariantUuid": "{{vnf-vfmodule-0-modelinfo-modelinvariantuuid}}", |
| 97 | "modelVersion": "1", |
| 98 | "modelCustomizationId": "{{vnf-vfmodule-0-modelinfo-modelcustomizationuuid}}" |
| 99 | }, |
| 100 | "instanceName": "{{vnf-vfmodule-0-modelinfo-modelname}}", |
| 101 | "instanceParams": [ |
| 102 | { |
| 103 | "sec_group": "olc-open", |
| 104 | "public_net_id": "olc-net" |
| 105 | } |
| 106 | ] |
| 107 | }, |
| 108 | { |
| 109 | "modelInfo": { |
| 110 | "modelName": "{{vnf-vfmodule-1-modelinfo-modelname}}", |
| 111 | "modelVersionId": "{{vnf-vfmodule-1-modelinfo-modeluuid}}", |
| 112 | "modelInvariantUuid": "{{vnf-vfmodule-1-modelinfo-modelinvariantuuid}}", |
| 113 | "modelVersion": "1", |
| 114 | "modelCustomizationId": "{{vnf-vfmodule-1-modelinfo-modelcustomizationuuid}}" |
| 115 | }, |
| 116 | "instanceName": "{{vnf-vfmodule-1-modelinfo-modelname}}", |
| 117 | "instanceParams": [ |
| 118 | { |
| 119 | "sec_group": "olc-open", |
| 120 | "public_net_id": "olc-net" |
| 121 | } |
| 122 | ] |
| 123 | }, |
| 124 | { |
| 125 | "modelInfo": { |
| 126 | "modelName": "{{vnf-vfmodule-2-modelinfo-modelname}}", |
| 127 | "modelVersionId": "{{vnf-vfmodule-2-modelinfo-modeluuid}}", |
| 128 | "modelInvariantUuid": "{{vnf-vfmodule-2-modelinfo-modelinvariantuuid}}", |
| 129 | "modelVersion": "1", |
| 130 | "modelCustomizationId": "{{vnf-vfmodule-2-modelinfo-modelcustomizationuuid}}" |
| 131 | }, |
| 132 | "instanceName": "{{vnf-vfmodule-2-modelinfo-modelname}}", |
| 133 | "instanceParams": [ |
| 134 | { |
| 135 | "sec_group": "olc-open", |
| 136 | "public_net_id": "olc-net" |
| 137 | } |
| 138 | ] |
| 139 | }, |
| 140 | { |
| 141 | "modelInfo": { |
| 142 | "modelName": "{{vnf-vfmodule-3-modelinfo-modelname}}", |
| 143 | "modelVersionId": "{{vnf-vfmodule-3-modelinfo-modeluuid}}", |
| 144 | "modelInvariantUuid": "{{vnf-vfmodule-3-modelinfo-modelinvariantuuid}}", |
| 145 | "modelVersion": "1", |
| 146 | "modelCustomizationId": "{{vnf-vfmodule-3-modelinfo-modelcustomizationuuid}}" |
| 147 | }, |
| 148 | "instanceName": "{{vnf-vfmodule-3-modelinfo-modelname}}", |
| 149 | "instanceParams": [ |
| 150 | { |
| 151 | "sec_group": "olc-open", |
| 152 | "public_net_id": "olc-net" |
| 153 | } |
| 154 | ] |
| 155 | } |
| 156 | ] |
| 157 | } |
| 158 | ] |
| 159 | }, |
| 160 | "modelInfo": { |
| 161 | "modelVersion": "1.0", |
| 162 | "modelVersionId": "{{service-uuid}}", |
| 163 | "modelInvariantId": "{{service-invariantUUID}}", |
| 164 | "modelName": "{{service-name}}", |
| 165 | "modelType": "service" |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | ], |
| 170 | "aLaCarte": false |
| 171 | }, |
| 172 | "project": { |
| 173 | "projectName": "Project-Demonstration" |
| 174 | }, |
| 175 | "owningEntity": { |
| 176 | "owningEntityId": "24ef5425-bec4-4fa3-ab03-c0ecf4eaac96", |
| 177 | "owningEntityName": "OE-Demonstration" |
| 178 | }, |
| 179 | "modelInfo": { |
| 180 | "modelVersion": "1.0", |
| 181 | "modelVersionId": "{{service-uuid}}", |
| 182 | "modelInvariantId": "{{service-invariantUUID}}", |
| 183 | "modelName": "{{service-name}}", |
| 184 | "modelType": "service" |
| 185 | } |
| 186 | } |
| 187 | }' |