406 Commits

Author SHA1 Message Date
Jenkins
2b0ae3c079 Merge "Add integration tests for admin actions" 2016-06-16 04:23:12 +00:00
Jenkins
17b014db81 Merge "Authorize super admin actions on all projects" 2016-06-16 02:07:36 +00:00
Zane Bitter
c85cae58bf Fix test_update_restricted timeouts due to timestamp resolution
Updating a stack where the only resource needs replacement but is
restricted from being replaced is *very* fast. Since the test framework
relies on seeing a change in the updated_time timestamp, which has only 1s
resolution, it can easily be missed causing the test to timeout. This adds
a 1s sleep between updates that have the same expected status to ensure
that the timestamp changes.

Change-Id: Ief845a21108e925325b1b3e8f090038ccdf73b8e
Closes-Bug: #1554375
Related-Bug: #1583630
2016-06-14 18:39:51 +00:00
rabi
3b0f8ad21f Add integration tests for admin actions
Add integration tests for super admin actions.

Change-Id: I277f23800274729cf7128fdcb4521e4b221233cf
Partial-Bug: #1466694
2016-06-14 22:39:33 +05:30
rabi
ac86702172 Authorize super admin actions on all projects
This allows admin super user (user with admin role in admin_project)
to do stack operations across all projects.

Change-Id: Ifbf56fde02b89248ee788e6a212ef9d11e665dc0
Partial-Bug: #1466694
2016-06-14 22:16:25 +05:30
rabi
353178b4b2 Run orig jobs without convergence engine
We seem to be running all jobs with convergence
enabled. We should run the orig jobs without
convergence.

Change-Id: I0dfdc319c25e5eb1da15eea83b5e77ee44c44461
Depends-On: I775fe499546ae8adfd2a8a1c062b5754ab71b50c
2016-06-14 07:44:13 +00:00
rabi
406dd7faa2 Fix env passed to test_replace
We don't seem to be passing the right env to test_replace,
when we want to test with both update and replace restricted.

Change-Id: I895389c1727321f328e6b7bd7c712796257993f1
2016-06-13 12:04:10 +05:30
Thomas Herve
d9855dfe0b Fix tests on Neutron port behavior
Fix some integration tests checking port behavior, as the assumptions we
were making were wrong, and that changed recently.

Closes-Bug: #1591177
Change-Id: I4338eee40d092148831b3e20f8a42a1b3d3ea8bf
2016-06-10 22:35:24 +02:00
Anant Patil
4c54183621 Don't hard code subnet
Replace hard coded private-subnet with configurable heat subnet for
lbaasv2 functional test.

Change-Id: Ie1a3d9ce02da30dcfa67b9de76900807de8212df
2016-06-08 12:44:31 +05:30
Jenkins
e1a6c072a1 Merge "Migrate to nova api version 2.1" 2016-06-07 03:18:51 +00:00
Jenkins
bfff4e4fff Merge "Adds default policy rule for resources limited to administrator" 2016-06-06 05:18:45 +00:00
huangtianhua
a07dccebe0 Migrate to nova api version 2.1
The Nova v2 API code has been completely removed from Nova by
change[1]. Although Nova still supports v2 compatible API with the
legacy endpoint, it is better to switch to use Nova v2.1 in Heat.

This change sets version='2.1' when init novaclient
instance, then we can use novaclient v2 and will
use nova api v2.1.

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

Change-Id: I428abb4ca05847da8ffc2da7157aa5c34263a205
Closes-Bug: #1588155
Partial-Bug: #1588171
2016-06-06 01:32:48 +00:00
Jenkins
19dbf0119b Merge "Use keystoneauth1 instead of keystoneclient.auth" 2016-05-31 05:16:05 +00:00
Jenkins
4307bb0ed7 Merge "Add wait_secs to test_stack_update_from_failed_patch" 2016-05-28 10:11:57 +00:00
Thomas Herve
de96d030ff Fix resource loading in resource filtering
We try to be careful when filtering resources from stack, to not load
all of them, but unfortunately it breaks as soon as you have
dependencies with resources that are not returned. To be on the safe
side we need to load them all and filter them afterwards.

