From 807f0832a599269d907eb6e8518cb124fe1f9fe1 Mon Sep 17 00:00:00 2001 From: beierlm Date: Mon, 12 Apr 2021 15:59:18 -0400 Subject: [PATCH] Fixes for bug 1496 No longer uses a build layer as there are development tools we still need at runtime. Changes yq to come from a stable source (PyPI) instead of PPA. Bug 1496 Change-Id: I0964edc1992c11c459a572ef77cf225f2eebf568 Signed-off-by: beierlm --- .gitignore | 1 + requirements-dev.txt | 36 +--------------------------------- requirements.in | 3 ++- requirements.txt | 15 +++++++++++--- robot-systest/lib/ns_lib.robot | 6 +++--- 5 files changed, 19 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index 9b3d525..1b54e54 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ .vscode .project .pydevproject +.settings #Generated folders when building the deb package locally .tox diff --git a/requirements-dev.txt b/requirements-dev.txt index b7d397f..40609b1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,41 +1,7 @@ -certifi==2020.12.5 - # via requests -chardet==4.0.0 - # via requests -click==7.1.2 - # via osmclient -idna==2.10 - # via requests -jinja2==2.11.3 - # via osmclient -markupsafe==1.1.1 - # via jinja2 git+https://osm.etsi.org/gerrit/osm/IM.git@master#egg=osm-im - # via - # -r requirements-dev.in - # osmclient + # via -r requirements-dev.in git+https://osm.etsi.org/gerrit/osm/osmclient.git@master#egg=osm-osmclient # via -r requirements-dev.in -packaging==20.9 - # via osmclient -prettytable==2.1.0 - # via osmclient -pycurl==7.43.0.6 - # via osmclient -pyparsing==2.4.7 - # via packaging -python-magic==0.4.22 - # via osmclient -pyyaml==5.4.1 - # via osmclient -requests==2.25.1 - # via osmclient -urllib3==1.26.4 - # via requests -verboselogs==1.7 - # via osmclient -wcwidth==0.2.5 - # via prettytable ####################################################################################### # Copyright ETSI Contributors and Others. # diff --git a/requirements.in b/requirements.in index c0fb153..e72b2cc 100644 --- a/requirements.in +++ b/requirements.in @@ -25,4 +25,5 @@ robotframework-jsonlibrary robotframework-requests robotframework-seleniumlibrary robotframework-sshlibrary -verboselogs \ No newline at end of file +verboselogs +yq diff --git a/requirements.txt b/requirements.txt index 197a5ac..d8870a3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,8 @@ appdirs==1.4.4 # via # openstacksdk # virtualenv +argcomplete==1.12.2 + # via yq attrs==20.3.0 # via cmd2 bcrypt==3.2.0 @@ -47,7 +49,7 @@ debtcollector==2.2.0 # oslo.config # oslo.utils # python-keystoneclient -decorator==5.0.5 +decorator==5.0.6 # via # dogpile.cache # jsonpath-rw @@ -215,7 +217,7 @@ prettytable==2.1.0 # cliff # python-cinderclient # python-novaclient -protobuf==3.15.7 +protobuf==3.15.8 # via macaroonbakery py==1.10.0 # via tox @@ -262,6 +264,7 @@ pyyaml==5.4.1 # jujubundlelib # openstacksdk # oslo.config + # yq regex==2021.3.17 # via # -r requirements.in @@ -293,7 +296,7 @@ robotframework-seleniumlibrary==5.1.3 # via -r requirements.in robotframework-sshlibrary==3.6.0 # via -r requirements.in -robotframework==4.0 +robotframework==4.0.1 # via # -r requirements.in # robotframework-jsonlibrary @@ -349,6 +352,8 @@ testresources==2.0.1 # via launchpadlib theblues==0.5.2 # via libcharmstore +toml==0.10.2 + # via yq tox==3.0.0 # via robotframework-jsonlibrary translationstring==1.4 @@ -375,6 +380,10 @@ wcwidth==0.2.5 # prettytable wrapt==1.12.1 # via debtcollector +xmltodict==0.12.0 + # via yq +yq==2.12.0 + # via -r requirements.in # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/robot-systest/lib/ns_lib.robot b/robot-systest/lib/ns_lib.robot index 6741f00..8cb6098 100644 --- a/robot-systest/lib/ns_lib.robot +++ b/robot-systest/lib/ns_lib.robot @@ -232,7 +232,7 @@ Check For NS Operation Completed [Arguments] ${ns_operation_id} - ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq r - operationState + ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .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 @@ -254,7 +254,7 @@ Get Vnf Vdur Names [Arguments] ${vnf_id} - ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq r - vdur.*.name + ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq .vdur[].name Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False @{vdur} = Split String ${stdout} [Return] @{vdur} @@ -265,7 +265,7 @@ Get Vnf Kdu Replica Count [Arguments] ${vnf_id} ${kdu_name} - ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq r - config.replicaCount + ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq .config.replicaCount Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False [Return] ${stdout} -- 2.25.1