diff --git a/02-osm-nfvi-test-plan.md b/02-osm-nfvi-test-plan.md index 8f0abf70cdff49100abfaded4abc8efb2ac02667..8524bcdeeacab42702ed5ab7b1eca9cbac93d226 100644 --- a/02-osm-nfvi-test-plan.md +++ b/02-osm-nfvi-test-plan.md @@ -593,47 +593,218 @@ NOTE: VNF Metrics collection for scaled instances is not supported. ### \[SLICING-01\] Basic Network Slicing -1. Onboard the packages and the Network Slice Template +1. Onboard the packages and the Network Slice Templates ```bash - osm vnfpkg-create slice_hackfest_vnf.tar.gz - osm nspkg-create slice_hackfest_ns.tar.gz - osm nst-create slice_hackfest_nst.yaml + osm vnfd-create slice_basic_vnf + osm vnfd-create slice_basic_middle_vnfd + osm nsd-create slice_basic_ns + osm nsd-create slice_basic_middle_nsd + osm netslice-template-create slice_basic_nst/slice_basic_nst.yaml ``` 2. Instantiate the Slice ```bash - osm nsi-create --nsi_name my_slice --nst_name slice_hackfest_nst --vim_account --config 'netslice-vld: [{name: slice_hackfest_vld_data, vim-network-name: }]' + osm nsi-create --nsi_name slicebasic --nst_name slice_basic_nst --vim_account --config '{netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: } ] }' + # Wait for the slice to be configured + osm nsi-list --filter name="slicebasic" ``` + +3. Get the slice Middle VNF IP address -3. Check that the Network services have been created. + ```bash + # Get the ns id of the middle ns (called slicebasic.slice_basic_nsd_2) + osm ns-list | grep slicebasic.slice_basic_nsd_2 | awk '{print $4}' + # Get the IP address of the first (and only) VNF in the ns: MGMT_IP + osm vnf-list --filter member-vnf-index-ref=1 | grep | awk '{print $14}' + ``` + +4. Test Ping to the middle VNF ```bash - osm nsi-list - osm ns-list |grep my_slice - osm nsi-show my_slice - # Look for nsr-ref-list. There should be 2 Network Services - osm ns-show - osm vnf-show --ns + ping -c 5 -W 1 /dev/null && echo OK ``` -4. SSH to the VNF +5. SSH to the middle VNF ```bash - osm vnf-show --ns ssh osm@ [pwd: osm4u] ``` -5. Delete the slice + +6. Get all the IP addresses of the slice ```bash - osm nsi-delete my_slice + # Get the list of ns of the slice + osm ns-list | grep slicebasic | awk '{print $4}' + # For each of the ns in the list, get the list of the VNFs + osm vnf-list | grep | awk '{print $2}' + # For each VNFs in the list, get the list of the IPs + osm vnf-show --filter vdur --literal | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -t: -u -k1,1 + ``` + +7. Test first slice connectivity: Ping all the VMs in the slice + + ```bash + ssh osm@ [pwd: osm4u] + # For each of the IP addresses obtained in step #5 + ping -c 5 -W 1 > /dev/null && echo OK + ``` + +8. Stop the first slice intance + + ```bash + osm nsi-delete slicebasic + ``` + +9. Delete the template and packages + + ```bash + osm netslice-template-delete slice_basic_nst + osm netslice-template-delete slice_basic_nst2 + osm nsd-delete slice_basic_nsd + osm nsd-delete slice_basic_middle_nsd + osm vnfd-delete slice_basic_vnfd + osm vnfd-delete slice_basic_middle_vnfd ``` ### \[SLICING-02\] Complex Network Slicing -TODO: Under ellaboration. Similar to above, but with more components and shared NS. +1. Onboard the packages and the Network Slice Templates + + ```bash + osm vnfd-create slice_basic_vnf + osm vnfd-create slice_basic_middle_vnfd + osm nsd-create slice_basic_ns + osm nsd-create slice_basic_middle_nsd + osm netslice-template-create slice_basic_nst/slice_basic_nst.yaml + osm netslice-template-create slice_basic_nst/slice_basic_2nd_nst.yaml + ``` + +2. Instantiate the first Slice + + ```bash + osm nsi-create --nsi_name slicebasic --nst_name slice_basic_nst --vim_account --config '{netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: } ] }' + # Wait for the slice to be configured + osm nsi-list --filter name="slicebasic" + ``` + +3. Instantiate the second Slice + + ```bash + osm nsi-create --nsi_name sliceshared --nst_name slice_basic_nst2 --vim_account --config '{netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: } ] }' + # Wait for the slice to be configured + osm nsi-list --filter name="sliceshared" + ``` + + +4. Check that the Network services have been created. + + ```bash + # Count the Network services in the first slice + osm ns-list | grep slicebasic | wc -l + # Count the Network services in the second slice + osm ns-list | grep sliceshared | wc -l + # The addition should be 4 + ``` + +4. Get the slice Middle VNF IP address + + ```bash + # Get the ns id of the middle ns (called slicebasic.slice_basic_nsd_2) + osm ns-list | grep slicebasic.slice_basic_nsd_2 | awk '{print $4}' + # Get the IP address of the first (and only) VNF in the ns: MGMT_IP + osm vnf-list --filter member-vnf-index-ref=1 | grep | awk '{print $14}' + ``` + +5. Get all the IP addresses of the first slice + + ```bash + # Get the list of ns of the slice + osm ns-list | grep slicebasic | awk '{print $4}' + # For each of the ns in the list, get the list of the VNFs + osm vnf-list | grep | awk '{print $2}' + # For each VNFs in the list, get the list of the IPs + osm vnf-show --filter vdur --literal | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -t: -u -k1,1 + ``` + +6. Test Ping to the middle VNF + + ```bash + ping -c 5 -W 1 /dev/null && echo OK + ``` + +7. SSH to the middle VNF + + ```bash + ssh osm@ [pwd: osm4u] + ``` + +8. Test first slice connectivity: Ping all the VMs in the slice + + ```bash + ssh osm@ [pwd: osm4u] + # For each of the IP addresses obtained in step #5 + ping -c 5 -W 1 > /dev/null && echo OK + ``` + +9. Stop the first slice intance + + ```bash + osm nsi-delete slicebasic + ``` + +10. Count the Network services remaining after deleting the first slice + + ```bash + # Count the Network services in the first slice + osm ns-list | grep slicebasic | wc -l + # Count the Network services in the second slice + osm ns-list | grep sliceshared | wc -l + # The addition should be 2 + ``` + +11. Get all the IP addresses of the second slice + + ```bash + # Get the list of ns of the slice + osm ns-list | grep sliceshared | awk '{print $4}' + # For each of the ns in the list, get the list of the VNFs + osm vnf-list | grep | awk '{print $2}' + # For each VNFs in the list, get the list of the IPs + osm vnf-show --filter vdur --literal | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort -t: -u -k1,1 + ``` + +12. Test second slice connectivity: Ping all the VMs in the slice + + ```bash + ssh osm@ [pwd: osm4u] + # For each of the IP addresses obtained in step #11 + ping -c 5 -W 1 > /dev/null && echo OK + ``` + +13. Stop the second slice intance + + ```bash + osm nsi-delete sliceshared + ``` + +14. Delete the template and packages + + ```bash + osm netslice-template-delete slice_basic_nst + osm netslice-template-delete slice_basic_nst2 + osm nsd-delete slice_basic_nsd + osm nsd-delete slice_basic_middle_nsd + osm vnfd-delete slice_basic_vnfd + osm vnfd-delete slice_basic_middle_vnfd + ``` + + +### \[SLICING-03\] Advanced Network Slicing + +TODO: Under ellaboration. Similar to above, but with day-2 operations ## Kubernetes and cloud-native