Change-Id: I399545a6a4fd77d9707505ec9c4058d384877dec
Closes-Bug: #1585931
2016-05-26 13:48:13 +02:00
Ethan Lynn
44862d9ac4 Use keystoneauth1 instead of keystoneclient.auth
keystoneclient.auth is deprecated, use keystoneauth1 instead.

Change-Id: Idf6daaccef8547755989140a91e4543cc94f9b58
Closes-Bug: #1554533
2016-05-24 20:27:23 +05:30
Jaime Guerrero
4c4301fbe0 Add wait_secs to test_stack_update_from_failed_patch
Add a 1 second pause to test_stack_update_from_failed_patch.  If a stack is
updated more than once per second, there is a possibility for busy waiting if
_verify_status neither returns nor raises an exception.

Please see
https://github.com/openstack/heat/blob/master/heat_integrationtests/common/test.py#L277
for _verify_status.

Closes bug: 1583630

Change-Id: Ifa9a5e9d69b47fe07fbc9ffcbe8f03479a24bb6c
2016-05-23 22:26:43 +00:00
Jenkins
93ce8e1d30 Merge "Removes duplicate code autoscale_complete" 2016-05-19 11:05:48 +00:00
Jenkins
688b20ce94 Merge "Remove unnecessary usage of stack_name" 2016-05-18 08:35:28 +00:00
huangtianhua
a52b821857 Adds default policy rule for resources limited to administrator
Adds default policy rule for resources which are limited to
administrator, to forbid non-admin to create these resources
at the very start.

Change-Id: I9e1ef86f0c44bce5bde3f9e26e1f2b9cb3aef06d
Closes-Bug: #1582187
2016-05-18 09:52:14 +08:00
rabi
7c17582a4b Remove unnecessary usage of stack_name
We don't need stack_name when we've the stack_identifier.

Change-Id: I296af464301705e653b3f80442c5dcfbf43ba728
2016-05-17 19:16:38 +05:30
huangtianhua
66b6490705 Set security_groups when create internal ports for nova server
Make sure nova server be created in correct security groups
if user specified subnet and security_groups when create/update
server.

Change-Id: Ic93cad4def90f3da25390d871d6a8c14ffe1c5ae
Closes-Bug: #1571975
2016-05-17 18:23:09 +08:00
Anant Patil
45d79cb9f5 Convergence: Un-skip functional test
Unskip the skipped functional tests when convergence engine is used.

Change-Id: I636fb4d6721f9f270ac981b43289b077bf318786
2016-05-16 10:07:53 +00:00
Rakesh H S
9561c540fa Removes duplicate code autoscale_complete
Function autoscale_complete will be required by many test
cases, hence moving it to common.

Change-Id: Ie0545ad35c6704bc86b26748ae99f9c66ca5a468
2016-04-28 15:38:09 +05:30
Thomas Herve
d815a06838 Fix properties usage in ResourceChain update
ResourceChain was using the old properties when trying to build the new
template in updates. Let's rebuild the properties so that it works
properly.

Change-Id: I5ba78995819ec2e1d398a02dad9979575bba05b1
Closes-Bug: #1571638
2016-04-19 17:15:58 +02:00
Rabi Mishra
354f1bcef0 Revert "Check RBAC policy for nested stacks"
This is causing issues with tripleo failures
with ValueError, when trying do stack-preview as
part of policy enforcement for stack DELETE.

This reverts commit a8accbba98b5fc15562864030f49d20570bf8412.

Change-Id: I366316f27f24c650bd435e67dd17abd8676cedf4
Closes-Bug: #1561172
2016-03-30 11:48:30 +05:30
Jenkins
ad72957108 Merge "Increase timeout of WaitCondition due to ConcurrentTransactions" 2016-03-29 10:50:49 +00:00
Sergey Kraynev
8f370d6174 Increase timeout of WaitCondition due to ConcurrentTransactions
Currently we have retry logic with random period of delay.
There is a chance, when we have several re-try attemts with maximum
timeout, so it can be a root cause of floating fails, when we have not
enough time for getting all signals.

