797 Commits

Author SHA1 Message Date
Corey Bryant
00284d8338 add python 3.7 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.7.

See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html

Change-Id: I22733429c53c217e72fb6d65e1f0dc1353b021fa
Story: #2004073
Task: #27416
2019-02-14 22:49:55 -05:00
Zuul
d23083a8e9 Merge "Update the bugs link to storyboard" 2019-01-03 22:09:16 +00:00
ZhijunWei
88905697f6 Update the bugs link to storyboard
Change-Id: Ic878d46e4802c79f416f4e157b734a16f8b612b4
2019-01-03 10:08:13 +08:00
Andreas Jaeger
21c2c922c2 Use template for lower-constraints
Small cleanups:

* Use openstack-lower-constraints-jobs template, remove individual
  jobs.
* Sort list of templates

Change-Id: Ib24ffd7701d8e7e88fb6c6ab9854244a4a656687
Needed-By: https://review.openstack.org/623229
2018-12-20 20:59:48 +01:00
Zuul
0e886af9f6 Merge "fix bug link in readme" 2018-09-07 23:55:14 +00:00
zhulingjie
05a1cc8896 Migrate the link of bug report button to storyboard
Change-Id: I5b329f3233ce126fb25bff6c947aa8379b991d50
2018-08-30 07:34:37 -04:00
Doug Hellmann
8acd0912ea add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I438730a4c37639341c0e7294b28a93e8ede845cc
Story: #2002586
Task: #24298
2018-08-29 08:59:49 -04:00
ZhijunWei
4b7978f965 fix bug link in readme
This patch fixes the bug tracker link in the readme. It is set to
depend on a job definition change in project-config so we can use this
patch to test the new release jobs.

Change-Id: I6dad9b1d6499d615c60d3c23b5cd8c44040abddd
2018-08-28 09:10:36 -04:00
Ha Manh Dong
97aec93e2b Switch to use stestr for unit test
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
So we should switch to stestr.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I14ae3879465e622f36fd7bba3f04cb6e0cb7500e
2018-07-19 15:30:51 -04:00
huang.zhiping
d6f8cda665 Add tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ic4a3b28cb670c71fb205640a9a9338bbcf9bc9bf
2018-07-19 15:30:49 -04:00
Zane Bitter
bee7811c80 Modernise requirements
Conform to the PTI for docs builds, add lower-constraints jobs, and use
upper-constraints instead of synced global requirements constraints.

Change-Id: Iaf1b54b35d02dbb733c7782b178e4eb774c02ef6
2018-07-18 20:19:40 -04:00
Zane Bitter
e403f3e673 Move Zuul config into repo
Change-Id: I21109adbdbf9d90b2145d3829e62dcf73392fb6a
2018-07-18 19:56:56 -04:00
Zane Bitter
d04bb529dc Fix pep8 errors with later versions of hacking
We are stuck on a very old version of hacking (0.8). In order to move
forward, we need to fix a bunch of things that flake8 will complain about.

Change-Id: If40ac29094b90c5bae63e7423061a190655f50a3
2018-07-18 16:35:03 -04:00
Zane Bitter
c583cbf9b2 Python3: Don't use cmp() function
The built-in cmp() function has been removed in Python 3, so don't try to
use it.

Change-Id: Ic62b7032ec6fd555974fc0d818327879d53a8ff2
2018-07-18 16:33:41 -04:00
XiaojueGuan
eccdf10a93 Update links in README
Change the outdated links to the latest links in README

Change-Id: I5743757aedc3462575bac5b9c6e9cbd2b6453801
2018-06-12 16:49:22 +08:00
Dirk Mueller
f88f78b7f4 Remove discover from test-requirements
discover is only needed for Python 2.6.x or older.

Change-Id: Iea418fa2a7c826e157e96e1672d22b737c0669e1
2018-02-19 21:28:31 +01:00
ricolin
341d07e298 Add OpenStack doc support for heat cfntools
This allow build docs with new OpenStack doc format.

Change-Id: I4ed880ee5c03de40793ebdb4662cbaf3eeca12fa
2017-07-21 12:28:14 +08:00
Anh Tran
407f8a5b00 Remove white space between print ()
Change-Id: I8b95436dfcf3bfd65fa95557e34268c0e5072812
2017-01-17 10:25:27 +07:00
Flavio Percoco
afaf465ac5 Show team and repo badges on README
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.

For more information about this effort, please read this email thread:

http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html

To see an example of how this would look like check:

https://gist.github.com/d71e2eaf72170035e6d10135f9c04a02

