-
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.
This PR adds functionality of BGP session management to ansible collection
- Loading branch information
Showing
13 changed files
with
1,064 additions
and
33 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
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,80 @@ | ||
# metal_bgp_session | ||
|
||
Manage BGP sessions in Equinix Metal.Create, update or delete BGP session. To look up an existing session, pass only the *id* attribute. | ||
|
||
|
||
- [Examples](#examples) | ||
- [Parameters](#parameters) | ||
- [Return Values](#return-values) | ||
|
||
## Examples | ||
|
||
```yaml | ||
- name: Start first test bgp session | ||
hosts: localhost | ||
tasks: | ||
- equinix.cloud.metal_bgp_session: | ||
device_id: 8ea9837a-6d19-4607-b166-f7f7bb04b022 | ||
address_family: ipv6 | ||
default_route: true | ||
|
||
``` | ||
|
||
```yaml | ||
- name: Delete bgp session | ||
hosts: localhost | ||
tasks: | ||
- equinix.cloud.metal_bgp_session: | ||
id: 1273edef-39af-4df0-85bb-02a847a484d1 | ||
state: absent | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
|-----------|------|----------|------------------------------------------------------------------------------| | ||
| `id` | <center>`str`</center> | <center>Optional</center> | UUID of the BGP session to look up | | ||
| `device_id` | <center>`str`</center> | <center>Optional</center> | Device ID for the BGP session | | ||
| `address_family` | <center>`str`</center> | <center>Optional</center> | BGP session address family, "ipv4" or "ipv6" | | ||
| `default_route` | <center>`bool`</center> | <center>Optional</center> | Boolean flag to set the default route policy. False by default. | | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Return Values | ||
|
||
- `metal_bgp_session` - The module object | ||
|
||
- Sample Response: | ||
```json | ||
|
||
[ | ||
{ | ||
"address_family": "ipv4", | ||
"default_route": true, | ||
"device_id": "2066d33e-7c43-4d78-87a3-aaa434913f7f", | ||
"id": "fc2d43e6-d606-47f7-9611-9d77aee443b5" | ||
}, | ||
{ | ||
"address_family": "ipv6", | ||
"default_route": true, | ||
"device_id": "bfab58c0-0723-49aa-a64e-6caf1b8ea2e2", | ||
"id": "277d4a7a-82dd-4e7c-bf79-8a1de6882982" | ||
} | ||
] | ||
|
||
``` | ||
|
||
|
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 @@ | ||
# metal_bgp_session_info | ||
|
||
Gather information BGP sessions in Equinix Metal. You can fetch it by device ID or project ID. | ||
|
||
|
||
- [Examples](#examples) | ||
- [Parameters](#parameters) | ||
- [Return Values](#return-values) | ||
|
||
## Examples | ||
|
||
```yaml | ||
- name: Gather information about all BGP sessions in a project | ||
hosts: localhost | ||
tasks: | ||
- equinix.cloud.metal_bgp_session_info: | ||
project_id: 2a5122b9-c323-4d5c-b53c-9ad3f54273e7 | ||
|
||
``` | ||
|
||
```yaml | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
|-----------|------|----------|------------------------------------------------------------------------------| | ||
| `device_id` | <center>`str`</center> | <center>Optional</center> | Find BGP sessions by device ID. | | ||
| `project_id` | <center>`str`</center> | <center>Optional</center> | Find BGP sessions by project ID. | | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Return Values | ||
|
||
- `resources` - Found resources | ||
|
||
- Sample Response: | ||
```json | ||
[ | ||
{ | ||
"address_family": "ipv6", | ||
"default_route": true, | ||
"device_id": "b068984f-f7d9-43a2-aa45-de04dcf4fe06", | ||
"id": "03912bd6-a158-47ad-8bc7-c93df338fe0d" | ||
} | ||
] | ||
``` | ||
|
||
|
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 @@ | ||
# metal_project_bgp_config | ||
|
||
You can use this module to enable BGP Config for a project. To lookup BGP Config of an existing project, call the module only with `project_id`. | ||
|
||
|
||
- [Examples](#examples) | ||
- [Parameters](#parameters) | ||
- [Return Values](#return-values) | ||
|
||
## Examples | ||
|
||
```yaml | ||
- name: Enable local BGP Config in Equinix Metal project | ||
hosts: localhost | ||
tasks: | ||
- equinix.cloud.metal_project_bgp_config: | ||
deployment_type: local | ||
asn: 65000 | ||
md5: null | ||
use_case: "ansible test" | ||
project_id: "{{ test_project.id }}" | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
|-----------|------|----------|------------------------------------------------------------------------------| | ||
| `project_id` | <center>`str`</center> | <center>**Required**</center> | UUID of the project where BGP Config should be enabled | | ||
| `asn` | <center>`int`</center> | <center>**Required**</center> | Autonomous System Number for local BGP deployment | | ||
| `deployment_type` | <center>`str`</center> | <center>**Required**</center> | "local" or "global". Local deployment type is likely to be usable immediately, "global" will need to be reviewed by Equinix Metal support. | | ||
| `md5` | <center>`str`</center> | <center>Optional</center> | Password for BGP session in plaintext (not a checksum) | | ||
| `use_case` | <center>`str`</center> | <center>Optional</center> | Description of your BGP use-case for Equinix Metal support | | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Return Values | ||
|
||
- `metal_project_bgp_config` - The module object | ||
|
||
- Sample Response: | ||
```json | ||
|
||
{ | ||
"changed": true | ||
} | ||
|
||
``` | ||
|
||
|
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.