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

Commit

Permalink
deprecate in favor of vultr.cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
resmo committed Jan 23, 2023
1 parent ad5d948 commit c56dc62
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ tags:
- cloud
- vultr
- ngine_io
version: 1.1.2
version: 1.2.0
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

0 comments on commit c56dc62

Please sign in to comment.