Versions Compared

Key

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

...

HPA VF-C External API Interaction for Casablanca

SDC 

Supported HPA Capability Requirements(DRAFT)#LogicalNodei/ORequirements is referred.

SDC will provide below HPA information to VF-C

...

Code Block
languagejs
titleVFC-OOF API
linenumberstrue
collapsetrue
{
  "requestInfo": {
    "transactionId": "2441780a-2710-4169-91ee-a9f52a705bb3 //UUID",
    "requestId": "2441780a-2710-4169-91ee-a9f52a705bb3 //UUID",
    "callbackUrl": "<callback URL from VFC>",
    "sourceId": "vfc",
    "requestType": "create",
    "numSolutions": 1,
    "optimizers": [
      "placement"
    ],
    "timeout": 600
  },
  "placementInfo": {
    "placementDemands": [
      {
        "resourceModuleName": "vBRG //<VNF name from CSAR>",
        "serviceResourceId": "<vnfInstanceId used inside VFC>",
        "resourceModelInfo": {
          "modelInvariantId": "no-resourceModelInvariantId",
          "modelVersionId": "no-resourceModelVersionId"
        }
         }

       ]
   
  },
   
  "serviceInfo":       {
        "serviceInstanceId": "9fd24064-a335-478c-bbb0-3b71b7fbc55f",

       "serviceName": "vcpe",
        "modelInfo": {
          "modelInvariantId": "31390ef2-94a9-4cef-a09a-08f7d66540c9 //Id get from CSAR",
 
        "modelVersionId": "1a32426f-3616-47d0-96eb-b20cc7fff9be //Id get from CSAR"
  
     }
 
    }
     
}


OOF retrieve the requirements(policies) for that service/VNF inside Policy

Based on the request from VF-C, OOF need to retrieve policies for that VNF/service. Sample Policy schema will look like this:

Note: Since flavor_label and sriov_nic_label are not needed by VFC, the values inside directives will be leave as blank or default values.

Code Block
languagejs
titleOOF retrieve HPA policies for VFC
linenumberstrue
collapsetrue
#
#Example 1: vCPE, Basic Capability and pciePassthroughsriovNICNetwork
#one VNFC(VFC) with one basic capability requirement and two pciePassthroughsriovNICNetwork requirements
#
{
  "service": "hpaPolicy",
  "policyName": "oofCasablanca.hpaPolicy_vFW",
  "description": "HPA policy for vFW",
  "templateVersion": "0.0.1",
  "version": "1.0",
  "priority": "3",
  "riskType": "test",
  "riskLevel": "2",
  "guard": "False",
  "content": {
    "resources": "vG",
    "identity": "hpaPolicy_vG",
    "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"],
    "policyType": "hpaPolicy",
    "flavorFeatures": [
      {
        "id" : "<vdu.Name>",
        "type":"vnfc/tocsa.nodes.nfv.Vdu.Compute",
        "directives":[  
           {  
             "directive_name":"flavor_directive",
             "attributes":[  
                {  
                  "attribute_name":"<Blank, or use Default value String 'flavor_name'>",  
                  "attribute_value": "<Blank>" 
                } 
               ]
           }
          ],
        "flavorProperties": [
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "numVirtualCpu", "hpa-attribute-value": "6", "operator": "=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "basicCapabilities",
            "mandatory": "True",
            "architecture": "generic",
            "directives": [],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "virtualMemSize", "hpa-attribute-value": "6", "operator": "=", "unit": "GB" },
            ]
          },
          {
            "hpa-feature": "pciePassthroughsriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "directives" : [
              {
                "directive_name": "pciePassthroughsriovNICNetwork_directive",
                "attributes": [
                   { "attribute_name": "<Blank>",
                     "attribute_value": "<Blank>"
                   },
                   { "attribute_name": "<Blank>",
                     "attribute_value": "<Blank>"
                   }
                ]
              }
            ],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "1234", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "5678", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" }
            ]
          },
          {
            "hpa-feature": "pciePassthroughsriovNICNetwork",
            "mandatory": "True",
            "architecture": "generic",
            "directives" : [
              {
                "directive_name": "pciePassthroughsriovNICNetwork_directive",
                "attributes": [
                   { "attribute_name": "<Blank>",
                     "attribute_value": "<Blank>"
                   }
                   { "attribute_name": "<Blank>",
                     "attribute_value": "<Blank>"
                   }
                ]
              }
            ],
            "hpa-feature-attributes": [
              { "hpa-attribute-key": "pciVendorId", "hpa-attribute-value": "3333", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "7777", "operator": "=", "unit": "" },
              { "hpa-attribute-key": "pciCount", "hpa-attribute-value": "1", "operator": ">=", "unit": "" }
            ]
          }
        ]
      }
    ]
  }
}

