4900 Commits

Author SHA1 Message Date
Pavlo Shchelokovskyy
a096144db7 Run pep8 check in run_tests.sh as in tox
Until now the flake8 tests run by tox and run_tests.sh were a bit
different - run_tests.sh was not checking heat-* python scripts in bin
folder and was checking the docs folder that is ignored in tox' pep8
check.

This patch brings pep8 style checking done by run_tests.sh in line with
what is done by tox (and thus the gate).

Change-Id: Ie3f2c25210075df6b941854737f0d926d141601b
2014-03-29 23:47:20 +02:00
Jenkins
3aaa843d1f Merge "Order imports in alphabetical order (8/9)" 2014-03-29 11:21:13 +00:00
Jenkins
17d8cca36d Merge "OS::Nova::Server depend on subnets related to nets" 2014-03-29 06:38:30 +00:00
Jenkins
ae89d172b4 Merge "Don't log exception for None timeout_mins" 2014-03-29 02:48:34 +00:00
OpenStack Jenkins
cfa9465b15 Merge "Imported Translations from Transifex" 2014-03-29 00:42:27 +00:00
Steven Hardy
7f9b8839b5 Don't log exception for None timeout_mins
If a request contains a timeout_mins key but it is None (which is
now the case for all requests sent via python-heatclient), we log
an exception, but really we just want to ignore the value and
continue (as well as other "None" values, ie '0' which was the
previous default for no key)

So split the test for a key and conversion to int, and only log
the exception if there is an error doing the type conversion,
not if we get a value which implies ignoring/doing nothing.

Change-Id: I6b8d1f053b47fd4c22a5df636481a95bd046b1df
Closes-Bug: #1297759
2014-03-28 13:25:43 +00:00
Jenkins
bc644814d9 Merge "Add docker network_gateway attribute" 2014-03-28 12:20:29 +00:00
Jenkins
0a6239f79a Merge "Display container ip not gateway IP" 2014-03-28 12:20:21 +00:00
OpenStack Jenkins
4ac4f94d35 Imported Translations from Transifex
Change-Id: I54d40a2c1d46c1f06e48034c52be5107bf80a62a
2014-03-28 06:09:44 +00:00
Jenkins
e1d48bafde Merge "Migrate invalid template version values" 2014-03-28 04:37:30 +00:00
Jenkins
0c7663b0b2 Merge "Validate that resource type is a string" 2014-03-27 23:47:41 +00:00
Thomas Herve
426fb774b8 Validate that resource type is a string
Raises a proper validation error when a non-string resource type is passed.

Change-Id: I1c84ee2bb1c7ff78802119e3321998b9d6487b2f
Closes-Bug: #1298548
2014-03-27 21:33:03 +01:00
Steve Baker
9d60559225 OS::Nova::Server depend on subnets related to nets
Nova supports creating network interfaces by network ID however
if the network and the subnet are part of the same stack as this
server then a race occurs between the creation of the subnet and
the creation of the server. Likewise for delete the subnet cannot
be deleted until all ports are removed from it.

This change adds the same add_dependencies workaround to
OS::Nova::Server that OS::Neutron::Port and OS::Neutron::RouterGateway
have.

The confirmation that this change fixes the race will be confirmed
by tempest test NeutronResourcesTestJSON once
https://review.openstack.org/#/c/82393/ lands.

Change-Id: I626b976446cda709d96823c9de331eafc29d3c68
Closes-Bug: #1243992
2014-03-28 09:08:48 +13:00
Steven Dake
b4f14d6e5f Migrate invalid template version values
If a stack was created with a template that specified an invalid time,
a variety of operations cannot be done on the stack, resulting in a
general breakage of Heat.  This patch migrates any occurances of version
numbers that are invalid that were specified prior to the merging of this
patch.  This patch also handles invalid version fields where a non-date
is specified or an invalid date was specified.

Change-Id: I5387ffb84dba5160103b3cb02f3d1cc5f352ff29
Closes-bug: 1296859
2014-03-27 12:35:00 -07:00
Jenkins
a393f810c9 Merge "Fail if non-existent security group referenced" 2014-03-27 19:01:46 +00:00
Jenkins
72c322d072 Merge "Fix using attributes in unittest" 2014-03-27 16:27:14 +00:00
Jenkins
d6e3e3a5b8 Merge "Fix heading markup in hot_spec.rst" 2014-03-27 15:40:20 +00:00
Zane Bitter
7246abab34 Fail if non-existent security group referenced
When using AWS::EC2::SecurityGroup resources with nova-network (not
Neutron), if a SourceSecurityGroupName was specified in a rule but the
name did not correspond to an extant security group it would be silently
ignored. This change ensures that any such error in the template will cause
creation of the security group to fail.

