Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.22.0 #440

Merged
merged 25 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bab0232
Merge pull request #413 from linode/dev
zliang-akamai Sep 19, 2023
70465f1
new: Add VPC and VPC Subnet modules (#404)
lgarber-akamai Sep 20, 2023
33c2a50
Support VPC interfaces in instance (#408)
lgarber-akamai Sep 25, 2023
84864bb
new: Add support for specifying a firewall_id on instance creation (#…
lgarber-akamai Oct 3, 2023
f36ffa1
Merge branch 'dev' into proj/vpc
zliang-akamai Oct 12, 2023
b09f86a
Fix conflict
lgarber-akamai Oct 17, 2023
93f7659
Merge pull request #429 from lgarber-akamai/temp/branch-sync
lgarber-akamai Oct 18, 2023
3c150e9
Bump types-requests from 2.31.0.2 to 2.31.0.10 (#431)
dependabot[bot] Oct 18, 2023
9feba1e
added_vpc_tests
vshanthe Oct 20, 2023
e08635f
make deps upgrade (#432)
lgarber-akamai Oct 25, 2023
d98a9b8
Merge pull request #433 from linode/test_vpc
vshanthe Oct 26, 2023
15b78af
Explicitly handle none values for testing CA (#435)
lgarber-akamai Nov 6, 2023
5a81b5d
new: add vpc fields to ip_info (#434)
jriddle-linode Nov 13, 2023
263e17d
Merge branch 'dev' into proj/vpc
zliang-akamai Nov 14, 2023
2d6ce37
Updated `linodes` Attribute in Subnet Return Object (#437)
zliang-akamai Nov 14, 2023
f62ccd6
Remove .DS_Store
zliang-akamai Nov 15, 2023
fd303e1
Change Python SDK version to a released version
zliang-akamai Nov 15, 2023
0a982d4
Replace REQUESTS_CA_BUNDLE with LINODE_CA in tests
zliang-akamai Nov 15, 2023
6a21b56
Disallow VLAN to be a primary interface
zliang-akamai Nov 15, 2023
ed77714
cleanup git conflict text
zliang-akamai Nov 15, 2023
1b2b46a
Cleanup
zliang-akamai Nov 15, 2023
2981fd4
Cleanup comment
zliang-akamai Nov 15, 2023
0b065ce
Cleanup interfaces work around (#439)
zliang-akamai Nov 15, 2023
8466763
Merge pull request #438 from linode/proj/vpc
zliang-akamai Nov 15, 2023
1670dc1
Fix default for LINODE_CA in instance_firewall test (#441)
lgarber-akamai Nov 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
python-version: '3.x'

- name: install dependencies
run: pip install -r requirements-dev.txt -r requirements.txt
run: make deps

- name: make temp directory
run: mkdir tmp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
python-version: '3.x'

- name: install dependencies
run: pip3 install -r requirements-dev.txt -r requirements.txt
run: make deps

- name: install ansible dependencies
run: ansible-galaxy collection install amazon.aws:==6.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
python-version: '3.10'

- name: install dependencies
run: pip3 install -r requirements-dev.txt -r requirements.txt
run: make deps

- name: install ansible dependencies
run: ansible-galaxy collection install amazon.aws:==6.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
python-version: '3.x'

- name: install dependencies
run: pip3 install -r requirements-dev.txt -r requirements.txt
run: make deps

- name: run linter
run: make lint
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
python-version: '3.x'

- name: install dependencies
run: pip3 install -r requirements-dev.txt -r requirements.txt
run: make deps

- name: install ansible dependencies
run: ansible-galaxy collection install amazon.aws:==6.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python-version: '3.10'

- name: install dependencies
run: pip3 install -r requirements-dev.txt -r requirements.txt
run: make deps

- name: Run unit tests
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ __pycache__/
galaxy.yml
venv
collections
.pytest_cache
.pytest_cache
.DS_Store
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ INTEGRATION_CONFIG := ./tests/integration/integration_config.yml
clean:
rm -f *.tar.gz && rm -rf galaxy.yml

build: clean gendocs
build: deps clean gendocs
python scripts/render_galaxy.py $(COLLECTION_VERSION) && ansible-galaxy collection build

publish: build
Expand All @@ -27,7 +27,7 @@ install: build
ansible-galaxy collection install *.tar.gz --force -p $(COLLECTIONS_PATH)

deps:
pip install -r requirements.txt -r requirements-dev.txt
pip install -r requirements.txt -r requirements-dev.txt --upgrade

lint:
pylint plugins
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Name | Description |
[linode.cloud.token](./docs/modules/token.md)|Manage a Linode Token.|
[linode.cloud.user](./docs/modules/user.md)|Manage a Linode User.|
[linode.cloud.volume](./docs/modules/volume.md)|Manage a Linode Volume.|
[linode.cloud.vpc](./docs/modules/vpc.md)|Create, read, and update a Linode VPC.|
[linode.cloud.vpc_subnet](./docs/modules/vpc_subnet.md)|Create, read, and update a Linode VPC Subnet.|


### Info Modules
Expand Down Expand Up @@ -72,6 +74,8 @@ Name | Description |
[linode.cloud.user_info](./docs/modules/user_info.md)|Get info about a Linode User.|
[linode.cloud.vlan_info](./docs/modules/vlan_info.md)|Get info about a Linode VLAN.|
[linode.cloud.volume_info](./docs/modules/volume_info.md)|Get info about a Linode Volume.|
[linode.cloud.vpc_info](./docs/modules/vpc_info.md)|Get info about a Linode VPC.|
[linode.cloud.vpc_subnet_info](./docs/modules/vpc_subnet_info.md)|Get info about a Linode VPC Subnet.|


### List Modules
Expand Down Expand Up @@ -99,6 +103,8 @@ Name | Description |
[linode.cloud.user_list](./docs/modules/user_list.md)|List Users.|
[linode.cloud.vlan_list](./docs/modules/vlan_list.md)|List and filter on Linode VLANs.|
[linode.cloud.volume_list](./docs/modules/volume_list.md)|List and filter on Linode Volumes.|
[linode.cloud.vpc_list](./docs/modules/vpc_list.md)|List and filter on VPCs.|
[linode.cloud.vpc_subnet_list](./docs/modules/vpc_subnet_list.md)|List and filter on VPC Subnets.|


### Inventory Plugins
Expand Down
8 changes: 7 additions & 1 deletion docs/modules/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Manage Linode Instances, Configs, and Disks.
type: g6-standard-1
booted: true
boot_config_label: boot-config
state: present
disks:
- label: boot
image: linode/ubuntu18.04
Expand Down Expand Up @@ -111,6 +112,7 @@ Manage Linode Instances, Configs, and Disks.
| `root_pass` | <center>`str`</center> | <center>Optional</center> | The password for the root user. If not specified, one will be generated. This generated password will be available in the task success JSON. |
| `stackscript_id` | <center>`int`</center> | <center>Optional</center> | The ID of the StackScript to use when creating the instance. See the [Linode API documentation](https://www.linode.com/docs/api/stackscripts/). |
| `stackscript_data` | <center>`dict`</center> | <center>Optional</center> | An object containing arguments to any User Defined Fields present in the StackScript used when creating the instance. Only valid when a stackscript_id is provided. See the [Linode API documentation](https://www.linode.com/docs/api/stackscripts/). |
| `firewall_id` | <center>`int`</center> | <center>Optional</center> | The ID of a Firewall this Linode to assign this Linode to. |
| `private_ip` | <center>`bool`</center> | <center>Optional</center> | If true, the created Linode will have private networking enabled. |
| `group` | <center>`str`</center> | <center>Optional</center> | The group that the instance should be marked under. Please note, that group labelling is deprecated but still supported. The encouraged method for marking instances is to use tags. **(Updatable)** |
| `boot_config_label` | <center>`str`</center> | <center>Optional</center> | The label of the config to boot from. |
Expand Down Expand Up @@ -232,9 +234,13 @@ Manage Linode Instances, Configs, and Disks.

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `purpose` | <center>`str`</center> | <center>**Required**</center> | The type of interface. **(Choices: `public`, `vlan`)** |
| `purpose` | <center>`str`</center> | <center>**Required**</center> | The type of interface. **(Choices: `public`, `vlan`, `vpc`)** |
| `primary` | <center>`bool`</center> | <center>Optional</center> | Whether this is a primary interface **(Default: `False`)** |
| `subnet_id` | <center>`int`</center> | <center>Optional</center> | The ID of the VPC subnet to assign this interface to. |
| `ipv4` | <center>`dict`</center> | <center>Optional</center> | The IPv4 configuration for this interface. (VPC only) |
| `label` | <center>`str`</center> | <center>Optional</center> | The name of this interface. Required for vlan purpose interfaces. Must be an empty string or null for public purpose interfaces. |
| `ipam_address` | <center>`str`</center> | <center>Optional</center> | This Network Interface’s private IP address in Classless Inter-Domain Routing (CIDR) notation. |
| `ip_ranges` | <center>`list`</center> | <center>Optional</center> | Packets to these CIDR ranges are routed to the VPC network interface. (VPC only) |

### disks

Expand Down
7 changes: 6 additions & 1 deletion docs/modules/ip_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ Get info about a Linode IP.
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
"type": "ipv4",
"vpc_nat_1_1": {
"vpc_id": 242,
"subnet_id": 194,
"address": "139.144.244.36",
}
}
```
- See the [Linode API response documentation](https://www.linode.com/docs/api/networking/#ip-address-view__responses) for a list of returned fields
Expand Down
7 changes: 6 additions & 1 deletion docs/modules/ip_rdns.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ Manage a Linode IP address's rDNS.
"rdns": "test.example.org",
"region": "us-east",
"subnet_mask": "255.255.255.0",
"type": "ipv4"
"type": "ipv4",
"vpc_nat_1_1": {
"vpc_id": 242,
"subnet_id": 194,
"address": "139.144.244.36",
}
}
```
- See the [Linode API response documentation](https://www.linode.com/docs/api/profile/#ip-address-rdns-update) for a list of returned fields
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/token.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NOTE: The full Personal Access Token is only returned when a new token has been
```yaml
- name: Delete a token
linode.cloud.token:
domain: my-token
label: my-token
state: absent
```

Expand Down
55 changes: 55 additions & 0 deletions docs/modules/vpc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# vpc

Create, read, and update a Linode VPC.

- [Examples](#examples)
- [Parameters](#parameters)
- [Return Values](#return-values)

## Examples

```yaml
- name: Create a VPC
linode.cloud.vpc:
label: my-vpc
region: us-east
description: A description of this VPC.
state: present
```

```yaml
- name: Delete a VPC
linode.cloud.vpc:
label: my-vpc
state: absent
```


## Parameters

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `label` | <center>`str`</center> | <center>**Required**</center> | This VPC's unique label. |
| `state` | <center>`str`</center> | <center>**Required**</center> | The state of this token. **(Choices: `present`, `absent`)** |
| `description` | <center>`str`</center> | <center>Optional</center> | A description describing this VPC. |
| `region` | <center>`str`</center> | <center>Optional</center> | The region this VPC is located in. |

## Return Values

- `vpc` - The VPC in JSON serialized form.

- Sample Response:
```json
{
"created": "2023-08-31T18:35:01",
"description": "A description of this VPC",
"id": 344,
"label": "my-vpc",
"region": "us-east",
"subnets": [],
"updated": "2023-08-31T18:35:03"
}
```
- See the [Linode API response documentation](TODO) for a list of returned fields


48 changes: 48 additions & 0 deletions docs/modules/vpc_info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# vpc_info

Get info about a Linode VPC.

- [Examples](#examples)
- [Parameters](#parameters)
- [Return Values](#return-values)

## Examples

```yaml
- name: Get info about a VPC by label
linode.cloud.vpc_info:
label: my-vpc
```

```yaml
- name: Get info about a VPC by ID
linode.cloud.vpc_info:
id: 12345
```


## Parameters

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `label` | <center>`str`</center> | <center>Optional</center> | The label of the VPC to resolve. |
| `id` | <center>`int`</center> | <center>Optional</center> | The ID of the VPC to resolve. |

## Return Values

- `vpc` - The returned VPC.

- Sample Response:
```json
{
"created": "2023-08-31T18:35:01",
"description": "A description of this VPC",
"id": 344,
"label": "my-vpc",
"region": "us-east",
"subnets": [],
"updated": "2023-08-31T18:35:03"
}
```


60 changes: 60 additions & 0 deletions docs/modules/vpc_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# vpc_list

List and filter on VPCs.

- [Examples](#examples)
- [Parameters](#parameters)
- [Return Values](#return-values)

## Examples

```yaml
- name: List all of the VPCs for the current user
linode.cloud.vpc_list: {}
```

```yaml
- name: List all of the VPCS for the current user with the given label
linode.cloud.vpc_list:
filters:
- name: label
values: my-vpc
```


## Parameters

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `order` | <center>`str`</center> | <center>Optional</center> | The order to list VPCs in. **(Choices: `desc`, `asc`; Default: `asc`)** |
| `order_by` | <center>`str`</center> | <center>Optional</center> | The attribute to order VPCs by. |
| [`filters` (sub-options)](#filters) | <center>`list`</center> | <center>Optional</center> | A list of filters to apply to the resulting VPCs. |
| `count` | <center>`int`</center> | <center>Optional</center> | The number of VPCs to return. If undefined, all results will be returned. |

### filters

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `name` | <center>`str`</center> | <center>**Required**</center> | The name of the field to filter on. Valid filterable fields can be found [here](). |
| `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. |

## Return Values

- `vpcs` - The returned VPCs.

- Sample Response:
```json
[
{
"created": "2023-08-31T18:35:01",
"description": "A description of this VPC",
"id": 344,
"label": "my-vpc",
"region": "us-east",
"subnets": [],
"updated": "2023-08-31T18:35:03"
}
]
```


Loading
Loading