Re: [onap-discuss][SDC][SO][SDNC] : how to instantiate a Virtual Link based on a neutron network with ONAP

2018-09-20 Thread Steve Smokowski
Your process looks correct from SO perspective.

Thanks

-Steve


From:  on behalf of Rene Robert 

Reply-To: "onap-discuss@lists.onap.org" , 
"rene.rob...@orange.com" 
Date: Thursday, September 20, 2018 at 8:28 AM
To: "onap-discuss@lists.onap.org" , "LANDO, 
MICHAEL" , "Seshu m (seshu.kuma...@huawei.com)" 

Subject: [onap-discuss][SDC][SO][SDNC] : how to instantiate a Virtual Link 
based on a neutron network with ONAP

Objective : instantiate a Virtual Link based on a neutron network with ONAP

Here is my procedure (maybe not the best, but the one I know) :
Done with ONAP Beijing (OOM)

1 - change the heat template and heat template params already inserted in SO 
mariaDB
(I did never manage to use the existing heat template….)

Connect to SO mariadb (use DBeaver software for example)

UPDATE mso_catalog.heat_template SET NAME='Generic NeutronNet', VERSION='1', 
BODY='heat_template_version: 2013-05-23

description:
  HOT template that creates a Generic Neutron Network

parameters:
  network_name:
 type: string
 description: Name of direct network (e.g. core, dmz)
outputs:
  network_id:
description: Openstack network identifier
value: { get_resource: network }
resources:
  network:
type: OS::Neutron::Net
properties:
  name: {get_param: network_name }

', TIMEOUT_MINUTES=10, DESCRIPTION='Generic Neutron Template', 
CREATION_TIMESTAMP='2017-10-26 14:44:00.000', ARTIFACT_CHECKSUM='MANUAL RECORD' 
WHERE ARTIFACT_UUID='efee1d84-b8ec-11e7-abc4-cec278b6b50a';


INSERT INTO mso_catalog.heat_template_params (HEAT_TEMPLATE_ARTIFACT_UUID, 
PARAM_NAME, IS_REQUIRED, PARAM_TYPE, PARAM_ALIAS) 
VALUES('efee1d84-b8ec-11e7-abc4-cec278b6b50a', 'network_name', 1, 'string', 
'NULL');

2 - onboard a new service using SDC
create a new service in SDC
add a "generic neutron" VL resource to the service (composition)
validate/distibute the service

3 instantiate the service and network
using Rest API (SO, SDNC)

Service instanciation

curl -X POST \
  
http://so.api.simpledemo.onap.org:30223/ecomp/mso/infra/serviceInstances/v6<https://urldefense.proofpoint.com/v2/url?u=http-3A__so.api.simpledemo.onap.org-3A30223_ecomp_mso_infra_serviceInstances_v6=DwQFAw=LFYZ-o9_HUMeMTSQicvjIg=shs6nPzThSiGJml9VXN0Eg=gVDL1KcbS83ZvbWv3Kr_TNrAdCzbjAnTauPtAJQLf3g=yvJpwtJltuSx7b9-p5d7gT4N-qHwmbYrprjNX4iJyFQ=>
 \
  -H 'accept: application/json' \
  -H 'authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-fromappid: APIclient' \
  -H 'x-transactionid: test' \
  -d '{
"requestDetails": {
"requestInfo": {
   "instanceName": "test-neutron-service-01",
   "source": "VID",
   "suppressRollback": false,
   "requestorId": "demo"
},
"modelInfo": {
   "modelType": "service",
   "modelInvariantId": 
"909c2700-799f-4348-9e69-a6523638ee0b",
   "modelVersionId": 
"912fe8f8-9d1e-4b46-b44d-722fb974e6bb",
   "modelName": "Neutron network",
   "modelVersion": "1.0"
},
"requestParameters": {
   "userParams": [],
   "subscriptionServiceType": "Neutron network",
   "aLaCarte": true
},
"subscriberInfo": {
   "globalSubscriberId": "generic"
},
"project": {
   "projectName": "Orange_project"
},
"owningEntity": {
   "owningEntityId": 
"2ca23314-ffc8-4511-8387-8a04b50684d6",
   "owningEntityName": "Orange"
}
}
}'


Preload for Network

curl -X POST \
  
http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-network-topology-operation<https://urldefense.proofpoint.com/v2/url?u=http-3A__sdnc.api.simpledemo.onap.org-3A30202_restconf_operations_VNF-2DAPI-3Apreload-2Dnetwork-2Dtopology-2Doperation=DwQFAw=LFYZ-o9_HUMeMTSQicvjIg=shs6nPzThSiGJml9VXN0Eg=gVDL1KcbS83ZvbWv3Kr_TNrAdCzbjAnTauPtAJQLf3g=mXRUZzazuVhBJd

