Console Output
[osmclient-stage_2-merge_master] Running shell script
+ runuser jenkins -c devops-stages/stage-test.sh
Launching tox
ERROR: invocation failed (exit code 1), logfile: /tmp/.tox/black/log/black-0.log
================================== log start ===================================
black create: /tmp/.tox/black
black installdeps: black
black installed: black==24.1.1,click==8.1.7,mypy-extensions==1.0.0,packaging==23.2,pathspec==0.12.1,platformdirs==4.1.0,tomli==2.0.1,typing_extensions==4.9.0
black run-test-pre: PYTHONHASHSEED='3745530622'
black run-test: commands[0] | black --check --diff osmclient/
--- /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/common/sol004_package.py 2024-01-28 10:00:32.927362+00:00
+++ /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/common/sol004_package.py 2024-01-28 10:03:53.384235+00:00
@@ -101,13 +101,13 @@
"product-name", "default-product-name"
)
self._manifest_metadata[self._MANIFEST_VNFD_PROVIDER_ID] = vnfd_data.get(
"provider", "OSM"
)
- self._manifest_metadata[
- self._MANIFEST_VNFD_SOFTWARE_VERSION
- ] = vnfd_data.get("version", "1.0")
+ self._manifest_metadata[self._MANIFEST_VNFD_SOFTWARE_VERSION] = (
+ vnfd_data.get("version", "1.0")
+ )
self._manifest_metadata[self._MANIFEST_VNFD_PACKAGE_VERSION] = "1.0.0"
self._manifest_metadata[self._MANIFEST_VNFD_RELEASE_DATE_TIME] = (
datetime.datetime.now().astimezone().isoformat()
)
self._manifest_metadata[
would reformat /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/common/sol004_package.py
--- /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/common/sol007_package.py 2024-01-28 10:00:32.927362+00:00
+++ /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/common/sol007_package.py 2024-01-28 10:03:53.393805+00:00
@@ -97,13 +97,13 @@
"name", "default-name"
)
self._manifest_metadata[self._MANIFEST_NSD_DESIGNER] = nsd_data.get(
"designer", "OSM"
)
- self._manifest_metadata[
- self._MANIFEST_NSD_FILE_STRUCTURE_VERSION
- ] = nsd_data.get("version", "1.0")
+ self._manifest_metadata[self._MANIFEST_NSD_FILE_STRUCTURE_VERSION] = (
+ nsd_data.get("version", "1.0")
+ )
self._manifest_metadata[self._MANIFEST_NSD_RELEASE_DATE_TIME] = (
datetime.datetime.now().astimezone().isoformat()
)
self._manifest_metadata[
self._MANIFEST_NSD_COMPATIBLE_SPECIFICATION_VERSIONS
would reformat /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/common/sol007_package.py
--- /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/cli_commands/rbac.py 2024-01-28 10:00:32.919362+00:00
+++ /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/cli_commands/rbac.py 2024-01-28 10:03:53.702140+00:00
@@ -292,13 +292,13 @@
)
@click.option(
"--projects",
# prompt="Comma separate list of projects",
multiple=True,
- callback=lambda ctx, param, value: "".join(value).split(",")
- if all(len(x) == 1 for x in value)
- else value,
+ callback=lambda ctx, param, value: (
+ "".join(value).split(",") if all(len(x) == 1 for x in value) else value
+ ),
help="list of project ids that the user belongs to",
)
@click.option(
"--project-role-mappings",
"project_role_mappings",
@@ -468,16 +468,18 @@
table.add_row(
[
user["username"],
user["_id"],
user["_admin"]["user_status"].upper(),
- time.strftime(
- "%b-%d-%Y %X",
- time.gmtime(user["_admin"]["account_expire_time"]),
- )
- if not user["username"] == "admin"
- else user["_admin"]["account_expire_time"],
+ (
+ time.strftime(
+ "%b-%d-%Y %X",
+ time.gmtime(user["_admin"]["account_expire_time"]),
+ )
+ if not user["username"] == "admin"
+ else user["_admin"]["account_expire_time"]
+ ),
]
)
else:
table = PrettyTable(["name", "id"])
for user in resp:
would reformat /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/cli_commands/rbac.py
--- /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/sol005/osmrepo.py 2024-01-28 10:00:32.939363+00:00
+++ /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/sol005/osmrepo.py 2024-01-28 10:03:54.089191+00:00
@@ -529,13 +529,13 @@
index = yaml.safe_load(open(destination + "/index.yaml"))
index["{}_packages".format(package_type)][fields.get("id")] = {
fields.get("version"): data_ind
}
- index["{}_packages".format(package_type)][fields.get("id")][
- "latest"
- ] = fields.get("version")
+ index["{}_packages".format(package_type)][fields.get("id")]["latest"] = (
+ fields.get("version")
+ )
yaml.safe_dump(
index,
open(join(destination, "index.yaml"), "w"),
default_flow_style=False,
width=80,
would reformat /home/jenkins/workspace/osmclient-stage_2-merge_master/osmclient/sol005/osmrepo.py
Oh no! 💥 💔 💥
4 files would be reformatted, 62 files would be left unchanged.
ERROR: InvocationError for command /tmp/.tox/black/bin/black --check --diff osmclient/ (exited with code 1)
=================================== log end ====================================
✖ FAIL black in 9.408 seconds
✔ OK flake8 in 11.561 seconds
flake8 create: /tmp/.tox/flake8
flake8 installdeps: flake8
flake8 develop-inst: /home/jenkins/workspace/osmclient-stage_2-merge_master
flake8 installed: flake8==7.0.0,mccabe==0.7.0,-e git+https://osm.etsi.org/gerrit/osm/osmclient.git@b407c249389159813d06435678b98de5e72663fe#egg=osmclient,pycodestyle==2.11.1,pyflakes==3.2.0
flake8 run-test-pre: PYTHONHASHSEED='2751764657'
flake8 run-test: commands[0] | flake8 osmclient/ setup.py
✔ OK safety in 26.856 seconds
safety create: /tmp/.tox/safety
safety installdeps: -r/home/jenkins/workspace/osmclient-stage_2-merge_master/requirements.txt, safety
safety develop-inst: /home/jenkins/workspace/osmclient-stage_2-merge_master
safety installed: certifi==2023.7.22,charset-normalizer==3.2.0,click==8.1.7,dparse==0.6.3,idna==3.4,Jinja2==3.1.2,jsonpath-ng==1.6.0,MarkupSafe==2.1.3,-e git+https://osm.etsi.org/gerrit/osm/osmclient.git@b407c249389159813d06435678b98de5e72663fe#egg=osmclient,packaging==23.1,ply==3.11,prettytable==3.9.0,python-magic==0.4.27,PyYAML==6.0.1,requests==2.31.0,ruamel.yaml==0.18.5,ruamel.yaml.clib==0.2.8,safety==2.3.4,tomli==2.0.1,urllib3==2.0.5,verboselogs==1.7,wcwidth==0.2.6
safety run-test-pre: PYTHONHASHSEED='1691186674'
safety run-test: commands[0] | - safety check --full-report
+==============================================================================+
/$$$$$$ /$$
/$$__ $$ | $$
/$$$$$$$ /$$$$$$ | $$ \__//$$$$$$ /$$$$$$ /$$ /$$
/$$_____/ |____ $$| $$$$ /$$__ $$|_ $$_/ | $$ | $$
| $$$$$$ /$$$$$$$| $$_/ | $$$$$$$$ | $$ | $$ | $$
\____ $$ /$$__ $$| $$ | $$_____/ | $$ /$$| $$ | $$
/$$$$$$$/| $$$$$$$| $$ | $$$$$$$ | $$$$/| $$$$$$$
|_______/ \_______/|__/ \_______/ \___/ \____ $$
/$$ | $$
| $$$$$$/
by pyup.io \______/
+==============================================================================+
[1mREPORT[0m
[31m[22m Safety is using PyUp's free open-source vulnerability database. This
data is 30 days old and limited. [0m
[31m For real-time enhanced vulnerability data, fix recommendations, severity
reporting, cybersecurity support, team and project policy management and more
sign up at https://pyup.io or email sales@pyup.io[0m
Safety [1mv2.3.4[0m is scanning for [1mVulnerabilities[0m[1m...[0m
[1m Scanning dependencies[0m in your [1menvironment:[0m
-> /tmp/.tox/safety/lib/python3.10/site-packages
-> /home/jenkins/workspace/osmclient-stage_2-merge_master
Using [1mnon-commercial database[0m
[1m Found and scanned 25 packages[0m
Timestamp [1m2024-01-28 10:04:11[0m
[1m 4[0m[1m vulnerabilities found[0m
[1m 0[0m[1m vulnerabilities ignored[0m
+==============================================================================+
[31m[1mVULNERABILITIES FOUND[0m
+==============================================================================+
[31m-> Vulnerability found in setuptools version 59.6.0
[0m[1m Vulnerability ID: [0m52495
[1m Affected spec: [0m<65.5.1
[1m ADVISORY: [0mSetuptools 65.5.1 includes a fix for CVE-2022-40897: Python
Packaging Authority (PyPA) setuptools before 65.5.1 allows remote attackers
to cause a denial of service via HTML in a crafted package or custom
PackageIndex page. There is a Regular Expression Denial of Service (ReDoS) in
package_index.py.https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-
in-top-python-packages
[1m CVE-2022-40897[0m
[1m For more information, please visit
[0mhttps://data.safetycli.com/v/52495/f17[0m
[31m-> Vulnerability found in pip version 22.0.2
[0m[1m Vulnerability ID: [0m62044
[1m Affected spec: [0m<23.3
[1m ADVISORY: [0mPip 23.3 includes a fix for CVE-2023-5752: When installing
a package from a Mercurial VCS URL (ie "pip install hg+...") with pip prior
to v23.3, the specified Mercurial revision could be used to inject arbitrary
configuration options to the "hg clone" call (ie "--config"). Controlling the
Mercurial configuration can modify how and which repository is installed.
This vulnerability does not affect users who aren't installing from
Mercurial.https://github.com/pypa/pip/pull/12306
[1m CVE-2023-5752[0m
[1m For more information, please visit
[0mhttps://data.safetycli.com/v/62044/f17[0m
[31m-> Vulnerability found in urllib3 version 2.0.5
[0m[1m Vulnerability ID: [0m61893
[1m Affected spec: [0m>=2.0.0a1,<2.0.7
[1m ADVISORY: [0mUrllib3 1.26.18 and 2.0.7 include a fix for CVE-2023-45803:
Request body not stripped after redirect from 303 status changes request
method to GET.https://github.com/urllib3/urllib3/security/advisories/GHSA-
g4mx-q9vg-27p4
[1m CVE-2023-45803[0m
[1m For more information, please visit
[0mhttps://data.safetycli.com/v/61893/f17[0m
[31m-> Vulnerability found in wheel version 0.37.1
[0m[1m Vulnerability ID: [0m51499
[1m Affected spec: [0m<0.38.1
[1m ADVISORY: [0mWheel 0.38.1 includes a fix for CVE-2022-40898: An issue
discovered in Python Packaging Authority (PyPA) Wheel 0.37.1 and earlier
allows remote attackers to cause a denial of service via attacker controlled
input to wheel cli.https://pyup.io/posts/pyup-discovers-redos-
vulnerabilities-in-top-python-packages
[1m CVE-2022-40898[0m
[1m For more information, please visit
[0mhttps://data.safetycli.com/v/51499/f17[0m
Scan was completed. 4 vulnerabilities were found.
+==============================================================================+
[32m[1m REMEDIATIONS[0m
4 vulnerabilities were found in 4 packages. For detailed remediation & fix
recommendations, upgrade to a commercial license.
+==============================================================================+
[31m[22m Safety is using PyUp's free open-source vulnerability database. This
data is 30 days old and limited. [0m
[31m For real-time enhanced vulnerability data, fix recommendations, severity
reporting, cybersecurity support, team and project policy management and more
sign up at https://pyup.io or email sales@pyup.io[0m
+==============================================================================+[0m
✔ OK cover in 1 minute, 22.743 seconds
cover create: /tmp/.tox/cover
cover installdeps: -r/home/jenkins/workspace/osmclient-stage_2-merge_master/requirements.txt, -r/home/jenkins/workspace/osmclient-stage_2-merge_master/requirements-dev.txt, -r/home/jenkins/workspace/osmclient-stage_2-merge_master/requirements-test.txt
cover develop-inst: /home/jenkins/workspace/osmclient-stage_2-merge_master
cover installed: certifi==2023.7.22,charset-normalizer==3.2.0,click==8.1.7,coverage==7.3.1,enum34==1.1.10,idna==3.4,Jinja2==3.1.2,jsonpath-ng==1.6.0,lxml==5.1.0,MarkupSafe==2.1.3,mock==5.1.0,nose2==0.13.0,osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git@09d797997f5a11557374e64cc94cf7b341beaabd,-e git+https://osm.etsi.org/gerrit/osm/osmclient.git@b407c249389159813d06435678b98de5e72663fe#egg=osmclient,packaging==23.1,ply==3.11,prettytable==3.9.0,pyang==2.5.3,pyangbind==0.8.3.post1,python-magic==0.4.27,PyYAML==6.0.1,regex==2023.12.25,requests==2.31.0,six==1.16.0,urllib3==2.0.5,verboselogs==1.7,wcwidth==0.2.6
cover run-test-pre: PYTHONHASHSEED='3542855582'
cover run-test: commands[0] | sh -c 'rm -f nosetests.xml'
cover run-test: commands[1] | coverage erase
cover run-test: commands[2] | nose2 -C --coverage osmclient
....................................
----------------------------------------------------------------------
Ran 36 tests in 10.484s
OK
Name Stmts Miss Cover
-----------------------------------------------------------------
osmclient/__init__.py 0 0 100%
osmclient/cli_commands/__init__.py 0 0 100%
osmclient/cli_commands/alarms.py 87 53 39%
osmclient/cli_commands/k8scluster.py 127 76 40%
osmclient/cli_commands/metrics.py 31 18 42%
osmclient/cli_commands/netslice_instance.py 119 56 53%
osmclient/cli_commands/netslice_ops.py 51 25 51%
osmclient/cli_commands/netslice_template.py 113 51 55%
osmclient/cli_commands/nfpkg.py 209 93 56%
osmclient/cli_commands/ns.py 185 143 23%
osmclient/cli_commands/nslcm.py 194 138 29%
osmclient/cli_commands/nslcm_ops.py 77 52 32%
osmclient/cli_commands/nspkg.py 137 64 53%
osmclient/cli_commands/other.py 11 3 73%
osmclient/cli_commands/packages.py 89 39 56%
osmclient/cli_commands/pdus.py 117 74 37%
osmclient/cli_commands/rbac.py 221 131 41%
osmclient/cli_commands/repo.py 213 109 49%
osmclient/cli_commands/sdnc.py 104 53 49%
osmclient/cli_commands/subscriptions.py 59 29 51%
osmclient/cli_commands/utils.py 52 38 27%
osmclient/cli_commands/vca.py 154 16 90%
osmclient/cli_commands/vim.py 183 67 63%
osmclient/cli_commands/vnf.py 114 80 30%
osmclient/cli_commands/wim.py 101 56 45%
osmclient/client.py 27 21 22%
osmclient/common/__init__.py 0 0 100%
osmclient/common/exceptions.py 6 0 100%
osmclient/common/http.py 71 58 18%
osmclient/common/package_handling.py 28 20 29%
osmclient/common/package_tool.py 441 396 10%
osmclient/common/print_output.py 47 36 23%
osmclient/common/sol004_package.py 36 17 53%
osmclient/common/sol007_package.py 32 15 53%
osmclient/common/sol_package.py 158 120 24%
osmclient/common/test/test_utils.py 36 0 100%
osmclient/common/utils.py 80 54 32%
osmclient/common/wait.py 86 66 23%
osmclient/scripts/__init__.py 0 0 100%
osmclient/scripts/osm.py 184 163 11%
osmclient/scripts/tests/tests_vca.py 100 0 100%
osmclient/scripts/tests/tests_vim.py 62 0 100%
osmclient/sol005/__init__.py 0 0 100%
osmclient/sol005/client.py 101 71 30%
osmclient/sol005/http.py 160 137 14%
osmclient/sol005/k8scluster.py 118 101 14%
osmclient/sol005/ns.py 383 354 8%
osmclient/sol005/nsd.py 124 103 17%
osmclient/sol005/nsi.py 208 189 9%
osmclient/sol005/nst.py 127 107 16%
osmclient/sol005/osmrepo.py 309 260 16%
osmclient/sol005/package.py 63 50 21%
osmclient/sol005/pdud.py 93 78 16%
osmclient/sol005/project.py 74 61 18%
osmclient/sol005/repo.py 74 60 19%
osmclient/sol005/role.py 117 103 12%
osmclient/sol005/sdncontroller.py 97 80 18%
osmclient/sol005/subscription.py 71 58 18%
osmclient/sol005/tests/test_osmrepo.py 13 0 100%
osmclient/sol005/tests/test_vca.py 117 0 100%
osmclient/sol005/user.py 143 131 8%
osmclient/sol005/vca.py 73 0 100%
osmclient/sol005/vim.py 160 141 12%
osmclient/sol005/vnf.py 56 46 18%
osmclient/sol005/vnfd.py 207 181 13%
osmclient/sol005/wim.py 142 123 13%
-----------------------------------------------------------------
TOTAL 7172 4864 32%
cover run-test: commands[3] | coverage report '--omit=*tests*'
Name Stmts Miss Cover
-----------------------------------------------------------------
osmclient/__init__.py 0 0 100%
osmclient/cli_commands/__init__.py 0 0 100%
osmclient/cli_commands/alarms.py 87 53 39%
osmclient/cli_commands/k8scluster.py 127 76 40%
osmclient/cli_commands/metrics.py 31 18 42%
osmclient/cli_commands/netslice_instance.py 119 56 53%
osmclient/cli_commands/netslice_ops.py 51 25 51%
osmclient/cli_commands/netslice_template.py 113 51 55%
osmclient/cli_commands/nfpkg.py 209 93 56%
osmclient/cli_commands/ns.py 185 143 23%
osmclient/cli_commands/nslcm.py 194 138 29%
osmclient/cli_commands/nslcm_ops.py 77 52 32%
osmclient/cli_commands/nspkg.py 137 64 53%
osmclient/cli_commands/other.py 11 3 73%
osmclient/cli_commands/packages.py 89 39 56%
osmclient/cli_commands/pdus.py 117 74 37%
osmclient/cli_commands/rbac.py 221 131 41%
osmclient/cli_commands/repo.py 213 109 49%
osmclient/cli_commands/sdnc.py 104 53 49%
osmclient/cli_commands/subscriptions.py 59 29 51%
osmclient/cli_commands/utils.py 52 38 27%
osmclient/cli_commands/vca.py 154 16 90%
osmclient/cli_commands/vim.py 183 67 63%
osmclient/cli_commands/vnf.py 114 80 30%
osmclient/cli_commands/wim.py 101 56 45%
osmclient/client.py 27 21 22%
osmclient/common/__init__.py 0 0 100%
osmclient/common/exceptions.py 6 0 100%
osmclient/common/http.py 71 58 18%
osmclient/common/package_handling.py 28 20 29%
osmclient/common/package_tool.py 441 396 10%
osmclient/common/print_output.py 47 36 23%
osmclient/common/sol004_package.py 36 17 53%
osmclient/common/sol007_package.py 32 15 53%
osmclient/common/sol_package.py 158 120 24%
osmclient/common/test/test_utils.py 36 0 100%
osmclient/common/utils.py 80 54 32%
osmclient/common/wait.py 86 66 23%
osmclient/scripts/__init__.py 0 0 100%
osmclient/scripts/osm.py 184 163 11%
osmclient/sol005/__init__.py 0 0 100%
osmclient/sol005/client.py 101 71 30%
osmclient/sol005/http.py 160 137 14%
osmclient/sol005/k8scluster.py 118 101 14%
osmclient/sol005/ns.py 383 354 8%
osmclient/sol005/nsd.py 124 103 17%
osmclient/sol005/nsi.py 208 189 9%
osmclient/sol005/nst.py 127 107 16%
osmclient/sol005/osmrepo.py 309 260 16%
osmclient/sol005/package.py 63 50 21%
osmclient/sol005/pdud.py 93 78 16%
osmclient/sol005/project.py 74 61 18%
osmclient/sol005/repo.py 74 60 19%
osmclient/sol005/role.py 117 103 12%
osmclient/sol005/sdncontroller.py 97 80 18%
osmclient/sol005/subscription.py 71 58 18%
osmclient/sol005/tests/test_osmrepo.py 13 0 100%
osmclient/sol005/tests/test_vca.py 117 0 100%
osmclient/sol005/user.py 143 131 8%
osmclient/sol005/vca.py 73 0 100%
osmclient/sol005/vim.py 160 141 12%
osmclient/sol005/vnf.py 56 46 18%
osmclient/sol005/vnfd.py 207 181 13%
osmclient/sol005/wim.py 142 123 13%
-----------------------------------------------------------------
TOTAL 7010 4864 31%
cover run-test: commands[4] | coverage html -d ./cover '--omit=*tests*'
Wrote HTML report to ./cover/index.html
cover run-test: commands[5] | coverage xml -o coverage.xml '--omit=*tests*'
Wrote XML report to coverage.xml
✔ OK pylint in 1 minute, 27.109 seconds
pylint create: /tmp/.tox/pylint
pylint installdeps: -r/home/jenkins/workspace/osmclient-stage_2-merge_master/requirements.txt, -r/home/jenkins/workspace/osmclient-stage_2-merge_master/requirements-dev.txt, -r/home/jenkins/workspace/osmclient-stage_2-merge_master/requirements-test.txt, pylint
pylint develop-inst: /home/jenkins/workspace/osmclient-stage_2-merge_master
pylint installed: astroid==3.0.2,certifi==2023.7.22,charset-normalizer==3.2.0,click==8.1.7,coverage==7.3.1,dill==0.3.8,enum34==1.1.10,idna==3.4,isort==5.13.2,Jinja2==3.1.2,jsonpath-ng==1.6.0,lxml==5.1.0,MarkupSafe==2.1.3,mccabe==0.7.0,mock==5.1.0,nose2==0.13.0,osm-im @ git+https://osm.etsi.org/gerrit/osm/IM.git@09d797997f5a11557374e64cc94cf7b341beaabd,-e git+https://osm.etsi.org/gerrit/osm/osmclient.git@b407c249389159813d06435678b98de5e72663fe#egg=osmclient,packaging==23.1,platformdirs==4.1.0,ply==3.11,prettytable==3.9.0,pyang==2.5.3,pyangbind==0.8.3.post1,pylint==3.0.3,python-magic==0.4.27,PyYAML==6.0.1,regex==2023.12.25,requests==2.31.0,six==1.16.0,tomli==2.0.1,tomlkit==0.12.3,typing_extensions==4.9.0,urllib3==2.0.5,verboselogs==1.7,wcwidth==0.2.6
pylint run-test-pre: PYTHONHASHSEED='2942896974'
pylint run-test: commands[0] | pylint -E osmclient/
___________________________________ summary ____________________________________
ERROR: black: parallel child exit code 1
cover: commands succeeded
flake8: commands succeeded
pylint: commands succeeded
safety: commands succeeded