Commit Graph

710 Commits

Author SHA1 Message Date
Zuul 646ef98991 Merge "Update metadata in setup.cfg" 2024-02-22 20:00:13 +00:00
Ayumu Ueha 74e1c70f2e Fix gate by adding extras to test-requirements.txt
The unit test fails with the following error:
```
ModuleNotFoundError: No module named 'extras'
```
This patch fixes the gate by adding `extras` package to
test-requirements.txt.

Change-Id: Idb653575b4a7a8ecd5f484cd23ba2c06429f8f28
2024-02-09 14:25:13 +00:00
Sairam Vengala 1008a8801c Update metadata in setup.cfg
removed the py3.6 and py3.7 from here as it does not get tested or supported now and added py3.9 and py3.10

please check this below reference link
 https://governance.openstack.org/tc/reference/runtimes/2023.2.html#python-runtimes-for-2023-2

Change-Id: I2c3988327eded325097d2823cf659aa90b3a35f7
2023-09-23 06:35:09 +00:00
Zuul da40f68136 Merge "Update metadata in setup.cfg" 2023-09-07 17:54:40 +00:00
Yasufumi Ogawa bb139587b2 Use upper-constraint in doc generation
Currently doc jobs are broken because the latest sphinx 7.2.0 is not
compatible with the latest release of openstackdocstheme.

This updates the docs/releasenotes target to use the global upper
constraints to avoid that issue.

Change-Id: I075240f47e4de34182a0fc68f92ed62ae84a277a
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
2023-08-25 16:51:36 +09:00
Sairam Vengala 20e1615d8f 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: I3d6eaebd86ce77a945e8179da783d0875cf19d27
2023-07-07 07:13:12 +00:00
Brendan Shephard 2becf4b0f1 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.

Change-Id: Iec6683ef865b74f86eae34f2bb969b8384ccfbca
2023-02-20 11:48:17 +09:00
OpenStack Release Bot 703bdbe56f Switch to 2023.1 Python3 unit tests and generic template name
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope. Also,
updating the template name to generic one.

See also the PTI in governance [1].

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

Change-Id: Ib3162c3a25998fb8b41a5d3bf7e4b0bb9e1d0c28
2022-09-14 09:29:59 +00:00
Ghanshyam Mann c51a506f57 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
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

Change-Id: I62d60bf7419decc35193ce1aa9a652a3c8bbf80d
2022-08-26 17:14:56 +09:00
Hiromu Asahina 82f8b0d9bb Add Python3 zed unit tests
Update Zuul job template to recent python versions [1].
python-novaclient 18.0.0 [2] which is listed on upper-constraints [3]
doesn't support python3.6.

[1] https://docs.openstack.org/infra/openstack-zuul-jobs/project-templates.html#project_template-openstack-python3-zed-jobs
[2] https://pypi.org/project/python-novaclient/
[3] https://releases.openstack.org/constraints/upper/master

Change-Id: Ibd4149ce962b6aab084ba3474d22c0bf4e3929cf
2022-07-01 10:01:07 +00:00
OpenStack Release Bot 8ed12ba41a Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

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

Change-Id: I8ac3f528c33ed039131d83c23b49be8f7471586d
2022-03-22 16:49:42 +00:00
Zuul c6abf6d7d0 Merge "Activate debugging in all unittests" 2022-03-22 05:22:44 +00:00
Zuul 32b425ed76 Merge "setup.cfg: Replace dashes with underscores" 2022-03-16 05:32:53 +00:00
Yasufumi Ogawa da9f163a31 Activate debugging in all unittests
heat-translator has some additional unittests other than
`translator/tests`, but we cannot run pdb debugger for the tests. It's
because only `translator/tests` is defined in [testenv:debug] section
in `tox.ini`. This update is to list all `tests` dirs in the section.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: I8a181a6936058acb2ad092d514ef0ffc4fd20e52
2022-03-16 02:53:48 +00:00
Yasufumi Ogawa 65dfa754e2 Fix unittest for auto scaling
This update is to fix failures in unittests below.