Also decrease number of signals from 30 to 25, due to small risk, when
one of signals goes to ConcurrentTransaction error.

Note, that all these changes are made in corresponding functional test
and don't affect main code.

Change-Id: I9ca85c4378d0f62e316f4f40ff73597ffaaabadf
Related-Bug: #1497274
2016-03-29 09:01:38 +00:00
Jenkins
d48101f311 Merge "Add lbaas v2 scenario test" 2016-03-29 07:30:13 +00:00
Pavlo Shchelokovskyy
dd50ac6352 Create integration tests requirements on the fly
The problem of integration tests was that they use their own
requirements.txt that is unable to auto-sync with global requirements.

This patch removes dedicated requirements.txt and replaces it with a
stub file listing names (and possibly versions) of the packages needed.
Then a special script parses this stub file, and for every package
that is present in main project requirements files it pulls the versions
from main project requirements, generating and installing requirements
for the integration tests on the fly.

This will help keeping requirements for the integration tests always in
sync with main project requirements.

Change-Id: Ie79338cc10cc101fbf15b51c7923e3a7b8e4fbb4
Closes-Bug: #1490866
2016-03-25 13:40:50 +00:00
Mark Vanderwiel
7adce61612 Add lbaas v2 scenario test
Make use of the new lbaas v2 resources.
This is an experimental gate job.

Will use the lbaas v2 namespace-haproxy driver instead of octavia.  Octavia
requires nested vms which is very slow and causes timeouts in devstack gates.

Change-Id: I7ea6e50a1da46622bdddcfccaf82203f473bfacc
2016-03-24 18:19:24 +00:00
Jenkins
b3f7fcacb3 Merge "Use domain env variables as defaults" 2016-03-24 11:34:39 +00:00
huangtianhua
018bbd6a3c Add a new HOT template version for Newton
1. Add a HOT template version 'heat_template_version.2016-10-14'
2. Add Newton version '7.0.0' in doc

Change-Id: I8194adbe9a27f982a6b123dda78849d6e5b33eeb
2016-03-24 09:29:48 +08:00
Jenkins
9c9845e7f7 Merge "Fix race condition for WaitCondition with several signals" 2016-03-23 21:08:07 +00:00
Jenkins
bc0080d099 Merge "Use region from config in functional tests" 2016-03-23 18:47:14 +00:00
Rabi Mishra
55713b94bf Use domain env variables as defaults
Use OS_USER_DOMAIN_NAME and OS_PROJECT_DOMAIN_NAME
env variables as the defaults for keystone v3 in
integration tests.

Change-Id: Idb58431cf95988a91504ccac5116e0f8e339578f
Closes-Bug: #1560032
2016-03-23 13:48:03 +00:00
Rabi Mishra
cbed62355c Use region from config in functional tests
We seem to be using hardcoded region in some inline
templates of fucntional tests. They would fail if
the region name is different. This changes to use
it from the config.

Change-Id: Iafd1251545e00c6cba292b042352b1ef34da81e0
Closes-Bug: #1560585
2016-03-23 18:33:56 +05:30
Sergey Kraynev
cb3183d047 Fix race condition for WaitCondition with several signals
This fix is based on changes introduced in patch
Ibf9dd58a66a77d9ae9d4b519b0f11567977f416c.

Follow changes were done in this patch:
 - According previous item code for calculating metadata of
   wait_condition_handle was moved to separate method -
   normalise_signal_data().
 - Same method was implemented for BaseWaitConditionHandle class, which
   returns original signal data without changes.
 - handle_signal method for BaseWaitConditionHandle class was updated:
   * all code related with updating and verification metadata was moved
     to merge_signal_metadata internal method, which will be called from
     metadata_set method.
   * if/else block was changed to raise error in case, when metadata has
     wrong format, so else section was deleted.
 - corresponding tests for waitcondition resource, which expect several
   signals was added.

Change-Id: Ia25146a742ce79dbb0480d9053131216037e5305
Co-Authored-By: Zane Bitter <zbitter@redhat.com>
Closes-Bug: #1497274
2016-03-23 03:47:49 -04:00
Thomas Herve
90fc4fe89e Remove unknown parameters in patched update
When updating a stack with the existing flag, we keep the parameters
from the old template to be used against the new version. Sometimes
parameters will get remove and won't make sense anymore, and keeping
them would break update with a 'Parameter was not defined' error. This
filters out such parameters so that the updates succeed.

