Browse Source

Add Lenovo enos switch driver

Change-Id: I08eef85c1d61ddd6cfc5624a9b1eceb8f4e8d6c5
changes/19/741219/1
Chris Janiszewski 3 weeks ago
parent
commit
c094a8f79e
5 changed files with 59 additions and 0 deletions
  1. +14
    -0
      etc/ansible/roles/openstack-ml2/providers/enos/conf_trunk_port.yaml
  2. +10
    -0
      etc/ansible/roles/openstack-ml2/providers/enos/create_network.yaml
  3. +9
    -0
      etc/ansible/roles/openstack-ml2/providers/enos/delete_network.yaml
  4. +13
    -0
      etc/ansible/roles/openstack-ml2/providers/enos/delete_port.yaml
  5. +13
    -0
      etc/ansible/roles/openstack-ml2/providers/enos/update_port.yaml

+ 14
- 0
etc/ansible/roles/openstack-ml2/providers/enos/conf_trunk_port.yaml View File

@@ -0,0 +1,14 @@
---
- name: "enos: configure trunk port"
enos_command:
commands:
- enable
- configure terminal
- "terminal dont-ask"
- "interface port {{ ml2_port_name }}"
- no switchport trunk allowed vlan
- switchport mode trunk
- switchport trunk allowed vlan [{{ ml2_segmentation_id }}{% for vlan in trunked_vlans %},{{ vlan }}{% endfor %}]"
- "switchport trunk native vlan {{ ml2_segmentation_id }}"
register: result
connection: network_cli

+ 10
- 0
etc/ansible/roles/openstack-ml2/providers/enos/create_network.yaml View File

@@ -0,0 +1,10 @@
---
- name: "enos: create vlan"
enos_command:
commands:
- enable
- configure terminal
- "vlan {{ ml2_segmentation_id }}"
- "name {{ ml2_segmentation_name }}"
register: result
connection: network_cli

+ 9
- 0
etc/ansible/roles/openstack-ml2/providers/enos/delete_network.yaml View File

@@ -0,0 +1,9 @@
---
- name: "enos: delete vlan"
enos_command:
commands:
- enable
- configure terminal
- "no vlan {{ ml2_segmentation_id }}"
register: result
connection: network_cli

+ 13
- 0
etc/ansible/roles/openstack-ml2/providers/enos/delete_port.yaml View File

@@ -0,0 +1,13 @@
---
- name: "enos: delete port"
enos_command:
commands:
- enable
- configure terminal
- "terminal dont-ask"
- "interface port {{ ml2_port_name }}"
- no switchport trunk allowed vlan
- switchport mode access
- no switchport access vlan
register: result
connection: network_cli

+ 13
- 0
etc/ansible/roles/openstack-ml2/providers/enos/update_port.yaml View File

@@ -0,0 +1,13 @@
---
- name: "enos: configure access port"
enos_command:
commands:
- enable
- configure terminal
- "terminal dont-ask"
- "interface port {{ ml2_port_name }}"
- no switchport trunk allowed vlan
- switchport mode access
- "switchport access vlan {{ ml2_segmentation_id }}"
register: result
connection: network_cli

Loading…
Cancel
Save