...

The data in AAI still follows the routine schema designed in HPA Policies and Mappings. The only part has been changed is inside pciePassthroughsriovNICNetwork. We added one 'directive' attributes to contain the 'vnic_type' and 'physicalNetwork' that needed by VF-C.

...

Code Block
languagejs
titleData inside AAI
linenumberstrue
collapsetrue
hpa-capability-id="b369fd3d-0b15-44e1-81b2-6210efc6dff9",
hpa-feature= "basicCapabilities",
architecture= "generic",
version= "v1",
hpa-attribute-key       hpa-attribute-value
numVirtualCpu           {value:6}
virtualMemSize          {value:6, unit:"GB"}


hpa-capability-id="f453fd3d-0b15-11w4-81b2-6210efc6dff9",
hpa-feature= "pciePassthroughsriovNICNetwork",
architecture= "intel64",
version= "v1",
hpa-attribute-key       hpa-attribute-value
pciCount                {value: 1}
pciVendorId             {value: "8086"}
pciDeviceId             {value: "0443"}
directive


hpa-capability-id="f453fd3d-0b15-11w4-81b2-873hf8oo98s0",
           {value: "[{"attribute_name"="vnic_type", "attribute_value"="direct"},
                                  {"attribute_name"="physical_network", "attribute_value"="physnet1"}]"}


hpa-capability-id="f453fd3d-0b15-11w4-81b2-873hf8oo98s0",
hpa-feature= "pciePassthrough",
hpa-feature= "sriovNICNetwork",
architecture= "intel64",
version= "v1",
hpa-attribute-key       hpa-attribute-value
pciCount                {value: 1}
pciVendorId             {value: "6808"}
pciDeviceId             {value: "3440"}
directive               {value: "[{"attribute_name"="vnic_type", "attribute_value"="direct"},
                                  {"attribute_name"="physical_network", "attribute_value"="physnet2"}]"}

...




OOF process homing allocation and return homing placement to VF-C

OOF will match the requirements inside the policies with the data of the available candidates(cloud-regions or existing candiates) to find an optimal solution to place that service.

...

Code Block
languagejs
titleSample OOF-VFC response
linenumberstrue
collapsetrue
{
  "requestId": "xxxx",
  "transactionId": " xxxx ",
  "statusMessage": " xxxx ",
  "requestStatus": "completed",
  "solutions": {
    "placementSolutions": [
      [
        { "resourceModuleName": " vG ",
          "serviceResourceId": " xxxx ",
          "solution": {
           "identifierType": "serviceInstanceId",
           "identifiers": [
             " xxxx "
             ],
           "cloudOwner": " xxxx "
          },
         "assignmentInfo": [
            {  "key":"isRehome",
               "value":"false"    },
            {  "key":"locationId",
               "value":"DLLSTX1A"    },
            {  "key":"locationType",
               "value":"openstack-cloud" },
            {  "key":"vimId",
               "value":"rackspace_DLLSTX1A"  },
            {  "key":"physicalLocationId",
               "value":"DLLSTX1223"    },          
            {  "key":"oofDirectives",
               "value": { "directives":[
                { "id":"<vdu.name>",  
                  "type":"vnfc",
                  "directives":[                                 
                     {  "type":"flavor_directive",
                        "attributes":[
                            {   "attribute_name":"flavor_name", //just a string 'flavor_name'
                                "attribute_value":"<flavor_name>"  #VIM Flavor, which oof seleted.
                            }
                        ]
                     },
                     {  "type": "pciePassthroughsriovNICNetwork_directive",
                        "attributes":[
                            {"attribute_name":"vnic_type", "attribute_value":"direct"},
                            {"attribute_name":"provider_network", "attribute_value":"physnet1"}    
                        ]
                     },
                     {  "type": "pciePassthroughsriovNICNetwork_directive",
                        "attributes": [
                            {"attribute_name":"vnic_type", "attribute_value":"direct"},                
                            {"attribute_name":"provider_network", "attribute_value":"physnet2"}
                        ]      
                      }               
                    ]                                        
                  }
                ]
               }
             }
           ]
         } 
      ]
    ],
    "licenseSoutions": [
      {
       "resourceModuleName": "string",
       "serviceResourceId": "string",
       "entitlementPoolUUID": [
         "string"
        ],
       "licenseKeyGroupUUID": [
         "string"
        ],
       "entitlementPoolInvariantUUID": [
         "string"
        ],
       "licenseKeyGroupInvariantUUID": [
         "string"
        ]
      }
    ]
  }
}

