Oslo.config deprecated parameter enforce_type and change its default
value to True in Ifa552de0a994e40388cbc9f7dbaa55700ca276b0. Remove
the usage of it to avoid DeprecationWarning: "Using the 'enforce_type'
argument is deprecated in version '4.0' and will be removed in version
'5.0': The argument enforce_type has changed its default value to True
and then will be removed completely."
Change-Id: I91b0f0a52b5ce8654702510eed76d5dea8cc8fe4
Related--Bug: #1517839
As of mitaka, the infra team won't have the resources available to
reasonably test py26, also the oslo team is dropping py26 support
from their libraries. sine we rely on oslo for a lot of our work,
and depend on infra for our CI, we should drop py26 support too.
Change-Id: I103ab61e29647e5830597343c6fbbbd3b9907afc
Closes-Bug: 1519510
Class Properties overwrites the __getitem__ method,
1. to raise KeyError if the key is an invalid
property, then the default value is return in supper.get() method
2. if the key is a valid property, the default value won't be
returned by using the format:
self.properties.get(key, default_value)
This patch changes to the format as following for case2:
self.properties.get(key) or default_value
Also, if the property is required or has default value in schema,
let's use self.properties[key] instead.
Change-Id: I2f546c69aa128c9aa6240ebd065df18a799b754d
Now if extension is not available, user gets
message 'Service endpoint not in service catalog'
which is incorrect. Patch corrects this behavior
and adds improved messages with more info.
Change-Id: I9b6c0d2921519590ef105be35e31db29cd1e3ecc
in heat/contrib/rackspace/rackspace/tests/test_auto_scale.py:270:
mock nova and glance client methods to satisfy contraints, contraints should be constraints
in heat/heat_integrationtests/functional/test_resource_group.py:51
triggering validation of nested resource custom contraints, contraints should be constraints
in heat/heat/common/exception.py:258:
"""Keep this for AWS compatiblility.""" compatiblility should be compatibility
in heat/heat/engine/resources/openstack/ceilometer/alarm.py:349:
1) so we don't create watch tasks unneccessarly , unneccessarly should be unnecessarily
in heat/heat/engine/resources/openstack/neutron/vpnservice.py:462:
The Internet Key Exchange policy identifyies the authentication and , identifyies should be identifies
in heat/heat/engine/resources/openstack/nova/server.py:1426:
if 'security_groups' present for the server and explict 'port' , explict should be explicit
in heat/heat/engine/service.py:182:
releasing the lock to avoid race condtitions. condtitions should be conditions
in heat/heat/engine/sync_point.py:134:
don't aggresively spin; induce some sleep, aggresively should be aggressively
in heat/heat/tests/openstack/heat/test_software_deployment.py:889:
Test bug 1332355, where details contains a translateable message, translateable should be translatable
in heat/heat/tests/test_environment.py:596:
make sure the parent env is uneffected, uneffected should be unaffected
in heat/heat/engine/resources/openstack/nova/server.py:472:
'ignorning it or by replacing the entire server.'), ignorning should be ignoring
in heat/contrib/rackspace/rackspace/resources/cloud_server.py:104:
'retained for compatability.'), compatability should be compatibility
in heat/heat/engine/stack.py:1258:
" ID %(trvsl_id)s, not trigerring rollback."), trigerring should be triggering.
Change-Id: Ic4ddb65dbfaf61751a330b853780689209f9f4b5
Closes-Bug: #1595376
Heat makes a lot of variations to the basic oslo.context which are going
to make it very hard to reuse with features added to the base
oslo.context.
There are a number of changes here that will make the heat context
options more like those from oslo.context.
*) context.user and context.tenant are IDs, not names. This will be
important for policy credentials.
*) kwargs should be passed through to base context so it can be extended
in the base class.
Change-Id: Ib0d60c6af196ba5c00459110b7a6190cff916d6f
In Python3, dict.keys() returns a view object rather than a list. This
behaves differently in that changes to the dict also modify the view, and
in that the view type interacts with various operators in different ways to
lists.
One universally correct transformation to preserve Python2 behaviour in
Python3 would be to replace all instances of d.keys() with
list(six.iterkeys(d)), and indeed we did. However, like many automatic
transformations the results are usually unsightly, invariably inefficient,
and frequently absurd. Not least because list(d.keys()) and indeed list(d)
are also equivalent.
This patch changes to using the simplest correct method of accessing the
data we want in each case.
This reverts or rewrites most of commit
4ace95ad47da7099191a06325c5d0b156fd54894.
Change-Id: Iba3cf48246d8cbc958d8fb577cd700a218b0bebf
Custom Cloud Server images do not have the 'flavor_classes' key in
their metadata, so try to get it from the base image. If
'flavor_classes' is empty or does not exist, skip image/flavor
validation.
Closes-Bug: #1570087
Change-Id: I44fd02c689ba0c06ba571d04e9baf0eb0ce035ff
Eliminate from the unit tests the deprecated use of a ResourceDefinition as
if it were a snippet from a CloudFormation template, in preparation for
this being removed in future.
Change-Id: I0449d3bff19c1294a9d0a475a4a9b623c73e11db
Remove the last few instances of treating a ResourceDefinition as a snippet
of a CloudFormation template (rather than using the API) in various
resources.
Change-Id: I7266385121530b76d1955e466b3d51fae860a5ee
Now that we have an API for determining the difference between resource
definitions in Heat, use it instead of treating the tmpl_diff argument to
handle_update() like a diff of snippets from a CloudFormation template.
Change-Id: Ib54ff610065ad8d4eabc7d6a45213fde93e425c8
This makes sure that type checking is done by oslo.config
on the test override values.
Change-Id: Ia8c1cb55fe98e9d06b9b9ff13e5c2d25aa67bff3
Closes-bug: #1517839
This changes OS::Nova::Server resource to use
translation rules to resolve name_id properties.
As most of the tests in test_server.py and
test_rackspace_cloud_server.py are impacted by this
change, this also changes all the tests to use mock
library. Though the change is very big, it's mostly
mox to mock conversion for the tests.
This reduces the LOC drastically. Some of these test
modules have become very big to manage. We can split
them into smaller ones in the future.
Change-Id: Iaa630ab3b013dfb65e9131b1f265e846c8274037
Partial-Bug: #1514680
Blueprint: mox-to-mock-conversion
The image and flavor used to build a Rackspace server must
satisfy certain properties to successfully build the server.
This patch adds Rackspace Public Cloud specific validation
to enable such checking so that invalid combinations are
discovered before the start of stack creation.
Change-Id: I2f676b5c06190ddc1077c13bbe3482a23d1d01fd
Co-Authored-By: Anna Eilering <anna.eilering@rackspace.com>, Jason Dunsmore <jasondunsmore@gmail.com>
To avoid the InvalidTemplateReference exception when resolving
get_resource functions for resources that are in the sub-template but
not the parent template.
Change-Id: I985b58ff95efbc7926cec708d2b37d8ce95c3390
Ensure config_drive is enabled automatically if
the user data format is SOFTWARE_CONFIG. Also,
limit the choices for transport and format to
only those supported at Rackspace.
Change-Id: Ia8bb09d991843860a8f0cfb73453b789fde28afd
The oslo.utils.reflection.get_class_name() handles more variations
of where a class name may come from (on) python 2 and python 3.
Its usage allows getting more accurate class names so we'd better use it.
Change-Id: Iff0e109a558d0185f126781369bac216da930bca
Rackspace AutoScale Groups now support a "launch_stack"
launchConfiguration type. This adds support to the
Rackspace::AutoScale::Group resource.
Change-Id: I20d2d9d4f317d726ccbb21275984f096ba300767
This fixes a bug where the load balancer creation fails with this
error:
resource CREATE failed: BadRequest: resources.loadbalancer: Must
supply a unique access list item to update the current list. (HTTP
400)
Closes-Bug: 1541953
Change-Id: I5183b305a7bf2cef16e5e01e88fdb3f24aeb4be5
Without these defaults, the resource can get stuck in update until the
stack times out.
Change-Id: I58a5b70959e6107eefb4351d77315c0bceb9b717
Closes-Bug: #1539230
This is a resource for representing a single node of a Load Balancer.
It has the ability to drain the connections off of a node before
deleting it.
Change-Id: Idfdce6c078e51f43e368a642a9c116565f3352b4
Use get interface and custom find functions to look for
images by id/name. Find interface is now implemented in
the client plugin itslef, as glanceclient v2 does not
support it. Once it's implemented in galnceclient v2,
we can leverage images.find interface directly.
This also leverges openstack.common.apicient.exceptions.
Change-Id: Ibf85495b9d5533c759c4e63284806f11e6e45413
It is preferred to wrap long lines in parentheses and not a backslash
for line continuation due to OpenStack Style Guidelines
http://docs.openstack.org/developer/hacking/#general, paragraph 2
Change-Id: Ibfc1022f8e4704fe2040e63bb87322404cea35a4
Currently, only Rackspace CloudLoadBalancers are supported by
the ASG resource.
Also update the requirements to use fork of pyrax that is
maintained by the Rackspace heat team.
Closes-Bug: #1525391
Change-Id: Iabb52b2a34f1c2a434e724b9a70e4b948e4d0d37
There are a few places where duplicate keys are defined in the
dictionary. Removed all such occurrences throughout the code.
TrivialFix
Change-Id: I40cd400b26745927698584a8376971f9884acbf8
This patch uses 'flavors.find' to look for flavors rather than
finding them from 'flavors.list' output.
Change-Id: I48b058a6b01d941d2e0f362900d0c85bc7c71fbc