56 Commits

Author SHA1 Message Date
Lukáš Piwowarski
846e3d2983 Change checkout commit in setup_env
A bug in test_create_multiple was fixed by this patch [1]. As the test
is part of the interop guidelines we should include this fix in
refstack-client.

[1] https://review.opendev.org/c/openstack/tempest/+/875751

Depends-On: Ie127c2ed159da8a6bc780919cdd4def44e457efb
Change-Id: Icfc4c4f270ee559128b165ffa032be0460294d48
2023-04-05 11:05:30 +02:00
jskunda
54c74fb8e3 Drop python2, python3.6 and 3.7 support
Refstack-client is dropping support of python2 and also all python3
versions above python3.8

Changes:
-requirements.txt - added license on python-subunit
-setup.cfg - removed python2 and python3 versions below python3.8
           - added python3.10
-setup_env - removed all python2 mentions
           - python3 min version set to 3.8.0
           - added parameter l which will force installation of
             python into  ${WORKDIR}/.localpython
-tox.ini - removed py27 from envlist, added py38

Change-Id: I6500ed950cb9bc07d87370940b4752e686712c14
2023-02-03 16:22:00 +01:00
Lukáš Piwowarski
23d9f5d7df Fix the default version of Python for '-p 3' option
When '-p 3' option is used, the setup_env script checks whether
there is 'python3' installed on the system. If it is, then python
3.8.10 is not installed by the script and whatever version that is
pointed to by the 'python3' command is used.

This is an issue as the setup_env script help message states that
python 3.8.10 is used for the '-p 3' option.

This patch fixes the issue by ensuring that PY_VERSION == "3.8.10"
when '-p 3' is utilized and by checking the exact version of the
installed python on the system.

Change-Id: Ic4e32ca84f4c7bf63ae0a1deb11c1b4cb44166d8
2022-10-07 13:08:41 +02:00
Martin Kopec
df3ce16947 Update tempest version and drop U and T jobs
The commit updates tempest version and removes Ussuri and Train jobs
as those aren't supported by the community anymore.
The patch also updates old openstack.org links.

Depends-On: https://review.opendev.org/c/openinfra/ansible-role-refstack-client/+/854211
Change-Id: Idf69f02ba844bdeea21ec744ec41ca78bbd1907d
2022-08-23 16:18:31 +02:00
Michal Arbet
34f4f209bc Run apt-get with DEBIAN_FRONTEND noninteractive
Change-Id: I8eb84c10ee3e42edd3df27a239c3e06d8bd48d86
2021-11-30 20:27:27 +01:00
Michal Arbet
cbaaffce66 Do not install python-dev automatically in debian
Setup_env script is installing python-dev package
via apt-get even if PY_VERSION is set to 3.

This patch is adding same conditional as centos like
OSes.

Change-Id: Ib2890e4f260445e392d0ec25eb16421595d2e031
2021-11-30 20:18:19 +01:00
Zuul
07a5b685e9 Merge "Use UPPER_CONSTRAINTS_FILE when installing plugins" 2021-10-21 21:38:44 +00:00
Martin Kopec
71000ff2d5 Reflect osf/ to openinfra/ namespace rename
Lately osf/ namespace got renamed to openinfra/ [1], this commit
reflects this change within refstack-client's repo.

[1] https://review.opendev.org/c/openstack/project-config/+/808479

Change-Id: I629d84cc8eed63ef8f33d3e063a3c7dc763c1d37
2021-10-21 21:08:37 +00:00
Martin Kopec
f3a704e136 Use UPPER_CONSTRAINTS_FILE when installing plugins
Let's use UPPER_CONSTRAINTS_FILE when installing plugins
by setup_env. The UPPER_CONSTRAINTS_FILE is set to
https://releases.openstack.org/constraints/upper/master
Using a constraint file is safer in general - it will shield
us from too recent releases of the dependencies (direct and
indirect ones as well).

Change-Id: Iea2127f53c0fb242f94e586983d28ce015221bb5
2021-10-21 21:07:48 +00:00
Martin Kopec
08a64544e1 Remove unnecessary rm command from setup_env
The removal of the dowloaded .tar.gz file is happening
on line 188 which makes the second removal of the .tar.gz
file redundant - the second call was also not matching the
name of the file.

