Squashed commit of the following:
commit
541f9cf287bf6c7dca45fe911f8e844988711fa3
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Tue May 23 11:59:47 2023 +0200
Fix Fail01 to get openstack quota properly after updating client version
Change-Id: Ief7b4d5f150d67cecf944021c2598456672a30e0
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit
a86e6938d53e345b08a7ca9cc9615115f14a002a
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Fri May 19 12:47:09 2023 +0200
Update SA02 to take into account the VNF threshold-time
Change-Id: Idde7fa330e8e9b141053c15edb266817c4e699c6
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit
c753f67c813fa82926b3d64db759fd7d0d7aa2cc
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Thu May 18 15:06:49 2023 +0200
Fix error message in run_test.sh for create_k8scluster
Change-Id: Ice2e0bc5e829e31a81cbde30ea6784de64d8ca63
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit
b9dfe0317c4935294747897dc2fd1645c4983067
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Wed May 10 17:25:47 2023 +0200
Support of Python3.10
This change includes required changes to make tests work in Python3.10.
It also enables tox running as part of stage-test, which was not included before.
For the moment, only flake8 and black envs will be checked. Some pylint
errors have been fixed, but a few remain unsolved. That's why pylint is
run, but its result is ignored.
Change-Id: I29105bf849eab8b47f92627a7eea1ede31b8e05b
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit
3d7579ccc2356a23ea32878e8f0fbb0e75f59b68
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Tue Apr 18 15:04:57 2023 +0200
Clean stage-archive.sh and use allowlist_extenals in tox.ini
Change-Id: I690598c770f52d805ee3516fead7fa191c90205f
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
commit
43f34481b4c5ccfda407a7f82a124012aab0dccc
Author: garciadeblas <gerardo.garciadeblas@telefonica.com>
Date: Thu Feb 23 17:37:47 2023 +0100
Fix bug 2220 to solve sol003_01 test
Change-Id: Ic4376067a8b42e470c09ba0668c545db8ce08e55
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Change-Id: Icde649f40b72a6a358ef6686fa8840f8502b2259
Signed-off-by: Dario Faccin <dario.faccin@canonical.com>
# devops-stages/stage-build.sh
#
-FROM ubuntu:20.04
+FROM ubuntu:22.04
ARG APT_PROXY
RUN if [ ! -z $APT_PROXY ] ; then \
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
debhelper \
- dh-make \
- git
+ dh-python \
+ git \
+ python3 \
+ python3-all \
+ python3-dev \
+ python3-setuptools \
+ python3-pip \
+ tox
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \
+ libcurl4-openssl-dev \
+ libssl-dev \
+ dh-make
+
+ENV LC_ALL C.UTF-8
+ENV LANG C.UTF-8
+
Section: devel
Priority: optional
Maintainer: Gerardo Garcia <gerardo.garciadeblas@telefonica.com>
-Build-Depends: debhelper (>=9)
+Build-Depends: debhelper (>=9), debhelper-compat (=13)
Standards-Version: 3.9.6
Homepage: http://osm.etsi.org
mkdir -p pool/$MDG
mv deb_dist/*.deb pool/$MDG/
-mkdir -p dists/unstable/$MDG/binary-amd64/
-apt-ftparchive packages pool/$MDG > dists/unstable/$MDG/binary-amd64/Packages
-gzip -9fk dists/unstable/$MDG/binary-amd64/Packages
-
-echo "ARCHIVE"
exit 1
}
+echo "Checking syntax of Robot tests"
+
echo "Checking tabs in robot files. No tabs should be present"
check_tabs robot-systest/testsuite
check_tabs robot-systest/lib
# - Settings: 1 blank line to separate each kind of setting (all LIbrary together, all Resource together, etc.)
# - Test cases: 2 blank lines between test cases, max 1 blank line inside Test case, no blank line after Test Case Keyword
-echo "SUCCESS"
-exit 0
+echo "Launching tox"
+TOX_PARALLEL_NO_SPINNER=1 tox --parallel=auto
# via
# -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=paas
# pyangbind
-certifi==2022.12.7
+certifi==2023.5.7
# via
# -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=paas
# requests
-charset-normalizer==3.0.1
+charset-normalizer==3.1.0
# via
# -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=paas
# requests
# via -r requirements-dev.in
osmclient @ git+https://osm.etsi.org/gerrit/osm/osmclient.git@paas
# via -r requirements-dev.in
-packaging==23.0
+packaging==23.1
# via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=paas
-prettytable==3.6.0
+prettytable==3.7.0
# via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=paas
pyang==2.5.3
# via
# via
# -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=paas
# pyangbind
-requests==2.28.2
+requests==2.30.0
# via -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=paas
six==1.16.0
# via
# -r https://osm.etsi.org/gitweb/?p=osm/IM.git;a=blob_plain;f=requirements.txt;hb=paas
# pyangbind
-urllib3==1.26.14
+urllib3==2.0.2
# via
# -r https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=paas
# requests
#######################################################################################
appdirs==1.4.4
# via openstacksdk
-argcomplete==2.0.0
+argcomplete==3.0.8
# via yq
async-generator==1.10
- # via
- # trio
- # trio-websocket
-attrs==22.2.0
+ # via trio
+attrs==23.1.0
# via
# cmd2
# jsonschema
# via cliff
bcrypt==4.0.1
# via paramiko
-bitarray==2.6.2
+bitarray==2.7.3
# via
# -r requirements.in
# pyangbind
blessings==1.7
# via charm-tools
-certifi==2022.12.7
+certifi==2023.5.7
# via
# requests
# selenium
# via
# cryptography
# pynacl
-charm-tools==3.0.4
+charm-tools==3.0.6
# via -r requirements.in
-charset-normalizer==3.0.1
+charset-normalizer==3.1.0
# via requests
cheetah3==3.2.6.post1
# via charm-tools
-cliff==4.1.0
+cliff==4.3.0
# via
# osc-lib
# python-openstackclient
# via cliff
colander==1.8.3
# via charm-tools
-cryptography==39.0.1
+cryptography==40.0.2
# via
# openstacksdk
# paramiko
# via charm-tools
distlib==0.3.6
# via virtualenv
-dogpile-cache==1.1.8
+dogpile-cache==1.2.0
# via openstacksdk
enum34==1.1.10
# via pyangbind
-exceptiongroup==1.1.0
- # via trio
-filelock==3.9.0
+exceptiongroup==1.1.1
+ # via
+ # trio
+ # trio-websocket
+filelock==3.12.0
# via virtualenv
h11==0.14.0
# via wsproto
# via
# requests
# trio
-importlib-metadata==6.0.0
+importlib-metadata==6.6.0
# via
# cliff
# keyring
-importlib-resources==5.10.2
- # via
- # jsonschema
- # keyring
iso8601==1.1.0
# via
# colander
# via charm-tools
keyring==23.13.1
# via charm-tools
-keystoneauth1==5.1.1
+keystoneauth1==5.1.2
# via
# openstacksdk
# osc-lib
# via
# pyang
# pyangbind
-more-itertools==9.0.0
+more-itertools==9.1.0
# via jaraco-classes
-msgpack==1.0.4
+msgpack==1.0.5
# via oslo-serialization
netaddr==0.8.0
# via
# oslo-utils
objectpath==0.6.1
# via robotframework-jsonvalidator
-openstacksdk==1.0.0
+openstacksdk==1.1.0
# via
# osc-lib
# python-openstackclient
# via
# keystoneauth1
# openstacksdk
-osc-lib==2.6.2
+osc-lib==2.8.0
# via python-openstackclient
-oslo-config==9.1.0
+oslo-config==9.1.1
# via python-keystoneclient
-oslo-i18n==5.1.0
+oslo-i18n==6.0.0
# via
# osc-lib
# oslo-config
# python-keystoneclient
# python-novaclient
# python-openstackclient
-oslo-serialization==5.0.0
+oslo-serialization==5.1.1
# via
# python-keystoneclient
# python-novaclient
# via charm-tools
outcome==1.2.0
# via trio
-packaging==23.0
+packaging==23.1
# via
# oslo-utils
# python-keystoneclient
-paramiko==3.0.0
+paramiko==3.1.0
# via
# robotframework-sshlibrary
# scp
# python-novaclient
# python-openstackclient
# stevedore
-pkgutil-resolve-name==1.3.10
- # via jsonschema
-platformdirs==3.0.0
+platformdirs==3.5.0
# via virtualenv
ply==3.11
# via
# jsonpath-ng
# jsonpath-rw
-prettytable==3.6.0
+prettytable==3.7.0
# via
# cliff
# python-cinderclient
# via jsonschema
pysocks==1.7.1
# via urllib3
-python-cinderclient==9.2.0
+python-cinderclient==9.3.0
# via python-openstackclient
-python-keystoneclient==5.0.1
+python-keystoneclient==5.1.0
# via python-openstackclient
-python-novaclient==18.2.0
+python-novaclient==18.3.0
# via python-openstackclient
-python-openstackclient==6.0.0
+python-openstackclient==6.2.0
# via -r requirements.in
-pytz==2022.7.1
+pytz==2023.3
# via
# oslo-serialization
# oslo-utils
# oslo-config
# robotframework-yamllibrary
# yq
-regex==2022.10.31
+regex==2023.5.5
# via
# -r requirements.in
# pyangbind
-requests==2.28.2
+requests==2.30.0
# via
# -r requirements.in
# charm-tools
# via -r requirements.in
robotframework-jsonvalidator==2.0.0
# via -r requirements.in
-robotframework-pythonlibcore==4.1.0
+robotframework-pythonlibcore==4.1.2
# via robotframework-seleniumlibrary
robotframework-requests==0.9.4
# via -r requirements.in
-robotframework-seleniumlibrary==6.0.0
+robotframework-seleniumlibrary==6.1.0
# via -r requirements.in
robotframework-sshlibrary==3.8.0
# via -r requirements.in
robotframework-yamllibrary==0.2.8
# via -r requirements.in
-ruamel-yaml==0.17.21
+ruamel-yaml==0.17.26
# via charm-tools
ruamel-yaml-clib==0.2.7
# via ruamel-yaml
# via
# charm-tools
# keyring
-selenium==4.8.0
+selenium==4.9.1
# via robotframework-seleniumlibrary
-simplejson==3.18.3
+simplejson==3.19.1
# via
# osc-lib
# python-cinderclient
# via trio
sortedcontainers==2.4.0
# via trio
-stevedore==4.1.1
+stevedore==5.0.0
# via
# cliff
# dogpile-cache
# python-openstackclient
stuf==0.9.16
# via otherstuf
-toml==0.10.2
+tomlkit==0.11.8
# via yq
translationstring==1.4
# via colander
# via
# selenium
# trio-websocket
-trio-websocket==0.9.2
+trio-websocket==0.10.2
# via selenium
types-docutils==0.19.1.3
# via types-setuptools
-types-setuptools==67.2.0.1
+types-setuptools==67.7.0.2
# via requirements-parser
-urllib3[socks]==1.26.14
+urllib3[socks]==2.0.2
# via
# requests
# selenium
# via -r requirements.in
vergit==1.0.2
# via charm-tools
-virtualenv==20.19.0
+virtualenv==20.23.0
# via charm-tools
wcwidth==0.2.6
# via
# cmd2
# prettytable
-wrapt==1.14.1
+wrapt==1.15.0
# via debtcollector
wsproto==1.2.0
# via trio-websocket
xmltodict==0.13.0
# via yq
-yq==3.1.0
+yq==3.2.2
# via -r requirements.in
-zipp==3.13.0
+zipp==3.15.0
# via
# importlib-metadata
# importlib-resources
[Return] ${stdout}
+Get Ns List
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-list 2>&1
+ Log ${stdout}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ [Return] ${stdout}
+
+
Get Ns Vnf List
[Arguments] ${ns_id}
[Arguments] ${field}
Should Not Be Empty ${field}
- ${rc} ${stdout}= Run and Return RC and Output openstack quota show -c ${field} -f value
+ ${rc} ${stdout}= Run and Return RC and Output openstack quota show -f yaml | yq '.[] | select(.Resource=="${field}") | .Limit'
Log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
[Return] ${stdout}
from jinja2 import Template
-class renderTemplate():
+class renderTemplate:
def render_template(self, template_file, config_file, **kwargs):
"""Renders a template with the values provided
Get Auth Token
[Tags] auth_token
Get Hostname
- Create Session osmhit ${HOST}
+ Create Session osmhit ${HOST} disable_warnings=1
&{headers} Create Dictionary Content-Type=application/json Accept=application/json
&{data} Create Dictionary username=${osm_user} password=${osm_password} project-id=${osm_project}
${resp}= Post On Session osmhit ${auth_token_uri} json=${data} headers=${headers}
[Arguments] ${JsonInput} ${key}
${json_path}= Read Directory
${json_obj}= Load JSON From File ${json_path}/${JsonInput}
- ${updated_json_obj} JSONLibrary.Update Value To Json ${json_obj} $..${key} ${created_vim_account_id}
+ ${updated_json_obj}= JSONLibrary.Update Value To Json ${json_obj} $..${key} ${created_vim_account_id}
Set Suite Variable ${updated_json_obj}
Get Api Request
*** Keywords ***
+Get Vnf List
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-list 2>&1
+ Log ${stdout}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ [Return] ${stdout}
+
+
Get VNF VIM ID
[Arguments] ${vnf_id}
# See the License for the specific language governing permissions and
# limitations under the License.
#######################################################################################
-
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"]:
+ if os_cloud not in clouds["clouds"]:
raise Exception("Openstack cloud '" + os_cloud + "' not found")
cloud = clouds["clouds"][os_cloud]
- if not "username" in cloud["auth"]:
+ if "username" not in cloud["auth"]:
raise Exception("Username not found in Openstack cloud '" + os_cloud + "'")
vim_user = cloud["auth"]["username"]
- if not "password" in cloud["auth"]:
+ if "password" not 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"]:
+ if "auth_url" not 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"]:
+ if "project_name" not in cloud["auth"]:
raise Exception(
"Project name not found in Openstack cloud '" + os_cloud + "'"
)
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"]:
+ if os_cloud not in clouds["clouds"]:
raise Exception("Openstack cloud '" + os_cloud + "' not found")
cloud = clouds["clouds"][os_cloud]
- if not "username" in cloud["auth"]:
+ if "username" not in cloud["auth"]:
raise Exception("Username not found in Openstack cloud '" + os_cloud + "'")
vim_user = cloud["auth"]["username"]
- if not "password" in cloud["auth"]:
+ if "password" not 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"]:
+ if "auth_url" not 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"]:
+ if "project_name" not in cloud["auth"]:
raise Exception("Project name not found in Openstack cloud '" + os_cloud + "'")
vim_tenant = cloud["auth"]["project_name"]
vim_user_domain_name = (
# limitations under the License.
import os
-from pathlib import Path
-
-import yaml
from common_helpers import get_prometheus_info
# See the License for the specific language governing permissions and
# limitations under the License.
-from pathlib import Path
-
from common_helpers import get_prometheus_info
# See the License for the specific language governing permissions and
# limitations under the License.
-from pathlib import Path
-
from common_helpers import get_prometheus_info
# See the License for the specific language governing permissions and
# limitations under the License.
-from pathlib import Path
-
from common_helpers import get_prometheus_info
# See the License for the specific language governing permissions and
# limitations under the License.
-from pathlib import Path
-
from common_helpers import get_prometheus_info
-{\r
- "data":[\r
- {\r
- "vnfdId":"hackfest_basic_metrics-vnf",\r
- "vnfInstanceName":"sol003-instance",\r
- "vnfInstanceDescription":"Test vnfm instance description",\r
- "vimAccountId":"8dc2f11d-e08a-4ec7-920c-6b8a88bff1e5",\r
- "additionalParams":{\r
- "virtual-link-desc":[\r
- {\r
- "id":"mgmtnet",\r
- "mgmt-network":true\r
- }\r
- ],\r
- "constituent-cpd-id":"vnf-cp0-ext",\r
- "virtual-link-profile-id":"mgmtnet"\r
- }\r
- },\r
- {\r
- "vnfName":"sol003-instance",\r
- "vnfDescription":"vnf package",\r
- "vnfId":"70b47595-fafa-4f63-904b-fc3ada60eebb",\r
- "vimAccountId":"8dc2f11d-e08a-4ec7-920c-6b8a88bff1e5"\r
- },\r
- {\r
- "type":"SCALE_OUT",\r
- "aspectId":"vdu_autoscale",\r
- "numberOfSteps":"1",\r
- "additionalParams":{\r
- "member-vnf-index":"1"\r
- }\r
- },\r
- {\r
- "terminationType":"GRACEFUL",\r
- "gracefulTerminationTimeout":"5"\r
- }\r
- ]\r
-}\r
+{
+ "data":[
+ {
+ "vnfdId":"hackfest_basic_metrics-vnf",
+ "vnfInstanceName":"sol003-instance",
+ "vnfInstanceDescription":"Test vnfm instance description",
+ "vimAccountId":"8dc2f11d-e08a-4ec7-920c-6b8a88bff1e5",
+ "additionalParams":{
+ "virtual-link-desc":[
+ {
+ "id":"mgmtnet",
+ "mgmt-network":true
+ }
+ ],
+ "constituent-cpd-id":"vnf-cp0-ext",
+ "virtual-link-profile-id":"mgmtnet"
+ }
+ },
+ {
+ "vnfName":"sol003-instance",
+ "vnfDescription":"vnf package",
+ "vnfId":"70b47595-fafa-4f63-904b-fc3ada60eebb",
+ "vimAccountId":"8dc2f11d-e08a-4ec7-920c-6b8a88bff1e5"
+ },
+ {
+ "type":"SCALE_OUT",
+ "aspectId":"vdu_autoscale",
+ "numberOfSteps":"1",
+ "additionalParams":{
+ "member-vnf-index":"1"
+ }
+ },
+ {
+ "terminationType":"GRACEFUL",
+ "gracefulTerminationTimeout":"5"
+ }
+ ]
+}
# See the License for the specific language governing permissions and
# limitations under the License.
-from pathlib import Path
-
from common_helpers import get_osm_info
((attempts--))
done
if [ $attempts -lt 0 ] ; then
- echo "VIM failed to enter ENABLED state"
+ echo "K8s cluster failed to enter ENABLED state"
exit 1
fi
}
Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
-Get Scale-Out Threshold From VNF
+Get Thresholds From VNF
${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_name} --literal | yq '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."scaling-criteria"[0]."scale-out-threshold"' | tr -d \\"
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
Set Suite Variable ${metric_threshold} ${scaleout_threshold}
Log ${metric_threshold}
+ ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_name} --literal | yq '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."threshold-time"' | tr -d \\"
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ ${threshold_time_value}= Convert To Number ${stdout}
+ Set Suite Variable ${threshold_time} ${threshold_time_value}
+ Log ${threshold_time}
+
Create NS Descriptor
Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Check VIM-based Metric Exceeds Threshold
+Wait Threshold Time
+
+ ${threshold_time_sleep}= Evaluate ${threshold_time} + 1
+ Sleep ${threshold_time_sleep} minutes Wait scale-out threshold time plus 1 minute
+
+
+Check VIM-based Metric Exceeds Threshold After Threshold-time
+
+ Check VIM-based Metric Exceeds Threshold
+
+
Get VDUs After Auto-scaling
Sleep 2 minutes Wait for auto-scale to take place
${metric_value}= Get Metric ${prometheus_host} ${prometheus_port} ${prometheus_user} ${prometheus_password} ${metric_name}
Run Keyword If ${metric_value} <= ${metric_threshold} Fail msg=The metric '${metric_name}' value is '${metric_value}' which is lower than '${metric_threshold}'
-
Resource %{ROBOT_DEVOPS_FOLDER}/lib/sol003_common_lib.robot
Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot
+Resource %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
+Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnf_lib.robot
Resource %{ROBOT_DEVOPS_FOLDER}/lib/vim_lib.robot
Force Tags sol003_01 cluster_sol003 daily
*** Test Cases ***
Create VNF package from JSON file descriptor
[Documentation] Test case to create a VNF Identifier
+ Get VNFDs List
${id}= Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
Set Suite Variable ${vnfid} ${id}
${created_vim_account_id}= Get VIM Target ID %{VIM_TARGET}
${json_path}= Read Directory
${json_obj}= Load JSON From File ${json_path}/sol003_01-vnf-lifecycle-management.json
${json_obj}= Get Variable Value ${json_obj['data'][0]}
- ${updated_json_obj} JSONLibrary.Update Value To Json ${json_obj} $..vimAccountId ${created_vim_account_id}
- ${updated_json_obj} JSONLibrary.Update Value To Json ${updated_json_obj} $..additionalParams.virtual-link-desc[0][id] %{VIM_MGMT_NET}
- ${updated_json_obj} JSONLibrary.Update Value To Json ${updated_json_obj} $..additionalParams.virtual-link-profile-id %{VIM_MGMT_NET}
+ ${updated_json_obj}= JSONLibrary.Update Value To Json ${json_obj} $..vimAccountId ${created_vim_account_id}
+ Log ${updated_json_obj}
+ ${updated_json_obj}= JSONLibrary.Update Value To Json ${updated_json_obj} $..additionalParams.virtual-link-desc[0][id] %{VIM_MGMT_NET}
+ Log ${updated_json_obj}
+ ${updated_json_obj}= JSONLibrary.Update Value To Json ${updated_json_obj} $..additionalParams.virtual-link-profile-id %{VIM_MGMT_NET}
+ Log ${updated_json_obj}
Set Test Variable ${updated_json_obj}
Post API Request ${vnf_instance_uri}
Pass Execution If ${request_response.status_code} in ${success_status_code_list} Query VNF Instance completed
${id}= Get Value From Json ${request_response.json()} $..id
Set Suite Variable ${createid} ${id[0]}
+ Get VNFDs List
Instantiate VNF
[Documentation] Test case to Instantiate a VNF
+ Get Ns List
+ Get Vnf List
Get Auth Token
${json_path}= Read Directory
${json_obj}= Load JSON From File ${json_path}/sol003_01-vnf-lifecycle-management.json
${json_obj}= Get Variable Value ${json_obj['data'][1]}
- ${updated_json_obj} JSONLibrary.Update Value To Json ${json_obj} $..vimAccountId ${created_vim_account_id}
- ${updated_json_obj} JSONLibrary.Update Value To Json ${json_obj} $..vnfId ${createid}
+ ${updated_json_obj}= JSONLibrary.Update Value To Json ${json_obj} $..vimAccountId ${created_vim_account_id}
+ ${updated_json_obj}= JSONLibrary.Update Value To Json ${updated_json_obj} $..vnfId ${createid}
Set Test Variable ${updated_json_obj}
Post API Request ${vnf_instantiate_uri}/${createid}/instantiate
Pass Execution If ${request_response.status_code} in ${success_status_code_list} Instantiate VNF Instance completed
${id}= Get Value From Json ${request_response.json()} $..id
Set Suite Variable ${instantiateid} ${id[0]}
Sleep 12s
+ Get Ns List
+ Get Vnf List
Query VNF Instances
[Documentation] Test case to query VNF Instance
[testenv]
usedevelop = True
-basepython = python3.8
+basepython = python3.10
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
deps = -r{toxinidir}/requirements.txt
+parallel_show_output = true
#######################################################################################
[testenv:black]
deps = black
skip_install = true
commands =
- - black --check --diff robot-systest --fast
+ black --check --diff robot-systest --fast
#######################################################################################
[testenv:cover]
commands =
sh -c 'echo No unit tests'
-whitelist_externals = sh
+allowlist_externals = sh
#######################################################################################
-r{toxinidir}/requirements-dev.txt
pylint
commands =
- pylint -E robot-systest/resources
+ - pylint -E robot-systest/resources
#######################################################################################
#######################################################################################
[testenv:pip-compile]
-deps = pip-tools==6.6.2
+deps = pip-tools==6.13.0
skip_install = true
-whitelist_externals = bash
+allowlist_externals = bash
[
commands =
- bash -c "for file in requirements*.in ; do \
UNSAFE="" ; \
if [[ $file =~ 'dist' ]] ; then UNSAFE='--allow-unsafe' ; fi ; \
- pip-compile -rU --no-header $UNSAFE $file ;\
+ pip-compile --resolver=backtracking -rU --no-header $UNSAFE $file ;\
out=`echo $file | sed 's/.in/.txt/'` ; \
sed -i -e '1 e head -16 tox.ini' $out ;\
done"