Commit Graph

13877 Commits

Author SHA1 Message Date
Tony Breeds ab8e888c69 Retire Packaging Deb project repos
This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: I604718b2ec740780a762c5c2dcc2cce0d317f55d
2017-09-12 15:38:51 -06:00
Jenkins 13f1f0d9fa Merge "Neutron resources observe reality implementation" 2017-07-25 15:09:13 +00:00
Jenkins 2ced86836e Merge "Only validate properties once during create resource" 2017-07-24 17:41:45 +00:00
Jenkins debcc1c0a7 Merge "Fix no message attribute in exception" 2017-07-24 17:32:17 +00:00
Jenkins aa5c44beeb Merge "Add CACHE_NONE for FloatingIP attributes" 2017-07-24 15:30:19 +00:00
Jenkins 0518e906ed Merge "Keep existing stack tags for patch update" 2017-07-24 13:52:51 +00:00
Jenkins 84321df087 Merge "Add Output definitions to StackDefinition" 2017-07-24 11:41:51 +00:00
Jenkins 2c863b95da Merge "Unit tests: Ensure StackDefinition is up to date" 2017-07-24 11:04:07 +00:00
Jenkins 6a42ff6c88 Merge "Unit tests: make tests more realistic" 2017-07-24 11:04:00 +00:00
Jenkins 444ca60d7f Merge "Check for circular dependencies in template validation" 2017-07-24 11:03:11 +00:00
ricolin a31bbe84a5 Neutron resources observe reality implementation
Add observe reality feature support to neutron resources.

implements bp get-reality-for-resources

Change-Id: Id4f73c968afe5e52b517e67001a25829d6d53f8b
2017-07-24 15:01:06 +08:00
OpenStack Proposal Bot ba41249edd Updated from global requirements
Change-Id: I5eaabb766b50deccf76bc45b237ab0bda0d24ffc
2017-07-23 18:58:04 +00:00
Zane Bitter 82721f8865 Add Output definitions to StackDefinition
Change-Id: I8356980d8687b2f1ffb4abe198adec8e70f00f69
Partially-Implements: blueprint stack-definition
2017-07-21 10:30:34 -04:00
Zane Bitter 6c87950521 Unit tests: Ensure StackDefinition is up to date
Update the resource data in the StackDefinition in unit tests where
required to simulate how the real code works, e.g. after creating or
updating a resource.

Change-Id: Ie4aad264b8a776a323dcfd1843357c5a7eac094e
2017-07-21 10:30:34 -04:00
Zane Bitter c0f281c142 Unit tests: make tests more realistic
In some tests the template we provide for the Stack does not match the
actual resources we are testing. This never happens in reality, and it
makes the tests brittle when other legitimate changes occur in the engine.
This makes the integration testing more realistic.

Change-Id: I777309f310e18f8a16b5ae675419d7eeeffa09ee
2017-07-21 10:30:34 -04:00
Zane Bitter 76aa7c87cb Check for circular dependencies in template validation
We ought to iterate over the dependency list in the validate_template call,
to check for any circular dependencies. This check was removed by
d12cbe7959 in order to avoid trying to
calculate implicit dependencies added by resource plugins (as e.g. many
Neutron resources do) at a time when we don't have sufficient data to do a
good job of it anyway.

However, the previous patch d12cbe7959 split
apart the calculation of explicit and implicit dependencies, so we can
easily do this while still checking for circular references in the
explicit dependencies. This patch splits the dependency calculation into
two phases - the first using only data available from the template, and the
second querying the resources for implicit dependencies.

Use strict_validate = False as the criterion for when to avoid calculating
implicit dependencies, since this corresponds exactly to when we don't have
enough data to do so.

Change-Id: I21c63dcc8d1cad20dbc237b472670753779b0ff8
Closes-bug: #1691575
2017-07-21 10:27:52 -04:00
Jenkins bdddeee602 Merge "Make standalone heat work with keystone v3" 2017-07-21 12:04:03 +00:00
Jenkins 224a83821a Merge "Fix _retrigger_replaced in convergence worker" 2017-07-21 10:53:03 +00:00
Jenkins a336742cb9 Merge "[api-ref] Correct config_id in url instead of in body" 2017-07-21 09:45:53 +00:00
Jenkins 94355d795c Merge "Fix subnet validate() for subnetpool resource ref" 2017-07-21 09:44:55 +00:00
ricolin 4a15c3387a Only validate properties once during create resource
While create a resource, we might retry to create or delete that resource.
Within every action properties validate was act as pre-function before
actually call any action. While the first creat run, if anything goes wrong
during property validation, a validation error will raise right away. Which
will definitely riase in the very first action run. But if it successed,
it still required to revalidate each time an action triggered (whatever is
creat or delete). This patch will ignore properties validate if it's not
the first create run.
Closes-Bug: #1691672