Change-Id: Ia86d8ad368336e1af6ab4838510dcad453e12059
2021-10-07 20:39:04 +00:00
Martin Kopec
0ab5f7ac61 Use UPPER_CONSTRAINTS_FILE when installing deps
Let's use UPPER_CONSTRAINTS_FILE when installing dependencies
by setup_env. The UPPER_CONSTRAINTS_FILE is set to
https://releases.openstack.org/constraints/upper/master
Using a constraint file is safer in general - it will shield
us from too recent releases of the dependencies (direct and
indirect ones as well).

Change-Id: I4a8a9647b7a78302009e3b6d60462d3c8d438cd8
2021-10-07 18:35:38 +00:00
lpiwowar
0851f4fdec Update default tempest tag
The currently used tempest tag points to the version of tempest that
causes failure of some object_storage tests. The failure occurs when
swift is used on ceph. In such a case tempest expects that swift's
API endpoint for listing active capabilities is at /info when
actually the correct endpoint is /swift/info. This issue fixes
commit [1] that should therefore be used as a new default
tempest tag.

[1] https://review.opendev.org/c/openstack/tempest/+/692375

Change-Id: Id213499a54d793fab198a9bc2d96dd4cc3c89ce6
2021-08-26 10:54:50 +02:00
Martin Kopec
a842efbf56 Update default tempest tag to Oct 2019
In order to support manila_tempest_plugin tests which are a part
of share file system target program we need to update tempest's
tag to the commit when a workaround to handle skip exception
was added [1]. Without the change some of the manila_tempest_plugin
tests in share file system program are failing because tests skips
are treated as errors.

[1] https://review.opendev.org/c/openstack/tempest/+/687999

Change-Id: I692ac5749da553435e8d04f8179aa6151038b1f4
2021-03-23 19:31:53 +00:00
Martin Kopec
6bbd88fed8 Update default tempest tag to Oct 2018
Let's update the default's tempest tag one month more so that
tempest contains follow_redirects parameter [1] in its RestClient
needed to run dns add-on tests. Without the change some of the
designate_tempest_plugin tests were failing with TypeError:
__init__() got an unexpected keyword argument 'follow_redirects'

[1] https://review.opendev.org/c/openstack/tempest/+/580146

Change-Id: I5fde40ff2ed3e6e258a18ba431ab9aef2009c891
2021-03-20 19:31:09 +00:00
Zuul
c9ba649e26 Merge "Support DNF based OS" 2020-11-20 05:11:23 +00:00
Ghanshyam Mann
a2b4ce30b8 Update jobs for interop repos renaming
Interop repos are going under rename from
openstack namespace to osf namespace (Depends-On),
which need update the zuul job to start using the
new location.

Update .gitreview as well.

Disable py27 and py35 jobs, they don't work anymore as is.

Depends-On: https://review.opendev.org/#/c/734669/
Change-Id: Ib6871eaf0735e756f051d14513869fbe7cc6e826
2020-06-13 18:57:48 +02:00
Artem Goncharov
d4e4da0ffc Support DNF based OS
Since some time RedHat based OS are moving from yum to dnf. Extend check
of the supported underlying package manager to add "dnf" command
(interface is same as yum).

Change-Id: I5041d32be58a591db7eda7747ba2173527dffbf2
2020-02-20 13:18:06 +01:00
Zuul
b4908817ef Merge "Bump version of virtualenv download" 2020-01-16 04:58:34 +00:00
Martin Kopec
9ab6f81e36 Change default python to 3.6.0
As setuptools has dropped support for python2 and python2 has reached
EOL 1st Jan 2020, this patch changes default python for preparing an
env to 3.6.0.

Change-Id: Id00ee1265048425e29de70aee65c70a1d5cf9264
2020-01-14 14:46:12 +00:00
Jonathan Rosser
ccdcb2ed5c Bump version of virtualenv download
This updates the virtualenv release to the latest current which allows
setup_env to complete without error when setuptools 45.0.0 is present
in the venv

Change-Id: I2138409d2adce578764781a1ba481fcbc319c451
Closes-Bug: 1859633
2020-01-14 14:41:29 +00:00
Martin Kopec
bed0a57de9 Check python version when installing deps via yum
It seems that newer yum will not install all packages provided if one of
them is not found.
setup_env script installs for example python-devel and python3-devel
where one of them is for installation with python2 and the other
for python3.
In order to avoid situations when required packages are not installed
because one of the packages is not available, the patch adds logic
which will install deps based on the python version.

