Sample Test Cases
The test cases specified in this chapter are implemented as a Sample
Test Suite included in the TH.
VNF, Device and Network Smoke Test Cases
The following is an automated test suite that acts as basic smoke
tests for Enea NFV Access, and as a sanity-check test suite for the AF and
TH.
VNF - Onboard a VNF Image
Description: Onboarding a VNF
Image into the uCPE Manager. For details please refer to:
<AF-TH-install-dir>/playbooks/onboardVNFImage.yml
<AF-TH-install-dir>/automation_framework/vnf/onboardVNFRaw.py
Preconditions:
Add the VNF Image in the vnf_image folder
in the QCOW2 format: <AF-TH-install-dir>/vnf_image/<VNF-Image-name>.qcow2
A VNF Image JSON configuration file is created:
<AF-TH-install-dir>/vnf_config/<VNF-Descriptor-name>/<VNF-Descriptor-name>.jsonExample:<AF-TH-install-dir>/vnf_config/fortigateImage/fortigateImage.json
Action: Run the
onboardVNFImage.yml Ansible Playbook with the
<VNF-Image-name> and the
<VNF-Descriptor-name> as extra-vars:
ansible-playbook playbooks/onboardVNFImage.yml -e "vnfb=<VNF-Image-name> \
vnfd=<VNF-Descriptor-name>"
Result: Output of the test case
run using the Test Harness:# Onboard VNF Image task result
<VNF-Descriptor-name> successfully onboarded!Note: The test will not fail if the VNF Image is
already onboarded. The output will instead contain: # debug <VNF-Descriptor-name> already onboarded!
VNF - Offboard a VNF
Description: Removing a VNF
Descriptor from the uCPE Manager. For details please refer to:
<AF-TH-install-dir>/playbooks/offboardVNF.yml
<AF-TH-install-dir>/automation_framework/vnf/offboardVNF.py
Precondition: The VNF has been
previously onboarded in the uCPE Manager instance.
Action: Run the
offboardVNF.yml Ansible Playbook with the
<VNF-Descriptor-name> as extra-vars:
ansible-playbook playbooks/offboardVNF.yml -e "vnfd=<VNF-Descriptor-name>"
Result: Output of the test case
run using the Test Harness: # Remove Descriptor task result
<VNF-Descriptor-name> was removed!Note: The test will not fail if the VNF
Descriptor does not exist. The output will instead contain:
# debug No Descriptor with name <VNF-Descriptor-name>!
Device - Add a device
Description: Adding a uCPE device
to the uCPE Manager. For details please refer to:
<AF-TH-install-dir>/playbooks/addDevice.yml
<AF-TH-install-dir>/automation_framework/device/addDevice.py
Precondition: A device JSON
configuration file must be created: <AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json
Example: <AF-TH-install-dir>/lab_config/intelc3850-2/intelc3850-2.json
Action: Run the
addDevice.yml Ansible playbook with the
<Device-name> as extra-vars: ansible-playbook playbooks/addDevice.yml -e "device=<Device-name>"
Result: Output of the test case
run using the Test Harness: # Add Device task result
<Device-name> device was added!Note: The test will not fail if the device
already exists. The output will instead contain: # debug
<Device-name> device already exists!
Device - Upload a NFV Access image
Description: Upload a NFV Access
image file onto the uCPE Manager. For details please refer to:
<AF-TH-install-dir>/playbooks/uploadImage.yml
<AF-TH-install-dir>/automation_framework/device/uploadImage.py
Precondition: The image path must
already exist.
Example: ansible-playbook playbooks/uploadImage.yml -e \
image_path="/tmp/enea-nfv-access-xeon-d6.rootfs.ostree.tar.bz2" -e \
upgrade_type="xeon_d"
Action: Run the
uploadImage.yml Ansible playbook with the
<Image-path> and
<Upgrade-type> as extra-vars:
ansible-playbook playbooks/deleteUpgradeFile.yml -e \
image_path="<Image-path>" -e upgrade_type="<Upgrade-type>"
Result: Output of the test case
run using the Test Harness:
TASK [Upload NFVA image -- Run uploadImage.py module from automation_framework]
localhost : ok=1 changed=1 unreachable=0 failed=0Note: The test will fail if the image file has
already been uploaded.
TASK [Upload NFVA image -- Run uploadImage.py module from automation_framework]
ok=0 changed=0 unreachable=0 failed=1
# debug
A file with the same name is already uploaded.
Device - Delete Upgraded File
Description: Deleting an uploaded
NFV Access image file from the uCPE Manager. For details please refer
to:
<AF-TH-install-dir>/playbooks/deleteUpgradeFile.yml
<AF-TH-install-dir>/automation_framework/device/deleteUpgradeFile.py
Preconditions: The image file
must already be uploaded onto the uCPE Manager.
Example:
ansible-playbook playbooks/deleteUpgradeFile.yml -e \
image_name="enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2"
Action: Run the
deleteUpgradeFile.yml Ansible Playbook with the
<Image-name> as extra-vars:ansible-playbook playbooks/deleteUpgradeFile.yml -e \
image_name="<Image-name>"
Result: Output of the test case
run using the Test Harness:TASK [Remove NFVA image -- Run deleteUpgradeFile.py module from automation_framework]
localhost : ok=1 changed=1 unreachable=0 failed=0
Note: The test will fail if the image
file does not exist: TASK [Remove NFVA image -- Run deleteUpgradeFile.py module from automation_framework]
ok=0 changed=0 unreachable=0 failed=1
# debug
No oid found for '<image_name>' image name
Device - Clear information about upgrades of uCPE devices
Description: Clear information
about upgrades of uCPE devices. For details please refer to:
<AF-TH-install-dir>/playbooks/clearCompletedUpgradesInfo.yml
<AF-TH-install-dir>/automation_framework/device/clearCompletedUpgradesInfo.py
Preconditions: No preconditions
needed.
Action: Run the
clearCompletedUpgradesInfo.yml Ansible
Playbook:ansible-playbook playbooks/clearCompletedUpgradesInfo.yml
Result: Output of the test case
run using the Test Harness:TASK [Clear completed info about upgrading -- Run \
clearCompletedUpgradesInfo.py module from automation framework]]
localhost : ok=1 changed=1 unreachable=0 failed=0
Device - Install and Activate a NFV Access image
Description: Installing and
Activating a NFV Access image on a uCPE device from the uCPE Manager.
For details please refer to:
<AF-TH-install-dir>/playbooks/installAndActivate.yml
<AF-TH-install-dir>/automation_framework/device/installAndActivate.py
Preconditions:
The device must be previously added to the uCPE Manager
instance.
The image file must already be uploaded onto the uCPE
Manager.
Example:
ansible-playbook playbooks/installAndActivate.yml -e \
image_name="enea-nfv-access-xeon-d6.rootfs.ostree.tar.bz2" -e \
upgrade_type=xeon_d -e device=inteld1521-16"
Action: Run the
installAndActivate.yml Ansible Playbook with the
<Image-name>,
<Upgrade-type>, and the
<Device-name> as extra-vars:ansible-playbook playbooks/installAndActivate.yml -e \
image_name="<Image_name>" -e upgrade_type="<Upgrade_type>" -e \
device="<Device-name>"
Result: Output of the test case
run using the Test Harness:TASK \
[Install And Activate -- Run installAndActivate.py module from automation_framework]
localhost : ok=1 changed=1 unreachable=0 failed=0
Note: The test will fail if the image
has already been installed on the uCPE device:TASK \
[Install And Activate -- Run installAndActivate.py module from automation_framework]
ok=0 changed=0 unreachable=0 failed=1
# debug
Duplicate entry - Release already installed
Device - Upload, Install and Activate a NFV Access image on a
uCPE device
Description: Upload, install and
activate a NFV Access image on a uCPE device from the uCPE Manager. For
details please refer to:
<AF-TH-install-dir>/playbooks/installNFVAImage.yml
The playbook imports the previously described
playbooks:
playbook/addDevice.yml
playbook/uploadImage.yml
playbook/installAndActivate.yml
playbook/deleteUpgradeFile.yml
playbook/clearCompletedUpgradesInfo.yml
playbook/removeDevice.yml
Precondition: A device JSON
configuration file must be created:<AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json
Example:
ansible-playbook playbooks/installNFVAImage.yml -e \
device="inteld1521-16" -e \
image_path=/tmp/enea-nfv-access-xeon-d5.rootfs.ostree.tar.bz2 -e \
image_name=enea-nfv-access-xeon-d5.rootfs.ostree.tar.bz2 -e \
upgrade_type=xeon_d
Action: Run the
installNFVAImage.yml Ansible Playbook with the
<Image-path>,
<Image-name>,
<Upgrade-type>, and the
<Device-name> as extra-vars:ansible-playbook playbooks/installNFVAImage.yml -e \
device="<Device-name>" -e image_path="<Image-path>" -e \
image_name="<Image-name>" -e upgrade_type="<Upgrade-type>"
Result: Output of the test case
run using the Test Harness:localhost : ok=1 changed=1 unreachable=0 failed=0
Note: The test will fail if the one
imported playbook fails:ok=0 changed=0 unreachable=0 failed=1
Device - Wait a Device
Description: Wait for a uCPE
device to connect to the uCPE Manager. For details please refer
to:
<AF-TH-install-dir>/playbooks/waitDeviceUp.yml
<AF-TH-install-dir>/automation_framework/device/waitDeviceUp.py
Preconditions:
The device has to be previously added to the uCPE Manager
instance.
The device JSON configuration file must exist:
<AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json
Action: Run the
waitDeviceUp.yml Ansible Playbook with the
<Device-name> as extra-vars: ansible-playbook playbooks/waitDeviceUp.yml -e "device=<Device-name>"
Result: Output of the test case
run using the Test Harness:# Wait Device task result
<Device-name> device is connected! Note: The test will fail if the device does not
exist or it is not connected.
Device - Remove a Device
Description: Removing a uCPE
device from the uCPE Manager. For details please refer to:
<AF-TH-install-dir>/playbooks/removeDevice.yml
<AF-TH-install-dir>/automation_framework/device/removeDevice.py
Preconditions:
The device has to be previously added to the uCPE Manager
instance.
The device JSON configuration file must exist:
<AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json
Action: Run the
removeDevice.yml Ansible Playbook with the
<Device-name> as extra-vars: ansible-playbook playbooks/removeDevice.yml -e "device=<Device-name>"
Result: Output of the test case
run using the Test Harness:# Remove Device task result
<Device-name> device was removed! Note: The test will not fail if the device does
not exist. The output will contain: # debug
<Device-name> device was not found!
Network - Bind a NIC
Description: Binding a physical
network interface (NIC) to a device. For details please refer to:
<AF-TH-install-dir>/playbooks/bindNIC.yml
<AF-TH-install-dir>/automation_framework/network/bindNetworkInterface.py
Preconditions:
A device must have been previously added and connected to the
uCPE Manager instance.
A NIC JSON configuration file must exist: <AF-TH-install-dir>/lab_config/<Device-name>/<NIC>.json
Example: <AF-TH-install-dir>/lab_config/intelc3850-2/wan_nic.json
<AF-TH-install-dir>/lab_config/intelc3850-2/lan_nic.json
Action: Run the
bindNIC.yml Ansible Playbook with the
<Device-name> and
<NIC> as extra-vars: ansible-playbook playbooks/bindNIC.yml -e "device=<Device-name> nic=<NIC>"
Result: Output of the test case
run using the Test Harness:# Bind NIC task result
<NIC> binded successfully! Note: The test will not fail if the NIC is
already bound, it will be unbound and bound again with the provided
configuration.
Network - Unbind a NIC
Description: Unbinding a physical
network interface (NIC) from a device. For details please refer
to:
<AF-TH-install-dir>/playbooks/unbindNIC.yml
<AF-TH-install-dir>/automation_framework/network/unbindNetworkInterface.py
Preconditions:
A NIC is bound to a device in a uCPE Manager instance.
A NIC JSON configuration file exists: <AF-TH-install-dir>/lab_config/<Device-name>/<NIC>.json
Action: Run the
unbindNIC.yml Ansible Playbook with the
<Device-name> and
<NIC> as extra-vars: ansible-playbook playbooks/unbindNIC.yml -e "device=<Device-name> nic=<NIC>"
Result: Output of the test case
run using the Test Harness: # Unbind NIC task result
<NIC> unbinded! Note:
The test will not fail if the NIC is not bound. The output will instead
contain:# debug
<NIC> is not binded!
Network - Create a Bridge
Description: Creating an OVS
network bridge on a uCPE device. For details please refer to:
<AF-TH-install-dir>/playbooks/addBridge.yml
<AF-TH-install-dir>/automation_framework/network/newNetworkBridge.py
Preconditions:
A NIC is bound to a device in a uCPE Manager
instance.
A Bridge JSON configuration file exists:<AF-TH-install-dir>/lab_config/<Device-name>/<Bridge-name>.json
Example:<AF-TH-install-dir>/lab_config/intelc3850-2/wan_br.json
<AF-TH-install-dir>/lab_config/intelc3850-2/lan_br.json
Action: Run the
addBridge.yml Ansible Playbook with the
<Device-name> and the
<Bridge-name> as extra-vars: ansible-playbook playbooks/addBridge.yml -e "device=<Device-name> bridge=<Bridge-name>"
Result: Output of the test case
run using the Test Harness: # Add Bridge task result
<Bridge-name> network bridge was added!Note: The test will not fail if there already
exists a bridge with the same name. It will be deleted and the bridge
will be created again with the provided configuration.
Network - Remove a Bridge
Description: Removing an OVS
network bridge from a uCPE device. For details please refer to:
<AF-TH-install-dir>/playbooks/deleteBridge.yml
<AF-TH-install-dir>/automation_framework/network/delNetworkBridge.py
Preconditions:
A Bridge exists in a uCPE Manager instance.
A Bridge JSON configuration file exists: <AF-TH-install-dir>/lab_config/<Device-name>/<Bridge-name>.json
Action: Run the
deleteBridge.yml Ansible Playbook with the
<Device-name> and the
<Bridge-name> as extra-vars: ansible-playbook playbooks/deleteBridge.yml -e "device=<Device-name> \
bridge=<Bridge-name>"
Result: Output of the test case
run using the Test Harness: # Delete Bridge task result
<Bridge-name> network bridge was deleted!Note: The test will not fail if the bridge does
not exist: # debug
<Bridge-name> bridge not found!
Network - Configure a DPDK
Description: Enabling or
Disabling the DPDK support in OVS. For details please refer to:
<AF-TH-install-dir>/playbooks/network/configDPDK.yml.
<AF-TH-install-dir>/automation_framework/network/configDPDK.py.
Precondition:
A device must have been previously added and connected to the uCPE
Manager instance.
Action: Run the
configDPDK.yml Ansible Playbook with the
<Device-name> and
<enable/disable> as extra-vars:ansible-playbook playbooks/configDPDK.yml -e "device=<Device-name> \
state=<enable/disable>"
Result: Output of the test case
run using the Test Harness:
# Configure DPDK task result
DEBUG: Set DPDK state to <enable/disable>Note: DPDK use cannot be disabled if DPDK
interfaces are configured. The task will fail in this case.
Custom Scripts - Upload a Custom Script to the uCPE
Manager
Description: Upload a Custom
Script to the uCPE Manager. For details please refer to:
<AF-TH-install-dir>/playbooks/uploadCustomScript.yml.
<AF-TH-install-dir>/automation_framework/customScripts/upload.py.
Precondition:
lab_config/customScripts must contain a Custom
Script file.
Action: Run the
uploadCustomScript.yml Ansible Playbook with the
<scriptName> and
<phase> as extra-vars: ansible-playbook playbooks/uploadCustomScript.yml -e "scriptName=<scriptName> \
phase=
<always-after-startup/once-after-startup/always-before-startup/once-before-startup>"
Result: Output of the test case
run using the Test Harness:
# Upload Custom Script task result
DEBUG: "{{ scriptName }} was uploaded to uCPE Manager!"
Custom Scripts - Upload a Custom Script from the uCPE Manager to
a Device
Description: Upload a Custom
Script from the uCPE Manager to a Device. For details please refer
to:
<AF-TH-install-dir>/playbooks/uploadCustomScriptOnDevice.yml.
<AF-TH-install-dir>/automation_framework/customScripts/uploadOnDevice.py.
Preconditions:
A device must have been previously added and connected to the
uCPE Manager instance.
A Custom Script must have been previously added to the uCPE
Manager instance.
Action: Run the
uploadCustomScriptOnDevice.yml Ansible Playbook
with the <scriptName>,
<phase> and
<deviceName> as extra-vars: ansible-playbook playbooks/uploadCustomScriptOnDevice.yml -e "scriptName=<scriptName> \
phase=
<always-after-startup/once-after-startup/always-before-startup/once-before-startup> \
device=<deviceName>"
Result: Output of the test case
run using the Test Harness:
# Upload Custom Script on Device task result
DEBUG: "{{ scriptName }} was uploaded to {{ device }}!"
Custom Scripts - Remove a Custom Script from the uCPE
Manager
Description: Remove a Custom
Script from the uCPE Manager. For details please refer to:
<AF-TH-install-dir>/playbooks/removeCustomScript.yml.
<AF-TH-install-dir>/automation_framework/customScripts/delete.py.
Precondition:
A Custom Script must have been previously added to the uCPE
Manager.
Action: Run the
removeCustomScript.yml Ansible Playbook with the
<scriptName> and
<phase> as extra-vars: ansible-playbook playbooks/removeCustomScript.yml -e "scriptName=<scriptName> \
phase=
<always-after-startup/once-after-startup/always-before-startup/once-before-startup>"
Result: Output of the test case
run using the Test Harness:
# Remove Custom Script in phase from uCPE Manager task result
DEBUG: "{{ scriptName }} from phase {{ phase }} was removed from uCPE Manager!"
Custom Scripts - Remove a Custom Script from a Device
Description: Remove a Custom
Script from a Device. For details please refer to:
<AF-TH-install-dir>/playbooks/removeCustomScriptOnDevice.yml.
<AF-TH-install-dir>/automation_framework/customScripts/deleteOnDevice.py.
Preconditions:
A device must have been previously added and connected to the
uCPE Manager instance.
A Custom Script must have been previously added to the
Device.
Action: Run the
removeCustomScriptOnDevice.yml Ansible Playbook
with the <scriptName>,
<phase> and and
<deviceName> as extra-vars: ansible-playbook playbooks/removeCustomScriptOnDevice.yml -e "scriptName=<scriptName> \
phase=
<always-after-startup/once-after-startup/always-before-startup/once-before-startup> \
device=<deviceName>"
Result: Output of the test case
run using the Test Harness:
# Remove Custom Script in phase from Device task result
DEBUG: "{{ scriptName }} from phase {{ phase }} was removed from {{ device }}!"
VNF Deployment and Lifecycle
The following details the automated suite that handles the testing
of the instantiation, lifecycle and destruction of a VNF for Enea NFV
Access.
Instantiating a VNFI
Description: Creating a VNF
instance on a uCPE device. For details please refer to:
<AF-TH-install-dir>/playbooks/instantiateVNFI.yml
<AF-TH-install-dir>/automation_framework/vnf/instantiateVNFI.py
Preconditions:
A VNF Image is onboarded and a device is added and connected
to the uCPE Manager. Depending on the VNF, other steps may be
required.
A VNFI JSON configuration file exists: <AF-TH-install-dir>/vnf_config/<VNF-Descriptor-name>/<VNFI-name>.json
Example: <AF-TH-install-dir>/vnf_config/fortigateImage/fortigateFWInstance.json
Action: Run the
instantiateVNFI.yml Ansible Playbook with the
<Device-name>,
<VNF-Descriptor-name> and the
<VNFI-name> as extra-vars: ansible-playbook playbooks/instantiateVNFI.yml -e "device=<Device-name> \
vnfd=<VNF-Descriptor-name> vnfi=<VNFI-name>"
Result: Output of the test case
run using the Test Harness: # Instantiate VNF task result
<VNFI-name> was instantiated!Note: The test will not fail if the VNF instance
already exists. The output will instead contain: # debug
<VNFI-name> already exists!
Controlling a VNFI
Description: Changing the status
of a VNF instance (Pause, Resume, Stop, Start). For details please refer
to:
<AF-TH-install-dir>/playbooks/controlVNFI.yml
<AF-TH-install-dir>/automation_framework/vnf/controlVNFI.py
Precondition: A VNF is
instantiated on a uCPE device.
Action: Run the
controlVNFI.yml Ansible Playbook with the
<Device-name>,
<VNFI-name> and the
<Command> as extra-vars: ansible-playbook playbooks/controlVNFI.yml -e "device=<Device-name> \
vnfi=<VNFI-name> status=<Command>"Where Command =
{ pause | resume | stop | start }
Result: Output of the test case
run using the Test Harness: # Change VNFI Status task result
<VNFI-name> status was set to <Command>Note: The test will not fail if the VNF instance
does not exist or if the specified command is not valid. Depending on
the case, the output will contain: # debug
<VNFI-name> was not found!or# debug
Invalid VNF Instance control command specified - <Command>
Destroying a VNFI
Description: Destroying a VNF
instance from a uCPE device. For details please refer to:
<AF-TH-install-dir>/playbooks/destroyVNFI.yml
<AF-TH-install-dir>/automation_framework/vnf/destroyVNFI.py
Precondition: A VNF is
instantiated on a uCPE device.
Action: Run the
destroyVNFI.yml Ansible Playbook with the
<Device-name> and the
<VNFI-name> as extra-vars: ansible-playbook playbooks/destroyVNFI.yml -e "device=<Device-name> \
vnfi=<VNFI-name>"Result: Output of the test case run using the
Test Harness:# Destroy VNFI task result
<VNFI-name> was destroyed!Note: The test will not fail if the VNF instance
does not exist. The output will instead contain: # debug
<VNFI-name> was not found!
Service Creation and Lifecycle
This test suite contains more complex test cases designed to verify
service creation and service lifecycle management. These test cases also
serve as examples of how different services can be deployed using the
Automation Framework (AF) and the Test Harness (TH).
Fortigate VNF as a Firewall
This test case was implemented in two different ways to exemplify
both methods supported by the AF and TH to deploy such services.
Prerequisites needed in order to deploy the FortiGate VNF as a
Firewall:
Add a uCPE device.
Wait for the uCPE device to be connected in the Enea uCPE
Manager.
Onboard the FortiGate VNF Image.
Bind 2 physical interfaces: wan_nic (this
physical interface has to be connected to the Lab Network) and
lan_nic.
Create 2 bridges: wan_br (using the
wan_nic interface) and lan_br
(using the lan_nic interface).
Instantiate the FortiGate VNF using the basic Firewall
configuration provided with your Enea NFV Access Release, and the
Fortigate License file.
Please contact the local Fortinet sales representatives in
your region to get the Fortigate License file.
For more information please refer to section FortiGate VNF as a Firewall in the
Manual.
FortigateFWInstance Test
Description: Instantiate the
FortiGate VNF as a Firewall and test it using an isolated network
namespace.
This example was implemented with the "Test Harness" method,
based on Ansible Playbooks. For details please refer to:
<AF-TH-install-dir>/playbooks/fortigateFWService/instantiateFortigateFW.yml
<AF-TH-install-dir>/playbooks/fortigateFWService/testFortigateFWInstance.yml
<AF-TH-install-dir>/playbooks/fortigateFWService/cleanupTestFortigateFWInstance.yml
<AF-TH-install-dir>/playbooks/fortigateFWService/cleanupFortigateFWInstance.yml
Preconditions:
Add the Fortigate VNF Image
(fortios.qcow2) to the
vnf_image folder.
The device JSON configuration file is created:
<AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json.
Add device settings in the hosts Ansible
inventory file under [fortigateFW] and remove
the intelc3850-2 example.
Example: intelc3850-2 ansible_host=172.24.12.114 ansible_port=22 \
ansible_user=root ansible_pass=root
NIC JSON configuration files are created:
<AF-TH-install-dir>/lab_config/<Device-name>/wan_nic.json
<AF-TH-install-dir>/lab_config/<Device-name>/lan_nic.json
Bridge JSON configuration files are created:
<AF-TH-install-dir>/lab_config/<Device-name>/wan_br.json
<AF-TH-install-dir>/lab_config/<Device-name>/lan_br.json
Download the FortiGate VNF Firewall basic configuration file
from Enea, copy it into the
<AF-TH-install-dir>/vnf_config/fortigateImage
directory and rename it to
fortigateFW.conf.
Retrieve the FortiGate VNF license file from Fortinet or
Enea, copy it into the
<AF-TH-install-dir>/vnf_config/fortigateImage
directory and rename it to
fortigateLicense.lic.
For more information please refer to section FortiGate VNF as a Firewall in
the
Manual.
Action: Run the
instantiateFortigateFW.yml Ansible Playbook with
the <Device-name> as
extra-vars:ansible-playbook playbooks/fortigateFWService/instantiateFortigateFW.yml \
-e "device=<Device-name>"
Result: Output of the test case
run using the Test Harness: # Test FortigateFWInstance task result
FortigateFWInstance tested successfully!
Cleanup: Run the
cleanupFortigateFWInstance.yml Ansible Playbook
with the <Device-name> as extra-vars:
ansible-playbook playbooks/fortigateFWService/cleanupFortigateFWInstance.yml \
-e "device=<Device-name>"
DeployFortigateFW Scenario
Description: Deploy the
Fortigate VNF as a Firewall. This example was implemented with the
"Automation Framework" method, based on the
unittestSuite.py Python module.
For details please refer to:
<AF-TH-install-dir>/playbooks/unittestSuiteTest/deployFortigateFWScenario.yml
<AF-TH-install-dir>/playbooks/unittestSuiteTest/cleanupFortigateFWScenario.yml
<AF-TH-install-dir>/automation_framework/unittestSuite
directory.
Preconditions:
Add the FortiGate VNF Image
(fortios.qcow2) to the
vnf_image folder.
The device JSON configuration file is created:
<AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json.
The NIC JSON configuration files are created:
<AF-TH-install-dir>/lab_config/<Device-name>/wan_nic.json
<AF-TH-install-dir>/lab_config/<Device-name>/lan_nic.json
The Bridge JSON configuration files are created:
<AF-TH-install-dir>/lab_config/<Device-name>/wan_br.json
<AF-TH-install-dir>/lab_config/<Device-name>/lan_br.json
Download the FortiGate VNF Firewall basic configuration from
Enea, copy it into the
<AF-TH-install-dir>/vnf_config/fortigateImage
directory and rename it to
fortigateFW.conf.
Retrieve the FortiGate VNF license file from Fortinet or
Enea, copy it into the
<AF-TH-install-dir>/vnf_config/fortigateImage
directory and rename it to
fortigateLicense.lic.
For more details, please refer to:
Section FortiGate VNF as a
Firewall in the
Manual.
Section Python Unit-Test Suite in
.
Action: Run the
deployFortigateFWScenario.yml Ansible Playbook
with the <Device-name> as extra-vars:
ansible-playbook playbooks/unittestSuiteTest/deployFortigateFWScenario.yml \
-e "device=<Device-name>"
Result: Output of the test case
run using the Test Harness: # unittestSuite Deploy Test task result
FortigateFW Scenario deployed successfully!
Cleanup: Run the
cleanupFortigateFWScenario.yml Ansible Playbook
with the <Device-name> as extra-vars:
ansible-playbook playbooks/unittestSuiteTest/cleanupFortigateFWScenario.yml \
-e "device=<Device-name>"
chainedVNFsService
Description: This sample test
case corresponds to the "VNF Chaining Example Use-case" from the Enea
NFV Access Example Use-cases manual.
For details please refer to:
<AF-TH-install-dir>/playbooks/chainedVNFsService/chainedVNFsService.yml
<AF-TH-install-dir>/playbooks/chainedVNFsService/testChainedVNFsService.yml
<AF-TH-install-dir>/playbooks/chainedVNFsService/cleanupChainedVNFsService.yml
Preconditions:
Add the Fortigate VNF Image
(fortios.qcow2) to the
vnf_image folder.
Add the Juniper vSRX VNF Image
(juniper.qcow2) to the
vnf_image folder.
The device JSON configuration file(s) is created, e.g.:
<AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json.
Add device settings in the hosts Ansible
inventory file under [chainedVNFs]. Keep both
devices, the "site1" and "site2" entries, and update the values for
ansible_host, ansible_port,
ansible_user and ansible_pass,
as applicable.
Example:
site1 ansible_host=172.24.14.157 ansible_port=22 ansible_user=root \
ansible_pass=root
site2 ansible_host=172.24.14.50 ansible_port=22 ansible_user=root \
ansible_pass=root
NIC JSON configuration files are created for each of the
devices, where mgmt_nic is connected to the DHCP
from the Lab Network and wan_nic is connected
back to back to the other device:
<AF-TH-install-dir>/lab_config/<Device-name>/mgmt_nic.json
<AF-TH-install-dir>/lab_config/<Device-name>/wan_nic.json
<AF-TH-install-dir>/lab_config/<Device-name>/lan_nic.json
Bridge JSON configuration files are created for each of the
devices:
<AF-TH-install-dir>/lab_config/<Device-name>/vnf_mgmt_br.json
<AF-TH-install-dir>/lab_config/<Device-name>/sfc_br.json
<AF-TH-install-dir>/lab_config/<Device-name>/wan_br.json
<AF-TH-install-dir>/lab_config/<Device-name>/lan_br.json
Note that sample configuration files needed for devices' NICs
and bridges can be found in:
<AF-TH-install-dir>/lab_config/inteld1521-1
and
<AF-TH-install-dir>/lab_config/inteld1521-2.
Retrieve the FortiGate VNF Firewall basic configuration files
from Enea (FortiFW-Site1.conf and
FortiFW-Site2.conf), and copy them into the
<AF-TH-install-dir>/vnf_config/fortigateFWImage
directory.
Retrieve the FortiGate VNF license file from Fortinet or Enea,
copy it into the
<AF-TH-install-dir>/vnf_config/fortigateFWImage
directory and rename it to
fortigateLicense.lic.
Retrieve the Juniper vSRX basic configuration files from Enea
(vSRX-Site1.iso and
vSRX-Site2.iso), and copy them into the
<AF-TH-install-dir>/vnf_config/junipervSRXImage
directory.
Retrieve the vSRX-domain-update-script
from Enea and copy it into the junipervSRXImage
directory.
Please refer to the Chapter concerning the VNF Chaining Example Use-case in the
manual for additional information about preconditions.
Action: Run the
chainedVNFsService.yml Ansible Playbook as
follows:ansible-playbook playbooks/chainedVNFsService/chainedVNFsService.yml \
-e "site1=inteld1521-1 site2=inteld1521-2 arch=XeonD"
Note that "arch" may either be { XeonD | AtomC } depending on the
target set chosen.
Result: Output of the test case
run using the Test Harness: # testChainedVNFsService task result
******************************************************************************
* site1 - changed=False ----------------------------------------------
----
<site1_lan-ip> ---> <site2_lan-ip>
LAN-to-LAN connectivity (through VPN tunnel)tested successfully!
Cleanup: Run the
cleanupChainedVNFsService.yml Ansible Playbook as
follows: ansible-playbook playbooks/chainedVNFsService/cleanupChainedVNFsService.yml \
-e "site1=inteld1521-1 site2=inteld1521-2 arch=XeonD"