Commit Graph

28 Commits

Author SHA1 Message Date
Zane Bitter 5c17e4c7ef Move policy defaults into code
Instead of a default policy.json file, policy defaults are now defined
in code. An operator need not supply policy.json data except to the
extent they want to override the defaults. Currently an empty
policy.json is still shipped because it is expected by devstack, but
this can be removed later. A sample policy.yaml file can be generated
using the genpolicy tox environment.

This partly fulfils the requirements of the policy in code goal[1].
However, because policies don't map 1:1 with APIs, it will not be
possible to fully document the policies until changes are made in how
policies are applied as proposed in https://review.opendev.org/528021

Due to the fact that existing policy files may rely on a rule named
"default" to specifiy policies not explicitly listed in the policy.json
file, all policies that are not admin-only by default now default to
"rule:default", so that the "default" rule will continue to apply to
those policies that are not listed in policy.json.

To ensure that this yields the expected policy in a standard
policy-in-code config file, the default value of the "default" rule is
now the empty string "". This is a change; between the Queens release
and now the default was set to "role:admin" to match the value specified
in the default policy.json file. An installation relying on both the
"default" rule for some policies and the default value of the default
rule may end up with a more permissive policy after upgrading. It's
likely that no such policies exist in the wild, because prior to the
Queens release the default value for the "default" rule was "@" (allow
all requests), so anybody relying on this rule will surely have
specified it explicitly in their policy.json.

Policies whose default is "role:admin" no longer use the "default" rule.
Therefore existing policy.json files that rely on the "default" rule for
those policies, and who have specified a value for the "default" rule
that is more permissive, will result in a more restrictive policy after
upgrading. It is unlikely that any of these policies exist in the wild
either.

[1] https://governance.openstack.org/tc/goals/selected/queens/policy-in-code.html

Change-Id: I8d1ccf5844078cc0b1652fb1130794daf07cedbc
2020-01-06 12:56:30 -05:00
junboli e571e1878f tests: replace .testr.conf with .stestr.conf
TrivialFix:In the change[1] os_testr changed under the covers
from using testr to stestr, so that we now get the following
warning:
   ostestr.py:120:
   UserWarning: No .stestr.conf file found in the CWD.
   Please create one to to replace the .testr.conf. You
   can find a script to do this in the stestr git repository.
So remove the .testr.conf and add .stestr.conf which was
generated using a utility script as documented here [2].
[1] Id7cb2a39a8308f1413608dcf19273a1d7f33592e
[2] https://media.readthedocs.org/pdf/stestr/stable/stestr.pdf

Change-Id: I4810ac86aeca23e5abff3dc0417ffa3aa2f3a199
2017-10-13 23:42:03 +00:00
Doug Hellmann 1c7f556d4f rearrange existing documentation to follow the new layout standard
This change moves existing files, updates a few of the cross-references
and paths, and fixes some formatting. It is not meant to be the final
word on how the main page looks or how the other files are organized,
but it gets everything roughly into shape. If the glance team wants to
make changes, please do those as follow-up patches

This change depends on the spec and on a feature of pbr that allows us
to move where the auto-generated class reference documentation ends up
in the tree.

Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Depends-On: I2bd5652bb59cbd9c939931ba2e7db1b37d2b30bb
Change-Id: I9dde267793a5913acb5b1ec028cfb66bc5189783
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-21 14:15:58 -04:00
Doug Hellmann 7c3260227d ignore generated sample config files
Change-Id: I498f78368edce7bfe00a09d190b6e47292c16139
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-19 13:46:22 -04:00
Doug Hellmann 262d0245a5 Add reno for release notes management
Change-Id: I9549e6b491b26232f4dac900b0bf05f10eb0e30a
2015-11-04 18:21:25 +00:00
zhu.rong 5b94798d37 Add subunit.log to gitignore
Execute the run_test.sh, it will generate a subunit.log file,
So add it to the gitignore file