Change-Id: Ib119b283fac3cda340813f48b10c0a3cc4573891
2019-09-16 10:22:38 +00:00
Martin Kopec
9d4e39e930 Use correct python to install venv
The review adds logic which will choose python3 by default. If there is
no python3 it will fall back to python2.

Change-Id: If6dd7e7e3b09f20caf73ccdd36ac55220b13c129
2019-09-16 10:21:14 +00:00
Martin Kopec
fb9f35d13f Improve python3 compatibility
The review:
 * adds a python3 job in order to test the refstack-client with
   python3 as well.
 * adds a job which runs unit tests by python3.7
 * changes default python3 (when -p 3 is specified) in setup_env script
   to version 3.6.0
 * converts downloaded list of tests from bytes to str in order to unify
   the types used for python2 and python3 compatibility.
 * edits -p argument in the setup_env script so that it also accepts a full
   version of Python a user wants to run with, before there were 2 options:
    * python2.7.8
    * python3.6.0
 * sets object-storage.operator_role to Member in tempest.conf in order to run
   tempest.api.object_storage.test_container_services.ContainerTest tests

Change-Id: I961f0f093bd7d40fde7e448ea12ef9907c61d126
2019-09-09 16:38:21 +00:00
Martin Kopec
1037f945f4 Fix generate-tempestconf-file role
The role has been using python-tempestconf master branch when
gating refstack-client or python-tempestconf patches.
This patch adds a new argument to setup_env script which can
be used to specify a path to python-tempestconf source code.
This argument is used, when running the setup_env script from
the role, to point the script to the zuul source of
python-tempestconf code which contains the newest commits.

Change-Id: I65f9043a7bb0e6f045b6442679dd99dbd6aeb2de
2019-01-07 13:03:59 +00:00
Chandan Kumar
74b6ac1c3f Refstack-client should use stestr for tempest testing
Tempest has changed to use stestr instead of testr and testrepository
starting from 18.0.0,and the testr.conf was removed:
https://review.openstack.org/#/c/504345/

refstack-client will not able to run for tempest 18.0.0 as some commands
need the testr.conf in the path:

root@defcore:/home/defcore/refstack-client/refstack_client#
/home/defcore/refstack-client/.tempest/tools/with_venv.sh testr
list-tests
No .testr.conf config file

Tempest Commit SHA: 8316f962c52b01edc5be466b18e54904e2a1248a pointing
to tempest 19.0.0

Install tempest from master

Updated Guidelines to match 2018.02

Change-Id: Ic796cc7ad48037e64a4437d4834051c7fa7cbda1
Closes-Bug: #1765609
2018-09-03 18:01:49 +05:30
Chandan Kumar
e1744ea1e4 Generate tempest.conf automatically using refstack-client
Usage: $ refstack-client config --use-test-accounts <path to test
         accounts file>

If not accounts.yaml is passed then:
  $ refstack-client config
  It will generate accounts.yaml and tempest.conf in etc folder

* It adds support for the above command
* Added zuul based devstack job to run the same
* let setup_env handles the installation of tempestconf
* updated git url for tempest
* It also generates accounts.yaml if no account file is
  passed
* we can --overrides flag to overrides the tempest.conf
  value.
* volume-feature-enabled.api_v2=True is added as default
  in overrides as it is deprecated in Rocky cycle but needed
  for interop tests.

Depends-On: https://review.openstack.org/589260
Story: 2001696
Task: 19758

Change-Id: I9cabfc52672e7a8a54792ca9d867c62babf12cb7
2018-08-13 19:59:53 +05:30
Christian Berendt
a59189eaac Use openSUSE instead of openSuSe
Change-Id: Ib9c6df8f4248ee51db66620fd4d81c612b0729dd
2018-02-12 11:11:42 +01:00
davyyy
d8ff820765 Fix command for zypper
The "$(command) -v zypper" is incorrect, it returns " -v zypper".

Change-Id: I03cffbe187a4fedd962ba3e96c5b7c9c0cda40f9
2017-11-22 21:44:14 +08:00
vagrant
ae949741ad Replace ostestr with tempest run
ostestr has been removed, and is being replace with the
`tempest run` command for now.

