Commit Graph

788 Commits

Author SHA1 Message Date
sairamvengala007@gmail.com 283cb6a375 Update metadata in setup.cfg
we are using some "aliases" that the setuptools docs say
"are supported for compatibility reasons" but their use is not advised[1].

[1] https://setuptools.pypa.io/en/latest/userguide/declarative_config.html#metadata

please check this below reference link

[2] https://review.opendev.org/c/openstack/charm-cinder/+/854987


Change-Id: I0d4bfa4b91180ddc567411845b94f5c1a046e2c6
2023-07-12 05:39:18 +00:00
Zuul 6c919b777d Merge "Support importing def from local instead of url" 2023-05-16 13:35:33 +00:00
Yasufumi Ogawa 16932ad1d5 Support importing def from local instead of url
Sometimes importing a nested definition from remote server is failed
for the server is busy. Although we usually can download the definition
before and change the path as local then, cannot for a case if the
contents of the template is fixed and it should not be changed.

This update is avoid such a case as a remedy. The url can be replaced
with any other path by using arg `local_defs` like as below. In this
case, the definition is imported from local path instead of url.

    local_defs = {"https://example.org/orig": "/path/to/local/def"}
    tosca = ToscaTemplate(template, local_defs=local_defs}

Closes-Bug: #2006796
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Iac88def836970cd976396452ffb9c3d276263d3e
2023-02-20 10:50:09 +00:00
Roman Stolyarov c34dd4b6af Interface outputs
Added support for outputs in operation definition.
References: https://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.3/os/TOSCA-Simple-Profile-YAML-v1.3-os.html#DEFN_ELEMENT_OPERATION_DEF (section 3.6.17.1 Keynames)

Change-Id: I71b497076135a50df27f8768d28c183c8d605d71
2023-02-20 10:08:31 +00:00
Brendan Shephard dcff68fd8a
Fix passenv for tox4
Space seperated list for passenv is no longer acceptable in tox4. This
change fixes the formatting of the passenv list as per this new
standard.

This change also removes skipsdist=true, which causes issues for loading
extensions in tox4.

Change-Id: If541ae03133e3d4a02b38a3e02c13f0b6355e13f
2023-02-20 12:35:19 +10:00
Manpreet Kaur 98e99e5223 Update python classifier for python 3.10
In 2023.1 cycle, we are testing the python 3.10
as voting job so updating the python classifier.

Currently we have python 3.8 unit test job running on
Ubuntu Focal and python 3.10 job on Ubuntu Jammy.

Change-Id: I14b012788ca3c00470683b594280347aeaedee68
2022-12-15 12:05:18 +05:30
Zuul a533cb1906 Merge "Use py3 as the default runtime for tox" 2022-10-12 18:17:11 +00:00
Zuul 347e0ddedf Merge "Switch to 2023.1 Python3 UT and generic template" 2022-10-11 08:20:23 +00:00
Manpreet Kaur aa58522e8b Switch to 2023.1 Python3 UT and generic template
This patch update the template name to generic template name.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ic5b019fe4255c81f07602883e8bd3743c3ac9e71
2022-10-06 12:25:58 +05:30
Yasufumi Ogawa e6675da564 Fix dash-separated attributes in setup.cfg
For dash-separated attribute names in setup.cfg will not be supported
in future versions, setuptools warns for such a names [1]. This update
is to replace dashes with underscores for the fix.

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Ia7064518a528e322c366daa6d9a30df9746126ce
2022-10-06 00:26:05 +00:00
wangjiaqi07 933da4c758 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update
this at each new cycle.

Change-Id: Iec76fff60bb0fb6107f61f371b97492eb90ff42a
2022-09-15 08:42:44 +08:00
OpenStack Release Bot 140efef52d Add Python3 antelope unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Ibc67dbc3e069bd61762ec1a8fd82decdf327b526
2022-09-06 12:51:02 +00:00
Wataru Juso 6e6fec40da Support primary and dependencies definition
The definition of implementation support the single artifact case.
For support the multi artifact case, implement the primary and
dependencies definitions to the implementation.

