OSM instantiation parameters: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''THIS PAGE IS DEPRECATED'''. OSM User Guide has been moved to a new location: '''https://osm.etsi.org/docs/user-guide/'''
---
When creating a NS instance, it is possible to pass instantiation parameters to OSM using the "--config" option of the client or the "config" parameter of the UI. In this section we will illustrate through some of the existing examples how to specify those parameters using OSM client:
When creating a NS instance, it is possible to pass instantiation parameters to OSM using the "--config" option of the client or the "config" parameter of the UI. In this section we will illustrate through some of the existing examples how to specify those parameters using OSM client:


===Specify a VIM network name for a NS VLD===
===Specify a VIM network name for a NS VLD===
  --config '{vld: [ {name: mgmtnet, vim-network-name: netVIM1} ] }'
In a generic way, the mapping can be specified in the following way, where 'vldnet' is the name of the network in the NS descriptor and 'netVIM1' is the VIM network that you want to use:
  --config '{vld: [ {name: vldnet, vim-network-name: netVIM1} ] }'
 
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_vnfd.tar.gz hackfest1-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_nsd.tar.gz hackfest1-ns]; images: [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%202%20-%20Creating%20a%20basic%20VNF%20and%20NS.pdf creating a basic VNF and NS]''') in the following way:


* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_vnfd.tar.gz hackfest1-vnf]
osm ns-create --ns_name hf1 --nsd_name hackfest1-ns --vim_account openstack1 --config '{vld: [ {name: mgmtnet, vim-network-name: mgmt} ] }'
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_nsd.tar.gz hackfest1-ns]
* '''Image:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604]
We can use the previous scenario to specify a VIM network name for a NS VLD
--config '{vld: [ {name: mgmtnet, vim-network-name: mgmt} ] }'
Check:
In NS instances, go to actions and select show info to see the details of the instance.


===Specify a VIM network name for an internal VLD of a VNF===
===Specify a VIM network name for an internal VLD of a VNF===
In this scenario, the mapping can be specified in the following way, where '1' is the member vnf index of the constituent vnf in the NS descriptor, 'internal' is the name of internal-vld in the VNF descriptor and  'netVIM1' is the VIM network that you want to use:
  --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, vim-network-name: netVIM1} ] } ] }'
  --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, vim-network-name: netVIM1} ] } ] }'


* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf]
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]; images:[https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf modeling multi-VDU VNF]''') in the following way:
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]
osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, vim-network-name: mgmt} ] } ] }'
* '''Image:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604]
 
===Specify IP profile information and IP for a NS VLD===
We can use the previous scenario to specify a VIM network name for an internal VLD of a VNF
In a generic way, the mapping can be specified in the following way, where 'datanet' is the name of the network in the NS descriptor, ip-profile you have to fill the associated parameters with the data model ( [http://osm-download.etsi.org/ftp/osm-doc/nsd.html# NS data model] ), and vnfd-connection-point-ref is the reference to the connection point:
  --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, vim-network-name: mgmt} ] } ] }'
--config '{vld: [ {name: datanet, ip-profile: {...}, vnfd-connection-point-ref: {...} } ] }'
Check:
In NS instances, go to actions and select show info to see the details of the instance.


You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]; images:[https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf modeling multi-VDU VNF]''') in the following way:
osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vld: [ {name: datanet, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}],dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}, vnfd-connection-point-ref: [ {member-vnf-index-ref: "1", vnfd-connection-point-ref: vnf-data, ip-address: "192.168.100.17"}]}]}'


===Specify IP profile information for an internal VLD of a VNF===
===Specify IP profile information for an internal VLD of a VNF===
  --config '{vld: [ {name: datanet, ip-profile: {...} } ] }'
In this scenario, the mapping can be specified in the following way, where '1' is the member vnf index of the constituent vnf in the NS descriptor, 'internal' is the name of internal-vld in the VNF descriptor and ip-profile you have to fill the associated parameters with the data model ( [http://osm-download.etsi.org/ftp/osm-doc/vnfd.html VNF data model] ):
 
--config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {...} ] } ] }'
 
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]; images:[https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf modeling multi-VDU VNF]''') in the following way:
 
  osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] ,dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}}]}]} '
 
===Specify IP address and/or MAC address for an interface===
 
