Skip to content

Commit acde075

Browse files
[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 63cb8f0) Co-authored-by: Alexei Znamensky <[email protected]>
1 parent 0310c78 commit acde075

File tree

3 files changed

+53
-47
lines changed

3 files changed

+53
-47
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
deprecated_features:
2+
- 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).

meta/runtime.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,10 @@ plugin_routing:
964964
redirect: community.docker.docker_swarm
965965
kubevirt:
966966
redirect: community.kubevirt.kubevirt
967+
stackpath_compute:
968+
deprecation:
969+
removal_version: 11.0.0
970+
warning_text: The company and the service were sunset in June 2024.
967971
filter:
968972
path_join:
969973
# The ansible.builtin.path_join filter has been added in ansible-base 2.10.

plugins/inventory/stackpath_compute.py

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,60 +6,60 @@
66

77
from __future__ import annotations
88

9-
DOCUMENTATION = '''
10-
name: stackpath_compute
11-
short_description: StackPath Edge Computing inventory source
12-
version_added: 1.2.0
13-
author:
14-
- UNKNOWN (@shayrybak)
15-
extends_documentation_fragment:
16-
- inventory_cache
17-
- constructed
9+
DOCUMENTATION = r"""
10+
name: stackpath_compute
11+
short_description: StackPath Edge Computing inventory source
12+
version_added: 1.2.0
13+
author:
14+
- UNKNOWN (@shayrybak)
15+
deprecated:
16+
removed_in: 11.0.0
17+
why: Stackpath (the company) ceased its operations in June 2024. The API URL this plugin relies on is not found in DNS.
18+
alternative: There is none.
19+
extends_documentation_fragment:
20+
- inventory_cache
21+
- constructed
22+
description:
23+
- Get inventory hosts from StackPath Edge Computing.
24+
- Uses a YAML configuration file that ends with stackpath_compute.(yml|yaml).
25+
options:
26+
plugin:
1827
description:
19-
- Get inventory hosts from StackPath Edge Computing.
20-
- Uses a YAML configuration file that ends with stackpath_compute.(yml|yaml).
21-
options:
22-
plugin:
23-
description:
24-
- A token that ensures this is a source file for the plugin.
25-
required: true
26-
type: string
27-
choices: ['community.general.stackpath_compute']
28-
client_id:
29-
description:
30-
- An OAuth client ID generated from the API Management section of the StackPath customer portal
31-
U(https://control.stackpath.net/api-management).
32-
required: true
33-
type: str
34-
client_secret:
35-
description:
36-
- An OAuth client secret generated from the API Management section of the StackPath customer portal
37-
U(https://control.stackpath.net/api-management).
38-
required: true
39-
type: str
40-
stack_slugs:
41-
description:
42-
- A list of Stack slugs to query instances in. If no entry then get instances in all stacks on the account.
43-
type: list
44-
elements: str
45-
use_internal_ip:
46-
description:
47-
- Whether or not to use internal IP addresses, If false, uses external IP addresses, internal otherwise.
48-
- If an instance doesn't have an external IP it will not be returned when this option is set to false.
49-
type: bool
50-
'''
28+
- A token that ensures this is a source file for the plugin.
29+
required: true
30+
type: string
31+
choices: ['community.general.stackpath_compute']
32+
client_id:
33+
description:
34+
- An OAuth client ID generated from the API Management section of the StackPath customer portal U(https://control.stackpath.net/api-management).
35+
required: true
36+
type: str
37+
client_secret:
38+
description:
39+
- An OAuth client secret generated from the API Management section of the StackPath customer portal U(https://control.stackpath.net/api-management).
40+
required: true
41+
type: str
42+
stack_slugs:
43+
description:
44+
- A list of Stack slugs to query instances in. If no entry then get instances in all stacks on the account.
45+
type: list
46+
elements: str
47+
use_internal_ip:
48+
description:
49+
- Whether or not to use internal IP addresses, If false, uses external IP addresses, internal otherwise.
50+
- If an instance doesn't have an external IP it will not be returned when this option is set to false.
51+
type: bool
52+
"""
5153

52-
EXAMPLES = '''
53-
# Example using credentials to fetch all workload instances in a stack.
54-
---
54+
EXAMPLES = r"""
5555
plugin: community.general.stackpath_compute
5656
client_id: my_client_id
5757
client_secret: my_client_secret
5858
stack_slugs:
59-
- my_first_stack_slug
60-
- my_other_stack_slug
59+
- my_first_stack_slug
60+
- my_other_stack_slug
6161
use_internal_ip: false
62-
'''
62+
"""
6363

6464
import traceback
6565
import json

0 commit comments

Comments
 (0)