Change-Id: Icb4f114e9408cd84e885aa51c3f1a9bfb54d7c52
2016-11-25 17:18:07 +01:00
Jenkins
e768825090 Merge "Replace 'MagicMock' with 'Mock'" 2016-09-23 03:44:46 +00:00
shizhihui
590b3fb996 Replace 'MagicMock' with 'Mock'
Change-Id: I24e87a1c341f63929f93d7306782e3e9d6b398fb
Partial-Bug: #1475722
2016-09-23 10:57:16 +08:00
shizhihui
f394343153 Drop unused directory in tox
The Oslo team has moved all previously incubated code from the
'openstack/oslo-incubator' repository into separate library
repositories and released those libraries to the Python Package,
so the directory should be removed.

Change-Id: I0ee30c36e87970bc1b1175230a1bffa27e0b3e09
2016-08-17 13:22:52 +08:00
Pablo Iranzo Gómez
c9f938b9d0
Fix typo
Change-Id: I15deb824a85aa561c2f2e7f4ea6b4b1ce96367f9
2016-06-29 17:42:09 +02:00
Swapnil Kulkarni (coolsvap)
5d62b178c3 Replace deprecated LOG.warn with LOG.warning
LOG.warn is deprecated. It still used in a few places.
Updated to non-deprecated LOG.warning.

Change-Id: I6e8df0e072448fbd4077c4e5d98b2986e9855489
Closes-Bug:#1508442
2016-03-11 13:09:24 +05:30
twm2016
7a604b2d5c Changed logger init and added verbose arg handling
Initialized logger with default value of NOTSET.

Added if statement to handle verbose argument and set the logger to
DEBUG.

Change-Id: I997b8b964dade013db265d088d00ccfdd6ab030e
Closes-Bug: #1269465
2016-03-01 11:27:59 -06:00
Jenkins
43c79ad94c Merge "Trivial: Remove vim header from source files" 1.4.2 2016-01-21 19:29:09 +00:00
Jenkins
6c16d37689 Merge "remove python 2.6 trove classifier" 2016-01-21 19:28:20 +00:00
Jenkins
e101695c6b Merge "Deprecated tox -downloadcache option removed" 2016-01-21 19:26:54 +00:00
Andreas Jaeger
fe2b57b563 Remove argparse from requirements
argparse was external in python 2.6 but not anymore, remove it from
requirements.

This should help with pip 8.0 that gets confused in this situation.
Installation of the external argparse is not needed.

Change-Id: Ib7e74912b36c1b5ccb514e31fac35efeff57378d
2016-01-20 19:16:50 +01:00
Jenkins
010c6482e2 Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2016-01-15 12:03:24 +00:00
Yun Bo Xu
d3a0e97f2f Trivial: Remove vim header from source files
Change-Id: If918eaeb47b0d35bda198119cbc0fc3f015d6a1e
2016-01-12 23:22:41 +08:00
reedip
6a834206d9 py26/py33 is no longer supported by Infra's CI
Python 2.6/3.3 support would be dropped by Infra team from mitaka,
CI would no longer be testing it, so projects should drop it too.

Change-Id: I13250170bd04d07b97990ed52a8c7a0c0f7e76c6
Closes-Bug: #1526170
2016-01-06 17:49:33 +09:00
Doug Hellmann
032c385d57 remove python 2.6 trove classifier
OpenStack projects are no longer being tested under Python 2.6, so
remove the trove classifier implying that this project supports 2.6.

Change-Id: I1f8cc2d5d25a2e00b7ad4d12b013b69695536ab8
2015-12-23 01:31:10 +00:00
Janonymous
5684248e19 Put py34 first in the env order of tox
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.

Change-Id: Id0d2de40081a59d5819d2e6c52c98135f26808b5
Closes-bug: #1489059
2015-12-22 22:17:45 +05:30
Shuquan Huang
e4503e43cb Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: Ic2dca04e7cdd4f837c42b39dd1ce37604c8f101b
Closes-bug: #1280522
2015-12-17 11:20:13 +08:00
Ondřej Nový
c737d480de Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I0a6561c0d667b1310cd544f1b1ec4c019ba16197
2015-12-11 23:03:32 +01:00
Anant Patil
6571e5ab64 Don't run commands given as list on shell
Commands from AWS::CloudFormation::Init, when supplied as list, should
be run with shell=False. Only when commands are given as string, they
are meant to be run on shell.

In principle, we are trying to give least access to the shell to avoid
any inadvertent shell injections.

Change-Id: I3dc6fe0c29a14f75be044846f737e1ade23a6d6b
Closes-Bug: 1498300
2015-09-23 20:22:28 -04:00
Jenkins
5d5a2c1f22 Merge "Activate pep8 check that _ is imported" 1.4.1 2015-09-23 04:55:51 +00:00
Anant Patil
2710bba2cb Convert all internal commands to list
Make all internal commands as list to avoid any possibility of command
line injection. Commands supplied as string are susceptible to
substitution.

