skydive_edge – Module to add edges to Skydive topology

New in version 2.8.

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 Choices/Defaults Comments
child_node
- / required
To defined the second node of the link, it can be either an ID or a gremlin expression
host
-
Default:
""
To define the host of the node.
metadata
-
To define metadata for the edge.
parent_node
- / required
To defined the first node of the link, it can be either an ID or a gremlin expression
provider
-
A dict object containing connection details.
endpoint
- / required
Specifies the hostname/address along with the port as localhost:8082for connecting to the remote instance of SKYDIVE client over the REST API.
insecure
boolean
    Choices:
  • no
  • yes
Ignore SSL certification verification.
password
-
Specifies the password to use to authenticate the connection to the remote instance of SKYDIVE client.
ssl
boolean
    Choices:
  • no
  • yes
Specifies the ssl parameter that decides if the connection type shall be http or https.
user
-
Configures the username to use to authenticate the connection to the remote instance of SKYDIVE client.
relation_type
- / required
To define relation type of the node ownership, layer2, layer3.
state
-
    Choices:
  • present
  • absent
State of the Skydive Edge. If value is present new edge will be created else if it is absent it will be deleted.

Notes

Note

  • This module must be run locally, which can be achieved by specifying connection: local.

Examples

- name: create tor
  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
  skydive_node:
    name: 'PORT1'
    node_type: 'fabric'
    seed: PORT1
    provider:
      endpoint: localhost:8082
      username: admin
      password: admin
  register: port1_result

- name: create port 2
  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
  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
  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
  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
  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
  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
  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

Status

Red Hat Support

More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.

Authors

  • Sumit Jaiswal (@sjaiswal)

Hint

If you notice any issues in this documentation you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/skydive_edge_module.html