Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoftLayer: Added flavor option #56036

Merged
merged 4 commits into from Sep 24, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/ansible/modules/cloud/softlayer/sl_vm.py
Expand Up @@ -63,6 +63,10 @@
description:
- Amount of memory to be assigned to new virtual instance.
required: true
flavor:
description:
- Specify which SoftLayer flavor template to use instead of cpus and memory.
version_added: "2.9"
disks:
description:
- List of disk sizes to be assigned to new virtual instance.
Expand Down Expand Up @@ -263,6 +267,7 @@ def create_virtual_instance(module):
domain=module.params.get('domain'),
cpus=module.params.get('cpus'),
memory=module.params.get('memory'),
flavor=module.params.get('flavor'),
hourly=module.params.get('hourly'),
datacenter=module.params.get('datacenter'),
os_code=module.params.get('os_code'),
Expand Down Expand Up @@ -338,6 +343,7 @@ def main():
local_disk=dict(type='bool', default=True),
cpus=dict(type='int', choices=CPU_SIZES),
memory=dict(type='int', choices=MEMORY_SIZES),
flavor=dict(type='str'),
disks=dict(type='list', default=[25]),
os_code=dict(type='str'),
image_id=dict(type='str'),
Expand Down