====Specify IP address for an interface====
In this scenario, the mapping can be specified in the following way, where '1' is the member vnf index of the constituent vnf in the NS descriptor, 'internal' is the name of internal-vld in the VNF descriptor ,ip-profile you have to fill the associated parameters with the data model ( [http://osm-download.etsi.org/ftp/osm-doc/vnfd.html VNF data model] ), 'id1' is the internal-connection-point id and 'a.b.c.d' is the IP that you have to specify for this scenario:


===Specify IP address and/or mac address for an interface===
--config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {...}, internal-connection-point: [{id-ref: id1, ip-address: "a.b.c.d"}] ] } ] }'
  --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: hackfest1VM, interface: [{name: vdu-eth0, ip-address: "10.31.31.21", mac-address: "52:33:44:55:66:21"}]} ] } ] } '
 
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]; images:[https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf modeling multi-VDU VNF]''') in the following way:
  osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account ost4 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] ,dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}, internal-connection-point: [{id-ref: mgmtVM-internal, ip-address: "192.168.100.3"}]}]}]}'
 
====Specify MAC address for an interface====
In this scenario, the mapping can be specified in the following way, where '1' is the member vnf index of the constituent vnf in the NS descriptor, 'id1' is the id of VDU in the VNF descriptor and 'interf1' is the name of the interface to which you want to add the MAC address:
  --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: id1, interface: [{name: interf1, mac-address: "aa:bb:cc:dd:ee:ff" }]} ] } ] } '
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_vnfd.tar.gz hackfest1-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_nsd.tar.gz hackfest1-ns]; images: [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%202%20-%20Creating%20a%20basic%20VNF%20and%20NS.pdf creating a basic VNF and NS]''') in the following way:
osm ns-create --ns_name hf12 --nsd_name hackfest1-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: hackfest1VM, interface: [{name: vdu-eth0, mac-address: "52:33:44:55:66:21"}]} ] } ] } '
 
====Specify IP address and MAC address for an interface====
In the following scenario, we will bring together the two previous cases
 
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]; images:[https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf modeling multi-VDU VNF]''') in the following way:
 
osm ns-create --ns_name hf12 --nsd_name hackfest2-ns --vim_account ost4 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal , ip-profile: {ip-version: ipv4, subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] , dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true} }, internal-connection-point: [ {id-ref: mgmtVM-internal, ip-address: "192.168.100.3"} ] }, ], vdu: [ {id: mgmtVM, interface: [{name: mgmtVM-eth0, mac-address: "52:33:44:55:66:21"}]} ] } ] } '


===Force floating IP address for an interface===
===Force floating IP address for an interface===
  --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: hackfest1VM, interface: [{name: vdu-eth0, floating-ip-required: True }]} ] } ] } '
In a generic way, the mapping can be specified in the following way, where 'id1' is the name of the VDU in the VNF descriptor and 'interf1' is the name of the interface:
  --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: id1, interface: [{name: interf1, floating-ip-required: True }]} ] } ] } '
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]; images:[https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf modeling multi-VDU VNF]''') in the following way:
osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu:[ {id: mgmtVM, interface: [{name: mgmtVM-eth0, floating-ip-required: True }]} ] } ] } '
 
Make sure 'vim-network-name' in NS Descriptor has access to the outside to be able to use the parameter 'floating-ip-required'.


===Multi-site deployments (specifying different VIM accounts for different VNFs)===
===Multi-site deployments (specifying different VIM accounts for different VNFs)===
In this scenario, the mapping can be specified in the following way, where '1 and 2' are the member vnf index of the constituent vnfs in the NS descriptor, 'vim1 and vim2' are the names of vim accounts and  'netVIM1 and netVIM2' are the VIM networks that you want to use:
  --config '{vnf: [ {member-vnf-index: "1", vim_account: vim1}, {member-vnf-index: "2", vim_account: vim2} ], vld: [ {name: datanet, vim-network-name: {vim1: netVIM1, vim2: netVIM2} } ] }'
  --config '{vnf: [ {member-vnf-index: "1", vim_account: vim1}, {member-vnf-index: "2", vim_account: vim2} ], vld: [ {name: datanet, vim-network-name: {vim1: netVIM1, vim2: netVIM2} } ] }'
  # NOTE: From release SIX (current master) add 'wim_account: False' (inside --config) to avoid wim network connectivity if you have not a WIM in your system


