Move the setup/reset of the dummy DB into the test common base-class,
which ensures the setup/recent happens consistently (some tests setup
but then don't reset for example), and ensures there's always a clean
dummy DB per test.
Change-Id: I8e3bdd23399cb0d1d3c93daae66e6509b12b4e72
All existing resources use property schema, where all properties defined
before they will be used. So Docker resource should have same
definition.
Change-Id: Ie18204569a207f6f168f468446fb0151f309ea25
This adds a save_admin_pass property to indicate whether or not the
admin_pass should be persisted in heat. save_admin_pass is False by
default.
Implements: blueprint custom-adminpass (partial)
Change-Id: Iac59056abf2cf709ecb940b84c56d09fa3fbb7d4
This stores the admin password returned by nova() as an encrypted
property on the CloudServer to allow template authors to display them
as outputs of a stack.
Co-Authored-By: Anderson Mesquita <andersonvom@gmail.com>
Implements: blueprint custom-adminpass (partial)
Change-Id: Ic11f1ddcd114631b92f87d5760ab7a6761ba40e4
The problem is that the timeout for running any action (i.e. create or update)
on stack is not passed from parent stack to nested stack.
All heat resources which are internally implemented as StackResource are
affected. For example AutoScalingGroup always using default timeout
(60 minutes). If creating any of the instances will take more that it will
fail no matter what timeout you will pass creating stack.
Changes:
* removes hardcoded timeout (60 minutes)
* adds new config option to specify timeout for stack action
* if timeout was not specified for nested stack then timeout from parent
is used
* adds test for StackResource and parser.Stack
Change-Id: I39494b75774988c625cb22cc7873d628c04d3228
Closes-Bug: 1287719
At the current moment default value is used only during resource
creation. However It should be used during update too.
Change-Id: I385d48b65f475284c80d2678cf83ce9dae1d76e3
Closes-Bug: #1298850
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
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
The Rackspace CLB resource couldn't be used with resource groups
because nodes were individual IPs or references. This change
allows a node to have a list of ips for a given port, status,
etc so that references to resource groups can easily be added
to Rackspace CLB instances. Ref-based nodes were removed as they
aren't used.
Change-Id: Ia26a012758fb1cd0470c1c0edc27e61e77bd8f0a
Previously, it was difficult to know if the server was stuck in
CREATE_IN_PROGRESS or if it was waiting for another automation to
complete.
Change-Id: I988a12fc520629a78d8215d4a9c529729a302741
To improve compatibility between Keystone V2 and V3, this renames the
client @property in both of them from self.client_v2 and self.client_v3
to just self.client.
This allows both of them to be used by third party contrib plugins in a
seamless manner.
Closes-Bug: 1289528
Co-Authored-By: Richard Lee <rblee88@gmail.com>
Change-Id: I60412ecb1665232ffeeeb869fb00d368604601d2
This patch is one in a series to re-enable H306 style check rule
(imports are in alphabetical order). It touches contrib resources.
Change-Id: Icfe39ee206a70a25e78027a5d097d1208f8750cf
Implements: blueprint reduce-flake8-ignored-rules (partial)
There is a known issue with some Rackspace Cloud Server images where
they occasionally refuse SSH connections for a few seconds just after
becoming 'ACTIVE'. This causes the stack creation to fail.
To avoid this, keep trying to initialize the SSH connection for up to 30
TaskRunner cycles.
Closes-Bug: #1287331
Change-Id: Icf28fb3c0de21cf733c4dd0d28a7b653af1bcd0b
The cloud-init config is now in /etc/cloud/cloud.cfg.d/90_dpkg.cfg
instead of /etc/cloud/cloud.cfg.d/10_rackspace.cfg, and that caused bug
1285891 to resurface.
Change all files in /etc/cloud/cloud.cfg.d to make this somewhat
future-proof.
Change-Id: I65e2c0795952a5807783bf272061550a4a3447e0
Closes-Bug: #1288920
Closes-Bug: #1285891
The error message that occurs when the heat-script.sh or cfn-userdata
script runs doesn't include the IP address of the server, and it's not
possible to find that info in the stack-show output of a failed stack.
Add the IP address to the error message so it is displayed in the
stack-show output to aid in debugging.
Change-Id: I35bd4fbc1a05fa8207f3eb4f501f5becf78415c9
This codes aims to add support the ExtraRoute resources.
* Neutron Router ExtraRoute as OS::Neutron::ExtraRoute
* OS::Neutron::ExtraRoute is implemented in /contrib directory as plugin
* The resource can be enabled by setting plugin_dirs property in heat.conf
Co-Authored-By: Kevin Benton <kevin.benton@bigswitch.com>
(from https://review.openstack.org/#/c/41044/)
Change-Id: I27dabe42e6c96a475aa2f31b091616c89eef83a7
Implements: blueprint extraroute-as-contrib
Update Server, Instance, and CloudServer so that they use
nova_utils.refresh_server() instead of server.get().
Change-Id: Id65fabaa15c06ecf511c231888166eded00ba467
This adds the previous Keystone V2 client to be used as a plugin by
clouds that have not upgraded to V3 yet. This replacement also raises
NotSupported exceptions in methods that are V3 only.
Co-Authored-By: Richard Lee <rblee88@gmail.com>
Closes-Bug: #1274201
Change-Id: I97d3fe7e5ff52250c699c9b470d114e53888ef15
contrib/ directory does not follow any standards and will make it
harder to programmatically install plugins on devstack. The current
structure can also cause namespace collisions when loading them.
This moves all plugin modules to a folder with the same name under
their directory (e.g. contrib/rackspace/rackspace), allowing
requirements, readmes, and other files to be separate from the
actual code.
This also helps to avoid namespace collisions when loading all the
plugins, since all plugins will be under their namespace in the heat
package. Example:
heat.engine.plugins
heat.engine.plugins.docker
heat.engine.plugins.marconi
heat.engine.plugins.rackspace
Since plugin packages are now in a folder one level under contrib/,
testr.conf is also updated so that all plugins are discovered
correctly.
Co-Authored-By: Anderson Mesquita <andersonvom@gmail.com>
Related-Bug: #1271226
Change-Id: Ifc8e3ca388253be82471651737da5d399c7cfb98
This allows users to add the admin password as one of the template's
parameters so that nova servers are created using it.
Co-Authored-By: Richard Lee <rblee88@gmail.com>
Implements: blueprint custom-adminpass (partial)
Change-Id: I800601f95682ad23ce2e34c7168aec7ada8e03a5
Add NoCloud to CentOS cloud.cfg data sources and remove /var/lib/cloud
before re-creating it to ensure that everything is re-run.
Closes-Bug: #1285891
Change-Id: I3594488aaa2329102e987874730ef325074f95ed
Replace string concatenation of translated messages with string
interpolation operation, since the gettextutils.Message object
doesn't support the '+' operation, which will cause problem when
lazy translation is enalbed.
Change-Id: I2c8a271ef766ab0da81b1c320870bbc429f6207e