OSM instantiation parameters: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
Line 13: Line 13:
  --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} ] } ] }'


You can try it using one of the examples of the hackfest in the following way:
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, vim-network-name: mgmt} ] } ] }'


'''Descriptors and Image: '''[https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz hackfest2-vnf]
===Specify IP profile information for a NS VLD===
[https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz hackfest2-ns]
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 and 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] ):
[https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2 Image ubuntu1604]
--config '{vld: [ {name: datanet, 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 '{vld: [ {name: mgmtnet} ], ip-profiles: [ {name: profile_external1, ip-profile-params: {ip-version: ipv4, dns-server: "8.8.8.8",gateway-address: "" ,subnet-address: "192.168.17.0/24", dhcp-params: {enabled: true} } } ] }'


'''Reference material:'''  [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]


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} ] } ] }'




Line 35: Line 37:


===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} } ] }'


* '''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:
In NS instances, go to actions and select show info to see the details of the instance.


===Specifying a volume ID for a VNF volume===
===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} ] } ] } ] }'

Revision as of 05:49, 29 August 2018

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 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 and ip-profile you have to fill the associated parameters with the data model ( NS data model ):

--config '{vld: [ {name: datanet, 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 '{vld: [ {name: mgmtnet} ], ip-profiles: [ {name: profile_external1, ip-profile-params: {ip-version: ipv4, dns-server: "8.8.8.8",gateway-address: "" ,subnet-address: "192.168.17.0/24", dhcp-params: {enabled: true} } } ] }'



Specify IP profile information for an internal VLD of a VNF

--config '{vld: [ {name: datanet, ip-profile: {...} } ] }'

Specify IP address and/or mac address for an interface

--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"}]} ] } ] } '

Force floating IP address for an interface

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

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} } ] }'

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

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