* `custom_def` in Policy class was changed from str to dict in
  tosca-parser. This arg isn't interested in the test, so it's replaced
  with empty dict.

* Fix unsafe yaml loader with `yamf.safe_load`.

It also removes nouse pip packages which cause failures while
resovlving dependencies, and some tiny refactoring.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: I8ae60a4ae9f139073f05ec0f99fa82c8bb24ee50
2022-03-16 01:01:23 +09:00
Ghanshyam Mann 0b8fba577f [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: I79d513ce982dcaa9196371d89e326570998e08fd
2021-06-02 15:49:45 +00:00
yangyawei bf04638938 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

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

Change-Id: I4e961fcc7b7096af186b7906abac5309850ea90b
2021-05-14 16:28:18 +08:00
OpenStack Release Bot 491348b58a 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: Id2c279d7d657e68614e8d638a017bf4b35a84e65
2021-03-19 19:42:33 +00:00
Nobuhiro Uematsu c6e04928fb ETSI-NFV SOL 001 translation: AffinityRule
The current heat-translator supports several conversions of
resources defined in ETSI NFV-SOL 001[1].
This patch supports the conversion of new resource types.
Specifically, the following types related to
'PlacementConstraints'.
- tosca.groups.nfv.PlacementGroup
- tosca.policies.nfv.AffinityRule
- tosca.policies.nfv.AntiAffinityRule

[1] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/02.06.01_60/gs_NFV-SOL001v020601p.pdf

Co-Authored-By: Hiroo Kitamura hiroo.kitamura@ntt-at.co.jp
Implements: blueprint support-placement-constraints
Change-Id: Ic22a6183ee0d7c8357063bdafbb1a11c1a6efa3c
2021-03-10 11:57:14 +09:00
Hiroo Kitamura 2c94431c0d Fix processing related to required properties
In the current UT testcase and yaml, there are several cases where
the required property of policy is insufficient or the definition
part is incorrect.
In addition, there is a bug in the code that has the translation
logic under 'translator/hot/tosca/'.
This patch fixes these translation logic codes, testcase and yaml.

Among the fixed yaml files, the following has a line feed code of CRLF,
so it has been modified to LF.

* translator/tests/data/autoscaling/tosca_cluster_autoscaling.yaml
* translator/tests/data/custom_types/senlin_cluster_policies.yaml
* translator/tests/data/nfv/test_tosca_nfv_autoscaling_with_params.yaml

In addition, NOTE description is added for
'translator/hot/tosca/tosca_policies_monitoring.py',
which is one of the translation logic codes.

Closes-Bug: #1918360
Change-Id: Ib9dec61007db5d354eaca86000ab3bcf6744a838
2021-03-10 11:52:49 +09:00
Zuul 7109d4cd52 Merge "Remove depreciated file babel.cfg" 2021-02-24 04:55:48 +00:00
Manpreet Kaur 615c76b900 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: I86a0ce342ae695c9529d3cf5bd4ac3779f9a9205
2021-02-12 06:50:56 +05:30
Manpreet Kaur e41b382afd 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: Iaa040f10028935782d8315efc81d344e72b2a152
2021-01-30 13:57:04 +05:30
Manpreet Kaur 91c4415c42 Update TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is an old and deprecated name, 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: Ib4dd97f427a0c364e2679c229bda9df6c3155d48
2021-01-29 00:11:32 +05:30
Manpreet Kaur 6687b35b46 Move heat-translator 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 heat-translator 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
./translator/tests/test_utils.py:51:13: H211: Use assert{Is,IsNot}instance
         self.assertTrue(

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

Change-Id: Iae79b8c5c6873d6bf5f6ef1b427dc8c60bade03f
2021-01-26 14:00:21 +05:30
Yasufumi Ogawa 4809045ed5 Remove six support
This update is to remove six support for dropping python2 from
heat-translator. Only the example of dockerfile is remained in which
it's expected libs are installed under `/usr/local/lib/python2.7`, so
it should also be considered to be updated later.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Change-Id: Iafbd1588674c95d6b6ec6b5429f2d34fb23081d0
2020-12-11 17:07:14 +00:00
Sean McGinnis 1823e8595d
Switch to wallaby job template
Run the expected wallaby jobs in gate.

Change-Id: I2496c1e95d36acbce60679f5e7224a92ed60a7ce
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-09-21 13:06:59 -05:00
Ghanshyam Mann 828ede5d67 [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Fixing:
- bug#1886298
Bump the lower constraints for required deps which added python3.8 support
in their later version.

Story: #2007865
Task: #40186

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal>

Change-Id: I482ac98bc56f0e3cfb8b767f47649da11ed1afab
2020-08-17 14:19:50 +00:00
Zuul 5c7c7d1eb6 Merge "Fix hacking min version to 3.0.1" 2020-06-19 19:26:14 +00:00
Hervé Beraud bfb642eb44 drop mock from lower-constraints
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we don't need it
in lower-constraints.

These changes will help us to drop `mock` from openstack/requirements

Change-Id: Ic435375ea64e5a2d50a208208c4729046cb49e23
2020-06-09 01:14:00 +02:00
Andreas Jaeger 92efac6413 Switch to newer openstackdocstheme version
Switch to openstackdocstheme 2.2.1 version. Using
this version will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: Ia9d81ddc1f3234af352787363e2963f808dbbad0
2020-05-30 17:10:51 +02:00
Ghanshyam Mann 7dc0b749b6 Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: I1b80db04389256f0629de9bec1f2045b63250bd2
2020-05-12 19:25:38 -05:00
Sean McGinnis 6229b16442
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I7a7b0090139a72a06ec98d22e27e015307c3aec3
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 16:09:09 -05:00
Andreas Jaeger 98e848606f Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: I36cc496d9374169b0eafdf8d66747b07f2b2cabb
2020-04-07 17:35:28 +02:00
Zuul 2a57298dce Merge "Add support for list data type" 2020-04-01 00:54:25 +00:00
Niraj 7be4cd79e8 Add support for list data type
In ETSI tosca definition, node type “tosca.nodes.nfv.VNF” has
property “vnfm_info” that is defined as of type list.

Definition given in etsi_nfv_sol001_vnfd_types.yaml:
tosca.nodes.nfv.VNF:
    properties:
      vnfm_info:
        type: list
        required: true

Example:
tosca.nodes.nfv.VNF:
    properties:
      vnfm_info: [vnfm1, vnfm2]

Added translation support for list data type.

Change-Id: I02a4ba46da588ef7c1ac36a15d7cd537187e3ecc
2020-03-31 03:13:24 +00:00
Zuul 6ddb2a7114 Merge "Replace assertItemsEqual with assertCountEqual" 2020-03-30 04:01:33 +00:00
JO Hiroyuki 0d0b1a1821 Replace assertItemsEqual with assertCountEqual
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.

[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - https://github.com/testing-cabal/testtools/issues/286
[4] - https://github.com/testing-cabal/testtools/pull/277

Change-Id: I53f758e7e8870b43b675f4c63d986f07d199c259
2020-03-30 00:02:49 +09:00
Zuul ece660b232 Merge "ETSI-NFV SOL 001 translation: ScalingPolicy" 2020-03-23 14:41:41 +00:00
Daniel Bengtsson b57e27bd61 Update the minversion parameter.
Update the minversion parameter to use the python -m pip to install
python packages:

https://tox.readthedocs.io/en/latest/changelog.html#id185

It's recommend to use this. Remove the useless install_command
parameter.

Change-Id: Ie1c6c65ee941509a7cec1472e798090ad00d52d7
2020-02-18 10:51:10 +01:00
Andreas Jaeger 2ceec3b348 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Increase requests lower requirement since oslo.config needs 2.18.0.
Fix idna lower-constraint to satisfy requests.

Change-Id: I753e09613b50e099060e2c85eb80d06d8b257858
2020-02-04 21:02:09 +01:00
Zuul a299c09d7a Merge "ETSI-NFV SOL 001 translation: BlockStorage" 2020-01-28 20:03:25 +00:00
Zuul 2479a9473f Merge "ETSI-NFV SOL 001 translation: CP,VL" 2020-01-28 20:03:21 +00:00
Zuul f237178efe Merge "ETSI-NFV SOL 001 translation: VNF, Compute" 2020-01-28 20:01:26 +00:00
Hiroo Kitamura 292248be2c ETSI-NFV SOL 001 translation: ScalingPolicy
Currently heat-translator supports translation of TOSCA Simple Profile
for YAML[1] and TOSCA Simple Profile for NFV[2] only.
This commit enables to translation of the follwoing type defined in
ETSI NFV-SOL 001[3].
- tosca.policies.nfv.InstantiationLevels
- tosca.policies.nfv.ScalingAspects
- tosca.policies.nfv.VduInitialDelta
- tosca.policies.nfv.VduInstantiationLevels
- tosca.policies.nfv.VduScalingAspectDeltas
- tosca.policies.nfv.VirtualLinkInstantiationLevels

[1] http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/tosca-nfv-v1.0.html
[2] http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.html
[3] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/02.06.01_60/gs_NFV-SOL001v020601p.pdf

Change-Id: Ifdb287c84dfb19d25b519a2e23f1b82ccc3f4088
Story: 2006372
Task: 37622
2020-01-24 04:52:54 +00:00
Hiroo Kitamura 59c61d71eb ETSI-NFV SOL 001 translation: BlockStorage
Currently heat-translator supports translation of TOSCA Simple Profile
for YAML[1] and TOSCA Simple Profile for NFV[2] only.
This commit enables to translation of the follwoing type defined in
ETSI NFV-SOL 001[3].
- tosca.nodes.nfv.Vdu.VirtualBlockStorage

[1] http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/tosca-nfv-v1.0.html
[2] http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.html
[3] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/02.06.01_60/gs_NFV-SOL001v020601p.pdf

Change-Id: I026a06de41ed390967e9ef137fa633ecd4fe747f
Story: 2006372
Task: 37621
2020-01-24 04:50:43 +00:00
Hiroo Kitamura 6f94614c71 ETSI-NFV SOL 001 translation: CP,VL
Currently heat-translator supports translation of TOSCA Simple Profile
for YAML[1] and TOSCA Simple Profile for NFV[2] only.
This commit enables to translation of the follwoing type defined in
ETSI NFV-SOL 001[3].
- tosca.nodes.nfv.VduCp
- tosca.nodes.nfv.VnfVirtualLink

[1] http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/tosca-nfv-v1.0.html
[2] http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.html
[3] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/02.06.01_60/gs_NFV-SOL001v020601p.pdf

Change-Id: I28b4ff67b74e7d5ad4264acb93cd8c292b91a0d4
Story: 2006372
Task: 37620
2020-01-22 03:35:50 +00:00
Hiroyuki JO 4833eb5e92 ETSI-NFV SOL 001 translation: VNF, Compute
Currently heat-translator supports translation of TOSCA Simple Profile
for YAML[1] and TOSCA Simple Profile for NFV[2] only.
This commit enables to translation of the follwoing type defined in
ETSI NFV-SOL 001[3].
- tosca.nodes.nfv.VNF
- tosca.nodes.nfv.Vdu.Compute

[1] http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/tosca-nfv-v1.0.html
[2] http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.html
[3] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/001/02.06.01_60/gs_NFV-SOL001v020601p.pdf

Story: 2006372
Task: 36161

Change-Id: I69263dce88bab5413a2d6f74f8d0c920dd454bf3
2020-01-22 03:35:40 +00:00
Zuul bfa3ab70c9 Merge "Switch to Ussuri jobs" 2019-12-19 15:36:21 +00:00
Zuul bcb389d884 Merge "nit: fix loading tosca classes including ., p, y" 2019-12-01 15:33:14 +00:00