Commit Graph

39 Commits (f7558164b5e4b289efda6ea5673f3e113698b525)

Author SHA1 Message Date
Rene Moser 45845e0bdc os_server, doc: add version added for delete_fip
Also see #3509
8 years ago
David Shrewsbury 3979faf3e5 Allow os_server to delete FIP (#3509)
The os_server module could automatically generate a floating IP for
the user with auto_ip=true, but we didn't allow for this FIP to be
automatically deleted when deleting the instance, which is a bug.
Add a new option called delete_fip that enables this.
8 years ago
tonyqui e6fb933c3c Fixing a typo, floating-ips has been used instead of floating_ips (#3540) 9 years ago
David Shrewsbury aecec868d5 Pass wait/timeout parameters to floating IP APIs in os_server
If a server already exists when os_server is run, but a floating
IP was not assigned to the server when one was requested, the
module will attempt to add an IP to the existing server. But it
would not pass the wait/timeout params to the floating IP APIs.
If wait was True, you could get back a server dict that did not
show the floating IP because it did not wait.
9 years ago
David Shrewsbury 772d9eb88e Set type on floating_ip_pools in os_server
This has been expected as a list, so let's be explicit about it
so it will work correctly in 2.1 release.
9 years ago
Rene Moser de7ceacfcd openstack: os_server: add version_added for scheduler_hints
See #3172
9 years ago
David Hocky 5fb334e84b add explicit type for scheduler hints 9 years ago
David Hocky cda0ec85b4 port 'scheduler_hints' feature from nova_compute to os_server module 9 years ago
Brian Coca b9020155ee Merge pull request #2939 from Shrews/os_server
Fix for os_server module when specifying region
9 years ago
David Shrewsbury f71542ccf2 Fix parameters where type is assumed.
A change is coming to Ansible where module params will default to str.
Many of our modules were taking advantage of this by not being explicit
about the type, so they will break when that change merges. This hopefully
catches those cases.
9 years ago
Monty Taylor 5f925d061b Add user_data alias for userdata in os_server
The old nova_compute module called the parameter user_data - having an
alias to the old name is friendly.

Fixes Issue #2920
9 years ago
David Shrewsbury 092791dc2c Fix for os_server module when specifying region
Fix the OpenStack os_server module for when region_name is specified.
This should not be passed through to the shade create_server() call
as it's only used with the auth parameters.

Fixes bug: https://github.com/ansible/ansible-modules-core/issues/2797
9 years ago
David Shrewsbury e8abea25c7 Fix OpenStack module failure output
The exception message, when shade fails, will contain much more
specific information about the failure if the exception is treated
as a string. The 'message' attribute alone is usually not helpful.
9 years ago
Sam Thursfield 6e9adc4687 os_server: Add some error checking for the 'nics' parameter
If this parameter was not of the right type, the module would fail with a
traceback, with a "AttributeError: 'str' object has no attribute 'get'"
exception.

It now gives a proper error message on type errors.
9 years ago
Alberto Gireud 9cc67e45a6 Update root_volume variable 9 years ago
Toshio Kuratomi f04cd88d22 Fix os_server docs build 9 years ago
Donovan Jones cf061dd93a fix typo in os_server security_groups description 9 years ago
Monty Taylor 187a4bd505 Add support for network, boot_from_volume and volumes
nics is a great flexible parameter, but it's wordy. Shade now supports
a simple parameter too, which is just "network" and takes a name or id.
Add passthrough support.

In addition to supporting booting from a pre-existing volume, nova and
shade both support the concept of booting from volume based on an image.
Pass the parameters through.

Shade supports boot-time attachment of additional volumes for OpenStack
instances. Pass through the parameter so that ansible users can also
take advantage of this.
9 years ago
Lars Kellogg-Stedman b0c10a7d31 allow os_server to accept a list of security groups
This commit allows the `security_groups` parameter of the `os_server`
module to be either a YAML list or a common-delimited string (much like
the `nics` attribute).  E.g., this:

    - os_nova_server:
        [...]
        security_groups:
          - default
          - webserver

Or this:

    - os_nova_server:
        [...]
        security_groups: default,webserver
9 years ago
Lars Kellogg-Stedman 06098a9d69 fix handling of nics argument
The existing code was receiving a list of strings and erroneously
assuming it was being given a list of dictionaries, leading it to fail
with:

    AttributeError: 'str' object has no attribute 'get'

This commit corrects the list handling code to check the type of each
item and handle it appropriately.   Also, based on bcoca's comment
in #2253, thie code removes the special case for a string-only argument.

By transforming string arguments into dicts and then handling them like
any other dict argument, this also permits arguments of the form:

    nics: net-name=mynet

Or:

    nics: port-name=mynet

Previous versions of this code only supported `net-id` and `port-id` in
string specifications.
9 years ago
Monty Taylor 4590ba4e59 Make the auto ip parameter auto_ip
There was a parameter in the docs called 'public_ip' that didn't
actually exist. Additionally, auto_floating_ip is not consistent with
the underlying parameter which is auto_ip - for no good reason.

Add auto_ip as the real parameter, and then make public_ip and
auto_floating_ip as aliases for it for backwards compatability.

Fixes #2301
9 years ago
Toshio Kuratomi 3af0d509c5 Some docs fixes 9 years ago
Brian Coca 7b21bc7144 Merge pull request #2238 from dagnello/server_meta_string
Adding string support to metadata argument
9 years ago
Brian Coca f707a711cd doc fixes 9 years ago
dagnello 83a9f293fd Adding string support to metadata argument
This patch adds support to setting metadata key/value through a string
argument.  Variables can now be used for both the metadata key and
value.

example:
meta: "{{ var1 }}:SomeValue,key:{{ var2 }}"
9 years ago
Abitha Palaniappan e64791ef1a os_server: Adding support to accept 'n' nic args as a string containing list 9 years ago
James Cammarata b743224aa9 Merge pull request #1831 from tkinz27/os_start_stop
Adding start and stop actions to os_server_actions
9 years ago
Abitha Palaniappan f449a0f48c Add support for port-id,port-name to nics in os_server 9 years ago
Victor Costan 2cc431f791 Fix indentation in os_server documentation 9 years ago
Victor Costan 2ae37e7845 os_server: nice error when flavor not found
When we can't find the VM flavor that the user requests, this change replaces the non-descript stack trace with a clear error message.
9 years ago
James Martin c54f875fdd Adds sanity check to make sure nics is a list. 9 years ago
Tony Kinsley bd210e42bc Adding start and stop actions to os_server_actions
Also making the os_server module allow a server in the possible new
states from the os_server_actions changes
9 years ago
Jesse Keating ddc78c82a4 Document auto_floating_ip argument 10 years ago
Monty Taylor 5609d1dc5a Return resource objects from OpenStack modules
It's not uncommon for people to want to do additional things after
creating a module. Also, add a note about it to the dev notes.
10 years ago
Greg DeKoenigsberg 28a869a030 Updating cloud modules with proper github author information 10 years ago
Toshio Kuratomi 1f99382dfb Finish up cleanups to modules:
* Add python>= 2.6 to documented requirements when a module's deps need
  python>= 2.6 so we know when a module can use python2.6+ syntax
* Remove BabyJSON usage
* Change modules to use if __name__ == '__main__' so that they can
  potentially be unittested

The BabJSON changes Fixes #1211
10 years ago
Brian Coca a6eafb87c8 minor doc fixes 10 years ago
David Shrewsbury 28488f1b84 Update os_server for shade flavor API changes
Latest shade fixes the flavor API so that raw objects are not
returned.
10 years ago
Monty Taylor 3834680f43 Add OpenStack Server module
Also deprecated old nova_compute module
10 years ago