|
6 | 6 |
|
7 | 7 | from __future__ import annotations |
8 | 8 |
|
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: |
18 | 27 | 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 | +""" |
51 | 53 |
|
52 | | -EXAMPLES = ''' |
53 | | -# Example using credentials to fetch all workload instances in a stack. |
54 | | ---- |
| 54 | +EXAMPLES = r""" |
55 | 55 | plugin: community.general.stackpath_compute |
56 | 56 | client_id: my_client_id |
57 | 57 | client_secret: my_client_secret |
58 | 58 | stack_slugs: |
59 | | -- my_first_stack_slug |
60 | | -- my_other_stack_slug |
| 59 | + - my_first_stack_slug |
| 60 | + - my_other_stack_slug |
61 | 61 | use_internal_ip: false |
62 | | -''' |
| 62 | +""" |
63 | 63 |
|
64 | 64 | import traceback |
65 | 65 | import json |
|
0 commit comments