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
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
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
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
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
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
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
A new version of python-keystoneclient has been released, with changes in
the options for the token auth middleware.
Change-Id: I04a725fac6dea8732533270828ad04f008142ab6
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
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
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
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
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
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
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
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
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
These doc descriptions are used in the generated reference for
the template guide.
Change-Id: I2dcd3c53b274777d172ed0464ad09befd85f8426
Partial-Bug: #1294086
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
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