173 Commits

Author SHA1 Message Date
Jenkins
ff3e5b9c97 Merge "Port all resources to new resource data methods" 2014-04-30 10:02:11 +00:00
Jenkins
e4f829671c Merge "tests make dummy db setup/reset consistent" 2014-04-29 09:23:40 +00:00
Steven Hardy
93d9594d7a tests make dummy db setup/reset consistent
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
2014-04-28 14:17:33 +01:00
Steve Baker
9bd4f3fcc5 Port all resources to new resource data methods
Change-Id: I9f7e984f5224cee16a2ffd3e9d6b118304766701
Related-Bug: #1306743
2014-04-28 17:01:28 +12:00
Alex Gaynor
69074f7512 Fix many typos
Change-Id: I2c4b04945dd44cec6d3b245ac00345da7e9ba1bf
2014-04-25 16:45:43 -07:00
Sergey Kraynev
2e0dbfaa03 Make Docker property schema similar with others
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
2014-04-21 02:23:55 -04:00
Jenkins
fe6ada0439 Merge "Update contrib docstrings to match guidelines" 2014-04-09 16:53:52 +00:00
Jenkins
d951d9eb58 Merge "Make the first line of every file consistent." 2014-04-08 08:51:07 +00:00
Ziad Sawalha
bbb41bfa5b Update contrib docstrings to match guidelines
Per http://docs.openstack.org/developer/hacking/
and http://www.python.org/dev/peps/pep-0257/

Without extra blank line in multi-line docstrings
based on http://lists.openstack.org/pipermail/openstack-dev/2014-February/028156.html

Blueprint: reduce-flake8-ignored-rules

Change-Id: I0050d382369d3013280f3d90df87fb530bc6c939
2014-04-07 22:47:57 +00:00
Richard Lee
629f5e2b2e Add save_admin_pass property to CloudServer
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
2014-04-07 13:29:11 -05:00
Richard Lee
4e7280cb77 Add admin_pass as attribute to CloudServer
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
2014-04-07 13:27:12 -05:00
Bartosz Górski
11571e1f86 Fix timeout for stack actions
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
2014-04-07 00:37:56 +00:00
Sergey Kraynev
fcecf91840 Using default value during update
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
2014-04-02 09:53:39 +00:00
Jenkins
c5ce19902d Merge "Add events for automation statuses to Cloud Server" 2014-03-31 03:32:58 +00:00
Jenkins
e6bbc4ef91 Merge "Add IP address to error message of failed stack" 2014-03-31 03:29:21 +00:00
Jenkins
2279fbfee3 Merge "Ensure that the NoCloud data source is loaded, part 2" 2014-03-31 03:29:18 +00:00
Jenkins
bc644814d9 Merge "Add docker network_gateway attribute" 2014-03-28 12:20:29 +00:00
Jenkins
0a6239f79a Merge "Display container ip not gateway IP" 2014-03-28 12:20:21 +00:00
Jenkins
aa55d97c49 Merge "Fix creating docker containers" 2014-03-26 12:34:35 +00:00
Chmouel Boudjnah
13afa377ff Add docker network_gateway attribute
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
2014-03-25 07:56:24 +01:00
Chmouel Boudjnah
6c2ed29665 Display container ip not gateway IP
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
2014-03-24 15:50:12 +01:00
Chmouel Boudjnah
c6ea390d58 Fix creating docker containers
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
2014-03-24 14:48:05 +01:00
Randall Burt
9509ce0960 Refactor CLB to work with groups
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
2014-03-13 14:37:22 -05:00
Jenkins
a22b4e45bd Merge "Order imports in alphabetical order (1/9)" 2014-03-13 19:08:10 +00:00
Jason Dunsmore
9c33d1f728 Add events for automation statuses to Cloud Server
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
2014-03-13 13:41:27 -05:00
Jenkins
5a876d2677 Merge "Retry logic for SSH connection in Cloud Server resource" 2014-03-12 19:20:33 +00:00
Anderson Mesquita
d96398aaa0 Improve compatibility between Keystone V2 and V3
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
2014-03-11 09:43:21 -05:00
Pavlo Shchelokovskyy
9877ea21be Order imports in alphabetical order (1/9)
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)
2014-03-11 15:42:51 +02:00
Jason Dunsmore
ffab714ff1 Retry logic for SSH connection in Cloud Server resource
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
2014-03-07 12:00:31 -06:00
Jason Dunsmore
2f85360fbc Ensure that the NoCloud data source is loaded, part 2
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
2014-03-07 11:02:45 -06:00
Jenkins
60caa26e1d Merge "Remove vim header from files." 2014-03-05 16:54:16 +00:00
Jenkins
00534e7a03 Merge "Add Keystone V2 plugin" 2014-03-04 20:26:53 +00:00
Jenkins
74acf5d757 Merge "Make server resources use nova_utils.refresh_server()" 2014-03-04 18:43:38 +00:00
Jason Dunsmore
f17afc6d22 Add IP address to error message of failed stack
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
2014-03-04 11:38:34 -06:00
Jason Dunsmore
af464c9afc Make the first line of every file consistent.
Change-Id: I2e1a809cfca8e88693551d58d33e747f54ee5eb1
2014-03-04 09:03:04 -06:00
Jason Dunsmore
97135cbfc0 Remove vim header from files.
Change-Id: Ia6131f8fcac6902c80c80aa805c8cd7a2a41f280
Closes-Bug: #1229324
2014-03-04 08:51:56 -06:00
Mitsuru Kanabuchi
897c7564d0 Implement OS::Neutron::ExtraRoute as /contrib
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
2014-03-04 14:21:17 +09:00
Jason Dunsmore
593fe2ec05 Make server resources use nova_utils.refresh_server()
Update Server, Instance, and CloudServer so that they use
nova_utils.refresh_server() instead of server.get().