All the internal commands are supplied as list to CommandRunner. As a
convention, all the commands must be given as list to subprocess except
the commands read from file, like in case of cfn hooks and commands
section in metadata.

Few internal commands require shell redirects and they will be
implemented in another patch.

Change-Id: Ifabaf44e341144bc85508dc05c76b1d83e41ae44
Partial-Bug: #1312246
2015-09-22 10:37:11 +05:30
Anant Patil
f427a69443 Use seteuid instead of su to control privileges
Control the privileges by setting the effective UID before running the
command. Earlier we used to run command using su -c "USER".

Original EUID is restored after running the command. This is required to
run multiple commands in succession with different run-as users.

Change-Id: I414fc6a802f11deb320b43c6d011f802a42c40c9
Partial-Bug: #1312246
2015-09-22 09:35:56 +05:30
Zane Bitter
090a14dd63 Revert "Fix cfntools command injection"
This reverts commit e424af2236ed1d6e6d0e11768f873ffe4e696221.

Splitting command strings that were previously assumed to be interpreted
by the shell at whitespace and then passing them as separate args to
execvp will not work.

Change-Id: I7c37b5852ce9b20e63bdbbaddfb852463548aa90
2015-09-03 18:18:41 -04:00
THOMAS J. COCOZZELLO
5304f5f7f1 Activate pep8 check that _ is imported
Remove the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.
This helps ensure that the _ from i18n is used.

Activating this check did not flag any violations.

Change-Id: Ibb457fc16b64ead1acbf359531ecd79e624df8ab
2015-09-03 16:22:25 -05:00
Anant Patil
e424af2236 Fix cfntools command injection
The CommandRunner used to run commands using su command and passing the
actual command to be run as argument to it.

su USER -c <cmd>

This is susceptible to command line injection as noted in the bug.

The fix required to do two things:

1. Pass the command to be run as list instead of a string. This is to
ensure that the actual arguments are passed as arguments to the program
ought to be executed. And by doing so, avoids running any commands
passed in the argument. On the contrary, if the command were passed as a
string to the shell, the arguments could be formed in a way to execute
malicious commands.

2. The CommandRunner runs the command directly and uses setuid to lower
the privileges if needed. If the 'runas' user is other than root, then
its UID is obtained and setuid is invoked to set the real user-id and
effective user-id to the given user.

Change-Id: I654117e994fd38411508dbe9b85d06c28dc0e411
Closes-Bug: #1312246
1.4.0
2015-08-31 15:58:04 +05:30
Anant Patil
20049ea85f Fix unit tests
Fix failing tests.

Co-Authored-By: Sirushti Murugesan <sirushti.murugesan@hp.com>
Change-Id: If44ea49e5d6262f6e6b51dfdfb76754fb7c467d5
2015-08-14 12:38:13 +05:30
Jenkins
c4c50583c8 Merge "Fix typos in cfn scripts" 2015-06-09 02:40:36 +00:00
tyagi
bd194f3f53 Fix typos in cfn scripts
Change-Id: Ie411a1d5229a89b545d949b79552c3f6d240783d
2015-06-04 01:12:13 -07:00
tyagi
791046046e Add --insecure/-k option to cfn-signal
cfn-signal will not work when heat-cfn-api server is configured
for the https. This patch will provide a option to make a insecure
request to the cfn server.

Change-Id: I9dcd53b40a389811e292c331ff625a8b5af827b7
Closes-Bug: 1460007
2015-06-04 01:06:04 -07:00
Steve Baker
02acffbe2a README changes to make release_notes.py happy
Change-Id: I53ac1abcbcc48c82627125e6740f1d0940490e1d
1.3.0
2015-05-12 10:50:52 +12:00
Miro Hrončok
57f8ae8997 Ported tests from mox3 to mock to support Python >= 3.3
Change-Id: I55579328adc7003f78e78161aa6e047524a5c805
Related-Bug: 1403214
2015-02-22 22:19:20 +01:00
Miro Hrončok
f8796122c5 Python 3 compatibility
* ConfigParser import from six
 * Drop iteritems()
  * To support both Python 2 and 3
 * Encode string before writing it to file
  * To support both Python 2 and 3
 * Use six.string_types
  * To support both Python 2 and 3
 * Use key on Python 3
  * Because cmp is no longer working
 * Add py33 and py34 to tox.ini

Change-Id: I23985be55302cd4ef577919efb51975ecbd9563d
Related-Bug: 1347899
2015-02-21 11:17:53 +01:00