Skip to content
This repository was archived by the owner on Jul 17, 2023. It is now read-only.

Commit f378e25

Browse files
committed
deprecate in favor of vultr.cloud
1 parent ad5d948 commit f378e25

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

plugins/doc_fragments/vultr.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Copyright (c) 2017 René Moser <mail@renemoser.net>
44
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
55
from __future__ import absolute_import, division, print_function
6+
67
__metaclass__ = type
78

89

@@ -54,5 +55,7 @@ class ModuleDocFragment(object):
5455
requirements:
5556
- python >= 2.6
5657
notes:
57-
- Also see the API documentation on https://www.vultr.com/api/.
58+
- "DEPRECATED: Please use vultr.cloud instead."
59+
- Also see the API documentation on https://www.vultr.com/api/v1/.
60+
5861
'''

plugins/module_utils/vultr.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
44

55
from __future__ import absolute_import, division, print_function
6+
67
__metaclass__ = type
78

89
import os
9-
import time
1010
import random
11+
import time
1112
import urllib
13+
14+
from ansible.module_utils._text import to_native, to_text
1215
from ansible.module_utils.six.moves import configparser
13-
from ansible.module_utils._text import to_text, to_native
1416
from ansible.module_utils.urls import fetch_url
1517

16-
1718
VULTR_API_ENDPOINT = "https://api.vultr.com"
1819
VULTR_USER_AGENT = 'Ansible Vultr'
1920

@@ -40,6 +41,14 @@ def __init__(self, module, namespace):
4041
collection_name='ngine_io.vultr',
4142
version='2.0.0') # Was Ansbile 2.11
4243

44+
module.deprecate(
45+
msg="This module is deprecated, it uses the deprecated Vultr v1 API. "
46+
"Please switch to the modules in collection vultr.cloud as soon as possible. "
47+
"Also see https://galaxy.ansible.com/vultr/cloud.",
48+
collection_name="ngine_io.vultr",
49+
version="2.0.0"
50+
)
51+
4352
self.module = module
4453

4554
# Namespace use for returns

0 commit comments

Comments
 (0)