Change-Id: Ibf592a254a862613eddb77ea5933ec6ba0cd2d1a
2017-07-21 08:09:49 +00:00
Jenkins d85361bd9f Merge "Add validation of block_device_mapping_v2" 2017-07-21 05:32:29 +00:00
Jenkins 798f64ee91 Merge "Support 'permutations' for 'repeat' function" 2017-07-21 04:33:36 +00:00
Jenkins 9b56edc2b8 Merge "Allow only validate external resource template" 2017-07-21 02:20:54 +00:00
ricolin 7cbf528da5 Allow only validate external resource template
When we choose only validate resource template, and external resource
id was set, we should consider that external resource template is
valid (since we only required `external_id` from that resource
template format). So the result of this validate will be None
(template validate passed).
Closes-Bug: #1702977

Change-Id: I8b33c957a7185a0f52356f412b13609ba1a7b469
2017-07-20 13:16:38 +08:00
Zane Bitter 652af4bde3 Use placeholder data for resources prior to creation
When requesting the NodeData for a Resource, generate placeholder values if
the resource has not been created yet. Currently, all attributes are given
a value of None (consistent with how the get_attr intrinsic functions
substitute them when the resource state indicates that the attributes are
not valid now). Reference IDs are generated as usual (since the logic for
what to return when the state indicates the data are not valid is contained
in the resource plugins).

In future, this will allow us to add placeholder NodeData for all resources
to the StackDefinition prior to validation. In the long term, that should
help us to remove the state-checking logic from the intrinsic functions. In
the short term, it will allow us to validate template data that is parsed
against the StackDefinition (rather than the Stack), since it gives us a
list of valid attribute names. In the medium term, this should give us a
place to substitute in more sophisticated placeholder values to do better
validation.

Change-Id: Ife69f563a3748c6cb611ca02f826229e76bee4d0
Partially-Implements: blueprint stack-definition
2017-07-19 18:01:23 -04:00
Zane Bitter efd51f4525 Use stored properties values during signal
When we signal a resource, we want the signal to be interpreted in the
context of the properties of the resource as they were set at the last
stack update, not based on any attributes of other resources that may have
changed.

We already store the properties for comparison during updates. This patch
freezes the properties while we call handle_signal(), in a similar way to
how we freeze the properties during handle_update() (see bug 1584623).

Also make sure that when a ScalingPolicy adjusts an autoscaling group, it
also uses the group's stored properties so that e.g. the definitions of
existing members cannot change on a scale up.

Change-Id: I7e248ad82f2334b1a580655efa3a302e7d84fbd8
Partially-Implements: blueprint stack-definition
2017-07-19 18:01:23 -04:00
Zane Bitter 9a21b8a5f3 Use the stored property values of LaunchConfig
When we read from the LaunchConfig in order to e.g. scale up an
InstanceGroup or AWS AutoscalingGroup, we want to use the properties as
they were last set by a stack update. We don't want to re-resolve functions
using live data, since any changes would result in changes to existing
members when we generate the template for scaling up, and that can possibly
result in the replacement of said existing members.

Instead, use the property values that are stored in the database from the
last update. In the case of a stack update in convergence, we need to load
them when doing Stack.resource_by_refid(), since they're not included in
the cache_data.

Change-Id: I9da5efb2559f10b2dfe44281e2ba1e615a8c618b
Partially-Implements: blueprint stack-definition
2017-07-19 18:01:23 -04:00
Zane Bitter 0f5deef8bb Unit tests: Do assertions on stored properties data
When checking that a resource has been updated with the correct values,
look at the stored properties data rather than live resolving the current
properties.

Change-Id: I4b1a179be0b1e3e352d30f3ef6696180e11d0a70
2017-07-19 18:01:23 -04:00
Zane Bitter 65630d4e8b Handle non-existent resources in list during update
When showing the resource list during a stack update, the patch
5ce238fb17 inadvertently raises a KeyError
when a resource in the new template hasn't been created yet. This resolves
the problem.

Change-Id: If0784156211b21d8ef7047a7082d1b48e977252d
Related-Bug: #1703703
Closes-Bug: #1705170
2017-07-19 17:51:24 -04:00
Jenkins 51b5f6c18f Merge "Add unit tests for function 'index'" 2017-07-19 14:08:25 +00:00
ricolin 4ba0b5fe7f Fix no message attribute in exception
For py35, message attribute in exception seems removed.
We should directly get the string message from exception object
if message attribute not presented. And since get message attribute
already been deprecated. We should remove sopport on
exception.message after we fully jump to py35.
Partial-Bug: #1704725

