openbaton / NFVO

Repository containing the source code of the NFVO
Apache License 2.0
61 stars 52 forks source link

Add existing VNF by id to NSD #131

Closed orkun34 closed 7 years ago

orkun34 commented 7 years ago

Hi all,

Is there any way to add existing VNFD to existing NSD in order to run it ? Because as far as I checked there is no way to launch/deploy vnf without using NSD. Therefore our approach becomes to implement what I mentioned above.

In API doc (v3.2.0) it allows to add new VNFD to existing NSD but the thing that I mentioned at the beginning is not covered by system.

Basically , there will be VNF on the system and I would like to run it on existing NSD by its ID.

Thanks in advance

lorenzotomasini commented 7 years ago

Hi @orkun34

I think i did not understand clearly. Do you want to add a VNFR to a NSR or a VNFD to a NSD? you wrote:

Because as far as I checked there is no way to launch/deploy vnf without using NSD.

That is true. To deploy a single VNF you need a NSD with one VNFD inside. And conceptually i don't see anything wrong on this approach, since a single VNF deployed is still a NS.

Therefore our approach becomes to implement what I mentioned above.

what is your approach? when you deploy the NSD, the NFVO creates a NSR, an instance of the NSD. Even if you are able to update the NSD, the NSR is already deployed and will not change, but the following deployment of this NSD will contain the modification (for instance a new VNFD).

what i understood is that you would like to add a VNF to a running NSR. Is that the case? If yes, are you already implementing this?

orkun34 commented 7 years ago

Hi again @lorenzotomasini

I think , I explained a little bit different what I would like to mention. I want to add existing VNF to NSD via VNF ID which means that I do not want to create a new VNF in order to POST into existing NSD.

On API guide , there is service ;

{host}/api/v1/ns-descriptors{nsdId}/vnfdescriptors/

which you create a new VNFD and add to existing NSD. However I want to use existing VNFD and add it to existing NSD.

Such as ;

{
  "name":"NSD iperf + privateIPs",
  ...
  "vnfd":[
               vnfd_ref:129c83ce-8c04-4a24-b54f-eddb64a9dfe4, 
               vnfd_ref:766783bv-90hu-67ft-kf7f-e8uyzdg6899e0]
  "vnf_dependency":[
    {
      "source":{
        "name":"iperf-server"
      },
      "target":{
        "name":"iperf-client"
      },
      "parameters":[
        "private"
      ]
    }
  ]
} 

Is there any way to implement like this ?

Thanks in advance

orkun34 commented 7 years ago

Hello,

I've found a solution that more or less fits my request.

{ "name": "NSD iperf + privateIP2", "vendor": "FOKUS", "version": "2.0", "vld": [{ "name": "private" } ], "vnfd": [{ "name":"iperf-client", "id": "ca3316f4-481b-401a-b365-bfc0e1ce63ac" }, { "name":"iperf-server", "id": "2a624d0d-70e3-4889-a8fd-9e12d589f334" } ], "vnf_dependency": [{ "source": { "name":"iperf-server", "id": "2a624d0d-70e3-4889-a8fd-9e12d589f334" }, "target": { "name":"iperf-client", "id": "ca3316f4-481b-401a-b365-bfc0e1ce63ac" }, "parameters": [ "private" ] } ] }

If I inject this JSON , it creates NSD successfully by giving VNFD id as references and created NSD was deployed without no error

lorenzotomasini commented 7 years ago

Well,

This is explained in our documentation here under nsd [iperf] paragraph, that is why i did not really understood what you were asking precisely.