-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: vultr: convert legacy tests to targets (#50156)
- Loading branch information
Showing
78 changed files
with
210 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This is the configuration template for ansible-test Vultr integration tests. | ||
# | ||
# You do not need this template if you are: | ||
# | ||
# 1) Running integration tests without using ansible-test. | ||
# | ||
# If you want to test against the Vultr public API, | ||
# fill in the values below and save this file without the .template extension. | ||
# This will cause ansible-test to use the given configuration. | ||
|
||
[default] | ||
key = @KEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
5 changes: 5 additions & 0 deletions
5
test/integration/targets/vultr_block_storage/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_block_storage_name: "{{ vultr_resource_prefix }}-volume" | ||
vultr_block_storage_size: 10 | ||
vultr_block_storage_region: New Jersey |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
5 changes: 5 additions & 0 deletions
5
test/integration/targets/vultr_block_storage_facts/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_block_storage_name: "{{ vultr_resource_prefix }}-volume" | ||
vultr_block_storage_size: 10 | ||
vultr_block_storage_region: New Jersey |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 2 additions & 1 deletion
3
...legacy/roles/vultr_user/defaults/main.yml → ...argets/vultr_dns_domain/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright (c) 2018, René Moser <mail@renemoser.net> | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
--- | ||
vultr_user_name: john | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_dns_domain_name: "{{ vultr_resource_prefix }}-example-ansible.com" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
4 changes: 4 additions & 0 deletions
4
test/integration/targets/vultr_dns_domain_facts/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
dns_domain_name: "{{ vultr_resource_prefix }}-example-ansible.com" | ||
dns_domain_server_ip: 104.24.16.59 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 2 additions & 1 deletion
3
.../roles/vultr_dns_record/defaults/main.yml → ...argets/vultr_dns_record/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 2 additions & 1 deletion
3
...les/vultr_firewall_rule/defaults/main.yml → ...ts/vultr_firewall_group/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright (c) 2018, René Moser <mail@renemoser.net> | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
--- | ||
vultr_firewall_group_name: ansible-firewall-group | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_firewall_group_name: "{{ vultr_resource_prefix }}_firewall-group" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 3 additions & 0 deletions
3
test/integration/targets/vultr_firewall_group_facts/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
firewall_group_name: "{{ vultr_resource_prefix }}_firewall-group" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 2 additions & 1 deletion
3
.../roles/vultr_dns_domain/defaults/main.yml → ...ets/vultr_firewall_rule/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright (c) 2018, René Moser <mail@renemoser.net> | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
--- | ||
vultr_dns_domain_name: example-ansible.com | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_firewall_group_name: "{{ vultr_resource_prefix }}_firewall-group" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_network_name: "{{ vultr_resource_prefix }}_network" | ||
vultr_network_cidr: 192.168.42.0/24 | ||
vultr_network_region: New Jersey |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
5 changes: 5 additions & 0 deletions
5
test/integration/targets/vultr_network_facts/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
vultr_resource_prefix: "vultr_test_prefix" | ||
vultr_network_name: "{{ vultr_resource_prefix }}_network" | ||
vultr_network_cidr: 192.168.42.0/24 | ||
vultr_network_region: New Jersey |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 2 additions & 1 deletion
3
...gacy/roles/vultr_server/defaults/main.yml → ...on/targets/vultr_server/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
4 changes: 3 additions & 1 deletion
4
...oles/vultr_server_facts/defaults/main.yml → ...gets/vultr_server_facts/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
vultr_server_name: ansibletest | ||
--- | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_server_name: "{{ vultr_resource_prefix }}_vm" | ||
vultr_server_os: CentOS 7 x64 | ||
vultr_server_plan: 1024 MB RAM,25 GB SSD,1.00 TB BW | ||
vultr_server_region: Amsterdam |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 2 additions & 1 deletion
3
...acy/roles/vultr_ssh_key/defaults/main.yml → ...n/targets/vultr_ssh_key/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Copyright (c) 2018, René Moser <mail@renemoser.net> | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
--- | ||
vultr_ssh_key_name: ansible-ssh-key | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_ssh_key_name: "{{ vultr_resource_prefix }}_ansible-ssh-key" | ||
vultr_ssh_key: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEAyWYItY+3w5b8PdGRoz0oY5mufqydW96naE+VM3JSvJFAUS08rAjQQpQ03ymoALeHQy6JVZbcgecxn6p0pAOINQdqufn4udPtOPCtMjNiPGpkSM9ah/6X5+kvyWMNrvlf+Ld4OOoszP5sAkgQzIbrFQAm41XknBUha0zkewZwfrVhain4pnDjV7wCcChId/Q/Gbi4xMtXkisznWcAJcueBs3EEZDKhJ5q0VeWSJEhYJDLFN1sOxF0AIUnMrOhfKQ/LjgREXPB6uCl899INUTXRNNjRpeMXyJ2wMMmOAbua2qEd1r13Bu1n+6A823Hzb33fyMXuqWnJwBJ4DCvMlGuEsfuOK+xk7DaBfLHbcM6fsPk0/4psTE6YLgC41remr6+u5ZWsY/faMtSnNPie8Z8Ov0DIYGdhbJjUXk1HomxRV9+ZfZ2Ob8iCwlaAQAyEUM6fs3Kxt8pBD8dx1HOkhsfBWPvuDr5y+kqE7H8/MuPDTc0QgH2pjUMpmw/XBwNDHshVEjrZvtICOjOLUJxcowLO1ivNYwPwowQxfisMy56LfYdjsOslBiqsrkAqvNGm1zu8wKHeqVN9w5l3yUELpvubfm9NKIvYcl6yWF36T0c5vE+g0DU/Jy4XpTj0hZG9QV2mRQcLJnd2pxQtJT7cPFtrn/+tgRxzjEtbDXummDV4sE= ansible@example.com" | ||
vultr_ssh_key2: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoQ9S7V+CufAgwoehnf2TqsJ9LTsu8pUA3FgpS2mdVwcMcTs++8P5sQcXHLtDmNLpWN4k7NQgxaY1oXy5e25x/4VhXaJXWEt3luSw+Phv/PB2+aGLvqCUirsLTAD2r7ieMhd/pcVf/HlhNUQgnO1mupdbDyqZoGD/uCcJiYav8i/V7nJWJouHA8yq31XS2yqXp9m3VC7UZZHzUsVJA9Us5YqF0hKYeaGruIHR2bwoDF9ZFMss5t6/pzxMljU/ccYwvvRDdI7WX4o4+zLuZ6RWvsU6LGbbb0pQdB72tlV41fSefwFsk4JRdKbyV3Xjf25pV4IXOTcqhy+4JTB/jXxrF torwalds@github.com" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
4 changes: 3 additions & 1 deletion
4
...les/vultr_ssh_key_facts/defaults/main.yml → ...ets/vultr_ssh_key_facts/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
ssh_key_name: ansibletest-sshkey | ||
--- | ||
vultr_resource_prefix: "vultr_test_prefix" | ||
ssh_key_name: "{{ vultr_resource_prefix }}-sshkey" | ||
ssh_key_content: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+ZFQv3MyjtL1BMpSA0o0gIkzLVVC711rthT29hBNeORdNowQ7FSvVWUdAbTq00U7Xzak1ANIYLJyn+0r7olsdG4XEiUR0dqgC99kbT/QhY5mLe5lpl7JUjW9ctn00hNmt+TswpatCKWPNwdeAJT2ERynZaqPobENgvIq7jfOFWQIVew7qrewtqwerqwrewUr2Cdq7Nb7U0XFXh3x1p0v0+MbL4tiJwPlMAGvFTKIMt+EaA+AsRIxiOo9CMk5ZuOl9pT8h5vNuEOcvS0qx4v44EAD2VOsCVCcrPNMcpuSzZP8dRTGU9wRREAWXngD0Zq9YJMH38VTxHiskoBw1NnPz ansibletest@sshkey |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 2 additions & 1 deletion
3
...es/vultr_startup_script/defaults/main.yml → ...ts/vultr_startup_script/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Copyright (c) 2018, René Moser <mail@renemoser.net> | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
--- | ||
vultr_startup_script_name: ansible_test_script | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_startup_script_name: "{{ vultr_resource_prefix }}_script" | ||
vultr_startup_script: "#!/bin/bash\necho Hello World > /root/hello" | ||
vultr_startup_script2: "#!/bin/bash\necho Hello to my World > /root/hello" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
4 changes: 4 additions & 0 deletions
4
test/integration/targets/vultr_startup_script_facts/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vultr_resource_prefix: "vultr_test_prefix" | ||
startup_script_name: "{{ vultr_resource_prefix }}_script" | ||
startup_script_type: boot | ||
startup_script_content: "#!/bin/bash\necho Hello World > /root/hello" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
3 changes: 2 additions & 1 deletion
3
...es/vultr_firewall_group/defaults/main.yml → ...tion/targets/vultr_user/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright (c) 2018, René Moser <mail@renemoser.net> | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
--- | ||
vultr_firewall_group_name: ansible-firewall-group | ||
vultr_resource_prefix: "vultr-test-prefix" | ||
vultr_user_name: "{{ vultr_resource_prefix }}_user" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cloud/vultr | ||
unsupported |
4 changes: 3 additions & 1 deletion
4
.../roles/vultr_user_facts/defaults/main.yml → ...argets/vultr_user_facts/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/legacy/roles/vultr_block_storage_facts/defaults/main.yml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/legacy/roles/vultr_startup_script_facts/defaults/main.yml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
"""Vultr plugin for integration tests.""" | ||
from __future__ import absolute_import, print_function | ||
|
||
import os | ||
|
||
from lib.cloud import ( | ||
CloudProvider, | ||
CloudEnvironment | ||
) | ||
|
||
from lib.util import ConfigParser | ||
|
||
|
||
class VultrCloudProvider(CloudProvider): | ||
"""Checks if a configuration file has been passed or fixtures are going to be used for testing""" | ||
|
||
def __init__(self, args): | ||
""" | ||
:type args: TestConfig | ||
""" | ||
super(VultrCloudProvider, self).__init__(args, config_extension='.ini') | ||
|
||
def filter(self, targets, exclude): | ||
"""Filter out the cloud tests when the necessary config and resources are not available. | ||
:type targets: tuple[TestTarget] | ||
:type exclude: list[str] | ||
""" | ||
if os.path.isfile(self.config_static_path): | ||
return | ||
|
||
super(VultrCloudProvider, self).filter(targets, exclude) | ||
|
||
def setup(self): | ||
super(VultrCloudProvider, self).setup() | ||
|
||
if os.path.isfile(self.config_static_path): | ||
self.config_path = self.config_static_path | ||
self.managed = False | ||
return True | ||
return False | ||
|
||
|
||
class VultrCloudEnvironment(CloudEnvironment): | ||
""" | ||
Updates integration test environment after delegation. Will setup the config file as parameter. | ||
""" | ||
|
||
def configure_environment(self, env, cmd): | ||
""" | ||
:type env: dict[str, str] | ||
:type cmd: list[str] | ||
""" | ||
parser = ConfigParser() | ||
parser.read(self.config_path) | ||
|
||
changes = dict( | ||
VULTR_API_KEY=parser.get('default', 'key'), | ||
) | ||
env.update(changes) | ||
|
||
cmd.append('-e') | ||
cmd.append('vultr_resource_prefix=%s' % self.resource_prefix) |