...

As part of discovery, it populates the A&AI with two PCIe features for Flavor1.


hpa-feature=”pciePassthrough”sriovNICNetwork,

architecture=”{hw_arch}",

...

Hpa-attribute-key

Hpa-attribute-value

pciVendorId

8086

pciDeviceId

0443

pciCount

1

directive

[

{"attribute_name": "vnic-type", "attribute_value": "direct"},

{"attribute_name": "physical-network", "attribute_value": "physnet1"},

]

hpa-feature=”pciePassthrough”,

architecture=”{hw_arch}",

version=”v1”,

...


hpa-feature=”sriovNICNetwork”,

architecture=”{hw_arch}",

version=”v1”,

Hpa-attribute-key

Hpa-attribute-value

pciVendorId

6808

pciDeviceId

3440

pciCount

1

directive

[

{"attribute_name": "vnic-type", "attribute_value": "direct"},

{"attribute_name": "physical-network", "attribute_value": "physnet2"},

]


Multi-cloud API


Code Block
languagetext
titlemultiMulti-cloud network API for VF-C
linenumberstrue
collapsetrue
Create Network

Request

    {
        "tenant": "tenant1",
        "networkName": "ommnet",
        "shared": 1,
        "vlanTransparent": 1,
        "networkType": "vlan",
        "segmentationId": 202,
        "physicalNetwork": "ctrl",
        "routerExternal": 0
    }

Response

    {
        "returnCode": 0,
        "vimId": "11111",
        "vimName": "11111",
        "status": "ACTIVE",
        "id": "3c9eebdbbfd345658269340b9ea6fb73d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "name": "net1",
        "tenant": "tenant1",
        "networkName": "ommnet",
        "shared": 1,
        "vlanTransparent": 1,
        "networkType": "vlan",
        "segmentationId": 202,
        "physicalNetwork": "physnet1",
        "routerExternal": 0
    }

Code Block
languagetext
titlemultiMulti-cloud subnet API for VF-C
linenumberstrue
collapsetrue
5.1. **Create Subnets**
Code Block
languagetext
titlemulti-cloud API for VF-C
linenumberstrue


-----------------------

+---------------------+--------------------------------------------------------------------------------+
| **IF Definition**   | **Description**  Create Subnets


Request


    {
        "tenant": "tenant1",
        "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "subnetName": "subnet1",
        "cidr": "10.43.35.0/24",
        "ipVersion": 4,
        "enableDhcp": 1,
        "gatewayIp": "10.43.35.1",
       |
+=====================+================================================================================+
| URI "dnsNameservers": [],
        "allocationPools": [{
       | msb.onap.org:80/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/{tenantid}/subnets   |
+---------------------+--------------------------------------------------------------------------------+
| Operation "start": "192.168.199.2",
           | POST "end": "192.168.199.254"
        }],
        "hostRoutes": []
    }

