From adc6872c65a4b266a67ab20770c29916ca79cb04 Mon Sep 17 00:00:00 2001 From: iosc Date: Mon, 22 Mar 2021 15:28:31 +0100 Subject: USERDOCAP-636 - all books renamed into enea edge Change-Id: I3ce4380c19653ef14792960ad968664b70f3c2bf --- .../doc/book.xml | 27 + .../doc/configuration.xml | 53 + .../doc/overview.xml | 109 ++ .../doc/sample_test_cases.xml | 1804 ++++++++++++++++++++ .../swcomp.mk | 10 + 5 files changed, 2003 insertions(+) create mode 100644 doc/book-enea-edge-system-test-specification/doc/book.xml create mode 100644 doc/book-enea-edge-system-test-specification/doc/configuration.xml create mode 100644 doc/book-enea-edge-system-test-specification/doc/overview.xml create mode 100644 doc/book-enea-edge-system-test-specification/doc/sample_test_cases.xml create mode 100755 doc/book-enea-edge-system-test-specification/swcomp.mk (limited to 'doc/book-enea-edge-system-test-specification') diff --git a/doc/book-enea-edge-system-test-specification/doc/book.xml b/doc/book-enea-edge-system-test-specification/doc/book.xml new file mode 100644 index 0000000..bcc2dcd --- /dev/null +++ b/doc/book-enea-edge-system-test-specification/doc/book.xml @@ -0,0 +1,27 @@ + + +]> + + <trademark class="registered">Enea</trademark> Edge System Test Specification + + Release Version + + + + + + + + + + + + + diff --git a/doc/book-enea-edge-system-test-specification/doc/configuration.xml b/doc/book-enea-edge-system-test-specification/doc/configuration.xml new file mode 100644 index 0000000..62d9b72 --- /dev/null +++ b/doc/book-enea-edge-system-test-specification/doc/configuration.xml @@ -0,0 +1,53 @@ + + + Configuration + +
+ Test Objects + + The test objects for the Test Harness are the Enea Edge and + Enea Edge Management installations performed as indicated in the Components chapter of the . +
+ +
+ Test Environment + + To set up the required Test Harness environment please refer to + Getting Started with the Automation Framework + and Test Harness in the . +
+ +
+ Preconditions and Execution + + Please refer to section Prerequisites in the + and section Installation and Initial Setup in the + + for more details. + + + Before running any test case, make sure the uCPE device(s) needed + have been added to the Enea Edge Management. + + + For detailed execution steps of the sample test cases included with + the Test Harness please see the following chapter. +
+
\ No newline at end of file diff --git a/doc/book-enea-edge-system-test-specification/doc/overview.xml b/doc/book-enea-edge-system-test-specification/doc/overview.xml new file mode 100644 index 0000000..07c5ef7 --- /dev/null +++ b/doc/book-enea-edge-system-test-specification/doc/overview.xml @@ -0,0 +1,109 @@ + + + Overview + + This document describes the Test Harness (TH) sample test cases for + the System Testing of Enea Edge, and the necessary environment setup + to run these tests successfully. + +
+ Definitions and Acronyms + + + Definitions + + + + + + + Component + + Description + + + + + + Enea Edge + + The Enea Edge (with ODM) Runtime and the + Enea Edge Management. + + + +
+ + + Acronyms + + + + + + + Component + + Description + + + + + + AF + + Automation Framework for Enea Edge. + + + + JSON + + JavaScript Object Notation. + + + + NIC + + Network Interface Card. + + + + NFV + + Network Functions Virtualization. + + + + ODM + + Enea Element On Device Management. + + + + OVS + + Open vSwitch. + + + + TH + + Test Harness for Enea Edge. + + + + Enea Edge Management + + Enea Universal Customer Premises Equipment Manager. + + + + VNF + + Virtualized Network Function. + + + +
+
+
\ No newline at end of file diff --git a/doc/book-enea-edge-system-test-specification/doc/sample_test_cases.xml b/doc/book-enea-edge-system-test-specification/doc/sample_test_cases.xml new file mode 100644 index 0000000..b1bfa1e --- /dev/null +++ b/doc/book-enea-edge-system-test-specification/doc/sample_test_cases.xml @@ -0,0 +1,1804 @@ + + + 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 Edge, and as a sanity-check test suite for the AF and + TH. + +
+ VNF - Onboard a VNF Image + + Description: Onboarding a VNF + Image into the Enea Edge Management. 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 Enea Edge Management. 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 Enea Edge Management 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 Enea Edge Management. 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 Edge image + + Description: Upload a Edge + image file onto the Enea Edge Management. 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. + + 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>" + + Example: ansible-playbook playbooks/uploadImage.yml -e \ +image_path="/tmp/enea-nfv-access-xeon-d6.rootfs.ostree.tar.bz2" -e \ +upgrade_type="xeon_d" + + 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 + Edge image file from the Enea Edge Management. 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 Enea Edge Management. + + Action: Run the + deleteUpgradeFile.yml Ansible Playbook with the + <Image-name> as extra-vars:ansible-playbook playbooks/deleteUpgradeFile.yml -e \ +image_name="<Image-name>" + + Example: ansible-playbook playbooks/deleteUpgradeFile.yml -e \ +image_name="enea-nfv-access-xeon-d.rootfs.ostree.tar.bz2" + + 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 Edge image + + Description: Installing and + Activating a Edge image on a uCPE device from the Enea Edge Management. + 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 Enea Edge Management + instance. + + + + The image file must already be uploaded onto the Enea Edge + Management. + + + + 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>" + + 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" + + 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 Edge image on a + uCPE device + + Description: Upload, install and + activate a Edge image on a uCPE device from the Enea Edge Management. For + details please refer to: + + + + <AF-TH-install-dir>/playbooks/installNFVAImage.yml + + + + The playbook imports the previously described + playbooks: + + + + playbooks/waitDeviceUp.yml + + + + playbook/uploadImage.yml + + + + playbook/installAndActivate.yml + + + + playbook/deleteUpgradeFile.yml + + + + playbook/clearCompletedUpgradesInfo.yml + + + + + + Preconditions: + + + + The device has to be previously added to the Enea Edge Management + instance. + + + + A device JSON configuration file must be created: + + <AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json + + + + 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>" + + 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 + + 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 Enea Edge Management. 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 Enea Edge Management + 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 Enea Edge Management. 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 Enea Edge Management + 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 + Enea Edge Management 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 Enea Edge Management 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 Enea Edge Management + 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 for a device in a Enea Edge Management + 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/configDPDK.yml. + + + + <AF-TH-install-dir>/automation_framework/network/configDPDK.py. + + + + Precondition: + + A device must have been previously added and connected to the Enea Edge + Management 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 Enea Edge + Management + + Description: Upload a Custom + Script to the Enea Edge Management. For details please refer to: + + + + <AF-TH-install-dir>/playbooks/uploadCustomScript.yml. + + + + <AF-TH-install-dir>/automation_framework/customScripts/upload.py. + + + + Precondition: + + <AF-TH-install-dir>/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 Enea Edge Management!" +
+ +
+ Custom Scripts - Upload a Custom Script from the Enea Edge Management to + a Device + + Description: Upload a Custom + Script from the Enea Edge Management 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 + Enea Edge Management instance. + + + + A Custom Script must have been previously added to the Enea Edge + Management 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 Enea Edge + Management + + Description: Remove a Custom + Script from the Enea Edge Management. 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 Enea Edge + Management. + + 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 Enea Edge Management task result +DEBUG: "{{ scriptName }} from phase {{ phase }} was removed from Enea Edge Management!" +
+ +
+ 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 + Enea Edge Management instance. + + + + A Custom Script must have been previously added to the + Device. + + + + Action: Run the + removeCustomScriptOnDevice.yml Ansible Playbook + with the <scriptName>, + <phase> 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 }}!" +
+ +
+ Offline Configuration - Add an Offline Configuration + Store + + Description: Adding an Offline + Config Store to the Enea Edge Management. For details please refer to: + + + + <AF-TH-install-dir>/playbooks/addConfigStore.yml. + + + + <AF-TH-install-dir>/automation_framework/device/addConfigStore.py. + + + + Precondition: + + The Offline Configuration Store should not already exist on + the Enea Edge Management. If it exists, the test will report a + duplicate. + + + + A store JSON file needs to exist: <AF-TH-install-dir>/lab_config/<device-name>/store.json + + + + Action: Run the + addConfigStore.yml Ansible Playbook with the + <device-name> as extra-vars: ansible-playbook playbooks/addConfigStore.yml -e \ +"device=<device-name>" + + Result: Output of the test case + run using the Test Harness: + + # Add Config Store task result +********************************************************** +********************************** + * localhost - changed=False +-------------------------------------------------- + Config store for intelc3850-2 device was added! +
+ +
+ Offline Configuration - Remove an Offline Configuration + Store + + Description: Removing an Offline + Config Store from the Enea Edge Management. For details please refer to: + + + + <AF-TH-install-dir>/playbooks/removeConfigStore.yml. + + + + <AF-TH-install-dir>/automation_framework/device/removeConfigStore.py. + + + + Precondition: + + The Offline Configuration Store the user wishes to remove should + exist in the Enea Edge Management. If it does not, the test will say so. + + Action: Run the + removeConfigStore.yml Ansible Playbook with the + <store-name> as extra-vars: ansible-playbook playbooks/removeConfigStore.yml -e \ +"store=<store-name>" + + Result: Output of the test case + run using the Test Harness: + + # Remove Config Store task result ********************************** +******************************************************* + * localhost - changed=False + -- intelc3850-2 config store was removed! --------- +
+ +
+ Offline Configuration - Add a network bridge to an Offline + Configuration Store + + Description: Adding a network + bridge to an Offline Config Store in Enea Edge Management. For details please + refer to: + + + + <AF-TH-install-dir>/playbooks/addOfflineBridge.yml. + + + + <AF-TH-install-dir>/automation_framework/network/newNetworkBridge.py. + + + + Precondition: + + + + The Offline Configuration Store should exist in the Enea Edge + Management. If it does not, the test will say so. + + + + A Bridge JSON configuration file needs to exist: + <AF-TH-install-dir>/lab_config/<device-name>/<bridge-name>.json + + + + Action: Run the + addOfflineBridge.yml Ansible Playbook with the + <device-name>, + <store-name> and + <bridge-name> as extra-vars: ansible-playbook playbooks/addOfflineBridge.yml -e \ +"device=<device-name> store=<store-name> bridge=<bridge-name>" + + Result: Output of the test case + run using the Test Harness: + + # debug ************************************************************* +****************************************************** + * localhost - changed=False +-------------------------------------------------- + lan_br bridge already exists + --- will be deleted to create it with the provided configuration +.. +# Add Bridge task result ******************************************** +****************************************************** + * localhost - changed=False + -- lan_br network bridge was added! ------------ + + Note: if the bridge exists, it + will be removed and then re-added, as the output above shows. +
+ +
+ Offline Configuration - Configure a DPDK + + Description: Adding an "enable" + or "disable" DPDK state to an Offline Config Store. For details please + refer to: + + + + <AF-TH-install-dir>/playbooks/configOfflineDPDK.yml. + + + + <AF-TH-install-dir>/automation_framework/network/configDPDK.py. + + + + Precondition: + + An empty Offline Configuration Store should exist in Enea Edge + Management. + + Action: Run the + configOfflineDPDK.yml Ansible Playbook with the + <store-name> and + <enable/disable> as extra-vars: + ansible-playbook playbooks/configOfflineDPDK.yml -e \ +"store=<store-name> state=<enable/disable>" + + Result: Output of the test case + run using the Test Harness: + + DEBUG: Set DPDK state to disable +INFO: Done + + Note: the DPDK state cannot be + changed. Recreate the Offline Config Store and set the DPDK again if you + want to change the state. +
+ +
+ Offline Configuration - Upload an offline configuration onto a + uCPE Device + + Description: Uploading an offline + configuration to a uCPE Device. For details please refer to: + + + + <AF-TH-install-dir>/playbooks/uploadConfigStore.yml. + + + + <AF-TH-install-dir>/automation_framework/device/uploadConfigStore.py. + + + + Precondition: + + + + The Offline Configuration Store should exist in the Enea Edge + Management. + + + + The device should be connected to the Enea Edge Management. + + + + Action: Run the + uploadConfigStore.yml Ansible Playbook with the + <store-name> and + <device-name> as extra-vars: + + ansible-playbook playbooks/uploadConfigStore.yml -e \ +"store=<store-name> device=<device-name>" + + Result: Output of the test case + run using the Test Harness: + + # Upload Config Store task result **************************** + * localhost - changed=False --------------- + 2020-10-08 13:29:41,062 - INFO: Upload offline \ + configuration to uCPE Device + 2020-10-08 13:30:01,315 - INFO: The '<store-name>' config \ + store was successfully uploaded on device! + 2020-10-08 13:30:01,316 - INFO: Done +
+ +
+ Offline Configuration - Get the offline configuration upload + status on the uCPE Device + + Description: Get the offline + configuration upload status to a uCPE Device. For details please refer + to: + + + + <AF-TH-install-dir>/playbooks/getUploadStatus.yml. + + + + <AF-TH-install-dir>/automation_framework/device/getUploadStatus.py. + + + + Precondition: + + + + An upload of the offline configuration should be done on the + uCPE Device. + + + + The device should be connected to the Enea Edge Management. + + + + Action: Run the + getUploadStatus.yml Ansible Playbook with the + <device-name> as extra-vars: + + ansible-playbook playbooks/getUploadStatus.yml -e \ +"device=<device-name>" + + Result: Output of the test case + run using the Test Harness: + + # Upload Config Store task result **************************** + * localhost - changed=False --------------- + 2020-10-08 14:13:24,422 - INFO: Get upload offline configure \ + status on uCPE Device + 2020-10-08 14:13:24,521 - INFO: Successful: True + 2020-10-08 14:13:24,522 - INFO: Store name: <store-name> + 2020-10-08 14:13:24,523 - INFO: In progress: False + 2020-10-08 14:13:24,524 - INFO: A config store was successfully \ + uploaded on device! + 2020-10-08 14:13:24,525 - INFO: Done +
+
+ +
+ 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 Edge. + +
+ 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 Enea Edge Management. 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=<pause|resume|start|stop>" + + 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. + + How to deploy the FortiGate VNF as a + Firewall: + + + + Add a uCPE device. + + + + Wait for the uCPE device to be connected in the Enea Edge + Management. + + + + 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 Edge 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: + + + + A device must have been previously added and connected to + the Enea Edge Management instance. + + + + Add the Fortigate VNF Image + (fortios.qcow2) to the + <AF-TH-install-dir>/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: + + + + A device must have been previously added and connected to + the Enea Edge Management instance. + + + + Add the FortiGate VNF Image + (fortios.qcow2) to the + <AF-TH-install-dir>/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: + + + + FortiGate VNF as a + Firewall in the + Manual. + + + + 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 + Edge 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: + + + + Two devices must have been previously added and connected to + the Enea Edge Management instance. + + + + 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" +
+
+ +
+ Custom Scripts - Basic Test + + The basic test script can be found in + <AF-TH-install-dir>/playbooks/customScripts/basicTest.yml. + + The basicTest.yml script requires the following + steps: + + + + Upload a Custom Script onto the Enea Edge Management. + + + + Upload the Custom Script onto a Device. + + + + Reboot the Device. + + + + Wait for the Device to be up and running. + + + + Remove the Custom Script from the Device. + + + + Remove the Custom Script from the Enea Edge Management. + + + + Preconditions: + + + + A device must have been previously added and connected to the + Enea Edge Management. + + + + The device JSON configuration file must have been created: + <AF-TH-install-dir>/lab_config/<Device-name>/<Device-name>.json. + + + + The custom script should have been previously saved in + <AF-TH-install-dir>/lab_config/customScripts. + + + + Add device settings in the hosts Ansible inventory file under + [customScriptDevice] and remove the inteld1521-1 + example. + + + + Example: + + [customScriptDevice] +inteld1521-1 ansible_host=172.24.12.73 ansible_port=22 ansible_user=root \ + ansible_pass=root + + Action: Run + basicTest.yml (example data for + test_success_after_always): + + ansible-playbook playbooks/customScripts/basicTest.yml -e "device=<Device-name>" \ +-e "scriptName=test_success_after_always" -e "phase=always-after-startup" \ +-e "expectedStatus=success" + + Result: Output of + basicTest.yml: + + test_success_after_always was uploaded to Enea Edge Management! +test_success_after_always was uploaded to <Device-name>! + +<Device-name> device is connected! +test_success_after_always from phase always-after-startup was removed \ +from <Device-name>! + +test_success_after_always from phase always-after-startup was removed \ +from Enea Edge Management! +
+
\ No newline at end of file diff --git a/doc/book-enea-edge-system-test-specification/swcomp.mk b/doc/book-enea-edge-system-test-specification/swcomp.mk new file mode 100755 index 0000000..2830cc3 --- /dev/null +++ b/doc/book-enea-edge-system-test-specification/swcomp.mk @@ -0,0 +1,10 @@ +# Component build specification + +# Version of THIS book +BOOK_VER ?= $(REL_VER)-dev + +DOCBOOK_SRC := $(COMP)/swcomp.mk $(COMP)/doc/book.xml $(shell find $(COMP)/doc -type f \( -name "*.xml" -o -name "*.svg" -o -name "*.png" \) ! -name "book.xml" -print) + +BOOKPACKAGES := book-enea-edge-system-test-specification +BOOKDESC_$(BOOKPACKAGES) := "Enea Edge $(PROD_VER) System Test Specification" +BOOKDEFAULTCONDITION := $(DEFAULTCONDITIONS) -- cgit v1.2.3-54-g00ecf