[PR #10026/63cb8f0a backport][stable-10] deprecation: stackpath_compute (#10037)

deprecation: stackpath_compute (#10026)

* deprecation: stackpath_compute

* add changelog frag

* restore test file

(cherry picked from commit 63cb8f0ace)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-04-21 13:20:40 +02:00 committed by GitHub
parent 0310c7875d
commit acde075b5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 53 additions and 47 deletions

View file

@ -0,0 +1,2 @@
deprecated_features:
- stackpath_compute inventory plugin - plugin is deprecated and will be removed in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/10026).

View file

@ -964,6 +964,10 @@ plugin_routing:
redirect: community.docker.docker_swarm redirect: community.docker.docker_swarm
kubevirt: kubevirt:
redirect: community.kubevirt.kubevirt redirect: community.kubevirt.kubevirt
stackpath_compute:
deprecation:
removal_version: 11.0.0
warning_text: The company and the service were sunset in June 2024.
filter: filter:
path_join: path_join:
# The ansible.builtin.path_join filter has been added in ansible-base 2.10. # The ansible.builtin.path_join filter has been added in ansible-base 2.10.

View file

@ -6,60 +6,60 @@
from __future__ import annotations from __future__ import annotations
DOCUMENTATION = ''' DOCUMENTATION = r"""
name: stackpath_compute name: stackpath_compute
short_description: StackPath Edge Computing inventory source short_description: StackPath Edge Computing inventory source
version_added: 1.2.0 version_added: 1.2.0
author: author:
- UNKNOWN (@shayrybak) - UNKNOWN (@shayrybak)
extends_documentation_fragment: deprecated:
- inventory_cache removed_in: 11.0.0
- constructed why: Stackpath (the company) ceased its operations in June 2024. The API URL this plugin relies on is not found in DNS.
alternative: There is none.
extends_documentation_fragment:
- inventory_cache
- constructed
description:
- Get inventory hosts from StackPath Edge Computing.
- Uses a YAML configuration file that ends with stackpath_compute.(yml|yaml).
options:
plugin:
description: description:
- Get inventory hosts from StackPath Edge Computing. - A token that ensures this is a source file for the plugin.
- Uses a YAML configuration file that ends with stackpath_compute.(yml|yaml). required: true
options: type: string
plugin: choices: ['community.general.stackpath_compute']
description: client_id:
- A token that ensures this is a source file for the plugin. description:
required: true - An OAuth client ID generated from the API Management section of the StackPath customer portal U(https://control.stackpath.net/api-management).
type: string required: true
choices: ['community.general.stackpath_compute'] type: str
client_id: client_secret:
description: description:
- An OAuth client ID generated from the API Management section of the StackPath customer portal - An OAuth client secret generated from the API Management section of the StackPath customer portal U(https://control.stackpath.net/api-management).
U(https://control.stackpath.net/api-management). required: true
required: true type: str
type: str stack_slugs:
client_secret: description:
description: - A list of Stack slugs to query instances in. If no entry then get instances in all stacks on the account.
- An OAuth client secret generated from the API Management section of the StackPath customer portal type: list
U(https://control.stackpath.net/api-management). elements: str
required: true use_internal_ip:
type: str description:
stack_slugs: - Whether or not to use internal IP addresses, If false, uses external IP addresses, internal otherwise.
description: - If an instance doesn't have an external IP it will not be returned when this option is set to false.
- A list of Stack slugs to query instances in. If no entry then get instances in all stacks on the account. type: bool
type: list """
elements: str
use_internal_ip:
description:
- Whether or not to use internal IP addresses, If false, uses external IP addresses, internal otherwise.
- If an instance doesn't have an external IP it will not be returned when this option is set to false.
type: bool
'''
EXAMPLES = ''' EXAMPLES = r"""
# Example using credentials to fetch all workload instances in a stack.
---
plugin: community.general.stackpath_compute plugin: community.general.stackpath_compute
client_id: my_client_id client_id: my_client_id
client_secret: my_client_secret client_secret: my_client_secret
stack_slugs: stack_slugs:
- my_first_stack_slug - my_first_stack_slug
- my_other_stack_slug - my_other_stack_slug
use_internal_ip: false use_internal_ip: false
''' """
import traceback import traceback
import json import json