Implements: blueprint support-multi-artifacts
Change-Id: Ie118add5c1829e54b3e16ea6ea4375bf7f3f9e50
2022-08-26 17:23:26 +09:00
zhangboye 88796c0072 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], dropping
the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Co-Authored-By: Manpreet Kaur <kaurmanpreet2620@gmail.com>

Change-Id: I1c7e8363b045487e4620613fdd37139b3d256758
2022-05-03 09:36:27 +05:30
Miguel Caballer 46141f95d2 Fix KeyError in get_attribute function
Fix KeyError is raised in get_attribute validation in case of
nested data types.
The data type schema was not correctly managed.

Closes-Bug: 1965089
Change-Id: Ic87a3c429105d6108507de05a31b788538ee2259
2022-03-23 08:34:27 +01:00
Miguel Caballer 4533792d10 Fix InvalidTypeError in get_attribute function
Fix InvalidTypeError is raised when a custom def datatype attribute
is requested in a function.
It only required to add custom defs in the DataType validation.

Closes-Bug: 1964972
Change-Id: Ie3413c6d6ba86d0fd5eb819dfc9770b8211badc6
2022-03-22 14:00:53 +00:00
OpenStack Release Bot c63e17a7a3 Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I17684c00054c2de0c66abadde8a424d43041a5ce
2022-03-04 17:07:39 +00:00
Manpreet Kaur 60d40de313 Update python testing classifier
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file and envlist in
tox.ini.
Added py39 job in Zuul.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: Iaf70878e611d6a61b96f0cbbebe12f8b0981b8ef
2021-12-15 06:14:20 +05:30
Zuul 40e36696db Merge "Add Python3 xena unit tests" 2021-11-18 18:03:07 +00:00
Zuul 0578e9702f Merge "Clean up extra spaces" 2021-11-08 01:43:29 +00:00
Zuul 05732befa2 Merge "Add parent interfaces to the list of NodeType interfaces" 2021-09-29 15:17:28 +00:00
jinyuanliu 2ea2f97cd2 Clean up extra spaces
Although these errors are not important, they affect the code specification.

Change-Id: I2e8b4a1b900f6aa02fd9a2397b604d454a093792
2021-09-15 10:04:49 -04:00
Zuul 0014362ab1 Merge "Fix parent types if relationships" 2021-07-28 05:20:50 +00:00
Zuul 2ff2f20d6f Merge "[ussuri][goal] Update contributor documentation" 2021-07-23 07:56:15 +00:00
Zuul 910f319e23 Merge "Replace assertItemsEqual with assertCountEqual" 2021-07-07 03:04:26 +00:00
Manpreet Kaur e7b9386a91 Fix old link in Installation guide
The TOSCA parser manual installation section refers to an old link
[1] for the TOSCA-Parser source code repository.
The new link for the TOSCA-Parser repository is [2].

[1] https://github.com/openstack/tosca-parser
[2] https://opendev.org/openstack/tosca-parser

Closes-Bug: #1934569
Change-Id: Ie7701e2a74671a0f9a8adda87ffab141e0504e60
2021-07-03 21:29:15 +05:30
Manpreet Kaur 405ec35f63 Replace assertItemsEqual with assertCountEqual
The assertItemsEqual has been replaced with assertCountEqual
since I7c20fec08e5dc9f67b34100c925ea6724bbd25f0 .

This patch replace assertItemsEqual with assertCountEqual.

Additionally, fix warning for deprecrate method skip.
Warning:
/opt/stack/tosca-parser/toscaparser/tests/test_toscatpl.py:
DeprecationWarning: Only valid in 1.8.1 and earlier.
Use skipTest instead. TestCase.skip(self, 'bug #1440247')