Change-Id: I3970aa7c161aa82d179779f1a2f46405d5b0dddb
2017-07-19 13:48:39 +00:00
Jenkins 66638d38ba Merge "Fix handle_create of ResourceGroup" 2017-07-19 10:55:55 +00:00
Jenkins 6d86cce6cb Merge "Change tags type from 'string' to 'array'" 2017-07-19 10:07:12 +00:00
Jenkins 5e283bcf08 Merge "Always cache attributes in outputs in Resource.node_data()" 2017-07-19 08:28:06 +00:00
Jenkins d74bb6d146 Merge "Handle errors calculating dep_attrs for nested get_attr" 2017-07-19 08:16:06 +00:00
Jenkins 923d018274 Merge "Fix OS::Zaqar::MistralSubscription with mistralclient 3.0" 2017-07-19 03:56:59 +00:00
rabi 3d29db4c70 Fix subnet validate() for subnetpool resource ref
When a resource reference is used __getitem__() returns empty
string before a resource is created and the validation fails.
Check for None value instead which would be the case when the
property is not specified.

Change-Id: Ida4b32c3611d1638b9c0eb78cb2b31a32f112fa9
Closes-Bug: #1705052
2017-07-19 09:16:33 +05:30
Jenkins c6dfbd4cfd Merge "Updated from global requirements" 2017-07-18 11:15:19 +00:00
Jenkins f3f625b191 Merge "Don't load new copies of current resources" 2017-07-18 11:14:03 +00:00
Jenkins 67dc455dc9 Merge "Add tag for server nic" 2017-07-18 11:00:31 +00:00
Jenkins 17b9aae558 Merge "Cinder volume attachment attributes should not be cached" 2017-07-18 10:55:59 +00:00
rabi 1591acaf1f Fix handle_create of ResourceGroup
When doing a non-batched create we call create_with_template(),
where we pass `self.stack.timeout_secs()` as `timeout_mins` which
increases the timeout by 60 times.

Change-Id: I225ece0d8e4b6cb4eba2d3a748bd3ce5cda4f5c9
Closes-Bug: #1705009
2017-07-18 16:24:04 +05:30
huangtianhua ba7f7888f6 Support 'permutations' for 'repeat' function
Adds a new section 'permutations' for 'repeat'
function to decide whether to do nested loops
to iterate over all the permutations of
the elements in the given lists, the default value
is True if no specify and keep the same behavior as
before.
For example:

  repeat:
    template:
      network: %net%
      port: %port%
      ip: %ip%
    for_each:
      %net%: [n1, n2]
      %port%: [p1, p2]
      %ip%: [ip1, ip2]
    permutations: False

Will be resolve to:
   [{network: n1, port: p1, ip: ip1},
    {network: n2, port: p2, ip: ip2}]

Change-Id: I2a008400fb71453f6a78656f2e041ae2efa098a2
Blueprint: improve-repeat-function
2017-07-18 09:32:15 +00:00
OpenStack Proposal Bot 1c43ad659c Updated from global requirements
Change-Id: I7b20c28f362ecf0ef7952195fd8a5ef1c8b39a37
2017-07-18 08:53:58 +00:00
rabi 3ae539bbf9 Fix barbicanclient and glance upload issue
It seems for py35 job barbicanclient is installed from source.

Ib91e7049de007f4d4254abcd4c125b4dc7e03c55 has made some backward
incompatible changes.

This also changes to upload images using $IMAGE_URLS, so
the images are stored locally and then uploaded.

Change-Id: I9d3d9dabdfca0442bd17f93ce69ef9753049dc23
Closes-Bug: #1704725
2017-07-18 11:30:35 +05:30
Zane Bitter 02176a5811 Fix OS::Zaqar::MistralSubscription with mistralclient 3.0
Starting with python-mistralclient 3.0.0, the Client object no longer
has http_client as an attribute. Instead get it from the
ExecutionManager.

To ensure backward compatibility with earlier client versions, look for
either the HTTPClient or the Client as an attribute of the
ExecutionManager.

Change-Id: I507284727039476acfdb1c9c8a26a360edc42417
Closes-Bug: #1704883
2017-07-17 18:26:26 -04:00
rabi 923e2e2316 Make standalone heat work with keystone v3
- Fix authpassword middleware
- Pass user_domain/project_domain all through. user_domain
is required whenever authenticating a user with 'username'
and creating the 'password' auth_plugin.

Change-Id: I692639a16be42b755628695d89731aa23eb9221b
Closes-Bug: #1699418
2017-07-17 02:59:03 +00:00
Kanagaraj Manickam 1269de4b4a Add tag for server nic
It adds the support for tagging the server
nic.

Change-Id: I32d0c9634987106c2e9d7dd8587be03dcb9e64a1
Closes-bug: #1657669
2017-07-17 01:30:35 +00:00
Gerry Buteau 9269787d39 Cinder volume attachment attributes should not be cached
The Cinder volume 'attachments' and 'attachments_list' attributes are
dynamically built lists and must be queried from the Cinder API on each
request. There are several factors that may change the contents of this
list that are unknown to Heat.  Caching should be prevented for these
attributes.

Closes-Bug: #1703605
Related-Bug: #1703387
Co-Authored-By: Paul Bourke <paul.bourke@oracle.com>
Change-Id: I1a646e567b2d88f2acf09b3077c205c5b061d4bc
2017-07-14 12:53:52 +01:00