Response

    {
        "returnCode": 0,
        "vimId": "11111",
        "vimName": "11111",
        "status": " ACTIVE",
| +---------------------+--------------------------------------------------------------------------------+ | Direction     "id": " d62019d3-bc6e-4319-9c1d-6722fc136a23",
   | VNFLCM,NSLCM->MULTIVIM    "tenant": "tenant1",
        "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "name": "subnet1",
        "cidr": "10.43.35.0/24",
        "ipVersion": 4,
        "enableDhcp": 1,
 | +---------------------+--------------------------------------------------------------------------------+ | Description         | Create network and subnetwork on the VIM    "gatewayIp": "10.43.35.1",
        "dnsNameservers": [],
        "allocationPools": [{
            "start": "192.168.199.2",
            "end": "192.168.199.254"
        }],
        "hostRoutes": []
 |
+---------------------+--------------------------------------------------------------------------------+

5.1.1. **Request**
>>>>>>>>>>>>>>>>>>

+-------------------+-----------------+-------------------+------------------------+----------------------+
| **Parameter**     | **Qualifier**   | **Cardinality**   | **Content**   }
Code Block
languagetext
titleMulti-cloud Port API for VF-C
linenumberstrue
collapsetrue
Create Virtual Port

Request
    {
        "networkId": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "subnetId": "c17afb1c-ab84-11e8-bfaa-77f95f421148",
        "name": "port1",
        "macAddress": "d4:5d:df:09:9e:19",
        "ip": "192.168.199.3",
        "vnicType": "direct"
    }

Response

    {
        "returnCode": 1,
 | **Description**      |
+===================+=================+===================+========================+======================+
| networkId"vimId": "11111",
        "vimName": "11111",
| M       "cloud-owner": "cloudowner",
      | 1   "cloud-region-id": "cloudregion",
        "status": "success",
    | String   "id": "393905cc-ab85-11e8-bb60-1f10d99adcef",
            | Network Id"name": "port_a",
             |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| name"tenantId": "55ab62ae-ab85-11e8-ba44-03ef3e9bc9d6",
        "networkName": "ommnet",
     | M  "networkId": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
        "subnetName": "subnet1",
 | 1        "subnetId": "c17afb1c-ab84-11e8-bfaa-77f95f421148",
        "macAddress": "d4:5d:df:09:9e:19",
        "ip": "192.168.199.3",
        | String  "vnicType": "direct",
    }
Code Block
languagetext
titleMulti-cloud server API for VF-C
collapsetrue
Create Server

Request
    {
         | SubnetName"tenant": "tenant1",
        "name": "vm1",
  |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| cidr       "availabilityZone": "az1",
        "flavorName": "vm_large",
  |    M  "boot": {
            |"type": 1,
            " volumeName": "volume1"
 | String      },
        "flavorId":  | Subnet cidr"vm_large_134213",
        "contextArray": [{
            |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| ipVersion"fileName": "test.yaml",
          | M "fileData": "…."
        }],
   | 1    "volumeArray": [{
           | Int "volumeName": "vol1",
        }],
         | Ip type"nicArray": [{
            "portId": "port_a"
 | |      }],
        "metada": [{
  |          "keyName": "foo",
     |       "value": "foo value"
        }],
|        "userdata": "abcdedf"
    }