Change-Id: I3112be6e984eb3d5f9052ece370a45ac69cf3ad6
2021-07-03 00:26:16 +05:30
Manpreet Kaur 92a3e697cb import "collections.abc" explicitly
The Collections Abstract Base Classes is moved to the
collections.abc module, which was earlier part of the
collections module[1].

The python3 reports a warning for the same-
DeprecationWarning: Using or importing the ABCs from
'collections' instead of from 'collections.abc' is
deprecated since Python 3.3, and in 3.10 it will stop working.

This patch updates to import collection.abc module explicitly.

[1] https://docs.python.org/3/library/collections.abc.html

Change-Id: I18ba70140f9b2b53f2e97e70f64973af9d8953be
2021-07-02 17:20:47 +05:30
Ghanshyam Mann 0501264fa0 [ussuri][goal] Update contributor documentation
This patch updates/adds the contributor documentation to follow
the guidelines of the Ussuri cycle community goal[1].

[1] https://governance.openstack.org/tc/goals/selected/ussuri/project-ptl-and-contrib-docs.html

Story: #2007236
Task: #38524
Change-Id: I2a91b3917a3d119aec2f53cc3e65fa6cc73381c0
2021-06-01 13:48:43 +00:00
Valeriya Shvetcova ca3a2a8804 Fix parent types if relationships
1. Fix passing arguments when parent type is taken
2. Take parent interfaces when interfaces are taken
3. Choose custom definitions first when capability type is taken

Change-Id: Ifb74a2a68bf627323ff6bfe5a8d5e0a9a222f86b
Closes-Bug: #1929616
2021-05-27 14:41:58 +03:00
Zuul 88988bba17 Merge "Simplify log translations" 2021-03-24 09:22:29 +00:00
OpenStack Release Bot 1ef468bce5 Add Python3 xena unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for xena.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I0a71aca64d1924c5309876143b92edc9e8b1171a
2021-03-19 19:43:41 +00:00
Zuul 0d85c4aaaa Merge "Update validation of function `get_operation_output`" 2021-03-19 15:06:20 +00:00
shizhihui 424cc36d52 Simplify log translations
Log messages are no longer being translated, which
can simplify logging and avoid confusion with new contributions.

OpenStack no longer supports log translation and depreciated since
Pike release.

Please refer:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Co-Authored-By: Manpreet Kaur kaurmanpreet2620@gmail.com
Change-Id: Icd3977cf87feaea3d7883d260843ec4404cd17cb
2021-03-12 12:17:35 +05:30
Zuul 9af55c83d1 Merge "Make custom definitions biggest priority" 2021-03-05 14:14:00 +00:00
Zuul a1c2cbe960 Merge "Remove depreciated file babel.cfg" 2021-02-23 06:56:40 +00:00
Manpreet Kaur d353bbce28 Remove depreciated file babel.cfg
The file babel.cfg is not used anymore.

This patch removes the depreciated file and the translation
sections in setup.cfg (extract_messages, compile_catalog and
update_catalog) as these not needed anymore,
Babel can generate translation files without them.

Change-Id: I64879fdcc2cb2b1395d31947280d39081cf2676b
2021-02-12 06:53:08 +05:30
Manpreet Kaur 6f253c5a5a Dropping explicit unicode literal
In python 3, all strings are considered as unicode string.

This patch drops the explicit unicode literal (u'...')
or (u"..") appearances from the unicode strings.

Change-Id: Idd8fde4c4330c5125ed33f85d12fa6a551165f96
2021-01-30 13:45:02 +05:30
Manpreet Kaur 1f6f7a064c Update TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated, refer [1].
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: I7d08d44b2d631010d48b7bcb520eaab91eb40ede
2021-01-29 00:15:57 +05:30
versus_vv 5860c6f0b0 Update validation of function `get_operation_output`
Function `get_operation_output` takes Node or Relationship Template
as first argument.