Closes-bug: #1291091

Change-Id: I9344451c83f4184ef46d4e9906b94abda08836df
2014-03-27 10:23:52 -04:00
Pavlo Shchelokovskyy
506d6940b1 Order imports in alphabetical order (8/9)
This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order).
It touches second half of tests (starting from test_n*).

Implements: blueprint reduce-flake8-ignored-rules (partial)
Change-Id: I5561d90a67eb5dc882200d432fda6b162011ac41
2014-03-27 12:45:17 +02:00
Sergey Kraynev
3028ac58ba Fix using attributes in unittest
Resource generic_rsrc.ResourceWithComplexAttributes does not have needed
attributes in attribute schema and should be replaced on
generic_rsrc.ResWithComplexPropsAndAttrs.

Change-Id: I5ac60e95fe88bb7a2b9f4a2b612e55561afccd0d
Closes-Bug: #1298204
2014-03-27 03:10:22 -04:00
Zane Bitter
29827230aa Update heat.conf.sample
A new version of python-keystoneclient has been released, with changes in
the options for the token auth middleware.

Change-Id: I04a725fac6dea8732533270828ad04f008142ab6
2014-03-26 19:15:29 -04:00
Jenkins
aa55d97c49 Merge "Fix creating docker containers" 2014-03-26 12:34:35 +00:00
Jenkins
f18bb8b5af Merge "Make OS::Nova::Server networks property updatable" 2014-03-26 01:05:38 +00:00
Jenkins
e70aade93f Merge "Change router's prop name agent_id to l3_agent_id" 2014-03-26 00:25:48 +00:00
Jenkins
d8d14ac2d6 Merge "Don't catch all exceptions in image constraint" 2014-03-25 23:02:28 +00:00
Sergey Kraynev
0baf8e6a6c Make OS::Nova::Server networks property updatable
This patch adds the ability to update the networks property.
Update process consists of two simple steps:
    1. detaching all old interfaces
    2. attaching all new interfaces.

Change-Id: Iaabf8be1adc6cb7d5ecc08edb92d9f9ce029b125
Closes-bug: #1250645
2014-03-26 11:14:30 +13:00
Jenkins
694635dd6f Merge "Revert "Add validation to KeyPair resource"" 2014-03-25 22:04:45 +00:00
Jenkins
74f4f8bd4b Merge "Add subnets as a dependency for router" 2014-03-25 21:44:35 +00:00
Thomas Herve
bd2d830074 Don't catch all exceptions in image constraint
Just catch ImageNotFound, as otherwise we can hide other problems.

Change-Id: Ib0e813043b1e4fe7b5b4a14ae8130ac17c4355a5
Closes-Bug: #1297349
2014-03-25 19:19:01 +01:00
Jenkins
b6795ea23e Merge "Don't create cloud-init user unless specified" 2014-03-25 17:17:04 +00:00
Jason Dunsmore
04e87178d6 Revert "Add validation to KeyPair resource"
This reverts commit 6124fdea6552145ec38817bbd409b81d717be1c2.

Nova Keypair validation doesn't work with stack-update.  Validation will
fail even if the Nova Keypair resource wasn't changed.

Change-Id: Iaa17e97ca7847c344aabd46f62ae3068cfbbe061
Closes-Bug: #1296747
2014-03-25 11:41:30 -05:00
Jenkins
ba5647c400 Merge "Store stack domain credentials for deployments" 2014-03-25 11:12:35 +00:00
Tomas Sedovic
b8eefd1de9 Don't create cloud-init user unless specified
When the the instance_user value from heat.conf is set to empty string/None and
the user doesn't specify Server's admin_user property, Heat will not create a
custom cloud-init user.

The instance_user config option and admin_user property are deprecated and will
be removed in Juno where this behaviour becomes the default.

AWS::EC2::Instance will still create a cloud-init user for CloudFormation
compatibility. In the absence of the instance_user config option, 'ec2-user'
will be used.

Closes-Bug: #1257410
Change-Id: I42dda36045f79be079b2030669284e9db71463d7
2014-03-25 05:01:11 -04:00
Chmouel Boudjnah
13afa377ff Add docker network_gateway attribute
We previously had it in network_ip attribute when that value should have
been the container ip. Add a new value called network_gateway giving
this information to the user.

Change-Id: I8ebfc576f4bbc470aa2d405e8b063932017904cc
Closes-Bug: 1296745
2014-03-25 07:56:24 +01:00
Mitsuru Kanabuchi
0eb5dc5de2 Change router's prop name agent_id to l3_agent_id
Currently, the OS::Neutron::Router supports associating the L3Agent via
"agent_id" property.