Change-Id: I6f2aa77da28d271dd001a137bb574b5470292f15
Closes-Bug: #1558610
2016-03-17 16:26:40 +01:00
Jenkins
991ce6d72c Merge "Fix race condition in reload_on_sighup functional" 2016-03-16 10:07:26 +00:00
Oleksii Chuprykov
a8accbba98 Check RBAC policy for nested stacks
This prevents stacks with forbidden resources start
to create/update or stuck in DELETE_IN_PROGRESS state,
if delete the stack with admin resources in nested stacks.
Also we need to allow get id of resource that in SUSPEND
state, because of we use stack preview in SUSPEND state.

Change-Id: I328891e62b4f4bcf620c52ef9d4d8ab60801a651
Closes-Bug: #1539145
2016-03-16 06:14:13 +00:00
Mark Vanderwiel
35703069f8 Add functional lbaas v2 tests
For lbaas v2, the scenario tests are on hold until bug:
https://bugs.launchpad.net/octavia/+bug/1557184 can be
resolved for octavia in devstack.

This patch will change the octavia drivers to no-op to
allow functional testing against the heat lbaas v2
resources.  These tests will run under 5 minutes.

Change-Id: I96890725d0b5c498815873b068613ab00f2cbac8
2016-03-15 13:37:48 -05:00
Peter Razumovsky
48387e92a0 Fix race condition in reload_on_sighup functional
Race condition appears in next situation:

  1. First thread calls _set_config_value for one section.
  2. Second thread calls _set_config_value for another section.
  3. First thread. Config option value set, calls
     open(self.config_file, 'wb'), which erases all file content.
  4. Second thread. In previous point moment second thread tries to
     set config option value to self.config_file, which is empty (see 3).
     So, NoSectionError exception raised.

This patch adds ten retries for setting option value, if NoSectionError
raised, i.e. try to wait until self.config_file is busy.

Change-Id: Ic54ea287ebe4724511f75d42677cae5dfdec4e57
Closes-bug: #1535766
2016-03-15 17:58:31 +00:00
Jenkins
e7df00f001 Merge "Convergence: Enable resource type aliasing test" 2016-03-14 13:56:53 +00:00
Oleksii Chuprykov
a7d63111a3 Fix stack preview
Don't execute translation rule for property that contains
a GetParam function that can't be resolved at the moment.
Such situation happens when we try to resolve get_param function
that refer to parameter with None value. We receive parameter value
from parent stack, where this value is a reference to some resource
without resource_id, so this situation is legal for stack preview
and we shouldn't fail. Note, that we can reproduce this behaviour
only with resources with hidden parameters and overrided  get_resource_id
method, that returns None if resoruce creation has not been started yet.

Change-Id: Ia1097940db983721c8b5116db7ee0a2c4c45339d
Closes-Bug: #1548802
2016-03-10 18:47:40 +02:00
Anant Patil
e5ea48629c Convergence: Enable resource type aliasing test
Enable functional test for testing resource type aliasing.

Change-Id: Ib81ba4726bcc04235aff724a6ae49d1793de0b09
Partial-Bug: #1512343
2016-03-08 06:53:19 +00:00
tyagi
96ef3fc4ca Heat integration tests failing against https endpoints
Provide ca_file option to pass the ca certificate to verify https
connection. Also pass verify parameter to the test cases which
directly call requests library methods.

Change-Id: I4a81047136d6a64b151180e95c254edea8165349
Closes-Bug: #1553898
2016-03-07 22:16:00 +05:30
Jenkins
e37e73e63d Merge "Fix error msg for wrong auth_url in functional" 2016-03-07 02:36:42 +00:00
Jenkins
4959f1879e Merge "Fix problems in unicode template support" 2016-03-06 06:06:00 +00:00
Jenkins
9345e1648f Merge "Use oslo.utils.reflection to extract class name" 2016-03-06 05:01:48 +00:00