Response

    {
 |       "vimId": "11111",
        "vimName": "11111",
   | |    "cloud-owner": "cloudowner",
        "cloud-region-id": "cloudregion",
   |     "returnCode": "success",
        "id": "1234-23545",
|        "name": "vm1",
         |"tenantId": "tenant1",
        "boot": {
            "type": 1,
| 4,6           " volumeName": "volume1"
    |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| enableDhcp        | O               | 1                 | boolean                | Whether to allow     |
|                   |                 |                   |                        |                      |
|                   |                 |                   |                        | 1: yes;0: no         |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| gatewayIp         | O               | 1                 | String                 | Gateway ip           |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| dnsNameservers    | O               | 1..n              | List of servers        | List of servers      |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| hostRoutes        | O               | 1..n              | List of routes         | List of routes       |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| allocationPools   | O               | 1..n              | list of "allocation"   | list of allocation   |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| -->allocation     |                 |                   |                        |                      |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| -->start          | O               | 1                 | String                 | Start ip             |
+-------------------+-----------------+-------------------+------------------------+----------------------+
| -->end            | O               | 1                 | String                 | End ip               |
+-------------------+-----------------+-------------------+------------------------+----------------------+

::

    {

        "tenant": "tenant1",

        "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",

        "subnetName": "subnet1",

        "cidr": "10.43.35.0/24",

        "ipVersion": 4,

        "enableDhcp": 1,

        "gatewayIp": "10.43.35.1",

        "dnsNameservers": [],

        "allocationPools": [{

            "start": "192.168.199.2",

            "end": "192.168.199.254"

        }],

        "hostRoutes": []

    }

5.1.2. **Response**
>>>>>>>>>>>>>>>>>>>

+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| **Parameter**     | **Qualifier**   | **Cardinality**   | **Content**            | **Description**                     |
+===================+=================+===================+========================+=====================================+
| returnCode        | M               | 1                 | int                    | 0: Already exist 1: Newly created   |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| vimId             | M               | 1                 | String                 | vim id                              |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| vimName           | O               | 1                 | string                 | vim name                            |
+-------------------+-----------------+-------------------+---------------------------+----------------------------------+
| cloud-owner       | M               | 1                 | String                    | cloud owner                      |
+-------------------+-----------------+-------------------+---------------------------+----------------------------------+
| cloud-region-id   | M               | 1                 | string                    | cloud region id                  |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| status            | M               | 1                 | string                 | subnetwork status                   |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| id                | M               | 1                 | string                 | subNetwork id                       |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| tenantId          | M               | 1                 | String                 | Tenant UUID                         |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| networkId         | O               | 1                 | String                 | Network Id                          |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| networkName       | O               | 1                 | String                 | Network Name                        |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| name              | M               | 1                 | String                 | SubnetName                          |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| cidr              | M               | 1                 | String                 | Subnet cidr                         |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| ipVersion         | M               | 1                 | Int                    | Ip type                             |
|                   |                 |                   |                        |                                     |
|                   |                 |                   |                        | 4,6                                 |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| enableDhcp        | O               | 1                 | boolean                | Whether to allow                    |
|                   |                 |                   |                        |                                     |
|                   |                 |                   |                        | 1: yes;0: no                        |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| gatewayIp         | O               | 1                 | String                 | Gateway ip                          |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| dnsNameservers    | O               | 1..n              | List of servers        | List of servers                     |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| hostRoutes        | O               | 1..n              | List of routes         | List of routes                      |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| allocationPools   | O               | 1..n              | list of "allocation"   | list of allocation                  |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| -->allocation     |                 |                   |                        |                                     |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| -->start          | O               | 1                 | String                 | Start ip                            |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+
| -->end            | O               | 1                 | String                 | End ip                              |
+-------------------+-----------------+-------------------+------------------------+-------------------------------------+

202: accepted

500: failed

::

    {

        "returnCode": 0,

        "vimId": "11111",

        "vimName": "11111",

        "status": " ACTIVE",

        "id": " d62019d3-bc6e-4319-9c1d-6722fc136a23",

        "tenant": "tenant1",

        "network_id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",

        "name": "subnet1",

        "cidr": "10.43.35.0/24",

        "ipVersion": 4,

        "enableDhcp": 1,

        "gatewayIp": "10.43.35.1",

        "dnsNameservers": [],

        "allocationPools": [{

            "start": "192.168.199.2",

            "end": "192.168.199.254"

        }],

        "hostRoutes": []

    }


6.1. **Create Virtual Port**
----------------------------

+---------------------+------------------------------------------------------------------------------+
| **IF Definition**   | **Description**                                                              |
+=====================+==============================================================================+
| URI                 | msb.onap.org:80/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/{tenantid}/ports   |
+---------------------+------------------------------------------------------------------------------+
| Operation           | POST                                                                         |
+---------------------+------------------------------------------------------------------------------+
| Direction           | VNFLCM->MULTIVIM                                                             |
+---------------------+------------------------------------------------------------------------------+

6.1.1. **Request**
>>>>>>>>>>>>>>>>>>

+------------------------+-----------------+-------------------+---------------+-------------------------------------------------------+
| **Parameter**          | **Qualifier**   | **Cardinality**   | **Content**   | **Description**                                       |
+========================+=================+===================+===============+=======================================================+
| networkId              | M               | 1                 | string        | Network UUID                                          |
+------------------------+-----------------+-------------------+---------------+-------------------------------------------------------+
| subnetId               | O               | 1                 | string        | Subnet UUID                                           |
+------------------------+-----------------+-------------------+---------------+-------------------------------------------------------+
| name                   | M               | 1                 | string        | Port name                                             |
+------------------------+-----------------+-------------------+---------------+-------------------------------------------------------+
| macAddress             | O               | 1                 | string        | Mac address                                           |
+------------------------+-----------------+-------------------+---------------+-------------------------------------------------------+
| ip                     | O               | 1                 | string        | Ip address                                            |
+------------------------+-----------------+-------------------+---------------+-------------------------------------------------------+
| vnicType               | O               | 1                 | string        | Virtual network card type,                            |
|                        |                 |                   |               |                                                       |
|                        |                 |                   |               | the value of three kinds of normal/direct/macvtap     |
+------------------------+-----------------+-------------------+---------------+-------------------------------------------------------+
| \ **securityGroups**   | **O**           | **1**             | **string**    | **The IDs of security groups applied to the port.**   |
+------------------------+-----------------+-------------------+---------------+-------------------------------------------------------+

6.1.2. **Response**
>>>>>>>>>>>>>>>>>>>

+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| **Parameter**        | **Qualifier**   | **Cardinality**   | **Content**   | **Description**                                     |
+======================+=================+===================+===============+=====================================================+
| returnCode           | M               | 1                 | int           | 0: Already exist 1: Newly created                   |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| vimId                | M               | 1                 | String        | vim id                                              |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| vimName              | O               | 1                 | string        | vim name                                            |
+-------------------+-----------------+-------------------+---------------------------+--------------------------------------------+
| cloud-owner       | M               | 1                 | String                    | cloud owner                                |
+-------------------+-----------------+-------------------+---------------------------+--------------------------------------------+
| cloud-region-id   | M               | 1                 | string                    | cloud region id                            |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| status               | M               | 1                 | string        | status                                              |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| id                   | M               | 1                 | string        | Port Id                                             |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| name                 | M               | 1                 | string        | Port name                                           |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| tenantId             | M               | 1                 | String        | Tenant UUID                                         |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| networkName          | M               | 1                 | string        | Network name                                        |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| networkId            | M               | 1                 | string        | Network Id                                          |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| subnetName           | M               | 1                 | string        | Subnet name                                         |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| subnetId             | M               | 1                 | string        | SubnetId                                            |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| macAddress           | O               | 1                 | string        | Mac address                                         |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| ip                   | O               | 1                 | string        | Ip address                                          |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| vnicType             | O               | 1                 | string        | Virtual network card type,                          |
|                      |                 |                   |               |                                                     |
|                      |                 |                   |               | the value of three kinds of normal/direct/macvtap   |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+
| **securityGroups**   | **O**           | **1**             | **string**    | **List of security group names.**                   |
+----------------------+-----------------+-------------------+---------------+-----------------------------------------------------+



7.1. **Create Server**
----------------------

+---------------------+--------------------------------------------------------------------------------+
| **IF Definition**   | **Description**                                                                |
+=====================+================================================================================+
| URI                 | msb.onap.org:80/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/{tenantid}/servers   |
+---------------------+--------------------------------------------------------------------------------+
| Operation           | POST                                                                           |
+---------------------+--------------------------------------------------------------------------------+
| Direction           | VNFLCM->MULTIVIM                                                               |
+---------------------+--------------------------------------------------------------------------------+

7.1.1. **Request**
>>>>>>>>>>>>>>>>>>

+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Parameter**        | **Qualifier**   | **Cardinality**   | **Content**                           | **Description**                                                                                                                                                                        |
+======================+=================+===================+=======================================+========================================================================================================================================================================================+
| name                 | M               | 1                 | string                                | server name                                                                                                                                                                            |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| boot                 | M               | 1                 | String                                | Start parameters                                                                                                                                                                       |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| nicArray             | O               | 1..n              | List of nic                           | List of nic                                                                                                                                                                            |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| contextArray         | O               | 1..n              | list of context                       | list of context                                                                                                                                                                        |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| volumeArray          | O               | 1..n              | list of volume                        | list of volume                                                                                                                                                                         |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| availabilityZone     | O               | 1                 | string                                | Usable field                                                                                                                                                                           |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| flavorId             | M               | 1                 | String                                | server Flavor id                                                                                                                                                                       |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| metadata             | O               | 1                 | List of metadata                      | Metadata key and value pairs. The maximum size of the metadata key and value is 255 bytes each.                                                                                        |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| userdata             | O               | 1                 | string                                | Configuration information or scripts to use upon launch. Must be Base64 encoded.                                                                                                       |
|                      |                 |                   |                                       |                                                                                                                                                                                        |
|                      |                 |                   |                                       | NOTE: The ‘null’ value allowed in Nova legacy v2 API, but due to the strict input validation, it isn’t allowed in Nova v2.1 API.                                                       |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| securityGroups       | O               | 1                 | List of names of security group       | One or more security groups. Specify the name of the security group in the name attribute. If you omit this attribute, the API creates the server in the default security group.       |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| serverGroup          | O               | 1                 | string                                | the ServerGroup for anti-affinity and affinity                                                                                                                                         |
+----------------------+-----------------+-------------------+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

**boot**

+-----------------+-----------------+-------------------+---------------+---------------------------+
| **Parameter**   | **Qualifier**   | **Cardinality**   | **Content**   | **Description**           |
+=================+=================+===================+===============+===========================+
| type            | M               | 1                 | int           | Startup mode              |
|                 |                 |                   |               |                           |
|                 |                 |                   |               | 1. boot from the volume   |
|                 |                 |                   |               |                           |
|                 |                 |                   |               | 2. boot from image        |
+-----------------+-----------------+-------------------+---------------+---------------------------+
| volumeId        | O               | 1                 | string        | Volume Id(type=1)         |
+-----------------+-----------------+-------------------+---------------+---------------------------+
| imageId         | O               | 1                 | String        | ImageId?type=2?         |
+-----------------+-----------------+-------------------+---------------+---------------------------+

**contextArray**

+-----------------+-----------------+-------------------+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Parameter**   | **Qualifier**   | **Cardinality**   | **Content**   | **Description**                                                                                                                                           |
+=================+=================+===================+===============+===========================================================================================================================================================+
| fileName        | M               | 1                 | String        | Injection file name                                                                                                                                       |
+-----------------+-----------------+-------------------+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| fileData        | M               | 1                 | string        | Injection file content (injection file content inside the <mac>$MAC\_1</mac> $MAC\_1 need to be replaced by the MAC address, of which 1 is NIC index. )   |
+-----------------+-----------------+-------------------+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+

**volumeArray**

+-----------------+-----------------+-------------------+---------------+-------------------+
| **Parameter**   | **Qualifier**   | **Cardinality**   | **Content**   | **Description**   |
+=================+=================+===================+===============+===================+
| volumeId        | M               | 1                 | String        | Volume Id         |
+-----------------+-----------------+-------------------+---------------+-------------------+

**nicArray**

+-----------------+-----------------+-------------------+---------------+-------------------+
| **Parameter**   | **Qualifier**   | **Cardinality**   | **Content**   | **Description**   |
+=================+=================+===================+===============+===================+
| portId          | M               | 1                 | String        | Port Id           |
+-----------------+-----------------+-------------------+---------------+-------------------+

**metadata**

+-----------------+-----------------+-------------------+---------------+-------------------+
| **Parameter**   | **Qualifier**   | **Cardinality**   | **Content**   | **Description**   |
+=================+=================+===================+===============+===================+
| keyName         | M               | 1                 | String        | Key name          |
+-----------------+-----------------+-------------------+---------------+-------------------+
| value           | M               | 1                 | string        | value             |
+-----------------+-----------------+-------------------+---------------+-------------------+

::

    {

        "tenant": "tenant1",

        "name": "vm1",

        "availabilityZone": "az1",

        "flavorName": "vm_large",

        "boot": {

            "type": 1,

            " volumeName": "volume1"

        },

        "flavorId": "vm_large_134213",

        "contextArray": [{

            "fileName": "test.yaml",

            "fileData": "…."

        }],

        "volumeArray": [{

            "volumeName": "vol1",

        }],

        "nicArray": [{

            "portId": "port_a"

        }],

        "metada": [{

            "keyName": "foo",

            "value": "foo value"

        }],

        "userdata": "abcdedf"

    }

7.1.2. **Response**
>>>>>>>>>>>>>>>>>>>

+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Parameter**        | **Qualifier**   | **Cardinality**   | **Content**                          | **Description**                                                                                                                                                                        |
+======================+=================+===================+======================================+========================================================================================================================================================================================+
| vimId                | M               | 1                 | String                               | vim id                                                                                                                                                                                 |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| vimName              | O               | 1                 | string                               | vim name                                                                                                                                                                               |
+-------------------+-----------------+-------------------+---------------------------+--------------------------------------------------------+
| cloud-owner       | M               | 1                 | String                    | cloud owner                                            |
+-------------------+-----------------+-------------------+---------------------------+--------------------------------------------------------+
| cloud-region-id   | M               | 1                 | string                    | cloud region id                                        |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| returnCode           |                 | 1                 | int                                  | 0: Already exist 1: Newly created                                                                                                                                                      |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id                   | M               | 1                 | string                               | server id                                                                                                                                                                              |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name                 |                 | 1                 | string                               | server name                                                                                                                                                                            |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tenantId             | M               | 1                 | String                               | Tenant UUID                                                                                                                                                                            |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| boot                 | M               | 1                 | String                               | Start parameters                                                                                                                                                                       |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| nicArray             | O               | 1..n              | List of nic                          | List of nic                                                                                                                                                                            |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| volumeArray          | O               | 1..n              | list of volume                       | list of volume                                                                                                                                                                         |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| availabilityZone     | O               | 1                 | string                               | Usable field                                                                                                                                                                           |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| flavorId             | M               | 1                 | String                               | server Flavor                                                                                                                                                                          |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| metadata             | O               | 1                 | List of metadata                     | Metadata key and value pairs. The maximum size of the metadata key and value is 255 bytes each.                                                                                        |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **securityGroups**   | **O**           | **1**             | **List of name of security group**   | **One or more security groups. Specify the name of the security group in the name attribute. If you omit this attribute, the API creates the server in the default security group.**   |
|                      |                 |                   |                                      |                                                                                                                                                                                        |
|                      |                 |                   |                                      | **[TBD]**                                                                                                                                                                              |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **serverGroup**      | **O**           | **1**             | **string**                           | the ServerGroup for anti-affinity and affinity                                                                                                                                         |
|                      |                 |                   |                                      |                                                                                                                                                                                        |
|                      |                 |                   |                                      | [TBD]                                                                                                                                                                                  |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **status**           | **M**           | **1**             | **string**                           | Server status, 0:INACTIVE,1:ACTIVE,2:ERROR                                                                                                                                             |
+----------------------+-----------------+-------------------+--------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

202: accepted

500: failed

::

    {

    "id": "3c9eebdbbfd345658269340b9ea6fb73",

    "name": "vm1",

    "returnCode": 1,
    },
        "volumeArray": [{
            "volumeName": "vol1",
        }],
        "nicArray": [{
            "portId": "port_a"
        }],
        "availabilityZone": "zone1",
        "flavorId": "tenant1",
        "metada": [{
            "keyName": "foo",
            "value": "foo value"
        }],
    }


HPA VF-C Casablanca Stories

...