heat/heat_integrationtests
Pavlo Shchelokovskyy 454a7b0ec1 Add resource_type-specific policies
Heat's `policy.json` now can contain policies of the following schema:

  "resource_types:<resource_type>": "rule"

This will allow cloud admins to control resource access utilizing
user roles, names, tenants and any other oslo.policy-supported rules.

Basic usage is to facilitate fail-early for stacks with resources
that a given user will not be able to actually create
due to role restrictions.

Default policy is 'allow to everyone' (who has passed previous policy
checks on REST API layer).

Resource types that the user will not be able to use due to
resources policy restrictions are hidden from `resource-type-list`.

Current operations that are prohibited if the user
does not pass policy check for a particular "forbidden" resource:
- show resource type for forbidden resource type
- show resource template for forbidden resource type
- create a stack containing a forbidden resource
- delete a stack containing a forbidden resource
- update a stack that already has a forbidden resource
- update a stack initroducing a new forbidden resource
- restore a stack snapshot to a stack that currently has forbidden
  resource
Not yet prohibited, need to be fixed:
- restore a stack snapshot that will create a forbidden resource

As first step (and for testing purposes) OS::Nova::Flavor is forbidden
to create for non-admin users. Simple functional test using this
resource is added.

Change-Id: I337306c4f1624552a2631e0ffbb43f0d3102813d
Implements blueprint conditional-resource-exposure
2015-08-25 15:37:26 +03:00
..
2015-07-17 11:01:31 +00:00
2015-08-17 19:45:59 +02:00

Heat integration tests

These tests can be run against any heat-enabled OpenStack cloud, however defaults match running against a recent DevStack.

To run the tests against DevStack, do the following:

# source DevStack credentials

source /opt/stack/devstack/openrc

# run the heat integration tests with those credentials

cd /opt/stack/heat

tox -eintegration

If custom configuration is required, copy the following file:

heat_integrationtests/heat_integrationtests.conf.sample

to:

heat_integrationtests/heat_integrationtests.conf

and make any required configuration changes before running:

tox -eintegration