Change-Id: Ifb9ddf2c021408bdc9f2da18a8c7f3958056709e
Closes-Bug: #1901051
2021-01-26 15:35:43 +03:00
Manpreet Kaur ce8fa0f8bc Move tosca-parser to new hacking 4.0.0
Hacking 4.0.0 has introduce new optimal assert checks.
Please refer [1] for more details.

Additionally Hacking has enabled some new checks by default,
and the next update to the new release will introduce failures
in tosca-parser pep8 jobs.
The main impact is from I122d250cab90964c346e9d53046a97c25054bc00.

This patch adopts new optimal assert check.
[H211]:  Change assertTrue(isinstance(A, B)) to assertIsInstance(A, B)

On bumping up the hacking version, below mention pep8 jobs failed.
This patch address the issues now, when the new hacking release starts
being used it will not cause a disruption.

pep8 run-test: commands[0] | flake8
./toscaparser/tests/test_toscatplvalidation.py:502:13:
                                   H211: Use assert{Is,IsNot}instance

[1] https://docs.openstack.org/releasenotes/hacking/unreleased.html#relnotes-4-0-0

Change-Id: I5c83168267be63d4b3908ce6bb844a64bcee837d
2021-01-26 16:30:49 +05:30
Aldinson Esto df16f011f0 Support "Implementation" definition as Artifact Name
In the Node templates interfaces definition, Tosca
parser only recognizes implementation as a file and
not as an artifact name. ETSI SOL definition provides
that Implementation may be an artifact name, and that
the artifact definition will specify the artifact
type and the file. This modification will allow both
artifact name and file to be placed as value in
"Implementation" definition.

This is essential to allow onboarding of VNFD
packages containing the Management Driver definition
that specifies both Implementation definition value
as the Artifact Name.

https://review.opendev.org/#/c/740896/

Change-Id: I192d36499e7b731bbefaf3845f23f85d1e649ca5
2021-01-18 13:44:43 +09:00
Zuul 3c5d2b6441 Merge "Drop Python 2 support" 2020-12-26 18:21:25 +00:00
Yasufumi Ogawa b0c5c55114 Drop Python 2 support
This update is to drop six and all Python 2 support.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Ieda51e621ee0477893fd3a0a06e696620c0a8f95
2020-12-26 15:24:33 +00:00
Zuul c24ece0db9 Merge "Add validation for required property of policies" 2020-12-24 16:31:27 +00:00
Zuul 998bb07191 Merge "Fix error parsing scalar unit contraints" 2020-12-24 16:29:53 +00:00
Yasufumi Ogawa 62f0d45fe1 Add Python3 wallaby unit tests
This update is to switch to wallaby jobs run with the latest tested
runtimes. See Project Testing Interface for the details [1].

[1] https://governance.openstack.org/tc/reference/project-testing-interface.html

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Ic57383420558744f48eeb12eb8cbe6b1ab3dc0e3
2020-11-27 03:58:12 +00:00
Ayumu Ueha 00d3a394d5 Add validation for required property of policies
Tosca-parser validates the required parameter for node_template but does
not validate the required property of the policy like node_template.

This patch fixes the issue for validation required property of policy.

Change-Id: I137addfa0d7d46e6821573f7770214f5c1754172
Closes-Bug: 1903233
2020-11-25 19:24:36 +09:00
Miguel Caballer 0653750dd2 Fix error parsing scalar unit contraints
Return the correct error in some cases where the unit is not set.

Related-Bug #1897268

Change-Id: I83cfa7b8a26949026a6c51c50a5aec22eadd3725
2020-11-18 11:39:55 +01:00
Miguel Caballer b598d9cfe4 Enable _get_explicit_relationship to maintain original relationship type name
Related-Bug #189726

Change-Id: I843fa7dfc928cb811ffd2fd8145644663e239976
2020-09-28 12:08:51 +02:00