* '''VNF package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf]
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]; images:[https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf modeling multi-VDU VNF]''') in the following way:
* '''NS package:''' [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]
  osm ns-create --ns_name hf12 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vim_account: openstack1}, {member-vnf-index: "2", vim_account: openstack3} ], vld: [ {name: mgmtnet, vim-network-name: {openstack1: mgmt, openstack3: mgmt} } ] }'  
* '''Image:''' [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604]
We can use the previous scenario to specify different VIM accounts for different VNFs
  --config '{vnf: [ {member-vnf-index: "1", vim_account: openstack1}, {member-vnf-index: "2", vim_account: openstack3} ], internal-vld: [ {name: datanet, vim-network-name: {openstack1: mgmt, ospenstack3: mgmt} } ] }'


Check:
===Specifying a volume ID for a VNF volume===
  In NS instances, go to actions and select show info to see the details of the instance.
   
In a generic way, the mapping can be specified in the following way, where 'VM1' is the name of the VDU, 'Storage1' is the volume name in VNF descriptor and '05301095-d7ee-41dd-b520-e8ca08d18a55' is the volume id:


===Specifying a volume ID for a VNF volume===
  --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: VM1, volume: [ {name: Storage1, vim-volume-id: 05301095-d7ee-41dd-b520-e8ca08d18a55} ] } ] } ] }'
  --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: VM1, volume: [ {name: Storage1, vim-volume-id: 05301095-d7ee-41dd-b520-e8ca08d18a55} ] } ] } ] }'
You can try it using one of the examples of the hackfest ('''descriptors: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_vnfd.tar.gz hackfest1-vnf], [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_nsd.tar.gz hackfest1-ns]; images: [https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 ubuntu1604], presentation: [https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%202%20-%20Creating%20a%20basic%20VNF%20and%20NS.pdf creating a basic VNF and NS]''') in the following way:
With the previous hackfest example, according [http://osm-download.etsi.org/ftp/osm-doc/vnfd.html VNF data model] you will add in VNF Descriptor:
<nowiki>
    volumes:
      - name: Storage1
        size: 'Size of the volume'
</nowiki>
osm ns-create --ns_name h1 --nsd_name hackfest1-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: hackfest1VM, volume: [ {name: Storage1, vim-volume-id: 8ab156fd-0f8e-4e01-b434-a0fce63ce1cf} ] } ] } ] }'
===Adding additonal parameters===
From release SIX (current master) additional user parameters can be added, and they land at vdu:cloud-init (Jinja2 format) and/or vnf-configuration primitives (enclosed by <>). Here is an example of VNF descriptor that uses two parameters called "touch_filename" and "touch_filename2"
<pre>
vnfd:
    ...
    vnf-configuration:
        config-primitive:
        -  name: touch
            parameter:
            -  data-type: STRING
                default-value: <touch_filename2>
                name: filename
        initial-config-primitive:
        -  name: config
            parameter:
            -  name: ssh-hostname
                value: <rw_mgmt_ip>  # this paramater is internal
            -  name: ssh-username
                value: ubuntu
            -  name: ssh-password
                value: osm4u
            seq: '1'
        -  name: touch
            parameter:
            -  name: filename
                value: <touch_filename>
            seq: '2'
</pre>
And they can be provided with:
--config '{additionalParamsForVnf: [{member-vnf-index: "1", additionalParams: {touch_filename: your-value,  touch_filename2: your-value2}}]}'

Latest revision as of 17:16, 17 February 2021

THIS PAGE IS DEPRECATED. OSM User Guide has been moved to a new location: https://osm.etsi.org/docs/user-guide/

---

When creating a NS instance, it is possible to pass instantiation parameters to OSM using the "--config" option of the client or the "config" parameter of the UI. In this section we will illustrate through some of the existing examples how to specify those parameters using OSM client:

Specify a VIM network name for a NS VLD

In a generic way, the mapping can be specified in the following way, where 'vldnet' is the name of the network in the NS descriptor and 'netVIM1' is the VIM network that you want to use:

--config '{vld: [ {name: vldnet, vim-network-name: netVIM1} ] }'

You can try it using one of the examples of the hackfest (descriptors: hackfest1-vnf, hackfest1-ns; images: ubuntu1604, presentation: creating a basic VNF and NS) in the following way:

osm ns-create --ns_name hf1 --nsd_name hackfest1-ns --vim_account openstack1 --config '{vld: [ {name: mgmtnet, vim-network-name: mgmt} ] }'

Specify a VIM network name for an internal VLD of a VNF

In this scenario, the mapping can be specified in the following way, where '1' is the member vnf index of the constituent vnf in the NS descriptor, 'internal' is the name of internal-vld in the VNF descriptor and 'netVIM1' is the VIM network that you want to use:

--config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, vim-network-name: netVIM1} ] } ] }'

You can try it using one of the examples of the hackfest (descriptors: hackfest2-vnf, hackfest2-ns; images:ubuntu1604, presentation: modeling multi-VDU VNF) in the following way:

osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1  --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, vim-network-name: mgmt} ] } ] }'

Specify IP profile information and IP for a NS VLD

In a generic way, the mapping can be specified in the following way, where 'datanet' is the name of the network in the NS descriptor, ip-profile you have to fill the associated parameters with the data model ( NS data model ), and vnfd-connection-point-ref is the reference to the connection point:

--config '{vld: [ {name: datanet, ip-profile: {...}, vnfd-connection-point-ref: {...} } ] }'

You can try it using one of the examples of the hackfest (descriptors: hackfest2-vnf, hackfest2-ns; images:ubuntu1604, presentation: modeling multi-VDU VNF) in the following way:

osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vld: [ {name: datanet, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}],dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}, vnfd-connection-point-ref: [ {member-vnf-index-ref: "1", vnfd-connection-point-ref: vnf-data, ip-address: "192.168.100.17"}]}]}'

Specify IP profile information for an internal VLD of a VNF

In this scenario, the mapping can be specified in the following way, where '1' is the member vnf index of the constituent vnf in the NS descriptor, 'internal' is the name of internal-vld in the VNF descriptor and ip-profile you have to fill the associated parameters with the data model ( VNF data model ):

--config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {...} ] } ] }'

You can try it using one of the examples of the hackfest (descriptors: hackfest2-vnf, hackfest2-ns; images:ubuntu1604, presentation: modeling multi-VDU VNF) in the following way:

osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile:  {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] ,dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}}]}]} '

Specify IP address and/or MAC address for an interface

Specify IP address for an interface

In this scenario, the mapping can be specified in the following way, where '1' is the member vnf index of the constituent vnf in the NS descriptor, 'internal' is the name of internal-vld in the VNF descriptor ,ip-profile you have to fill the associated parameters with the data model ( VNF data model ), 'id1' is the internal-connection-point id and 'a.b.c.d' is the IP that you have to specify for this scenario:

--config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {...}, internal-connection-point: [{id-ref: id1, ip-address: "a.b.c.d"}] ] } ] }'

You can try it using one of the examples of the hackfest (descriptors: hackfest2-vnf, hackfest2-ns; images:ubuntu1604, presentation: modeling multi-VDU VNF) in the following way:

 osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account ost4 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] ,dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}, internal-connection-point: [{id-ref: mgmtVM-internal, ip-address: "192.168.100.3"}]}]}]}'

Specify MAC address for an interface

In this scenario, the mapping can be specified in the following way, where '1' is the member vnf index of the constituent vnf in the NS descriptor, 'id1' is the id of VDU in the VNF descriptor and 'interf1' is the name of the interface to which you want to add the MAC address:

--config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: id1, interface: [{name: interf1, mac-address: "aa:bb:cc:dd:ee:ff" }]} ] } ] } '

You can try it using one of the examples of the hackfest (descriptors: hackfest1-vnf, hackfest1-ns; images: ubuntu1604, presentation: creating a basic VNF and NS) in the following way:

osm ns-create --ns_name hf12 --nsd_name hackfest1-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: hackfest1VM, interface: [{name: vdu-eth0, mac-address: "52:33:44:55:66:21"}]} ] } ] } '

Specify IP address and MAC address for an interface

In the following scenario, we will bring together the two previous cases

You can try it using one of the examples of the hackfest (descriptors: hackfest2-vnf, hackfest2-ns; images:ubuntu1604, presentation: modeling multi-VDU VNF) in the following way:

osm ns-create --ns_name hf12 --nsd_name hackfest2-ns --vim_account ost4 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal , ip-profile: {ip-version: ipv4, subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] , dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true} }, internal-connection-point: [ {id-ref: mgmtVM-internal, ip-address: "192.168.100.3"} ] }, ], vdu: [ {id: mgmtVM, interface: [{name: mgmtVM-eth0, mac-address: "52:33:44:55:66:21"}]} ] } ] } '

Force floating IP address for an interface

In a generic way, the mapping can be specified in the following way, where 'id1' is the name of the VDU in the VNF descriptor and 'interf1' is the name of the interface:

--config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: id1, interface: [{name: interf1, floating-ip-required: True }]} ] } ] } '

You can try it using one of the examples of the hackfest (descriptors: hackfest2-vnf, hackfest2-ns; images:ubuntu1604, presentation: modeling multi-VDU VNF) in the following way:

osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu:[ {id: mgmtVM, interface: [{name: mgmtVM-eth0, floating-ip-required: True }]} ] } ] } '

Make sure 'vim-network-name' in NS Descriptor has access to the outside to be able to use the parameter 'floating-ip-required'.

Multi-site deployments (specifying different VIM accounts for different VNFs)

In this scenario, the mapping can be specified in the following way, where '1 and 2' are the member vnf index of the constituent vnfs in the NS descriptor, 'vim1 and vim2' are the names of vim accounts and 'netVIM1 and netVIM2' are the VIM networks that you want to use:

--config '{vnf: [ {member-vnf-index: "1", vim_account: vim1}, {member-vnf-index: "2", vim_account: vim2} ], vld: [ {name: datanet, vim-network-name: {vim1: netVIM1, vim2: netVIM2} } ] }'
 # NOTE: From release SIX (current master) add 'wim_account: False' (inside --config) to avoid wim network connectivity if you have not a WIM in your system

You can try it using one of the examples of the hackfest (descriptors: hackfest2-vnf, hackfest2-ns; images:ubuntu1604, presentation: modeling multi-VDU VNF) in the following way:

osm ns-create --ns_name hf12 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vim_account: openstack1}, {member-vnf-index: "2", vim_account: openstack3} ], vld: [ {name: mgmtnet, vim-network-name: {openstack1: mgmt, openstack3: mgmt} } ] }' 

Specifying a volume ID for a VNF volume

In a generic way, the mapping can be specified in the following way, where 'VM1' is the name of the VDU, 'Storage1' is the volume name in VNF descriptor and '05301095-d7ee-41dd-b520-e8ca08d18a55' is the volume id:

--config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: VM1, volume: [ {name: Storage1, vim-volume-id: 05301095-d7ee-41dd-b520-e8ca08d18a55} ] } ] } ] }'

You can try it using one of the examples of the hackfest (descriptors: hackfest1-vnf, hackfest1-ns; images: ubuntu1604, presentation: creating a basic VNF and NS) in the following way:

With the previous hackfest example, according VNF data model you will add in VNF Descriptor:

     volumes:
      - name: Storage1
        size: 'Size of the volume'

osm ns-create --ns_name h1 --nsd_name hackfest1-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: hackfest1VM, volume: [ {name: Storage1, vim-volume-id: 8ab156fd-0f8e-4e01-b434-a0fce63ce1cf} ] } ] } ] }'


Adding additonal parameters

From release SIX (current master) additional user parameters can be added, and they land at vdu:cloud-init (Jinja2 format) and/or vnf-configuration primitives (enclosed by <>). Here is an example of VNF descriptor that uses two parameters called "touch_filename" and "touch_filename2"

vnfd:
    ...
    vnf-configuration:
        config-primitive:
        -   name: touch
            parameter:
            -   data-type: STRING
                default-value: <touch_filename2>
                name: filename
        initial-config-primitive:
        -   name: config
            parameter:
            -   name: ssh-hostname
                value: <rw_mgmt_ip>  # this paramater is internal
            -   name: ssh-username
                value: ubuntu
            -   name: ssh-password
                value: osm4u
            seq: '1'
        -   name: touch
            parameter:
            -   name: filename
                value: <touch_filename>
            seq: '2'

And they can be provided with:

--config '{additionalParamsForVnf: [{member-vnf-index: "1", additionalParams: {touch_filename: your-value,  touch_filename2: your-value2}}]}'