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

deprecate in favor of vultr.cloud #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugins/doc_fragments/vultr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Copyright (c) 2017 René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function

__metaclass__ = type


Expand Down Expand Up @@ -54,5 +55,7 @@ class ModuleDocFragment(object):
requirements:
- python >= 2.6
notes:
- Also see the API documentation on https://www.vultr.com/api/.
- "DEPRECATED: Please use vultr.cloud instead."
- Also see the API documentation on https://www.vultr.com/api/v1/.

'''
15 changes: 12 additions & 3 deletions plugins/module_utils/vultr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)

from __future__ import absolute_import, division, print_function

__metaclass__ = type

import os
import time
import random
import time
import urllib

from ansible.module_utils._text import to_native, to_text
from ansible.module_utils.six.moves import configparser
from ansible.module_utils._text import to_text, to_native
from ansible.module_utils.urls import fetch_url


VULTR_API_ENDPOINT = "https://api.vultr.com"
VULTR_USER_AGENT = 'Ansible Vultr'

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

module.deprecate(
msg="This module is deprecated, it uses the deprecated Vultr v1 API. "
"Please switch to the modules in collection vultr.cloud as soon as possible. "
"Also see https://galaxy.ansible.com/vultr/cloud.",
collection_name="ngine_io.vultr",
version="2.0.0"
)

self.module = module

# Namespace use for returns
Expand Down