Fix the HeatTestCase import issue as required by H302,
a following patch of https://review.openstack.org/#/c/129846/
Change-Id: Iab9a508682e9fe2932b7d00b191c8a4cdea4738b
No need to set tabstop tons of times, this can be set in your vimrc
file instead.
Closes-Bug: #1229324
Change-Id: Ib859c0af8a29437540a0586dc0af77bb544ece23
Currently, Log translation is motivated by oslo's move to prioritized
translation of strings, as documented at
https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation
- add log translation hints for warning, error and info levels
- move from LOG.warning to LOG.warn
- remove use of % as a string formatter, use the log functionality
instead
Partial implements blueprint log-translation-hints
Change-Id: I8dbb5430507283038939b5665d67615c46b1f72e
Rackspace Cloud Files uses a UUID for the tenant ID, so move the code that
validates that part of the TempURL to the client.
Change-Id: I996fdc4b4b66e110066353d3b22ea3dab0535a5d
The Rackspace Cloud DNS TTLs have a minimum constraint of 301, but,
according to the API docs, the minimum is "300 seconds or more".
Change-Id: I924889f859de4226d5e7517576e40d1fdbba3064
Closes-Bug: #1380755
Since i18n.install() is deprecated, remove it from heat codes and
import i18n._() to where it needed.
blueprint oslo-i18n
Change-Id: Icefada18b5a33112b425cd90d31d3a6a5f06188a
There's references to the auth_token middleware in keystoncelient.
The auth_token middleware has been moved to keystonemiddleware and
the version in keystoneclient shouldn't be used anymore.
If these references aren't updated, then when options are changed in
keystonemiddleware.auth_token the heat-api will fail to start because
there's duplicate options in keystoneclient.middleware.auth_token.
Change-Id: I04573aa5ff967afe3e00329f797fcc71b779e7b3
Closes-Bug: #1379082
Rackspace Cloud Files uses a non-OpenStack account identifier in the
URL, so the Rackspace Swift client needs its own get_temp_url method.
Change-Id: Ic90c26fca0200f1fba74d50b6aa8a75f8bcd7ef6
Closes-bug: #1378979
Since stack-check has been accepted, this patch implements handle_check
for all Rackspace resources.
Implements: blueprint stack-check
Change-Id: Ibdeded33a32ddef07df572ce7d44b5a51afc5df7
Remove access to the Resource clients attribute and the unavailable
client import.
Change-Id: I36ac2fc4a55f9d5c2d1f4392fce93468fef42453
Closes-Bug: 1374101
Closes-Bug: 1374125
To get KeystoneClientV2 to work with StackUser resources, the
missing methods create_stack_domain_user_keypair and
delete_stack_domain_user_keypair have been added.
StackUser._create_keypair has also been modified to tolerate
having a missing id attribute, which is what the v2 API returns.
Change-Id: I9c19c1ca49f72ff1e760e849712c8c9d5fa7541f
Closes-Bug: #1372687
Added these missing properties and upgraded the client
library requirements to support them. This upgrade breaks
Swift compatability, but we don't need to override that
client any more anyway, so client registration for
Swift-via-pyrax is also removed.
Change-Id: I8e07092adf58da2a39330789fb170986176f47e3
Closes-Bug: 1336498
After this fix, the Heat keystoneclient plugin should pick up
the right region to authenticate.
Change-Id: I9bb5fe5fd767997b4118cf674a17de9f8be503fe
Closes-Bug: #1213291
The Docker plugin incorrectly implements the 'volumes_from' option:
- The property is marked as a string when it should be a list, and
- The property needs to be passed to start_container rather than
create_container.
Change-Id: I617a4d29a9edbb45d80c7b8abb8f87eeaf795a8b
closes-bug: #1364041
closes-bug: #1364039
handle_delete and check_delete_complete were not handling NotFound
exceptions
Change-Id: I6e8100ff37157f6a06837307cea31af66a3403af
Closes-Bug: #1296758
This directory was renamed in 4e8231, which made importing docker
(that is docker-py) difficult if not impossible in Python 2.x. So
rename it to something other than 'docker' to avoid that problem.
(setup.cfg has been modified with the new path)
Change-Id: I3cbb7c5d4b53f70e1dc6102881f8e05852341a9a
Related-bug: #1296758
Allows the user to specify the id of an existing
virtual ip rather than create a new one. This
allows devices listening on different ports using
the same ip addresses.
Change-Id: Ieba48abc0470cc5b596245efa51e9919ef37e0ca
i.e. stop using parser.Template
this imports the template module as "templatem" to avoid
namespace clashes with the many local variables called "template".
Change-Id: I97cc893f630e46589ee71fc73c6bbbcaa86b3a62
This removes resetting resource_id in delete, as the state is storing
that information properly, and it doesn't provide any additional value.
Change-Id: I71f17ab79adbad5286389c87f1fbd5c60c4a8d7f
Closes-Bug: #1358492
This moves the client creation code out of a Clients subclass into
its own client plugin.
Barbican is not an integrated project so the plugin is not registered
if barbicanclient cannot be imported.
The code which prevented client errors in _resolve_attribute from being raised
has been removed. This will prevent invalid attribute values from being
memoized.
The base package has been renamed to heat_barbican since stevedore
is used for client plugin loading and the base package will be
installed by setuptools, the package barbican might clash with
the actual Barbican project.
Change-Id: I5788fb4618fef0d1c3e39cc98094bb2813e842c5
This moves the client creation code out of a Clients subclass into
its own client plugin.
The base package has been renamed to heat_marconi since stevedore
is used for client plugin loading and the base package will be
installed by setuptools, the package marconi might clash with
the actual marconi project.
Change-Id: Ie824d961fcfa9dafd72cc40ccf207d1c1e0501ad
This change converts the rackspace client code to be contributed
via client plugins. This is the last change required for all in-tree
clients to be contributed via plugins.
A RackspaceTest base class which adds the rackspace directory
to the client plugins path which ensures any rackspace variants
are loaded. Plugin loading precedence is used to ensure rackspace
versions will override core plugins with the same name.
The nova plugin will fallback to returning the core nova client
so that CloudServersTest will run even when pyrax is not installed.
The cloud_backed configuration option will no longer have any effect
on whether rackspace clients will be loaded. Instead they will be loaded
by stevedore via the setup.cfg heat.clients entry point.
Change-Id: I312de40064cc00896dba1835117ff67003e57938
This change creates a pbr setup.cfg and specifies a data_files
entry to install the contrib plugin source into the /usr/lib/heat
plugin directory.
This change also temporarily disables docs building for contrib
resoures until the transition to stevedore is fully complete.
Change-Id: I1c91aee20f72dc2a5a049e67de1d6d7cbabda241
All uses of nova_utils functions have been migrated to using
the nova client plugin version.
Existing functions now have a deprecation warning which is
suppressed during nova_utils unit tests.
nova_utils.get_flavor_id was being called with the trove
client, so there is now a dedicated trove plugin method
get_flavor_id.
Change-Id: Ic8120022a1f9117c783f6422069f94614bcbb3c6
As the mock lib is going to be used more actively, there is a need
to improve our boilerplate code in respect to mock.
Changes in this patch include:
* `patchobject` now accepts kwargs and passes them to `mock.patch.object`;
* added `patch` method that uses mock.patch (similar to `patchobject`)
- NOTE: this shadows `testtools.TestCase.patch` method that uses
simple monkey-patching in favor of mock-based patching,
relevant comment added in the code;
* test code changed accordingly where needed.
Change-Id: I779cab63249d5eb1962e9ec388cd31f3df4a4189
According to https://wiki.openstack.org/wiki/Python3 dict.iteritems()
should be replaced with six.iteritems(dict).
Change-Id: I9e2881a006433c8b44a3caccebc73bae4973a041
When switching to oslo.i18n, tests where used str(exc) will failed
with unicodeerror, so before switching to oslo.i18n, need to
replace str with six.text_type where exception is used. And it's
recommanded to use six.text_type instead of str in openstack.
Change-Id: Ie37a6ef74a12b2580ce72afc75c99bcd19d4cf97