Change-Id: Ie6b13ed3967f31248aea0cbeb9cde75a02b690f8
2017-10-10 17:40:55 +00:00
Catherine Diep
4e187b0767 Update default Tempest version to tag 16.1.0 (July 10, 2017)
Change-Id: I85563e8141c2ba87789b8d543cdb385fd4b70904
2017-08-15 15:42:43 -07:00
Jenkins
a61137f767 Merge "Add python35 support" 2017-08-15 19:02:20 +00:00
Luz Cazares
c876311111 Add python35 support
To be aligned with community goals
Add python35 support to refstack-client

Change-Id: I42ccc6128fc6a83ddee0e4014cbe2c8793b84012
2017-08-09 18:28:53 -07:00
Chandan Kumar
e950efdc73 Switch to refstack-client binary and some cleanup
* Use latest pbr >= 2.0.0
* Removed gitpython as it is not used within the code
* switched to refstack-client binary in README.rst
* Removed unwanted stuff from setup.py as those are already in setup.cfg
* use pip install -e . to auto install dependencies from requirements.txt
  as well as package.

Change-Id: Ia0b1b0a598c48200dc91cc08af9bd78d5685091e
2017-07-27 14:35:23 +05:30
sslypushenko
648b325a59 Add scripts for running refstack-client in docker
Prerequisites:

Linux host with Docker installed.

Usage:

./docker/env_build - script removes previous container if eny and builds
an updated `refstack-client` image
./docker/env_up - script setups environment in container if is the first run
and joins to shell in this container

Basic usage example:

1) Checkout repository
2) Run ./docker/env_build.sh
3) Run ./docker/env_up.sh
...
You will get Bash console in the prepared dockerized environment.

4) Run ./docker/env_up.sh  to get back to shell in the env
5) Run ./docker/env_build.sh to rebuild image and spin a new env
container.

NOTE: These scripts are safe to run locally.

Change-Id: I51e34a5d130d9595ead948f7ddb0db840527a797
2017-05-04 08:56:48 +03:00
Catherine Diep
17f401c702 Update default Tempest version to tag 15.0.0 (February 17, 2017)
Update to use the latest Tempest tag for Ocata release.

Change-Id: Ifef7f77139ed5c0ac76942584fcd98e403f1557e
2017-02-19 19:47:23 -08:00
Catherine Diep
9a3ac98a76 Update default Tempest version to tag 14.0.0 (December 21, 2016)
Current Tempest version is from a June 17, 2016 SHA. This patch
updates default Tempest to the latest Tempest tag (14.0.0).

