Skip to content

Commit 1e998b2

Browse files
Merge pull request #739 from ezilber-akamai/TPT-3822-private-image-sharing-features
Added support for Private Image Sharing
2 parents 4d16125 + 5252f32 commit 1e998b2

File tree

57 files changed

+4082
-111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4082
-111
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ else
121121
echo "LINODE_API_TOKEN must be set"; \
122122
exit 1;
123123
endif
124+
# Add producer/consumer tokens, may be empty
125+
@echo "producer_api_token: $${LINODE_PRODUCER_API_TOKEN:-}" >> $(INTEGRATION_CONFIG)
126+
@echo "consumer_api_token: $${LINODE_CONSUMER_API_TOKEN:-}" >> $(INTEGRATION_CONFIG)
127+
128+
# Common settings
124129
@echo "ua_prefix: E2E" >> $(INTEGRATION_CONFIG)
125130
@echo "api_url: $$(url=$${LINODE_API_URL:-$${TEST_API_URL:-https://api.linode.com}}; echo $${url%/}/)" >> $(INTEGRATION_CONFIG)
126131
@echo "api_version: $${LINODE_API_VERSION:-$${TEST_API_VERSION:-v4beta}}" >> $(INTEGRATION_CONFIG)

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ Name | Description |
3333
[linode.cloud.firewall_device](./docs/modules/firewall_device.md)|Manage Linode Firewall Devices.|
3434
[linode.cloud.firewall_settings](./docs/modules/firewall_settings.md)|Configure the firewall settings for the account.|
3535
[linode.cloud.image](./docs/modules/image.md)|Manage a Linode Image.|
36+
[linode.cloud.image_share_group](./docs/modules/image_share_group.md)|Manage an Image Share Group.|
37+
[linode.cloud.image_share_group_member](./docs/modules/image_share_group_member.md)|Manage an Image Share Group Member.|
38+
[linode.cloud.image_share_group_token](./docs/modules/image_share_group_token.md)|Manage an Image Share Group Token.|
3639
[linode.cloud.instance](./docs/modules/instance.md)|Manage Linode Instances, Configs, and Disks.|
3740
[linode.cloud.instance_interface_settings](./docs/modules/instance_interface_settings.md)|Create, read, and update the interface settings for a Linode instance.|
3841
[linode.cloud.ip](./docs/modules/ip.md)|Allocates a new IPv4 Address on your Account. The Linode must be configured to support additional addresses - please Open a support ticket requesting additional addresses before attempting allocation.|
@@ -65,6 +68,7 @@ Name | Description |
6568
[linode.cloud.account_availability_info](./docs/modules/account_availability_info.md)|Get info about a Linode Account Availability.|
6669
[linode.cloud.account_info](./docs/modules/account_info.md)|Get info about a Linode Account.|
6770
[linode.cloud.child_account_info](./docs/modules/child_account_info.md)|Get info about a Linode Child Account.|
71+
[linode.cloud.consumer_image_share_group_info](./docs/modules/consumer_image_share_group_info.md)|Get info about a Linode Image Share Group.|
6872
[linode.cloud.database_config_info](./docs/modules/database_config_info.md)|Get info about a Linode Configuration.|
6973
[linode.cloud.database_mysql_info](./docs/modules/database_mysql_info.md)|Get info about a Linode MySQL Managed Database.|
7074
[linode.cloud.database_postgresql_info](./docs/modules/database_postgresql_info.md)|Get info about a Linode PostgreSQL Managed Database.|
@@ -74,6 +78,9 @@ Name | Description |
7478
[linode.cloud.firewall_settings_info](./docs/modules/firewall_settings_info.md)|Get info about a Linode Firewall Settings.|
7579
[linode.cloud.firewall_template_info](./docs/modules/firewall_template_info.md)|Get info about a Linode Firewall Template.|
7680
[linode.cloud.image_info](./docs/modules/image_info.md)|Get info about a Linode Image.|
81+
[linode.cloud.image_share_group_info](./docs/modules/image_share_group_info.md)|Get info about a Linode Image Share Group.|
82+
[linode.cloud.image_share_group_member_info](./docs/modules/image_share_group_member_info.md)|Get info about a Linode Image Share Group Member.|
83+
[linode.cloud.image_share_group_token_info](./docs/modules/image_share_group_token_info.md)|Get info about a Linode Image Share Group Token.|
7784
[linode.cloud.instance_info](./docs/modules/instance_info.md)|Get info about a Linode Instance.|
7885
[linode.cloud.instance_interface_settings_info](./docs/modules/instance_interface_settings_info.md)|Get the interface settings for a Linode instance.|
7986
[linode.cloud.ip_info](./docs/modules/ip_info.md)|Get info about a Linode IP.|
@@ -105,13 +112,18 @@ Name | Description |
105112
--- | ------------ |
106113
[linode.cloud.account_availability_list](./docs/modules/account_availability_list.md)|List and filter on Account Availabilities.|
107114
[linode.cloud.child_account_list](./docs/modules/child_account_list.md)|List and filter on Child Account.|
115+
[linode.cloud.consumer_image_share_group_image_list](./docs/modules/consumer_image_share_group_image_list.md)|List and filter on Image Share Group Images.|
108116
[linode.cloud.database_engine_list](./docs/modules/database_engine_list.md)|List and filter on Managed Database engine types.|
109117
[linode.cloud.database_list](./docs/modules/database_list.md)|List and filter on Linode Managed Databases.|
110118
[linode.cloud.domain_list](./docs/modules/domain_list.md)|List and filter on Domains.|
111119
[linode.cloud.event_list](./docs/modules/event_list.md)|List and filter on Events.|
112120
[linode.cloud.firewall_list](./docs/modules/firewall_list.md)|List and filter on Firewalls.|
113121
[linode.cloud.firewall_template_list](./docs/modules/firewall_template_list.md)|List and filter on Firewall Templates.|
114122
[linode.cloud.image_list](./docs/modules/image_list.md)|List and filter on Images.|
123+
[linode.cloud.image_share_group_image_list](./docs/modules/image_share_group_image_list.md)|List and filter on Image Share Group Images.|
124+
[linode.cloud.image_share_group_list](./docs/modules/image_share_group_list.md)|List and filter on Image Share Groups.|
125+
[linode.cloud.image_share_group_member_list](./docs/modules/image_share_group_member_list.md)|List and filter on Image Share Group Members.|
126+
[linode.cloud.image_share_group_token_list](./docs/modules/image_share_group_token_list.md)|List and filter on Image Share Group Tokens.|
115127
[linode.cloud.instance_interface_firewall_list](./docs/modules/instance_interface_firewall_list.md)|List and filter on Linode Interface Firewalls.|
116128
[linode.cloud.instance_list](./docs/modules/instance_list.md)|List and filter on Instances.|
117129
[linode.cloud.instance_type_list](./docs/modules/instance_type_list.md)|**NOTE: This module has been deprecated in favor of `type_list`.**|
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# consumer_image_share_group_image_list
2+
3+
List and filter on Image Share Group Images.
4+
5+
- [Minimum Required Fields](#minimum-required-fields)
6+
- [Examples](#examples)
7+
- [Parameters](#parameters)
8+
- [Return Values](#return-values)
9+
10+
## Minimum Required Fields
11+
| Field | Type | Required | Description |
12+
|-------------|-------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
13+
| `api_token` | `str` | **Required** | The Linode account personal access token. It is necessary to run the module. <br/>It can be exposed by the environment variable `LINODE_API_TOKEN` instead. <br/>See details in [Usage](https://github.com/linode/ansible_linode?tab=readme-ov-file#usage). |
14+
15+
## Examples
16+
17+
```yaml
18+
- name: List all of the Image Share Group Images for the specified Token UUID
19+
linode.cloud.consumer_image_share_group_image_list:
20+
token_uuid: "9e64b99e-92f7-4c7b-a616-8f622fffb94c"
21+
```
22+
23+
24+
## Parameters
25+
26+
| Field | Type | Required | Description |
27+
|-----------|------|----------|------------------------------------------------------------------------------|
28+
| `token_uuid` | <center>`str`</center> | <center>**Required**</center> | The parent Token for the Image Share Group Images. |
29+
| `order` | <center>`str`</center> | <center>Optional</center> | The order to list Image Share Group Images in. **(Choices: `desc`, `asc`; Default: `asc`)** |
30+
| `order_by` | <center>`str`</center> | <center>Optional</center> | The attribute to order Image Share Group Images by. |
31+
| [`filters` (sub-options)](#filters) | <center>`list`</center> | <center>Optional</center> | A list of filters to apply to the resulting Image Share Group Images. |
32+
| `count` | <center>`int`</center> | <center>Optional</center> | The number of Image Share Group Images to return. If undefined, all results will be returned. |
33+
34+
### filters
35+
36+
| Field | Type | Required | Description |
37+
|-----------|------|----------|------------------------------------------------------------------------------|
38+
| `name` | <center>`str`</center> | <center>**Required**</center> | The name of the field to filter on. Valid filterable fields can be found [here](https://techdocs.akamai.com/linode-api/reference/get-sharegroup-images-by-token). |
39+
| `values` | <center>`list`</center> | <center>**Required**</center> | A list of values to allow for this field. Fields will pass this filter if at least one of these values matches. |
40+
41+
## Return Values
42+
43+
- `image_share_group_images` - The returned Image Share Group Images.
44+
45+
- Sample Response:
46+
```json
47+
[
48+
{
49+
"capabilities": [
50+
"cloud-init",
51+
"distributed-sites"
52+
],
53+
"created": "2025-08-04T10:07:59",
54+
"created_by": null,
55+
"deprecated": true,
56+
"description": "Official Debian Linux image for server deployment",
57+
"eol": "2025-12-31T18:13:44.756Z",
58+
"expiry": "2025-12-31T18:13:44.756Z",
59+
"id": "shared/1",
60+
"image_sharing": {
61+
"shared_by": {
62+
"sharegroup_id": 123,
63+
"sharegroup_label": "DevOps Base Images",
64+
"sharegroup_uuid": "8d64b99e-92f7-4c7b-a616-8f622fffb94c",
65+
"source_image_id": "private/15"
66+
},
67+
"shared_with": null
68+
},
69+
"is_public": true,
70+
"is_shared": "none",
71+
"label": "Linux Debian",
72+
"regions": [
73+
{
74+
"region": "us-iad",
75+
"status": "available"
76+
}
77+
],
78+
"size": 256,
79+
"status": "available",
80+
"tags": [
81+
"repair-image",
82+
"fix-1"
83+
],
84+
"total_size": 256,
85+
"type": "shared",
86+
"updated": null,
87+
"vendor": "string"
88+
}
89+
]
90+
```
91+
- See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-sharegroup-images-by-token) for a list of returned fields
92+
93+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# consumer_image_share_group_info
2+
3+
Get info about a Linode Image Share Group.
4+
5+
- [Minimum Required Fields](#minimum-required-fields)
6+
- [Examples](#examples)
7+
- [Parameters](#parameters)
8+
- [Return Values](#return-values)
9+
10+
## Minimum Required Fields
11+
| Field | Type | Required | Description |
12+
|-------------|-------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
13+
| `api_token` | `str` | **Required** | The Linode account personal access token. It is necessary to run the module. <br/>It can be exposed by the environment variable `LINODE_API_TOKEN` instead. <br/>See details in [Usage](https://github.com/linode/ansible_linode?tab=readme-ov-file#usage). |
14+
15+
## Examples
16+
17+
```yaml
18+
- name: Get info about an Image Share Group by a Consumer's Token UUID
19+
linode.cloud.consumer_image_share_group_info:
20+
token_uuid: "1433863e-16a4-47b5-b829-ac0f35c13278"
21+
```
22+
23+
24+
## Parameters
25+
26+
| Field | Type | Required | Description |
27+
|-----------|------|----------|------------------------------------------------------------------------------|
28+
| `token_uuid` | <center>`str`</center> | <center>**Required**</center> | The ID of the Token for this resource. |
29+
30+
## Return Values
31+
32+
- `image_share_group` - The returned Image Share Group.
33+
34+
- Sample Response:
35+
```json
36+
{
37+
"created": "2025-04-14T22:44:02",
38+
"description": "Group of base operating system images and engineers used for CI/CD pipelines and infrastructure automation",
39+
"id": 1,
40+
"is_suspended": false,
41+
"label": "DevOps Base Images",
42+
"updated": "2025-04-14T22:44:03",
43+
"uuid": "1533863e-16a4-47b5-b829-ac0f35c13278"
44+
}
45+
```
46+
- See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-sharegroup-by-token) for a list of returned fields
47+
48+

docs/modules/image.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,33 +83,43 @@ Manage a Linode Image.
8383
- Sample Response:
8484
```json
8585
{
86-
"capabilities": [],
86+
"capabilities": [
87+
"cloud-init",
88+
"distributed-sites"
89+
],
8790
"created": "2021-08-14T22:44:02",
88-
"created_by": "my-account",
91+
"created_by": "linode",
8992
"deprecated": false,
90-
"description": "Example Image description.",
93+
"description": "Example image description.",
9194
"eol": "2026-07-01T04:00:00",
9295
"expiry": null,
93-
"id": "private/123",
94-
"is_public": true,
95-
"label": "my-image",
96-
"size": 2500,
97-
"status": null,
98-
"type": "manual",
99-
"updated": "2021-08-14T22:44:02",
100-
"vendor": "Debian",
101-
"tags": ["test"],
102-
"total_size": 5000,
96+
"id": "private/15",
97+
"image_sharing": {
98+
"shared_by": null,
99+
"shared_with": {
100+
"sharegroup_count": 0,
101+
"sharegroup_list_url": "/images/private/15/sharegroups"
102+
}
103+
},
104+
"is_public": false,
105+
"is_shared": false,
106+
"label": "Debian 11",
103107
"regions": [
104108
{
105-
"region": "us-east",
106-
"status": "available"
107-
},
108-
{
109-
"region": "us-central",
110-
"status": "pending"
109+
"region": "us-iad",
110+
"status": "available"
111111
}
112-
]
112+
],
113+
"size": 2500,
114+
"status": "available",
115+
"tags": [
116+
"repair-image",
117+
"fix-1"
118+
],
119+
"total_size": 1234567,
120+
"type": "manual",
121+
"updated": "2021-08-14T22:44:02",
122+
"vendor": "Debian"
113123
}
114124
```
115125
- See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-image) for a list of returned fields

docs/modules/image_info.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,33 +41,43 @@ Get info about a Linode Image.
4141
- Sample Response:
4242
```json
4343
{
44-
"capabilities": [],
44+
"capabilities": [
45+
"cloud-init",
46+
"distributed-sites"
47+
],
4548
"created": "2021-08-14T22:44:02",
46-
"created_by": "my-account",
49+
"created_by": "linode",
4750
"deprecated": false,
48-
"description": "Example Image description.",
51+
"description": "Example image description.",
4952
"eol": "2026-07-01T04:00:00",
5053
"expiry": null,
51-
"id": "private/123",
52-
"is_public": true,
53-
"label": "my-image",
54-
"size": 2500,
55-
"status": null,
56-
"type": "manual",
57-
"updated": "2021-08-14T22:44:02",
58-
"vendor": "Debian",
59-
"tags": ["test"],
60-
"total_size": 5000,
54+
"id": "private/15",
55+
"image_sharing": {
56+
"shared_by": null,
57+
"shared_with": {
58+
"sharegroup_count": 0,
59+
"sharegroup_list_url": "/images/private/15/sharegroups"
60+
}
61+
},
62+
"is_public": false,
63+
"is_shared": false,
64+
"label": "Debian 11",
6165
"regions": [
6266
{
63-
"region": "us-east",
64-
"status": "available"
65-
},
66-
{
67-
"region": "us-central",
68-
"status": "pending"
67+
"region": "us-iad",
68+
"status": "available"
6969
}
70-
]
70+
],
71+
"size": 2500,
72+
"status": "available",
73+
"tags": [
74+
"repair-image",
75+
"fix-1"
76+
],
77+
"total_size": 1234567,
78+
"type": "manual",
79+
"updated": "2021-08-14T22:44:02",
80+
"vendor": "Debian"
7181
}
7282
```
7383
- See the [Linode API response documentation](https://techdocs.akamai.com/linode-api/reference/get-image) for a list of returned fields

0 commit comments

Comments
 (0)