Change-Id: Id65fabaa15c06ecf511c231888166eded00ba467
2014-03-03 19:33:18 -06:00
Anderson Mesquita
dc8d98dc6e Add Keystone V2 plugin
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
2014-03-03 15:22:43 -06:00
Richard Lee
805a73b1e7 Restructure contrib/ directories
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
2014-03-03 10:49:28 -05:00
Jenkins
66d97ab5f1 Merge "Add admin_pass as a property" 2014-03-03 11:54:39 +00:00
Jenkins
d83b616aa4 Merge "Implement glance image constraint" 2014-03-03 04:27:06 +00:00
Jenkins
fbecd4fdfa Merge "Change access to ceilometerclient" 2014-03-01 22:45:46 +00:00
Anderson Mesquita
1a642b671f Add admin_pass as a property
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
2014-02-28 14:30:13 -05:00
Jenkins
e8eddb87d3 Merge "I18N support for log message and attributes schema" 2014-02-28 18:26:27 +00:00
huangtianhua
6e5dfcfa1d I18N support for log message and attributes schema
The log message and attributes schema should support i18n.

Change-Id: Iea8a73ba8aabd3c12efe43cdda9188f9216f50de
2014-02-28 14:35:09 +08:00
Jason Dunsmore
2894b15602 Ensure that the NoCloud data source is loaded
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
2014-02-27 16:32:30 -06:00
Jason Dunsmore
c8f464ef34 Don't install cloud-init on Rackspace images
Cloud-init is installed by default on all images now.

Change-Id: I542531cddb5c5e647fdb69b4f126d18647c67098
2014-02-27 16:30:03 -06:00
Jenkins
9a8ffd1ef8 Merge "Replace '+' with string interpolation operation" 2014-02-27 20:17:38 +00:00
Liang Chen
5dab47b3e8 Replace '+' with string interpolation operation
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
2014-02-25 13:48:33 +08:00