Change-Id: Ie2da198cb1dc130380b31347cc6a4273437aea91
2017-02-06 20:59:17 -08:00
Carl Baldwin
c8934a31b3 Call pip by executing python -m pip to avoid issue with long shebang
If refstack-client is cloned to a place in the filesystem with
a pretty long path, such that the path to pip in the virtualenv
exceeds about 128 characters (with the #! in the shebang line)
then setup_env will fail because the path to the interpreter
gets truncated. This is a known issue with pip due to a kernel
limitation on the size of the shebang line.

Change-Id: Ie2cce5647960c45032c03f008501b8f87c0991cd
Closes-Bug: #1643046
2016-11-21 23:21:42 +00:00
Jenkins
701bfbd3e9 Merge "Fix missing dependency in refstack-client" 2016-10-04 19:51:22 +00:00
Ghe Rivero
a3a8ecd7c6 Clean downloaded venv after unpacking it
The VENV_VERSION.tar.gz is left in the folder
causing future runs to redownload it with an added
incremental number. Also, by not removing it, we can
accidentaly add it to the repo since it's not ignored
by git.

Change-Id: If79472121ab9cef0e5c59e41f3cf02d75092cc75
2016-09-29 18:43:06 +02:00
Jenkins
65b7d3d99a Merge "Commented out pip installs tempest-additional-requirements.txt" 2016-09-02 21:52:03 +00:00
David Lenwell
0d7dd225c7 Commented out pip installs tempest-additional-requirements.txt
Because the TC wants all tests in tempest
(https://governance.openstack.org/resolutions/20160504-defcore-test-location.html)
and since we have nothing in the tempest-additional-requirements.txt. This line always
return errors and confuses the user.

Change-Id: I6c379ced9fc01021254c5bdc363dd9a0697b3e02
2016-09-02 14:43:46 -07:00
Catherine Diep
7e12cedc0d Fix setup_env "Could not find .egg-info directory" errors.
Recently, pip install Tempest required packages results in
"Could not find .egg-info directory" errors for a number of the
pacakages (wrapt, positional ..).  This patch upgrades "virtualenv"
to version 15.0.3 which includes newer "setuptools" and "pip" that
would fix the .egg-info errors.

Change-Id: I098df3e8118782713e930fbd4c52a904c96045bc
2016-09-01 15:59:25 -07:00
Simeon Monov
21a9f60b03 Fix missing dependency in refstack-client
Added libyaml to the dependencies. It is needed by PyYAML
to optimize the yaml parsing. It is much faster then the
pure Python implementation.

Change-Id: I8b3f3861b2d3ec1db2d1404b7fafedfaf27c5420
2016-08-26 15:42:59 +02:00
Catherine Diep
81dbc62c06 Update default Tempest version to SHA 4d63b16d (June 17, 2016)
Update default Tempest version to pick up Tempest commit [1] which
includes fixes for testing of environment when ip_version_for_ssh
in the [validation] section is set to 6.

[1] https://review.openstack.org/#/c/330790/

Change-Id: If4c55b518e27bfbfcbcf828a5f4483a0795eb53f
2016-06-21 11:29:02 -07:00
wangxf
717ec4cb0c Update default Tempest version to SHA 8d468c83 (May 07, 2016).
DefCore updated test procedures[1] recommends RefStack testing
should be run with a single non-admin OpenStack user.  RefStack
default Tempest version is updated to pick up Tempest patch[2]
which fixes some test failures caused by the second user
credential requirement.

[1] https://review.openstack.org/#/c/313669/
[2] https://review.openstack.org/#/c/283819/

Co-Authored-By: Catherine Diep <cdiep@us.ibm.com>
Change-Id: I1f21e7d76c754bc675b21eda9970aab81e7eb8d7
2016-05-12 10:55:28 -07:00
Catherine Diep
59ddf8ed0b Update default Tempest version to SHA 09a60155 (Mar 2, 2016)
Update to use Tempest SHA: 09a60155435cfb8bfd1edb6eab3d4bec30515b8f
which is Tempest tag 10.0.0 (March 2, 2016).

Note:  There are many updates in the tempest.conf file since the
last default Tempest used by RefStack.  Appropriate updates in the
config file should be made before any attempt to run test.

Change-Id: I9c685153ff83a5728c4e42fa667e0c730366bf22
2016-04-05 15:48:40 -07:00
Dolph Mathews
5879281506 Cleanup comments and error message in setup_env
Change-Id: I1dded63334979bf16107dfc329804d6cb0253e74
2016-02-02 14:54:16 +00:00
Andrey Pavlov
b943663d94 Another way to use additional tests for tempest
Change-Id: I1da50f0e2c0da0b3e89bdf97063c22718b1b7997
2015-12-14 17:10:55 +03:00
cdiep
646a7b9cc7 Update default Tempest version to SHA 551e1a97(Sept 11, 2015).
Although refstack-client does install a default Tempest check
out version (the current version is SHA [1]),  refstack-client
has also offered options for user to install other versions of
Tempest if needed.  However, the "test_index_no_params" test in
Tempest was recently renamed to "test_list_no_params" in patch
[2] which was merged on Sept 16, 2015.  As such, test results
collected with any version of Tempest that's later than [3] will
never be able to obtain a pass status for the
"test_index_no_params" test case which is included in the Board
approved 2015.07 guideline.  For tests run against 2015.07, it
is important that users use a version of Tempest that doesn't
include the name change.

In order to allow for users to get a verison of Tempest that
includes recent Tempest fixes, refStack-client will be updated
its default Tempest version to [4] which is the most recent
version that doesn't include the name change.

More information about the test name change discussion can be
found in [5].

[1] ffe09dd61170bfccf7d60ef9c8eba2883ab6c148 (July 16, 2015)
[2] https://review.openstack.org/#/c/223796/
[3] eb9941ba06d87b3fb458ce472cae4c594ad8c0cf
[4] 551e1a9701e7e2b3edf6d49a2eaa62b7ab2435ad (September 11, 22015)
[5] https://review.openstack.org/#/c/229177/

Change-Id: I34e73a20e8129ac7e8bcd2a6b47c1b3591b37838
2015-10-08 10:12:57 -07:00
cdiep
4d141d885e Rename "Refstack" to "RefStack"
The RefStack team has decided to use "RefStack" as the name of our
project.

Change-Id: Ibd3fa01f0904549f22eaf4883116631a4e5b3d01
2015-08-31 16:15:36 -07:00