However, Neutron supports a few kind of agents(L3, DHCP and etc).
The property name of "agent_id" is little bit ambiguous.

It's nice to change property name "agent_id" to "l3_agent_id".

Change-Id: Ie3c90d703df81bbf9d541a7d7c08641eed9c8e2a
Closes-bug: #1296608
2014-03-25 15:07:17 +09:00
Jenkins
0d19394458 Merge "Reimplement DHCPAgent as net's property" 2014-03-25 04:28:43 +00:00
Jenkins
cfab65b298 Merge "heat is enabled by default in devstack now" 2014-03-25 02:29:06 +00:00
Jenkins
834ed62da9 Merge "Properly encode heat.common.exception in rpc" 2014-03-25 02:15:16 +00:00
Jenkins
1648f7a5cf Merge "Error and NotFound inherit HeatException class" 2014-03-25 02:10:58 +00:00
liudong
1ed544eb80 Add subnets as a dependency for router
Because router's external gateway depends on at least one external subnet,
so add subnets as an implicit dependency for the router.

Change-Id: Ib34636b440b3eee3993cd1030dab23312824510d
Closes-Bug:1279645
2014-03-25 09:14:02 +08:00
Jenkins
59855364b3 Merge "Document software config classes" 2014-03-25 00:49:36 +00:00
Sean Dague
d55235105c heat is enabled by default in devstack now
update documentation accordingly, as the previous first line is
no longer needed.

Change-Id: I9ececc394e05bc57f011b3508208f074908c7761
2014-03-24 20:20:24 -04:00
Jenkins
d63d9893ae Merge "Fix stack-show failed with a name in uuid format" 2014-03-24 23:54:45 +00:00
Steven Dake
9863fd4081 Properly encode heat.common.exception in rpc
Several types of exceptions can be raised inside heat.engine.service.
This patch ignores those which are in the heat.common.exception.py
file and encodes them into user errors.  Prior to this patch, only
some exceptions were properly encoded.  This patch assumes all
exceptions in heat.common.exception should be encoded in this way
in line with how oslo.messaging allows exmods to be specified.

Closes-Bug: 1287445

Change-Id: Ifb1901fbc32d574439e648643f49ae509d139aa7
2014-03-24 16:19:22 -07:00
Steven Dake
7c696555f0 Error and NotFound inherit HeatException class
In a previous commit, Error and NotFound were copied from
oslo.common.exception and then oslo.common.exception was
deleted.  the NotFound exception class was used throughout
the code base.  A more correct solution would have been to use
the correct HeatException base class for user errors.

Bug: 1287445
Change-Id: I2926cd70d60dbc4f04e18881b0be3fbcd9a0c407
2014-03-24 16:16:17 -07:00
Steve Baker
323ed2566c Store stack domain credentials for deployments
In order to allow stack domain credentials to be used for
deployment API operations, the stack_user_project_id needs to
be passed when a deployment resource is created and stored in the
database.

stack_user_project_id can then be used to compare to the context
tenant_id, just as for stack_get.

This change is needed since the blueprint hot-software-config and
blueprint instance-users landed at the same time. Some stack
operations can now be performed with credentials which are scoped
to a single resource. It would be very useful to allow these
credentials to be used for that polling for deployment metadata
too.

Closes-Bug: #1293234
Change-Id: Iea9d8bfe216d17fa2d3a9e9251102292be48486d
2014-03-25 09:08:43 +13:00
Steve Baker
66d701564c Document software config classes
These doc descriptions are used in the generated reference for
the template guide.

Change-Id: I2dcd3c53b274777d172ed0464ad09befd85f8426
Partial-Bug: #1294086
2014-03-25 09:08:43 +13:00
Jenkins
dcf02dc27b Merge "Refactor CLB to work with groups" 2014-03-24 17:14:57 +00:00
Chmouel Boudjnah
6c2ed29665 Display container ip not gateway IP
As described in the attribute schema of network_ip we want to show the
container ip and not the gateway ip.

Change-Id: I86a3c3476d04d437d7b6bb270d3178d0bc7e8136
Partial-Bug: #1296745
2014-03-24 15:50:12 +01:00
Chmouel Boudjnah
c6ea390d58 Fix creating docker containers
Due of an API change in the pydocker library we need to set the
privileges argument on start() and not on create()

Change-Id: Ie4c63c8d8104577d2766a5f74ac2bae9bf0e3468
Fixes-bug: #1296617
2014-03-24 14:48:05 +01:00