community.skydive.skydive_edge – Module to add edges to Skydive topology
Note
This plugin is part of the community.skydive collection (version 1.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.skydive
.
To use it in a playbook, specify: community.skydive.skydive_edge
.
Synopsis
This module handles setting up edges between two nodes based on the relationship type to the Skydive topology.
Requirements
The below requirements are needed on the host that executes this module.
skydive-client
Parameters
Parameter |
Comments |
---|---|
To defined the second node of the link, it can be either an ID or a gremlin expression |
|
To define the host of the node. Default: “” |
|
To define metadata for the edge. |
|
To defined the first node of the link, it can be either an ID or a gremlin expression |
|
A dict object containing connection details. |
|
Specifies the hostname/address along with the port as |
|
Ignore SSL certification verification. Choices:
|
|
Specifies the password to use to authenticate the connection to the remote instance of SKYDIVE client. |
|
Specifies the ssl parameter that decides if the connection type shall be http or https. Choices:
|
|
Configures the username to use to authenticate the connection to the remote instance of SKYDIVE client. |
|
To define relation type of the node ownership, layer2, layer3. |
|
State of the Skydive Edge. If value is present new edge will be created else if it is absent it will be deleted. Choices:
|
Examples
- name: create tor
community.skydive.skydive_node:
name: 'TOR'
node_type: "fabric"
seed: TOR
metadata:
Model: Cisco xxxx
provider:
endpoint: localhost:8082
username: admin
password: admin
register: tor_result
- name: create port 1
community.skydive.skydive_node:
name: 'PORT1'
node_type: 'fabric'
seed: PORT1
provider:
endpoint: localhost:8082
username: admin
password: admin
register: port1_result
- name: create port 2
community.skydive.skydive_node:
name: 'PORT2'
node_type: 'fabric'
seed: PORT2
provider:
endpoint: localhost:8082
username: admin
password: admin
register: port2_result
- name: link node tor and port 1
community.skydive.skydive_edge:
parent_node: "{{ tor_result.UUID }}"
child_node: "{{ port1_result.UUID }}"
relation_type: ownership
state: present
provider:
endpoint: localhost:8082
username: admin
password: admin
- name: link node tor and port 2
community.skydive.skydive_edge:
parent_node: "{{ tor_result.UUID }}"
child_node: "{{ port2_result.UUID }}"
relation_type: ownership
state: present
provider:
endpoint: localhost:8082
username: admin
password: admin
- name: update link node tor and port 1 relation
community.skydive.skydive_edge:
parent_node: "{{ tor_result.UUID }}"
child_node: "{{ port2_result.UUID }}"
relation_type: layer2
state: upadte
provider:
endpoint: localhost:8082
username: admin
password: admin
- name: Unlink tor and port 2
community.skydive.skydive_edge:
parent_node: "{{ tor_result.UUID }}"
child_node: "{{ port2_result.UUID }}"
relation_type: ownership
state: absent
provider:
endpoint: localhost:8082
username: admin
password: admin
- name: link tor and port 2 via Gremlin expression
community.skydive.skydive_edge:
parent_node: G.V().Has('Name', 'TOR')
child_node: G.V().Has('Name', 'PORT2')
relation_type: ownership
state: present
provider:
endpoint: localhost:8082
username: admin
password: admin
- name: Unlink tor and port 2 via Gremlin expression
community.skydive.skydive_edge:
parent_node: G.V().Has('Name', 'TOR')
child_node: G.V().Has('Name', 'PORT2')
relation_type: ownership
state: absent
provider:
endpoint: localhost:8082
username: admin
password: admin
Authors
Sumit Jaiswal (@sjaiswal)