Change-Id: I0129610d941d2fc9f4d813bde8bd89ee6766727d
2015-11-03 08:36:11 +00:00
venkatamahesh 7a06e15287 Remove the duplicate file path created by sphinx build
Change-Id: I314cb7e30625d11e259a6c4f864ea84976221401
2015-10-14 20:30:55 +05:30
Erno Kuvaja 44de1ea117 Add .eggs/* to .gitignore
Change-Id: Ia2dc8ef99254aa69c23c0831ee29ee3e25793bb7
2015-07-09 12:34:45 +00:00
Kamil Rykowski 01d7acb5a8 Git ignore covhtml directory
The covhtml directory is created when tests are run with coverage report
flag and it contains HTML files with code coverage:

./run_tests.sh -c

This patch adds the covhtml directory to gitignore, so it won't be
tracked by the Git (similar ignore has been already introducted in
Cinder, Nova and Neutron).

Change-Id: I4f06640d893e241bfdec23520271abb20b1dc91d
2015-02-26 12:50:23 +01:00
Kent Wang 959c55e2dd Prevents swap files from being found by Git
Since swap files can range from *.saa to *.swp, all of these extensions
are now ignored by Git.

Change-Id: I373a98b47002f7eede52b7091dde6ad820b8dfc3
Closes-Bug: #1255865
2015-02-19 07:59:34 -08:00
Inessa Vasilevskaya 36d3c5222a vim ropeproject directories added to gitignore
Change-Id: I9270098ed618672233441e0bcb3693917060d872
2014-11-05 16:44:33 +04:00
Mike Fedosin 75d96295e4 Ignore Eric IDE files and folders in git
Change-Id: I2871707b6a2500a1d955de11381bfec54ead331a
2014-10-29 13:43:54 +03:00
ling-yun 4f0956c41b ignore .idea folder in glance
If we use JetBrains PyCharm as python develop tool, JetBrains PyCharm
would automatically generate its config folder name .idea in the root
dir of your python code.
Many Code projects, such as nova and cinder, have ignore .idea folder.
Project glance should also ignore .idea folder.

Change-Id: I1e3ba1936c8b918aa4669c2d7fceac23a23ca974
Closes-Bug: #1362451
2014-08-29 08:04:48 +08:00
Zhi Yan Liu d7f1221684 Switch to testrepository for running tests
OpenStack as a whole is moving towards using testrepository and
testtools for running tests. To that end, bring Glance into line by
switching it to use testrepository to run tests.

This copies run_tests.sh and tools/colorizer.py from Nova.

This change also has some minor changes to make run_test.sh work well.

Partial fixes bug: 1179009
Fixes bug: 1271806

Change-Id: Ic265bc0d2f1528358f6e8ee5b4139f991923fc72
Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-01-29 08:30:55 +08:00
Luis A. Garcia ff35e28d23 Add eclipse project files to .gitignore
Like some of the other projects (nova, heat, oslo, cinder) git ignore
eclipse project files. This will remove manual steps for people
developing from eclipse.

Change-Id: Ib908c8d419072b440f5ec647bea8f13b97e48f7c
2013-11-26 16:40:32 +00:00
Jenkins 08113deeee Merge "add doc/source/api in gitignore" 2013-07-30 20:32:30 +00:00
Kun Huang 55cb5af076 add doc/source/api in gitignore
Some files are created after running 'python setup.py build_sphinx'.
These should be ignored by git

Change-Id: I89d671d84294169dac5aacf18800ab805605aa9f
2013-07-22 18:41:28 +08:00
Doug Hellmann 9f9f01bf88 Ignore files created by Sphinx build
Change-Id: I46f34d9320ce39977facff705c52d272a160220f
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2013-07-05 16:10:21 -04:00
Monty Taylor 014d3f9ee3 Move to tag-based versioning.
* Update to latest openstack-common setup code
* Add openstack-common version module

Change-Id: Id6876b55554c358fbd29e7ef8377f42a72a98301
2012-08-12 16:10:03 +00:00
Monty Taylor 66108d0e48 Fix coverage jobs. Also, clean up the tox.ini.
Change-Id: I85e8f1b190e2c5f598ae76f2920dfbe7c4ed1500
2012-06-04 15:29:26 -04:00
Brian Waldon eb4aaa97bd Split noauth context middleware into new class
Use UnauthenticatedContextMiddleware in the case that you want to deploy
without an auth service. ContextMiddleware is now solely for authenticated
requests.

* Rewrite ownership tests for adding/updating images through the v1 API
* Fixes bug 992859

Change-Id: I608671aac8300c9195769542708708afda991e04
2012-05-03 09:00:07 -07:00
Bhuvan Arumugam f4ce37b9c2 Auto generate AUTHORS file for glance.
Bug: 976267

Now that git commits are gated by CLA, we shouldn't enforce
committers to add an entry in AUTHORS file. The AUTHORS file
should be generated automatically, based on git commits.

This commit fixes the problem.

* Authors
  Remove this file. To be consistent with other projects,
  the new file AUTHORS is generated automatically.

* .gitignore
  Add AUTHORS file.

* glance/common/setup.py
  generate_authors(): New method to create AUTHORS file. If
  AUTHORS.in file exists, append it's content to AUTHORS file.

* setup.py
  Import the new method.
  local_sdist.run(): Generate AUTHORS file before creating the
  package.

* MANIFEST.in
  s/Authors/AUTHORS

* glance/tests/unit/test_misc.py
  AuthorsTestCase: Remove this class that test an entry in
  Authors file.
  parse_mailmap(), str_dict_replace(): Remove these methods.

Change-Id: If83c3fe9b2142342ac11cc019bc24926f52ee753
2012-04-30 19:44:43 -07:00
Monty Taylor eea25b4149 Prep tox config for jenkins builds.
Change-Id: Id81588d3a2aabc0931d5bf12f078d8f770305e69
2012-02-06 08:31:49 -08:00
James E. Blair 37fc2b00c0 Rename .glance-venv to .venv.
This simplifies a number of Jenkins jobs which currently, other
than directory names, could be the same for all OpenStack
projects.  By renaming the virtualenv directory, the redundant
Jenkins virtualenv build and copy jobs can be eliminated.

Change-Id: I7916783d863e5184bad8293c3aed5ba119e374a9
2011-12-05 13:09:22 -08:00
Kevin L. Mitchell 9385a39bec Additions to .gitignore
Installing or testing glance adds several files that are not currently
ignored by git, leading to cluttered displays of modified files.  This
causes the 'build', 'dist', and 'glance.egg-info' directories to be
ignored, reducing the clutter.

Change-Id: I3f0ca3f99fcf6cfe0480fbf5755908ee411552ea
2011-10-13 13:09:35 -05:00
Jay Pipes 53db059772 Refactoring/cleanup around our exception handling
Fixes LP Bug #820643 - import_class() does not
report original exception.

* Makes ALL exceptions now use base exception class
* Removes unused exception classes from Nova
* Removes unused code in glance.common.utils
* Adds unit tests for bool_from_string and import_class

Change-Id: If6775eb3ce85390bc5d579dff6c59c6066e77e9b
2011-10-11 11:54:20 -04:00
Jay Pipes 72e2e31fea Add @skip_if_disabled decorator to test.utils and integrate
it into the base functional API test case. The S3 functional
test case now uses test_api.TestApi as its base class and
the setUp() method sets the disabled and disabled_message
attributes that the @skip_if_disabled decorator uses.

The S3 test case now tests all the methods that are tested
for the filesystem store driver in test_api.TestApi

Removed the test.functional.test_s3.conf file as it was no
longer needed.

Change-Id: I308d7a655c8c26339d0e2560634421935bbc8b5d
2011-08-08 12:56:30 -04:00
Justin Shepherd 486deeabd6 Implemented @utils.skip_test, @utils.skip_unless and @utils.skip_if functionality in glance/test/utils.py. Added glance/tests/unit/test_skip_examples.py which contains example skip case usages.
Fixed issue where ./run_tests.sh would not execute pep8. Fixed couple of pep8 violations in test_skip_examples.py

Change-Id: Id6eaa8768b663b4638fbca0e3bdf72b74969150a
2011-08-04 11:39:14 -05:00