[onap-discuss][SDC][SO][SDNC] : how to instantiate a Virtual Link based on a neutron network with ONAP

2018-09-20 Thread Rene Robert
Objective : instantiate a Virtual Link based on a neutron network with ONAP

Here is my procedure (maybe not the best, but the one I know) :
Done with ONAP Beijing (OOM)

1 - change the heat template and heat template params already inserted in SO 
mariaDB
(I did never manage to use the existing heat template)

Connect to SO mariadb (use DBeaver software for example)

UPDATE mso_catalog.heat_template SET NAME='Generic NeutronNet', VERSION='1', 
BODY='heat_template_version: 2013-05-23

description:
  HOT template that creates a Generic Neutron Network

parameters:
  network_name:
 type: string
 description: Name of direct network (e.g. core, dmz)
outputs:
  network_id:
description: Openstack network identifier
value: { get_resource: network }
resources:
  network:
type: OS::Neutron::Net
properties:
  name: {get_param: network_name }

', TIMEOUT_MINUTES=10, DESCRIPTION='Generic Neutron Template', 
CREATION_TIMESTAMP='2017-10-26 14:44:00.000', ARTIFACT_CHECKSUM='MANUAL RECORD' 
WHERE ARTIFACT_UUID='efee1d84-b8ec-11e7-abc4-cec278b6b50a';


INSERT INTO mso_catalog.heat_template_params (HEAT_TEMPLATE_ARTIFACT_UUID, 
PARAM_NAME, IS_REQUIRED, PARAM_TYPE, PARAM_ALIAS) 
VALUES('efee1d84-b8ec-11e7-abc4-cec278b6b50a', 'network_name', 1, 'string', 
'NULL');

2 - onboard a new service using SDC
create a new service in SDC
add a "generic neutron" VL resource to the service (composition)
validate/distibute the service

3 instantiate the service and network
using Rest API (SO, SDNC)

Service instanciation

curl -X POST \
  http://so.api.simpledemo.onap.org:30223/ecomp/mso/infra/serviceInstances/v6 \
  -H 'accept: application/json' \
  -H 'authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-fromappid: APIclient' \
  -H 'x-transactionid: test' \
  -d '{
"requestDetails": {
"requestInfo": {
   "instanceName": "test-neutron-service-01",
   "source": "VID",
   "suppressRollback": false,
   "requestorId": "demo"
},
"modelInfo": {
   "modelType": "service",
   "modelInvariantId": 
"909c2700-799f-4348-9e69-a6523638ee0b",
   "modelVersionId": 
"912fe8f8-9d1e-4b46-b44d-722fb974e6bb",
   "modelName": "Neutron network",
   "modelVersion": "1.0"
},
"requestParameters": {
   "userParams": [],
   "subscriptionServiceType": "Neutron network",
   "aLaCarte": true
},
"subscriberInfo": {
   "globalSubscriberId": "generic"
},
"project": {
   "projectName": "Orange_project"
},
"owningEntity": {
   "owningEntityId": 
"2ca23314-ffc8-4511-8387-8a04b50684d6",
   "owningEntityName": "Orange"
}
}
}'


Preload for Network

curl -X POST \
  
http://sdnc.api.simpledemo.onap.org:30202/restconf/operations/VNF-API:preload-network-topology-operation
 \
  -H 'accept: application/json' \
  -H 'authorization: Basic 
YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-fromappid: API client' \
  -H 'x-transactionid: 0a3f6713-ba96-4971-a6f8-c2da85a3176e' \
  -d '{
  "VNF-API:input": {
"VNF-API:request-information": {
  "VNF-API:request-id": "robot0012",
  "VNF-API:notification-url": "http://so.onap.org;,
  "VNF-API:order-number": "robot0012",
  "VNF-API:request-sub-action": "SUPP",
  "VNF-API:request-action": "PreloadNetworkRequest",
  "VNF-API:source": "robot",
  "VNF-API:order-version": "1.0"
},
"VNF-API:network-topology-information": {
  "VNF-API:network-topology-identifier": {
"VNF-API:network-role": "test",
"VNF-API:network-technology": "neutron",
"VNF-API:service-type": "Neutron network",
"VNF-API:network-name": "Net_via_ONAP_01",
"VNF-API:network-type": "Generic NeutronNet"
  },
  "VNF-API:provider-network-information": {
"VNF-API:is-external-network": "false",
"VNF-API:is-provider-network": "false",
"VNF-API:is-shared-network": "false"
  },
  "VNF-API:subnets": [
{
  "VNF-API:start-address": "192.168.80.0",
  "VNF-API:cidr-mask": "24",
  "VNF-API:subnet-name":