+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Keywords ***
-Test Connectivity
- [Arguments] ${host}
-
- ${result} Run Process ping -c 5 -W 1 ${host} > /dev/null && echo OK shell=True
- Log all output: ${result.stdout}
- Should Contain ${result.stdout} OK
+++ /dev/null
-# Copyright 2020 Canonical Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Variables ***
-${success_return_code} 0
-${k8scluster_launch_max_wait_time} 2min
-${k8scluster_launch_pol_time} 30sec
-${k8scluster_delete_max_wait_time} 2min
-${k8scluster_delete_pol_time} 15sec
-
-*** Keywords ***
-Create K8s Cluster
- [Arguments] ${k8scluster_creds} ${k8scluster_version} ${k8scluster_vim} ${k8scluster_net} ${k8scluster_name}
- ${rc} ${stdout}= Run and Return RC and Output osm k8scluster-add --creds ${k8scluster_creds} --version ${k8scluster_version} --vim ${k8scluster_vim} --k8s-nets '{"net1": "${k8scluster_net}"}' ${k8scluster_name} --description "Robot cluster"
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- WAIT UNTIL KEYWORD SUCCEEDS ${k8scluster_launch_max_wait_time} ${k8scluster_launch_pol_time} Check For K8s Cluster To Be Ready ${k8scluster_name}
- [Return] ${stdout}
-
-Delete K8s Cluster
- [Arguments] ${k8scluster_name}
- ${rc} ${stdout}= Run and Return RC and Output osm k8scluster-delete ${k8scluster_name}
- Should Be Equal As Integers ${rc} ${success_return_code}
- WAIT UNTIL KEYWORD SUCCEEDS ${k8scluster_delete_max_wait_time} ${k8scluster_delete_pol_time} Check For K8s Cluster To Be Deleted ${k8scluster_name}
-
-Get K8s Cluster
- ${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list
- Should Be Equal As Integers ${rc} ${success_return_code}
- log ${stdout}
- [Return] ${stdout}
-
-Check for K8s Cluster
- [Arguments] ${k8scluster_name}
- ${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list --filter name="${k8scluster_name}"
- Should Be Equal As Integers ${rc} ${success_return_code}
- [Return] ${stdout}
-
-Check For K8s Cluster To Be Deleted
- [Arguments] ${k8scluster_name}
- ${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list --filter name="${k8scluster_name}" | awk '{print $2}' | grep ${k8scluster_name}
- Should Be Empty ${stdout}
-
-Check For K8s Cluster To Be Ready
- [Arguments] ${k8scluster_name}
- ${rc} ${stdout}= Run and Return RC and Output osm k8scluster-list --filter name="${k8scluster_name}" --filter _admin.operationalState="ENABLED" | awk '{print $2}' | grep ${k8scluster_name}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Be Equal As Strings ${stdout} ${k8scluster_name}
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Variables ***
-${success_return_code} 0
-${ns_launch_pol_time} 30sec
-${ns_delete_max_wait_time} 1min
-${ns_delete_pol_time} 15sec
-${ns_action_max_wait_time} 1min
-${ns_action_pol_time} 15sec
-${vnf_scale_max_wait_time} 5min
-${vnf_scale_pol_time} 30sec
-
-
-*** Keywords ***
-Create Network Service
- [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} ${publickey} ${ns_launch_max_wait_time}=5min
-
- ${config_attr} Set Variable If '${ns_config}'!='${EMPTY}' --config '${ns_config}' \
- ${sshkeys_attr} Set Variable If '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} \
-
- ${ns_id}= Instantiate Network Service ${ns_name} ${nsd} ${vim_name} ${config_attr} ${sshkeys_attr}
- log ${ns_id}
-
- WAIT UNTIL KEYWORD SUCCEEDS ${ns_launch_max_wait_time} ${ns_launch_pol_time} Check For NS Instance To Configured ${ns_name}
- Check For NS Instance For Failure ${ns_name}
- [Return] ${ns_id}
-
-
-Instantiate Network Service
- [Arguments] ${ns_name} ${nsd} ${vim_name} ${ns_extra_args}
-
- ${rc} ${stdout}= Run and Return RC and Output osm ns-create --ns_name ${ns_name} --nsd_name ${nsd} --vim_account ${vim_name} ${ns_extra_args}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- [Return] ${stdout}
-
-
-Get Vnf Management Ip Address
- [Arguments] ${ns_id} ${vnf_member_index}
-
- Should Not Be Empty ${ns_id}
- Should Not Be Empty ${vnf_member_index}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-list --filter member-vnf-index-ref=${vnf_member_index} | grep ${ns_id} | awk '{print $14}' 2>&1
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- [Return] ${stdout}
-
-
-Get Ns Vnf List
- [Arguments] ${ns_id}
-
- Should Not Be Empty ${ns_id}
- @{vnf_list_string}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1
- # Returns a String of vnf_id and needs to be converted into a list
- @{vnf_list} = Split String ${vnf_list_string}[1]
- Log List ${vnf_list}
- [Return] @{vnf_list}
-
-
-Get Ns Ip List
- [Arguments] @{vnf_list}
-
- should not be empty @{vnf_list}
- @{temp_list}= Create List
- FOR ${vnf_id} IN @{vnf_list}
- log ${vnf_id}
- @{vnf_ip_list} Get Vnf Ip List ${vnf_id}
- @{temp_list}= Combine Lists ${temp_list} ${vnf_ip_list}
- END
- should not be empty ${temp_list}
- [return] @{temp_list}
-
-
-Get Vnf Ip List
- [arguments] ${vnf_id}
-
- should not be empty ${vnf_id}
- @{vnf_ip_list_string}= run and return rc and output osm vnf-show ${vnf_id} --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 2>&1
- # returns a string of ip addresses and needs to be converted into a list
- should not be empty ${vnf_ip_list_string}[1]
- @{vnf_ip_list} = split string ${vnf_ip_list_string}[1]
- log list ${vnf_ip_list}
- should not be empty ${vnf_ip_list}
- [return] @{vnf_ip_list}
-
-
-Check For Ns Instance To Configured
- [arguments] ${ns_name}
-
- ${rc} ${stdout}= run and return rc and output osm ns-list --filter name="${ns_name}"
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Contain Any ${stdout} READY BROKEN
-
-Check For NS Instance For Failure
- [Arguments] ${ns_name}
-
- ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}"
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Not Contain ${stdout} BROKEN
-
-Check For NS Instance To Be Deleted
- [Arguments] ${ns}
-
- ${rc} ${stdout}= Run and Return RC and Output osm ns-list | awk '{print $2}' | grep ${ns}
- Should Not Be Equal As Strings ${stdout} ${ns}
-
-Delete NS
- [Documentation] Delete ns
- [Arguments] ${ns}
-
- ${rc} ${stdout}= Run and Return RC and Output osm ns-delete ${ns}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
-
- WAIT UNTIL KEYWORD SUCCEEDS ${ns_delete_max_wait_time} ${ns_delete_pol_time} Check For NS Instance To Be Deleted ${ns}
-
-Execute NS Action
- [Documentation] Execute an action over the desired NS.
- ... Parameters are given to this function in key=value format (one argument per key/value pair).
- ... Return the ID of the operation associated to the executed action.
- ... Examples of execution:
- ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index}
- ... \${ns_op_id}= Execute NS Action \${ns_name} \${ns_action} \${vnf_member_index} \${param1}=\${value1} \${param2}=\${value2}
-
- [Arguments] ${ns_name} ${ns_action} ${vnf_member_index} @{action_params}
-
- ${params}= Set Variable ${EMPTY}
- FOR ${param} IN @{action_params}
- ${match} ${param_name} ${param_value} = Should Match Regexp ${param} (.+)=(.+) msg=Syntax error in parameters
- ${params}= Catenate SEPARATOR= ${params} "${param_name}":"${param_value}",
- END
- ${osm_ns_action_command}= Set Variable osm ns-action --action_name ${ns_action} --vnf_name ${vnf_member_index}
- ${osm_ns_action_command}= Run Keyword If '${params}'!='${EMPTY}' Catenate ${osm_ns_action_command} --params '{${params}}'
- ... ELSE Set Variable ${osm_ns_action_command}
- ${osm_ns_action_command}= Catenate ${osm_ns_action_command} ${ns_name}
- ${rc} ${stdout}= Run and Return RC and Output ${osm_ns_action_command}
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- Wait Until Keyword Succeeds ${ns_action_max_wait_time} ${ns_action_pol_time} Check For NS Operation Completed ${stdout}
- [Return] ${stdout}
-
-
-Execute Manual VNF Scale
- [Documentation] Execute a manual VNF Scale action.
- ... The parameter 'scale_type' must be SCALE_IN or SCALE_OUT.
- ... Return the ID of the operation associated to the executed scale action.
-
- [Arguments] ${ns_name} ${vnf_member_index} ${scaling_group} ${scale_type}
-
- Should Contain Any ${scale_type} SCALE_IN SCALE_OUT msg=Unknown scale type: ${scale_type} values=False
- ${osm_vnf_scale_command}= Set Variable osm vnf-scale --scaling-group ${scaling_group}
- ${osm_vnf_scale_command}= Run Keyword If '${scale_type}'=='SCALE_IN' Catenate ${osm_vnf_scale_command} --scale-in
- ... ELSE Catenate ${osm_vnf_scale_command} --scale-out
- ${osm_vnf_scale_command}= Catenate ${osm_vnf_scale_command} ${ns_name} ${vnf_member_index}
- ${rc} ${stdout}= Run and Return RC and Output ${osm_vnf_scale_command}
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- Wait Until Keyword Succeeds ${ns_action_max_wait_time} ${ns_action_pol_time} Check For NS Operation Completed ${stdout}
- [Return] ${stdout}
-
-
-Get Operations List
- [Arguments] ${ns_name}
-
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-list ${ns_name}
- log ${stdout}
- log ${rc}
- Should Be Equal As Integers ${rc} ${success_return_code}
-
-
-Check For NS Operation Completed
- [Documentation] Check wheter the status of the desired operation is "COMPLETED" or not.
-
- [Arguments] ${ns_operation_id}
-
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq r - operationState
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Contain ${stdout} COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
-
-
-Get Ns Vnfr Ids
- [Documentation] Return a list with the IDs of the VNF records of a NS instance.
-
- [Arguments] ${ns_id}
-
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- @{vdur} = Split String ${stdout}
- [Return] @{vdur}
-
-
-Get Vnf Vdur Names
- [Documentation] Return a list with the names of the VDU records of a VNF instance.
-
- [Arguments] ${vnf_id}
-
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq r - vdur.*.name
- Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
- @{vdur} = Split String ${stdout}
- [Return] @{vdur}
-
+++ /dev/null
-# -*- coding: utf-8 -*-
-
-##
-# Copyright 2019 Tech Mahindra Limited
-#
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-##
-
-## Change log:
-# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019
-##
-
-*** Settings ***
-Library String
-
-
-*** Variables ***
-${success_return_code} 0
-${delete_max_wait_time} 1min
-${delete_pol_time} 15sec
-
-
-*** Keywords ***
-Get NSDs List
- ${rc} ${stdout}= Run and Return RC and Output osm nsd-list
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
-
-
-Create NSD
- [Arguments] ${nsd_pkg}
-
- ${rc} ${stdout}= Run and Return RC and Output osm nsd-create ${nsd_pkg}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- ${lines}= Get Line Count ${stdout}
- ${last}= Evaluate ${lines} - 1
- ${id}= Get Line ${stdout} ${last}
- [Return] ${id}
-
-
-Delete NSD
- [Arguments] ${nsd_id}
-
- ${rc} ${stdout}= Run Keyword And Continue On Failure Run and Return RC and Output osm nsd-delete ${nsd_id}
- Should Be Equal As Integers ${rc} ${success_return_code}
- log ${stdout}
- WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NSD ${nsd_id}
-
-
-Check For NSD
- [Arguments] ${nsd_id}
-
- ${rc} ${stdout}= Run and Return RC and Output osm nsd-list | awk '{print $2}' | grep ${nsd_id}
- Should Not Be Equal As Strings ${stdout} ${nsd_id}
+++ /dev/null
-# Copyright 2020 Atos
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Library Collections
-
-
-*** Variables ***
-${success_return_code} 0
-${slice_launch_max_wait_time} 5min
-${slice_launch_pol_time} 30sec
-${slice_delete_max_wait_time} 1min
-${slice_delete_pol_time} 15sec
-
-*** Keywords ***
-
-Create Network Slice
- [Documentation] Instantiates a NST and returns an instantiation id (nsi), verifying the slice is successfully instantiated
- ... Parameters:
- ... nst: Name of the slice template
- ... vim_name: Name of the VIM entry already in OSM
- ... slice_name: Name of the slice instance
- ... slice_config: Extra parameters that might require the slice instantiation i.e. configuration attributes
- ... publickey: SSH public key of the local machine
- ... Execution example:
- ... \${nsi}= Create Network Slice \${nst} \${vim_name} \${slice_name} \${slice_config} \${publickey}
-
- [Arguments] ${nst} ${vim_name} ${slice_name} ${slice_config} ${publickey}
-
- ${config_attr} Set Variable If '${slice_config}'!='${EMPTY}' --config '${slice_config}' \
- ${sshkeys_attr} Set Variable If '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} \
-
- ${nsi_id}= Instantiate Network Slice ${slice_name} ${nst} ${vim_name} ${config_attr} #${sshkeys_attr}
- log ${nsi_id}
-
- WAIT UNTIL KEYWORD SUCCEEDS ${slice_launch_max_wait_time} ${slice_launch_pol_time} Check For Network Slice Instance To Configured ${slice_name}
- Check For Network Slice Instance For Failure ${slice_name}
- [Return] ${nsi_id}
-
-
-Instantiate Network Slice
- [Documentation] Instantiates a NST and returns an instantiation id (nsi)
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... nst: Name of the slice template
- ... vim_name: Name of the VIM entry already in OSM
- ... slice_extra_args: Extra parameters that might require the slice instantiation i.e. configuration attributes
- ... Execution example:
- ... \${nsi}= Instantiate Network Slice \${slice_name} \${nst} \${vim_name} \${config_attr}
-
- [Arguments] ${slice_name} ${nst} ${vim_name} ${slice_extra_args}
-
- ${rc} ${stdout}= Run and Return RC and Output osm nsi-create --nsi_name ${slice_name} --nst_name ${nst} --vim_account ${vim_name} ${slice_extra_args}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- [Return] ${stdout}
-
-
-Get Slice Ns List
- [Documentation] Retrieves the list of NS in a slice
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... Execution example:
- ... \@{slice_ns_list}= Get Slice Ns List \${slice_name}
-
- [Arguments] ${slice_name}
-
- Should Not Be Empty ${slice_name}
- @{ns_list_string}= Run and Return RC and Output osm ns-list | grep ${slice_name} | awk '{print $4}' 2>&1
- # Returns a String of ns_id and needs to be converted into a list
- @{ns_list} = Split String ${ns_list_string}[1]
- Log List ${ns_list}
- [Return] @{ns_list}
-
-
-Get Slice Ns List Except One
- [Documentation] Retrieves the list of NS in a slice removing one from the list. This is done to save time in the tests, avoiding one VNF to ping itself.
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... exception_ns: Name of the ns that will not appear in the final list
- ... Execution example:
- ... \@{slice_ns_list}= Get Slice Ns List Except One \${slice_name} \${exception_ns}
-
- [Arguments] ${slice_name} ${exception_ns}
-
- Should Not Be Empty ${slice_name}
- Should Not Be Empty ${exception_ns}
-
- @{ns_list_string}= Run and Return RC and Output osm ns-list | grep ${slice_name} | awk '!/${exception_ns}/' | awk '{print $4}' 2>&1
- # Returns a String of ns_id and needs to be converted into a list
- @{ns_list} = Split String ${ns_list_string}[1]
- Log List ${ns_list}
- [Return] @{ns_list}
-
-
-Get Slice Ns Count
- [Documentation] Returns the count of all the NS in a slice
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... Execution example:
- ... \${slice_ns_count}= Get Slice Ns Count \${slice_name}
-
- [Arguments] ${slice_name}
-
- Should Not Be Empty ${slice_name}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-list | grep ${slice_name} | wc -l 2>&1
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- [Return] ${stdout}
-
-
-Get Slice Vnf Ip Addresses
- [Documentation] Retrieves the list of IP addresses that belong to each of the VNFs in the slice
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... Execution example:
- ... \@{slice_ip_address_list}= Get Slice Vnf Ip Addresses \${slice_name}
-
- [Arguments] ${slice_name}
-
- # Get all the ns_id in the slice
- @{slice_ns_list} Get Slice Ns List ${slice_name}
- log many @{slice_ns_list}
- @{temp_list}= Create List
- # For each ns_id in the list, get all the vnf_id and their IP addresses
- FOR ${ns_id} IN @{slice_ns_list}
- log ${ns_id}
- @{vnf_id_list} Get Ns Vnf List ${ns_id}
- # For each vnf_id in the list, get all its IP addresses
- @{ns_ip_list} Get Ns Ip List @{vnf_id_list}
- @{temp_list}= Combine Lists ${temp_list} ${ns_ip_list}
- END
- Log List ${temp_list}
- [Return] @{temp_list}
-
-
-Check For Network Slice Instance To Configured
- [Documentation] Verify the slice has been instantiated
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... Execution example:
- ... Check For Network Slice Instance To Configured \${slice_name}
-
- [Arguments] ${slice_name}
-
- ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}"
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Contain Any ${stdout} READY BROKEN configured
-
-
-Check For Network Slice Instance For Failure
- [Documentation] Verify the slice instance is not in failure
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... Execution example:
- ... Check For Network Slice Instance For Failure \${slice_name}
-
- [Arguments] ${slice_name}
-
- ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}"
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Not Contain ${stdout} BROKEN
-
-
-Delete NSI
- [Documentation] Delete Network Slice Instance (NSI)
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... Execution example:
- ... Delete NST \${slice_name}
-
- [Arguments] ${slice_name}
-
- ${rc} ${stdout}= Run and Return RC and Output osm nsi-delete ${slice_name}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
-
- WAIT UNTIL KEYWORD SUCCEEDS ${slice_delete_max_wait_time} ${slice_delete_pol_time} Check For Network Slice Instance To Be Deleted ${slice_name}
-
-
-Check For Network Slice Instance To Be Deleted
- [Documentation] Verify the slice instance is not present
- ... Parameters:
- ... slice_name: Name of the slice instance
- ... Execution example:
- ... Check For Network Slice Instance \${slice_name}
-
- [Arguments] ${slice_name}
-
- ${rc} ${stdout}= Run and Return RC and Output osm nsi-list | awk '{print $2}' | grep ${slice_name}
- Should Not Be Equal As Strings ${stdout} ${slice_name}
-
-
+++ /dev/null
-# Copyright 2020 Atos
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Variables ***
-${success_return_code} 0
-${ns_launch_max_wait_time} 5min
-${ns_launch_pol_time} 30sec
-${ns_delete_max_wait_time} 1min
-${ns_delete_pol_time} 15sec
-
-*** Keywords ***
-Get NST List
- ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-list
- log ${stdout}
- log ${rc}
- Should Be Equal As Integers ${rc} ${success_return_code}
-
-
-Create NST
- [Arguments] ${nst}
-
- ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-create ${nst}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- [Return] ${stdout}
-
-
-Delete NST
- [Arguments] ${nst_id}
-
- ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-delete ${nst_id}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NST ${nst_id}
-
-
-Check For NST
- [Arguments] ${nst_id}
-
- ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-list | awk '{print $2}' | grep ${nst_id}
- Should Not Be Equal As Strings ${stdout} ${nst_id}
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Documentation Library to obtain metrics from Prometheus.
-
-Library String
-Library Collections
-Library RequestsLibrary
-
-
-*** Variables ***
-${timeout} 1000
-${max_retries} 1
-
-
-*** Keywords ***
-Get Metric
- [Documentation] Get the instant value of a metric from Prometheus using multiple filter parameters.
- ... The filter parameters are given to this function in key=value format (one argument per key/value pair).
- ... Fails if the metric is not found or has multiple values.
- ... Examples of execution:
- ... \${metric}= Get Metric \${prometheus_ip} \${prometheus_port} \${metric}
- ... \${metric}= Get Metric \${prometheus_ip} \${prometheus_port} \${metric} \${param1}=\${value1} \${param2}=\${value2}
-
- [Arguments] ${prometheus_ip} ${prometheus_port} ${metric} @{filter_parameters}
-
- ${filter}= Set Variable ${EMPTY}
- FOR ${param} IN @{filter_parameters}
- ${match} ${param_name} ${param_value} = Should Match Regexp ${param} (.+)=(.+) msg=Syntax error in filter parameters
- ${filter}= Catenate SEPARATOR= ${filter} ${param_name}="${param_value}",
- END
- ${resp}= Execute Prometheus Instant Query ${prometheus_host} ${prometheus_port} query=${metric}{${filter}}
- ${result_list}= Convert To List ${resp["data"]["result"]}
- ${results}= Get Length ${result_list}
- Should Not Be Equal As Numbers 0 ${results} msg=Metric ${metric} not found values=false
- Should Be Equal As Integers 1 ${results} msg=Metric ${metric} with multiple values values=false
- [Return] ${result_list[0]["value"][1]}
-
-
-Execute Prometheus Instant Query
- [Documentation] Execute a Prometheus Instant Query using HTTP API.
- ... Return an inline json with the result of the query.
- ... The requested URL is the next: http://\${prometheus_ip}:\${prometheus_port}/api/v1/query?\${querystring}
-
- [Arguments] ${prometheus_ip} ${prometheus_port} ${querystring}
-
- Create Session prometheus http://${prometheus_ip}:${prometheus_port} timeout=${timeout} max_retries=${max_retries}
- ${resp}= Get Request prometheus /api/v1/query?${querystring} timeout=${timeout}
- Status Should Be 200 ${resp}
- [Return] ${resp.json()}
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Keywords ***
-Test SSH Connection
- [Arguments] ${host} ${username} ${password} ${privatekey}
-
- Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
- Execute Command hostname
- Close All Connections
-
-Check If remote File Exists
- [Arguments] ${host} ${username} ${password} ${privatekey} ${file}
-
- Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
- ${rc}= Execute Command ls ${file} >& /dev/null return_stdout=False return_rc=True
- Close All Connections
- Should Be Equal As Integers ${rc} 0
-
-Get Remote File Content
- [Arguments] ${host} ${username} ${password} ${privatekey} ${file}
-
- Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
- ${output}= Execute Command cat ${file}
- Close All Connections
- [Return] ${output}
-
-Ping Many
- [Arguments] ${host} ${username} ${password} ${privatekey} @{ip_list}
-
- Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
- FOR ${ip} IN @{ip_list}
- ${result}= Execute Command ping -c 5 -W 1 ${ip} > /dev/null && echo OK shell=True
- Log ${result}
- Should Contain ${result} OK
- END
- Close All Connections
-
-
-Execute Remote Command Check Rc Return Output
- [Arguments] ${host} ${username} ${password} ${privatekey} ${command}
-
- Open Connection ${host}
- Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
- ... ELSE Login With Public Key ${username} ${privatekey}
- ${stdout} ${rc}= Execute Command ${command} return_rc=True return_stdout=True
- log ${rc}
- log ${stdout}
- Close All Connections
- Should Be Equal As Integers ${rc} 0
- [Return] ${stdout}
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Documentation Library to manage VIM Targets.
-
-Library String
-Library Collections
-Library OperatingSystem
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/prometheus_lib.robot
-
-
-*** Variables ***
-${success_return_code} 0
-${delete_max_wait_time} 1min
-${delete_pol_time} 15sec
-${vim_status_max_wait_time} 1min
-${vim_status_pol_time} 15sec
-
-
-*** Keywords ***
-Create VIM Target
- [Documentation] Create a VIM Target in OSM.
- ... The optional parameters (such as 'config' or 'sdn_controller') are given to this function in name=value format. These parameters will be appended to the 'osm vim-create' command with the next syntax: --param_name=param_value
- ... Return the ID of the created VIM Target.
- ... Example of execution:
- ... \${vim_account_id}= Create VIM Target \${vim_name} \${vim_user} \${vim_password} \${vim_auth_url} \${vim_tenant} \${vim_account_type} config='{...}'
-
- [Arguments] ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type} @{optional_parameters}
-
- ${osm_vim_create_command}= Set Variable osm vim-create --name ${vim_name} --user ${vim_user} --password ${vim_password} --auth_url ${vim_auth_url} --tenant ${vim_tenant} --account_type ${vim_account_type}
- FOR ${param} IN @{optional_parameters}
- ${match} ${param_name} ${param_value} = Should Match Regexp ${param} (.+)=(.+) msg=Syntax error in optional parameters
- ${osm_vim_create_command}= Catenate ${osm_vim_create_command} --${param_name}=${param_value}
- END
- ${rc} ${stdout}= Run and Return RC and Output ${osm_vim_create_command}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- [Return] ${stdout}
-
-
-Delete VIM Target
- [Arguments] ${vim_name}
-
- ${rc} ${stdout}= Run Keyword And Continue On Failure Run and Return RC and Output osm vim-delete ${vim_name}
- log ${stdout}
- Wait Until Keyword Succeeds ${delete_max_wait_time} ${delete_pol_time} Check for VIM Target ${vim_name}
-
-
-Get VIM Targets
- ${rc} ${stdout}= Run and Return RC and Output osm vim-list
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
-
-
-Check for VIM Target
- [Arguments] ${vim_name}
-
- ${rc} ${stdout}= Run and Return RC and Output osm vim-list | awk '{print $2}' | grep ${vim_name}
- Should Not Be Equal As Strings ${stdout} ${vim_name}
-
-
-Check for VIM Target Status
- [Arguments] ${vim_name} ${prometheus_host} ${prometheus_port}
-
- ${vim_account_id}= Get VIM Target ID ${vim_name}
- Wait Until Keyword Succeeds ${vim_status_max_wait_time} ${vim_status_pol_time} Check If VIM Target Is Available ${vim_account_id} ${prometheus_host} ${prometheus_port}
-
-
-Get VIM Target ID
- [Arguments] ${vim_name}
-
- ${rc} ${stdout}= Run and Return RC and Output osm vim-list | grep " ${vim_name} " | awk '{print $4}'
- Should Be Equal As Integers ${rc} ${success_return_code}
- Should Not Be Equal As Strings ${stdout} ${EMPTY} msg=VIM Target '${vim_name}' not found values=false
- [Return] ${stdout}
-
-
-Check If VIM Target Is Available
- [Arguments] ${vim_account_id} ${prometheus_host} ${prometheus_port}
-
- ${metric}= Get Metric ${prometheus_host} ${prometheus_port} osm_vim_status vim_account_id=${vim_account_id}
- Should Be Equal As Integers ${metric} 1 msg=VIM Target '${vim_account_id}' is not active values=false
+++ /dev/null
-# -*- coding: utf-8 -*-
-
-##
-# Copyright 2019 Tech Mahindra Limited
-#
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-##
-
-## Change log:
-# 1. Feature 7829: Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 06-sep-2019
-##
-
-*** Settings ***
-Library String
-
-
-*** Variables ***
-${success_return_code} 0
-${delete_max_wait_time} 1min
-${delete_pol_time} 15sec
-
-
-*** Keywords ***
-Get VNFDs List
- ${rc} ${stdout}= Run and Return RC and Output osm vnfd-list
- log ${stdout}
- log ${rc}
- Should Be Equal As Integers ${rc} ${success_return_code}
-
-
-Create VNFD
- [Arguments] ${vnfd_pkg}
-
- ${rc} ${stdout}= Run and Return RC and Output osm vnfd-create ${vnfd_pkg}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- ${lines}= Get Line Count ${stdout}
- ${last}= Evaluate ${lines} - 1
- ${id}= Get Line ${stdout} ${last}
- [Return] ${id}
-
-
-Delete VNFD
- [Arguments] ${vnfd_id}
-
- ${rc} ${stdout}= Run and Return RC and Output osm vnfd-delete ${vnfd_id}
- log ${stdout}
- Should Be Equal As Integers ${rc} ${success_return_code}
- WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For VNFD ${vnfd_id}
-
-
-Check For VNFD
- [Arguments] ${vnfd_id}
-
- ${rc} ${stdout}= Run and Return RC and Output osm vnfd-list | awk '{print $2}' | grep ${vnfd_id}
- Should Not Be Equal As Strings ${stdout} ${vnfd_id}
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import os
-import yaml
-from pathlib import Path
-
-# Prometheus host and port
-prometheus_host = os.environ.get("OSM_HOSTNAME")
-prometheus_port = "9091"
-
-# VIM Configuration
-vim_account_type = "openstack"
-vim_name_prefix = "basic_01_vim_test"
-# Get credentias from Openstack Clouds file
-os_cloud = os.environ.get("OS_CLOUD")
-clouds_file_paths = ["./clouds.yaml", str(Path.home()) + "/.config/openstack/clouds.yaml", "/etc/openstack/clouds.yaml"]
-for path in clouds_file_paths:
- clouds_file_path = Path(path)
- if clouds_file_path.exists(): break
-if not clouds_file_path.exists(): raise Exception("Openstack clouds file not found")
-with clouds_file_path.open() as clouds_file:
- clouds = yaml.safe_load(clouds_file)
- if not os_cloud in clouds["clouds"]: raise Exception("Openstack cloud '" + os_cloud + "' not found")
- cloud = clouds["clouds"][os_cloud]
- if not "username" in cloud["auth"]: raise Exception("Username not found in Openstack cloud '" + os_cloud + "'")
- vim_user = cloud["auth"]["username"]
- if not "password" in cloud["auth"]: raise Exception("Password not found in Openstack cloud '" + os_cloud + "'")
- vim_password = cloud["auth"]["password"]
- if not "auth_url" in cloud["auth"]: raise Exception("Auth url not found in Openstack cloud '" + os_cloud + "'")
- vim_auth_url = cloud["auth"]["auth_url"]
- if not "project_name" in cloud["auth"]: raise Exception("Project name not found in Openstack cloud '" + os_cloud + "'")
- vim_tenant = cloud["auth"]["project_name"]
- vim_user_domain_name = cloud["auth"]["user_domain_name"] if "user_domain_name" in cloud["auth"] else "Default"
- vim_project_domain_name = cloud["auth"]["project_domain_name"] if "project_domain_name" in cloud["auth"] else "Default"
-# Extra config
-vim_config = "'{project_domain_name: " + vim_project_domain_name + ", user_domain_name: " + vim_user_domain_name + ", vim_network_name: " + os.environ.get("VIM_MGMT_NET") + "}'"
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package folder
-vnfd_pkg = 'ubuntu_cloudinit_vnf'
-nsd_pkg = 'ubuntu_cloudinit_ns'
-# NS and VNF descriptor id
-vnfd_name = 'ubuntu_cloudinit-vnf'
-nsd_name = 'ubuntu_cloudinit-ns'
-# NS instance name
-ns_name = 'basic_05_instantiation_params_cloud_init'
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package folder
-vnfd_pkg = 'hackfest_proxycharm_vnf'
-nsd_pkg = 'hackfest_proxycharm_ns'
-# NS and VNF descriptor id
-vnfd_name = 'hackfest_proxycharm-vnf'
-nsd_name = 'hackfest_proxycharm-ns'
-# NS instance name
-ns_name = 'basic_06_charm_test'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package folder
-vnfd_pkg = 'simple_nopasswd_vnf'
-nsd_pkg = 'simple_nopasswd_ns'
-# NS and VNF descriptor id
-vnfd_name = 'simple_nopasswd-vnf'
-nsd_name = 'simple_nopasswd-ns'
-# NS instance name
-ns_name = 'basic_07_secure_key_management'
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package folder
-vnfd_pkg = 'hackfest_basic_metrics_vnf'
-nsd_pkg = 'hackfest_basic_metrics_ns'
-# NS and VNF descriptor id
-vnfd_name = 'hackfest_basic_metrics-vnf'
-nsd_name = 'hackfest_basic-ns-metrics'
-# NS instance name
-ns_name = 'basic_09_manual_scaling_test'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
+++ /dev/null
-# Copyright 2020 Atos
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package files
-vnfd1_pkg = 'slice_basic_vnf'
-vnfd2_pkg = 'slice_basic_middle_vnfd'
-nsd1_pkg = 'slice_basic_ns'
-nsd2_pkg = 'slice_basic_middle_nsd'
-nst = 'slice_basic_nst/slice_basic_nst.yaml'
-# Instance names
-slice_name = 'slicebasic'
-middle_ns_name = 'slicebasic.slice_basic_nsd_2'
-# Descriptor names
-nst_name = 'slice_basic_nst'
-vnfd1_name = 'slice_basic_vnfd'
-vnfd2_name = 'slice_basic_middle_vnfd'
-nsd1_name = 'slice_basic_nsd'
-nsd2_name = 'slice_basic_middle_nsd'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package folder
-vnfd_pkg = 'hackfest_basic_vnf'
-nsd_pkg = 'hackfest_basic_ns'
-# NS and VNF descriptor package id
-vnfd_name = 'hackfest_basic-vnf'
-nsd_name = 'hackfest_basic-ns'
-# NS instance name
-ns_name = 'hfbasic'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package folder
-vnfd_pkg = 'hackfest_cloudinit_vnf'
-nsd_pkg = 'hackfest_cloudinit_ns'
-# NS and VNF descriptor package id
-vnfd_name = 'hackfest_cloudinit-vnf'
-nsd_name = 'hackfest_cloudinit-ns'
-# NS instance name
-ns_name = 'hfcloudinit'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package folder
-vnfd_pkg = 'hackfest_multivdu_vnf'
-nsd_pkg = 'hackfest_multivdu_ns'
-# NS and VNF descriptor package id
-vnfd_name = 'hackfest_multivdu-vnf'
-nsd_name = 'hackfest_multivdu-ns'
-# NS instance name
-ns_name = 'hfmultivdu'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
+++ /dev/null
-# Copyright 2020 Canonical Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# K8s cluster name
-k8scluster_name = 'k8s-test'
-k8scluster_version = 'v1'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# K8s cluster name
-k8scluster_name = 'k8s-test'
-k8scluster_version = 'v1'
-# NS and VNF descriptor package files
-vnfd_pkg = 'hackfest_simple_k8s_vnfd.tar.gz'
-nsd_pkg = 'hackfest_simple_k8s_nsd.tar.gz'
-# NS and VNF descriptor package files
-vnfd_name = 'hackfest-simple-k8s-vnfd'
-nsd_name = 'hackfest-simple-k8s-nsd'
-# NS instance name
-ns_name = 'simple-k8s'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
+++ /dev/null
-# Copyright 2020 Atos
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package files
-vnfd1_pkg = 'slice_basic_vnf'
-vnfd2_pkg = 'slice_basic_middle_vnfd'
-nsd1_pkg = 'slice_basic_ns'
-nsd2_pkg = 'slice_basic_middle_nsd'
-nst = 'slice_basic_nst/slice_basic_nst.yaml'
-nst2 = 'slice_basic_nst/slice_basic_2nd_nst.yaml'
-# Instance names
-slice_name = 'slicebasic'
-slice2_name = 'sliceshared'
-middle_ns_name = 'slicebasic.slice_basic_nsd_2'
-# Descriptor names
-nst_name = 'slice_basic_nst'
-nst2_name = 'slice_basic_nst2'
-vnfd1_name = 'slice_basic_vnfd'
-vnfd2_name = 'slice_basic_middle_vnfd'
-nsd1_name = 'slice_basic_nsd'
-nsd2_name = 'slice_basic_middle_nsd'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
-
+++ /dev/null
-# Copyright 2020 Atos
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from pathlib import Path
-
-# Get ${HOME} from local machine
-home = str(Path.home())
-# NS and VNF descriptor package files
-vnfd1_pkg = 'slice_hackfest_vnf.tar.gz'
-vnfd2_pkg = 'slice_hackfest_middle_vnfd.tar.gz'
-nsd1_pkg = 'slice_hackfest_ns.tar.gz'
-nsd2_pkg = 'slice_hackfest_middle_nsd.tar.gz'
-nst = 'slice_hackfest_nst.yaml'
-nst2 = 'slice_hackfest2_nst.yaml'
-# Instance names
-slice_name = 'slicehfbasic'
-slice2_name = 'sliceshared'
-middle_ns_name = 'slicehfbasic.slice_hackfest_nsd_2'
-# Descriptor names
-nst_name = 'slice_hackfest_nst'
-nst2_name = 'slice_hackfest2_nst'
-vnfd1_name = 'slice_hackfest_vnfd'
-vnfd2_name = 'slice_hackfest_middle_vnfd'
-nsd1_name = 'slice_hackfest_nsd'
-nsd2_name = 'slice_hackfest_middle_nsd'
-# SSH keys to be used
-publickey = home + '/.ssh/id_rsa.pub'
-privatekey = home + '/.ssh/id_rsa'
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Documentation [BASIC-01] CRUD operations on VIM targets.
-... All tests will be performed over an Openstack VIM, and the credentials will be loaded from clouds.yaml file.
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/basic_01-crud_operations_on_vim_targets_data.py
-
-
-*** Test Cases ***
-Create VIM Target Basic
- [Documentation] Create a VIM Target only with the mandatory parameters.
- ... Checks the status of the VIM in Prometheus after it creation.
- [Tags] vim
-
- ${rand}= Generate Random String 8 [NUMBERS]
- ${vim_name}= Catenate SEPARATOR=_ ${vim_name_prefix} ${rand}
- Set Suite Variable ${vim_name}
- ${created_vim_account_id}= Create VIM Target ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type}
- Set Suite Variable ${created_vim_account_id}
- Check for VIM Target Status ${vim_name} ${prometheus_host} ${prometheus_port}
-
-
-Delete VIM Target By Name
- [Documentation] Delete the VIM Target created in previous test-case by its name.
- ... Checks whether the VIM Target was created or not before perform the deletion.
- [Tags] vim cleanup
-
- ${vim_account_id}= Get VIM Target ID ${vim_name}
- Should Be Equal As Strings ${vim_account_id} ${created_vim_account_id}
- Delete VIM Target ${vim_name}
-
-
-Create VIM Target With Extra Config
- [Documentation] Create a VIM Target using the extra parameter 'config'.
- ... Checks the status of the VIM in Prometheus after it creation.
- [Tags] vim
-
- ${rand}= Generate Random String 8 [NUMBERS]
- ${vim_name}= Catenate SEPARATOR=_ ${vim_name_prefix} ${rand}
- Set Suite Variable ${vim_name}
- ${created_vim_account_id}= Create VIM Target ${vim_name} ${vim_user} ${vim_password} ${vim_auth_url} ${vim_tenant} ${vim_account_type} config=${vim_config}
- Set Suite Variable ${created_vim_account_id}
- Check for VIM Target Status ${vim_name} ${prometheus_host} ${prometheus_port}
-
-
-Delete VIM Target By ID
- [Documentation] Delete the VIM Target created in previous test-case by its ID.
- ... Checks whether the VIM Target was created or not before perform the deletion.
- [Tags] vim cleanup
-
- ${vim_account_id}= Get VIM Target ID ${vim_name}
- Should Be Equal As Strings ${vim_account_id} ${created_vim_account_id}
- Delete VIM Target ${vim_account_id}
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Documentation [BASIC-05] Instantiation parameters in cloud-init.
-
-Library OperatingSystem
-Library SSHLibrary
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/basic_05-instantiation_parameters_in_cloud_init_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-${username} ubuntu
-${new_password} newpassword
-${vnf_member_index} 1
-${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ], additionalParamsForVnf: [ { member-vnf-index: "${vnf_member_index}", additionalParams: { password: "${new_password}" } } ] }
-
-
-*** Test Cases ***
-Create Cloudinit VNF Descriptor
- [Tags] instantiation_params
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-
-
-Create Cloudinit NS Descriptor
- [Tags] instantiation_params
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
-
-
-Instantiate Cloudinit Network Service Using Instantiation Parameters
- [Documentation] Instantiates the NS using the instantiation parameter 'additionalParamsForVnf' to change the password of the default user.
- [Tags] instantiation_params
-
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${EMPTY}
- Set Suite Variable ${ns_id} ${id}
-
-
-Get Management Ip Addresses
- [Tags] instantiation_params
-
- ${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
- Set Suite Variable ${vnf_ip_addr} ${ip_addr}
-
-
-Test SSH Access With The New Password
- [Documentation] Test SSH access with the new password configured via cloud-init.
- [Tags] instantiation_params
-
- Variable Should Exist ${vnf_ip_addr} msg=IP address of the management VNF is not available
- Sleep 30s Waiting ssh daemon to be up
- Test SSH Connection ${vnf_ip_addr} ${username} ${new_password} ${EMPTY}
-
-
-Delete NS Instance
- [Tags] instantiation_params cleanup
-
- Delete NS ${ns_name}
-
-
-Delete NS Descriptor
- [Tags] instantiation_params cleanup
-
- Delete NSD ${nsd_name}
-
-
-Delete VNF Descriptor
- [Tags] instantiation_params cleanup
-
- Delete VNFD ${vnfd_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance
-
- Run Keyword If Test Failed Delete NS ${ns_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd_name}
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Documentation [BASIC-06] VNF with Charm.
-
-Library OperatingSystem
-Library SSHLibrary
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/basic_06-vnf_with_charm_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-${username} ubuntu
-${password} ${EMPTY}
-${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
-${action_name} touch
-${vnf_member_index_1} 1
-${vnf_member_index_2} 2
-${day_1_file_name} /home/ubuntu/first-touch
-${day_2_file_name_1} /home/ubuntu/mytouch1
-${day_2_file_name_2} /home/ubuntu/mytouch2
-${ns_timeout} 15min
-
-
-*** Test Cases ***
-Create Charm VNF Descriptor
- [Tags] charm
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-
-
-Create Charm NS Descriptor
- [Tags] charm
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
-
-
-Instantiate Charm Network Service
- [Tags] charm
-
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey} ${ns_timeout}
- Set Suite Variable ${ns_id} ${id}
-
-
-Get Management Ip Addresses
- [Tags] charm
-
- ${ip_addr_1} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_1}
- log ${ip_addr_1}
- Set Suite Variable ${vnf_1_ip_addr} ${ip_addr_1}
- ${ip_addr_2} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index_2}
- log ${ip_addr_2}
- Set Suite Variable ${vnf_2_ip_addr} ${ip_addr_2}
-
-
-Test SSH Access
- [Tags] charm
-
- Variable Should Exist ${vnf_1_ip_addr} msg=IP address of the management VNF '${vnf_member_index_1}' is not available
- Variable Should Exist ${vnf_2_ip_addr} msg=IP address of the management VNF '${vnf_member_index_2}' is not available
- Sleep 30s Waiting ssh daemon to be up
- Test SSH Connection ${vnf_1_ip_addr} ${username} ${password} ${privatekey}
- Test SSH Connection ${vnf_2_ip_addr} ${username} ${password} ${privatekey}
-
-
-Check Remote Files Created Via Day 1 Operations
- [Documentation] The Charm VNF has a Day 1 operation that creates a file named ${day_1_file_name}.
- ... This test checks whether that files have been created or not.
- [Tags] charm
-
- Check If remote File Exists ${vnf_1_ip_addr} ${username} ${password} ${privatekey} ${day_1_file_name}
- Check If remote File Exists ${vnf_2_ip_addr} ${username} ${password} ${privatekey} ${day_1_file_name}
-
-
-Execute Day 2 Operations
- [Documentation] Performs one Day 2 operation per VNF that creates a new file.
- [Tags] charm
-
- Variable Should Exist ${ns_id} msg=Network service instance is not available
- ${ns_op_id_1}= Execute NS Action ${ns_name} ${action_name} ${vnf_member_index_1} filename=${day_2_file_name_1}
- ${ns_op_id_2}= Execute NS Action ${ns_name} ${action_name} ${vnf_member_index_2} filename=${day_2_file_name_2}
-
-
-Check Remote Files Created Via Day 2 Operations
- [Documentation] Check whether the files created in the previous test via Day 2 operations exist or not.
- [Tags] charm
-
- Check If remote File Exists ${vnf_1_ip_addr} ${username} ${password} ${privatekey} ${day_2_file_name_1}
- Check If remote File Exists ${vnf_2_ip_addr} ${username} ${password} ${privatekey} ${day_2_file_name_2}
-
-
-Delete NS Instance
- [Tags] charm cleanup
-
- Delete NS ${ns_name}
-
-
-Delete NS Descriptor
- [Tags] charm cleanup
-
- Delete NSD ${nsd_name}
-
-
-Delete VNF Descriptor
- [Tags] charm cleanup
-
- Delete VNFD ${vnfd_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance
-
- Run Keyword If Test Failed Delete NS ${ns_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd_name}
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Documentation [BASIC-07] Secure key management.
-
-Library OperatingSystem
-Library SSHLibrary
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/basic_07-secure_key_management_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-${username} ubuntu
-${password} osm4u
-${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
-${action_name} touch
-${vnf_member_index} 1
-${day_1_file_name} /home/ubuntu/first-touch
-${day_2_file_name} /home/ubuntu/mytouch1
-${ns_timeout} 15min
-
-
-*** Test Cases ***
-Create Nopasswd Charm VNF Descriptor
- [Tags] nopasswd
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-
-
-Create Nopasswd Charm NS Descriptor
- [Tags] nopasswd
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
-
-
-Instantiate Nopasswd Charm Network Service
- [Tags] nopasswd
-
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${EMPTY} ${ns_timeout}
- Set Suite Variable ${ns_id} ${id}
-
-
-Get Management Ip Addresses
- [Tags] nopasswd
-
- ${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
- Set Suite Variable ${vnf_ip_addr} ${ip_addr}
-
-
-Test SSH Access
- [Tags] nopasswd
-
- Variable Should Exist ${vnf_ip_addr} msg=IP address of the management VNF is not available
- Sleep 30s Waiting ssh daemon to be up
- Test SSH Connection ${vnf_ip_addr} ${username} ${password} ${EMPTY}
-
-
-Check Remote Files Created Via Day 1 Operations
- [Documentation] The Nopasswd VNF has a Day 1 operation that creates a file named ${day_1_file_name} and performs it without password.
- ... This test checks whether that files have been created or not.
- [Tags] nopasswd
-
- Check If remote File Exists ${vnf_ip_addr} ${username} ${password} ${EMPTY} ${day_1_file_name}
-
-
-Execute Day 2 Operations
- [Documentation] Performs one Day 2 operation that creates a new file, this action is executed without password too.
- [Tags] nopasswd
-
- Variable Should Exist ${ns_id} msg=Network service instance is not available
- ${ns_op_id}= Execute NS Action ${ns_name} ${action_name} ${vnf_member_index} filename=${day_2_file_name}
-
-
-Check Remote Files Created Via Day 2 Operations
- [Documentation] Check whether the file created in the previous test via Day 2 operation exists or not.
- [Tags] nopasswd
-
- Check If remote File Exists ${vnf_ip_addr} ${username} ${password} ${EMPTY} ${day_2_file_name}
-
-
-Delete NS Instance
- [Tags] nopasswd cleanup
-
- Delete NS ${ns_name}
-
-
-Delete NS Descriptor
- [Tags] nopasswd cleanup
-
- Delete NSD ${nsd_name}
-
-
-Delete VNF Descriptor
- [Tags] nopasswd cleanup
-
- Delete VNFD ${vnfd_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance
-
- Run Keyword If Test Failed Delete NS ${ns_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd_name}
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Documentation [BASIC-09] Manual VNF/VDU Scaling.
-
-Library OperatingSystem
-Library String
-Library Collections
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/basic_09-manual_vdu_scaling_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
-${scaling_group} vdu_autoscale
-${vnf_member_index} 1
-
-
-*** Test Cases ***
-Create Scaling VNF Descriptor
- [Tags] manual_scaling
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-
-
-Create Scaling NS Descriptor
- [Tags] manual_scaling
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
-
-
-Instantiate Scaling Network Service
- [Tags] manual_scaling
-
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
- Set Suite Variable ${ns_id} ${id}
-
-
-Get Vnf Id
- [Tags] manual_scaling
-
- Variable Should Exist ${ns_id} msg=Network service instance is not available
- @{vnfr_list}= Get Ns Vnfr Ids ${ns_id}
- Log List ${vnfr_list}
- Set Suite Variable ${vnf_id} ${vnfr_list}[0]
-
-
-Get Vdus Before Scale Out
- [Documentation] Get the number of VDU records before the manual scaling.
- [Tags] manual_scaling
-
- @{vdur_list}= Get Vnf Vdur Names ${vnf_id}
- Log List ${vdur_list}
- ${vdurs}= Get Length ${vdur_list}
- Set Suite Variable ${initial_vdur_count} ${vdurs}
-
-
-Perform Manual Vdu Scale Out
- [Tags] manual_scaling
-
- Variable Should Exist ${ns_id} msg=Network service instance is not available
- ${ns_op_id}= Execute Manual VNF Scale ${ns_name} ${vnf_member_index} ${scaling_group} SCALE_OUT
-
-
-Check Vdus After Scale Out
- [Documentation] Check whether there is one more VDU after scaling or not.
- [Tags] manual_scaling
-
- Variable Should Exist ${ns_id} msg=Network service instance is not available
- @{vdur_list}= Get Vnf Vdur Names ${vnf_id}
- Log List ${vdur_list}
- ${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
-
-
-Perform Manual Vdu Scale In
- [Tags] manual_scaling
-
- Variable Should Exist ${ns_id} msg=Network service instance is not available
- ${ns_op_id}= Execute Manual VNF Scale ${ns_name} ${vnf_member_index} ${scaling_group} SCALE_IN
-
-
-Check Vdus After Scaling In
- [Documentation] Check whether there is one less VDU after scaling or not.
- [Tags] manual_scaling
-
- Variable Should Exist ${ns_id} msg=Network service instance is not available
- @{vdur_list}= Get Vnf Vdur Names ${vnf_id}
- Log List ${vdur_list}
- ${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In
-
-
-Delete NS Instance
- [Tags] manual_scaling cleanup
-
- Delete NS ${ns_name}
-
-
-Delete NS Descriptor
- [Tags] manual_scaling cleanup
-
- Delete NSD ${nsd_name}
-
-
-Delete VNF Descriptor
- [Tags] manual_scaling cleanup
-
- Delete VNFD ${vnfd_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suite Cleanup: Deleting descriptors and NS instance
-
- Run Keyword If Test Failed Delete NS ${ns_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd_name}
-
+++ /dev/null
-# Copyright 2020 Atos
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Library OperatingSystem
-Library String
-Library Collections
-Library Process
-Library SSHLibrary
-Library yaml
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nst_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsi_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/basic_network_slicing_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-
-${ns_id} ${EMPTY}
-${username} osm
-${password} osm4u
-${vnf_member_index} 1
-${vnf_ip_addr} ${EMPTY}
-${nst_config} {netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: %{VIM_MGMT_NET}} ] }
-
-
-*** Test Cases ***
-
-Create Slice VNF Descriptors
- [Documentation] Onboards all the VNFDs required for the test: vnfd1_pkg and vnfd2_pkg (in the variables file)
-
- [Tags] basic_network_slicing SLICING-01
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd1_pkg}'
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd2_pkg}'
-
-
-Create Slice NS Descriptors
- [Documentation] Onboards all the NSDs required for the test: nsd1_pkg and nsd2_pkg (in the variables file)
-
- [Tags] basic_network_slicing SLICING-01
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd1_pkg}'
- Create NSD '%{PACKAGES_FOLDER}/${nsd2_pkg}'
-
-Create Slice Template
- [Documentation] Onboards the Network Slice Template: nst (in the variables file)
-
- [Tags] basic_network_slicing SLICING-01
-
- Create NST '%{PACKAGES_FOLDER}/${nst}'
-
-Network Slice Instance Test
- [Documentation] Instantiates the NST recently onboarded and sets the instantiation id as a suite variable (nsi_id)
-
- [Tags] basic_network_slicing SLICING-01
-
- ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey}
- Set Suite Variable ${nsi_id} ${id}
-
-
-Get Middle Vnf Management Ip
- [Documentation] Obtains the management IP of the slice middle VNF (name in the reources file) and sets the ip as a suite variable (mgmt_vnf_ip)
-
- [Tags] basic_network_slicing SLICING-01
-
- ${middle_ns_id}= Run and Return RC and Output osm ns-list | grep ${middle_ns_name} | awk '{print $4}' 2>&1
- ${vnf_ip} Get Vnf Management Ip Address ${middle_ns_id}[1] ${vnf_member_index}
- Set Suite Variable ${mgmt_vnf_ip} ${vnf_ip}
-
-
-Get Slice Vnf Ip Addresses
- [Documentation] Obtains the list of IPs addresses in the slice and sets the list as a suite variable (slice_vnfs_ips)
-
- [Tags] basic_network_slicing SLICING-01
-
- # Get all the ns_id in the slice except the middle one to avoid self ping
- @{slice_ns_list} Get Slice Ns List Except One ${slice_name} ${middle_ns_name}
- log many @{slice_ns_list}
- @{temp_list}= Create List
- # For each ns_id in the list, get all the vnf_id and their IP addresses
- FOR ${ns_id} IN @{slice_ns_list}
- log ${ns_id}
- @{vnf_id_list} Get Ns Vnf List ${ns_id}
- # For each vnf_id in the list, get all its IP addresses
- @{ns_ip_list} Get Ns Ip List @{vnf_id_list}
- @{temp_list}= Combine Lists ${temp_list} ${ns_ip_list}
- END
- Log List ${temp_list}
- Set Suite Variable ${slice_vnfs_ips} ${temp_list}
-
-
-Test Middle Ns Ping
- [Documentation] Pings the slice middle vnf (mgmt_vnf_ip)
-
- [Tags] basic_network_slicing SLICING-01
- Sleep 60s Waiting for the network to be up
- # Ping to the middle VNF
- Test Connectivity ${mgmt_vnf_ip}
-
-
-Test Middle Vnf SSH Access
- [Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file
-
- [Tags] basic_network_slicing SLICING-01
- Sleep 30s Waiting ssh daemon to be up
- Test SSH Connection ${mgmt_vnf_ip} ${username} ${password} ${privatekey}
-
-
-Test Slice Connectivity
- [Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file
- ... and pings all the IP addresses in the list (slice_vnfs_ips)
-
- [Tags] basic_network_slicing SLICING-01
- Ping Many ${mgmt_vnf_ip} ${username} ${password} ${privatekey} @{slice_vnfs_ips}
-
-
-Stop Slice Instance
- [Documentation] Stops the slice instance (slice_name)
-
- [Tags] basic_network_slicing SLICING-01 cleanup
-
- Delete NSI ${slice_name}
-
-
-Delete Slice Template
- [Documentation] Deletes the NST (nst_name) from OSM
-
- [Tags] basic_network_slicing SLICING-01 cleanup
-
- Delete NST ${nst_name}
-
-
-Delete NS Descriptors
- [Documentation] Deletes all the NSDs created for the test: nsd1_name, nsd2_name
-
- [Tags] basic_network_slicing SLICING-01 cleanup
-
- Delete NSD ${nsd1_name}
- Delete NSD ${nsd2_name}
-
-
-Delete VNF Descriptors
- [Documentation] Deletes all the VNFDs created for the test: vnfd1_name, vnfd2_name
-
- [Tags] basic_network_slicing SLICING-01 cleanup
-
- Delete VNFD ${vnfd1_name}
- Delete VNFD ${vnfd2_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suit Cleanup: Deleting Descriptors, instance and template
-
- Run Keyword If Test Failed Delete NST ${nst_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd1_name}
- Run Keyword If Test Failed Delete NSD ${nsd2_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd1_name}
- Run Keyword If Test Failed Delete VNFD ${vnfd2_name}
-
-
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Library OperatingSystem
-Library String
-Library Collections
-Library Process
-Library SSHLibrary
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/hackfest_basic_ns_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-${ns_id} ${EMPTY}
-${username} ubuntu
-${password} ${EMPTY}
-${vnf_member_index} 1
-${vnf_ip_addr} ${EMPTY}
-${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
-# ${ns_config} ${EMPTY}
-
-*** Test Cases ***
-Create Hackfest Basic VNF Descriptor
- [Tags] hackfest_basic
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-
-
-Create Hackfest Basic NS Descriptor
- [Tags] hackfest_basic
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
-
-Network Service Instance Test
- [Tags] hackfest_basic
-
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
- Set Suite Variable ${ns_id} ${id}
-
-
-Get Vnf Ip Address
- [Tags] hackfest_basic
-
- ${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
- Set Suite Variable ${vnf_ip_addr} ${ip_addr}
-
-Test Ping
- [Tags] hackfest_basic
- Test Connectivity ${vnf_ip_addr}
-
-Test SSH Access
- [Tags] hackfest_basic
- Sleep 30s Waiting ssh daemon to be up
- Test SSH Connection ${vnf_ip_addr} ${username} ${password} ${privatekey}
-
-Delete NS Instance Test
- [Tags] hackfest_basic cleanup
-
- Delete NS ${ns_name}
-
-
-Delete NS Descriptor Test
- [Tags] hackfest_basic cleanup
-
- Delete NSD ${nsd_name}
-
-
-Delete VNF Descriptor Test
- [Tags] hackfest_basic cleanup
-
- Delete VNFD ${vnfd_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
-
- Run Keyword If Test Failed Delete NS ${ns_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd_name}
-
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Library OperatingSystem
-Library String
-Library Collections
-Library Process
-Library SSHLibrary
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/hackfest_cloudinit_ns_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-${ns_id} ${EMPTY}
-${username} ubuntu
-${password} ${EMPTY}
-${vnf_member_index} 1
-${vnf_ip_addr} ${EMPTY}
-${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
-# ${ns_config} ${EMPTY}
-
-*** Test Cases ***
-Create Hackfest Cloudinit VNF Descriptor
- [Tags] hackfest_cloudinit
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-
-
-Create Hackfest Cloudinit NS Descriptor
- [Tags] hackfest_cloudinit
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
-
-
-Network Service Instance Test
- [Tags] hackfest_cloudinit
-
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
- Set Suite Variable ${ns_id} ${id}
-
-
-Get Vnf Ip Address
- [Tags] hackfest_cloudinit
-
- ${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
- Set Suite Variable ${vnf_ip_addr} ${ip_addr}
-
-
-Test SSH Access
- [Tags] hackfest_cloudinit
-
- Sleep 30s Waiting ssh daemon to be up
- Test SSH Connection ${vnf_ip_addr} ${username} ${password} ${privatekey}
-
-
-Check Remote File Injected Via Cloud-init
- [Tags] hackfest_cloudinit
-
- ${stdout}= Execute Remote Command Check Rc Return Output ${vnf_ip_addr} ${username} ${password} ${privatekey} sudo cat /root/helloworld.txt
- log ${stdout}
-
-
-Delete NS Instance Test
- [Tags] hackfest_cloudinit cleanup
-
- Delete NS ${ns_name}
-
-
-Delete NS Descriptor Test
- [Tags] hackfest_cloudinit cleanup
-
- Delete NSD ${nsd_name}
-
-
-Delete VNF Descriptor Test
- [Tags] hackfest_cloudinit cleanup
-
- Delete VNFD ${vnfd_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
-
- Run Keyword If Test Failed Delete NS ${ns_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd_name}
-
-
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Library OperatingSystem
-Library String
-Library Collections
-Library Process
-Library SSHLibrary
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/hackfest_multivdu_ns_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-${ns_id} ${EMPTY}
-${username} osm
-${password} osm4u
-${vnf_member_index} 1
-${vnf_ip_addr} ${EMPTY}
-${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
-${wait_guard_for_vm_boot} 50s
-# ${ns_config} ${EMPTY}
-
-*** Test Cases ***
-Create Hackfest multivdu VNF Descriptor
- [Tags] hackfest_multivdu
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-
-
-Create Hackfest Multivdu NS Descriptor
- [Tags] hackfest_multivdu
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
-
-Network Service Instance Test
- [Tags] hackfest_multivdu
-
- ${status} ${message}= Run Keyword And Ignore Error Variable Should Exist ${publickey}
- Run Keyword If "${status}" == "FAIL" Set Global Variable ${publickey} ${EMPTY}
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
- Set Suite Variable ${ns_id} ${id}
- Sleep ${wait_guard_for_vm_boot} Waiting for VM's daemons to be up and running
-
-Get Vnf Ip Address
- [Tags] hackfest_multivdu
-
- ${ip_addr} Get Vnf Management Ip Address ${ns_id} ${vnf_member_index}
- log ${ip_addr}
- Set Suite Variable ${vnf_ip_addr} ${ip_addr}
-
-Test Ping
- [Tags] hackfest_multivdu
- Test Connectivity ${vnf_ip_addr}
-
-Test SSH Access
- [Tags] hackfest_multivdu
- ${status} ${message}= Run Keyword And Ignore Error Variable Should Exist ${privatekey}
- Run Keyword If "${status}" == "FAIL" Set Global Variable ${privatekey} ${EMPTY}
- Test SSH Connection ${vnf_ip_addr} ${username} ${password} ${privatekey}
-
-Delete NS Instance Test
- [Tags] hackfest_multivdu cleanup
-
- Delete NS ${ns_name}
-
-
-Delete NS Descriptor Test
- [Tags] hackfest_multivdu cleanup
-
- Delete NSD ${nsd_name}
-
-
-Delete VNF Descriptor Test
- [Tags] hackfest_multivdu cleanup
-
- Delete VNFD ${vnfd_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
-
- Run Keyword If Test Failed Delete NS ${ns_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd_name}
+++ /dev/null
-# Copyright 2020 Canonical Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Library OperatingSystem
-Library String
-Library Collections
-Library Process
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/k8s_02-k8scluster_creation_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-*** Test Cases ***
-Add K8s Cluster To OSM
- [Tags] k8scluster
- Create K8s Cluster %{K8S_CREDENTIALS} ${k8scluster_version} %{VIM_TARGET} %{VIM_MGMT_NET} ${k8scluster_name}
-
-List K8s Clusters
- [Tags] k8scluster
- ${stdout}= Get K8s Cluster
- Log To Console \n${stdout}
-
-Remove K8s Cluster from OSM
- [Tags] k8scluster
- Delete K8s Cluster ${k8scluster_name}
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suit Cleanup: Deleting K8s Cluster
- Run Keyword If Test Failed Delete K8s Cluster ${k8scluster_name}
+++ /dev/null
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Library OperatingSystem
-Library String
-Library Collections
-Library Process
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/k8scluster_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/k8s_03-simple_k8s_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-${ns_id} ${EMPTY}
-${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
-${publickey} ${EMPTY}
-
-*** Test Cases ***
-Create Simple K8s VNF Descriptor
- [Tags] simple_k8s
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-
-Create Simple K8s Descriptor
- [Tags] simple_k8s
- Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}'
-
-Add K8s Cluster To OSM
- [Tags] k8scluster
- Create K8s Cluster %{K8S_CREDENTIALS} ${k8scluster_version} %{VIM_TARGET} %{VIM_MGMT_NET} ${k8scluster_name}
-
-Network Service K8s Instance Test
- [Tags] simple_k8s
- ${id}= Create Network Service ${nsd_name} %{VIM_TARGET} ${ns_name} ${ns_config} ${publickey}
- Set Suite Variable ${ns_id} ${id}
-
-Delete NS K8s Instance Test
- [Tags] simple_k8s cleanup
- Delete NS ${ns_name}
-
-Remove K8s Cluster from OSM
- [Tags] k8scluster
- Delete K8s Cluster ${k8scluster_name}
-
-Delete NS Descriptor Test
- [Tags] simple_k8s cleanup
- Delete NSD ${nsd_name}
-
-Delete VNF Descriptor Test
- [Tags] simple_k8s cleanup
- Delete VNFD ${vnfd_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
- Run Keyword If Test Failed Delete NS ${ns_name}
- Run Keyword If Test Failed Delete NSD ${nsd_name}
- Run Keyword If Test Failed Delete VNFD ${vnfd_name}
-
-
+++ /dev/null
-# Copyright 2020 Atos
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-*** Settings ***
-Library OperatingSystem
-Library String
-Library Collections
-Library Process
-Library SSHLibrary
-
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nst_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsi_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
-Resource %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
-
-Variables %{ROBOT_DEVOPS_FOLDER}/resources/shared_network_slicing_data.py
-
-Suite Teardown Run Keyword And Ignore Error Test Cleanup
-
-
-*** Variables ***
-
-${ns_id} ${EMPTY}
-${username} osm
-${password} osm4u
-${vnf_member_index} 1
-${vnf_ip_addr} ${EMPTY}
-${nst_config} {netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: %{VIM_MGMT_NET}} ] }
-
-
-*** Test Cases ***
-
-Create Slice VNF Descriptors
- [Documentation] Onboards all the VNFDs required for the test: vnfd1_pkg and vnfd2_pkg (in the variables file)
-
- [Tags] shared_network_slicing SLICING-02
-
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd1_pkg}'
- Create VNFD '%{PACKAGES_FOLDER}/${vnfd2_pkg}'
-
-
-Create Slice NS Descriptors
- [Documentation] Onboards all the NSDs required for the test: nsd1_pkg and nsd2_pkg (in the variables file)
-
- [Tags] shared_network_slicing SLICING-02
-
- Create NSD '%{PACKAGES_FOLDER}/${nsd1_pkg}'
- Create NSD '%{PACKAGES_FOLDER}/${nsd2_pkg}'
-
-Create Slice Templates
- [Documentation] Onboards the Network Slice Templates: nst, nst2 (in the variables file)
-
- [Tags] shared_network_slicing SLICING-02
-
- Create NST '%{PACKAGES_FOLDER}/${nst}'
- Create NST '%{PACKAGES_FOLDER}/${nst2}'
-
-Network Slice One Instance Test
- [Documentation] Instantiates the first NST recently onboarded (nst_name) and sets the instantiation id as a suite variable (nsi_id)
- ... The slice contains 3 NS (1 shared)
-
- [Tags] shared_network_slicing SLICING-02
-
- ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey}
- Set Suite Variable ${nsi_id} ${id}
-
-
-Network Slice Two Instance Test
- [Documentation] Instantiates the second NST recently onboarded (nst2_name) and sets the instantiation id as a suite variable (nsi2_id)
- ... The slice contains 2 NS (1 shared)
-
- [Tags] shared_network_slicing SLICING-02
-
- ${id}= Create Network Slice ${nst2_name} %{VIM_TARGET} ${slice2_name} ${nst_config} ${publickey}
- Set Suite Variable ${nsi2_id} ${id}
-
-
-First Network Slice Ns Count
- [Documentation] Counts the NS in both slice instances and shoul be equal to 4
-
- [Tags] shared_network_slicing SLICING-02
-
- ${slice1_count}= Get Slice Ns Count ${slice_name}
- ${slice2_count}= Get Slice Ns Count ${slice2_name}
- ${together}= Evaluate ${slice1_count} + ${slice2_count}
- Should Be Equal As Integers ${together} 4
-
-
-Get Middle Vnf Management Ip
- [Documentation] Obtains the management IP of the shared NS main (only) VNF and sets it as a suite variable (mgmt_vnf_ip)
-
- [Tags] shared_network_slicing SLICING-02
-
- ${middle_ns_id}= Run and Return RC and Output osm ns-list | grep ${middle_ns_name} | awk '{print $4}' 2>&1
- ${vnf_ip} Get Vnf Management Ip Address ${middle_ns_id}[1] ${vnf_member_index}
- Set Suite Variable ${mgmt_vnf_ip} ${vnf_ip}
-
-
-Get First Slice Vnf IPs
- [Documentation] Obtains the list of IPs addresses in the first slice and sets the list as a suite variable (slice1_vnfs_ips)
-
- [Tags] shared_network_slicing SLICING-02
-
- # Get all the ns_id in the slice except the middle one
- @{ip_list} Get Slice Vnf Ip Addresses ${slice_name}
- Set Suite Variable ${slice1_vnfs_ips} ${ip_list}
-
-
-Test Middle Ns Ping
- [Documentation] Pings the slice middle vnf (mgmt_vnf_ip)
-
- [Tags] shared_network_slicing SLICING-02
-
- Sleep 60s Waiting for the network to be up
- # Ping to the middle VNF
- Test Connectivity ${mgmt_vnf_ip}
-
-
-Test Middle Vnf SSH Access
- [Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file
-
- [Tags] shared_network_slicing SLICING-02
-
- Sleep 30s Waiting ssh daemon to be up
- Test SSH Connection ${mgmt_vnf_ip} ${username} ${password} ${privatekey}
-
-
-Test First Slice Connectivity
- [Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file
- ... and pings all the IP addresses in the list (slice1_vnfs_ips)
-
- [Tags] shared_network_slicing SLICING-02
-
- Ping Many ${mgmt_vnf_ip} ${username} ${password} ${privatekey} @{slice1_vnfs_ips}
-
-
-Stop Slice One Instance
- [Documentation] Stops the slice instance (slice_name)
-
- [Tags] shared_network_slicing SLICING-02 cleanup
-
- Delete NSI ${slice_name}
-
-
-Second Network Slice Ns Count
- [Documentation] Counts the NS in both slice instances and should be equal to 2
-
- [Tags] shared_network_slicing SLICING-02
-
- ${slice1_count}= Get Slice Ns Count ${slice_name}
- ${slice2_count}= Get Slice Ns Count ${slice2_name}
- ${together}= Evaluate ${slice1_count} + ${slice2_count}
- Should Be Equal As Integers ${together} 2
-
-Get Second Slice Vnf IPs
- [Documentation] Obtains the list of IPs addresses in the second slice and sets the list as a suite variable (slice2_vnfs_ips)
-
- [Tags] shared_network_slicing SLICING-02
-
- # Get all the ns_id in the slice
- @{ip_list} Get Slice Vnf Ip Addresses ${slice2_name}
- Set Suite Variable ${slice2_vnfs_ips} ${ip_list}
-
-
-Test Second Slice Connectivity
- [Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file
- ... and pings all the IP addresses in the list (slice2_vnfs_ips)
-
- [Tags] shared_network_slicing SLICING-02
-
- Ping Many ${mgmt_vnf_ip} ${username} ${password} ${privatekey} @{slice2_vnfs_ips}
-
-
-Stop Slice Two Instance
- [Documentation] Stops the slice instance (slice2_name)
-
- [Tags] shared_network_slicing SLICING-02 cleanup
-
- Delete NSI ${slice2_name}
-
-
-Delete Slice One Template
- [Documentation] Deletes the NST (nst_name) from OSM
-
- [Tags] shared_network_slicing SLICING-02 cleanup
-
- Delete NST ${nst_name}
-
-
-Delete Slice Two Template
- [Documentation] Deletes the NST (nst2_name) from OSM
-
- [Tags] shared_network_slicing SLICING-02 cleanup
-
- Delete NST ${nst2_name}
-
-
-Delete NS Descriptors
- [Documentation] Deletes all the NSDs created for the test: nsd1_name, nsd2_name
-
- [Tags] shared_network_slicing SLICING-02 cleanup
-
- Delete NSD ${nsd1_name}
- Delete NSD ${nsd2_name}
-
-
-Delete VNF Descriptors
- [Documentation] Deletes all the VNFDs created for the test: vnfd1_name, vnfd2_name
-
- [Tags] shared_network_slicing SLICING-02 cleanup
-
- Delete VNFD ${vnfd1_name}
- Delete VNFD ${vnfd2_name}
-
-
-*** Keywords ***
-Test Cleanup
- [Documentation] Test Suit Cleanup: Deleting Descriptors, instance and templates
-
- Run Keyword If Test Failed Delete NST ${nst_name}
- Run Keyword If Test Failed Delete NST ${nst2_name}
-
- Run Keyword If Test Failed Delete NSD ${nsd1_name}
- Run Keyword If Test Failed Delete NSD ${nsd2_name}
-
- Run Keyword If Test Failed Delete VNFD ${vnfd1_name}
- Run Keyword If Test Failed Delete VNFD ${vnfd2_name}
-
-
-