-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
619 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
on: | ||
pull_request_target: | ||
paths: | ||
- plugins/** | ||
- tests/** | ||
- Makefile | ||
- requirements.txt | ||
- requirements-dev.txt | ||
- .github/** | ||
workflow_dispatch: | ||
|
||
permissions: | ||
pull-requests: read | ||
contents: read | ||
|
||
jobs: | ||
authorize: | ||
environment: | ||
${{ github.event_name == 'pull_request_target' && | ||
github.event.pull_request.head.repo.full_name != github.repository && | ||
'external' || 'internal' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: true | ||
|
||
integration-test-pr: | ||
needs: authorize | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: .ansible/collections/ansible_collections/equinix/cloud | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: .ansible/collections/ansible_collections/equinix/cloud | ||
ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
|
||
- name: update packages | ||
run: sudo apt-get update -y | ||
|
||
- name: install make | ||
run: sudo apt-get install -y build-essential | ||
|
||
- name: setup python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: install dependencies | ||
run: pip3 install -r requirements-dev.txt -r requirements.txt | ||
|
||
- name: install collection | ||
run: make install | ||
|
||
- name: replace existing keys | ||
run: rm -rf ~/.ansible/test && mkdir -p ~/.ansible/test && ssh-keygen -m PEM -q -t rsa -N '' -f ~/.ansible/test/id_rsa | ||
|
||
- name: run tests | ||
run: make testall | ||
env: | ||
METAL_API_TOKEN: ${{ secrets.METAL_API_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# metal_vlan | ||
|
||
Manage the VLAN in Equinix Metal. You can use *id* or *vxlan* to lookup the resource. If you want to create new resource, you must provide *metro*. | ||
|
||
|
||
- [Examples](#examples) | ||
- [Parameters](#parameters) | ||
- [Return Values](#return-values) | ||
|
||
## Examples | ||
|
||
```yaml | ||
- name: Create new VLAN | ||
hosts: localhost | ||
tasks: | ||
- equinix.cloud.metal_vlan: | ||
description: "This is my new VLAN." | ||
metro: "se" | ||
vxlan: 1234 | ||
project_id: "778h50f7-75b6-4271-bc64-632b80f87de2" | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
|-----------|------|----------|------------------------------------------------------------------------------| | ||
| `id` | <center>`str`</center> | <center>Optional</center> | ID of parent project" | | ||
| `project_id` | <center>`str`</center> | <center>Optional</center> | ID of parent project" | | ||
| `description` | <center>`str`</center> | <center>Optional</center> | Description of the VLAN **(Updatable)** | | ||
| `metro` | <center>`str`</center> | <center>Optional</center> | Metro in which to create the VLAN **(Updatable)** | | ||
| `vxlan` | <center>`int`</center> | <center>Optional</center> | VLAN ID, must be unique in metro **(Updatable)** | | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Return Values | ||
|
||
- `metal_vlan` - The module object | ||
|
||
- Sample Response: | ||
```json | ||
|
||
{ | ||
"changed": false, | ||
"id": "7624f0f7-75b6-4271-bc64-632b80f87de2", | ||
"description": "This is my new VLAN.", | ||
"metro": "se", | ||
"vxlan": 1234, | ||
"project_id": "778h50f7-75b6-4271-bc64-632b80f87de2" | ||
} | ||
|
||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# metal_vlan_info | ||
|
||
Gather information about Equinix Metal VLAN resources | ||
|
||
|
||
- [Examples](#examples) | ||
- [Parameters](#parameters) | ||
- [Return Values](#return-values) | ||
|
||
## Examples | ||
|
||
```yaml | ||
- name: list vlans | ||
equinix.cloud.metal_vlan_info: | ||
register: listed_vlan | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
|-----------|------|----------|------------------------------------------------------------------------------| | ||
| `project_id` | <center>`str`</center> | <center>Optional</center> | Filter vlans by Project UUID. | | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Return Values | ||
|
||
- `resources` - Found resources | ||
|
||
- Sample Response: | ||
```json | ||
|
||
[ | ||
{ | ||
"vxlan": 1234, | ||
"metro": "se", | ||
"id": "845b45a3-c565-47e5-b9b6-a86204a73d29", | ||
"description": "My VLAN." | ||
} | ||
] | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.