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
The glance client plugin is a more obvious home for this sort
of function, and this change makes mocking of these functions
much easier since a mocked client is no longer needed.
To access the methods defined in the client plugin the method
Resource.client_plugin has been added. When all clients are
contributed by plugins then method Resource.client will call
Resource.client_plugin.
glance_utils can be deleted since it was only added at the
beginning of the Juno cycle.
The image constraint has also been moved to the glance plugin.
Change-Id: Id31ccd605411ca034addc67d8aadf7cea0904bfd
This deletes the region_name configuration option and replaces
uses with region_name_for_services.
There is no need for a different configuration option
for rackspace clients.
Change-Id: I6866026a0b9a1895b9b062e9c49e0fe54ec8e831
This adds the name, port_bindings and links properties to the docker
container resource which are passed to container creation and start.
This also removes properties which were never implemented.
Change-Id: I7320e3a95895b894cc53ebb77ebb220482f990c1
This moves the client creation code out of Clients._keystone() into
its own client plugin.
This is the last client to convert to a plugin, so supporting code
to fetch a client from a non-plugin has been removed.
In a later change it would be worth considering moving methods
in heat_keystoneclient.KeystoneClient into KeystoneClientPlugin
so that calling Clients.client('keystone') returns the actual keystone
client rather than a wrapper.
The barbican TestClient has been removed; it had limited practical
value since it mocked all of the internal calls of the method it was
testing.
Change-Id: Ie4a616d6a2b056fe59877e2bec325f02b6d7a693
This moves the client creation code out of Clients._neutron() into
its own client plugin.
Neutron is an integrated project, and python-neutronclient is a dependency,
so the import is now mandatory. Also any conditional code which skipped
if the neutron client was missing has been removed, since the presense or
absense of an installed neutronclient has no bearing on whether neutron
is installed on a given cloud.
Change-Id: Id9fdc50e80efe78731e21934ed9f2704cc3eb408
This moves the client creation code out of Clients._glance() into
its own client plugin.
Glance is a core project, and python-glanceclient is a dependency,
so the import is now mandatory.
Change-Id: If61f2510344bf67b7e9aded1dc9d9cedf2426228
This moves the client creation code out of Clients._nova() into
its own client plugin.
Raising nova exceptions has been moved to
heat.tests.v1_1.fakes.fake_exception since it is actually impossible
to directly create a nova exception object which works on both
novaclient 2.17 and (yet to be released) 2.18.
nova.exceptions.from_response is stable across novaclient releases
so all test exceptions are now raised using from_response.
Change-Id: Id68ff32c381c9c8c06f3712736d1888d1d0e8110
Mutables in the method params defaults might cause errors and
that's why it's anti-pattern in most of the cases and should be
removed.
Change-Id: I8bc284f12ce72082a0482410ec2c20c2fc087a4b
Closes-Bug: #1327473
This change deprecates access to methods like clients.nova()
replacing them with calls to clients.client('nova')
This allows the memoization to be done in one place (the client()
method) and also establishes the preferred API for accessing clients
that are contributed by plugins.
All calls should now be going through the new client() method.
Any calls to the old methods will result in a deprecated log
warning.
Change-Id: I3dc45aaed2655536ed1558e03f468b0733527815
To prevent this message from being logged during unit tests runs
or heat-manage calls, the following changes have been made:
* Make the instance_users deprecation warning use "warnings" and
move to engine init
* patch out warnings for engine tests
* do not log barbican or marconi if importing their clients fails
Change-Id: Icc4be26bf334a6ce31ad3b8fe9fd244cd9e37be2
Closes-Bug: #1333408