Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New voss_config module #47533

Merged
merged 2 commits into from Nov 1, 2018

Conversation

Projects
None yet
4 participants
@LindsayHill
Copy link
Contributor

commented Oct 23, 2018

SUMMARY

New module for managing configurations on Extreme Networks (née Avaya) VOSS-based devices (VSP).

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

voss_config

ANSIBLE VERSION
(venv)Lindsays-MacBook:voss lhill$ ansible --version
ansible 2.8.0.dev0 (voss_config baa864a766) last updated 2018/10/23 12:37:04 (GMT -700)
  config file = None
  configured module search path = [u'/Users/lhill/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/lhill/github/ansible/lib/ansible
  executable location = /Users/lhill/github/ansible/bin/ansible
  python version = 2.7.10 (default, Aug 17 2018, 17:41:52) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)]
ADDITIONAL INFORMATION

VOSS uses a 'flat' configuration file, with no indentation. Instead it uses exit to identify the end of an interface-specific, or routing protocol-specific section, e.g.

interface GigabitEthernet 1/1
no shutdown
exit
interface GigabitEthernet 1/2
no shutdown
exit

This is similar to Dell OS 6, but with only a single level of sub-commands. This module identifies the beginning & end of such sections, and maps to 'parents' and 'children' in the ConfigLine object.

There is an additional complexity element in that it may repeat the same "interface XX" or "router XXX" top-level command. Typically this is used to separate out IPv6 configuration options, e.g.:

router ospf
timers basic holddown 45
area 0.0.0.1
exit
router ospf
ipv6 router-id  6.6.6.6
ipv6 area  0.0.0.6
exit

This module internally treats those as a combined object under the same parent.

Example playbook:

(venv)Lindsays-MacBook:playbooks lhill$ cat voss_config_lines.yaml
---
- hosts: vsp200
  gather_facts: no

  tasks:
    - name: Description on 1/2
      voss_config:
        lines:
          - name "ServerB"
        parents: interface GigabitEthernet 1/2
        save_when: changed

Example first run:

(venv)Lindsays-MacBook:playbooks lhill$ ansible-playbook -v voss_config_lines.yaml
Using /Users/lhill/github/ansible-extreme/playbooks/ansible.cfg as config file
/Users/lhill/github/ansible-extreme/playbooks/hosts did not meet host_list requirements, check plugin documentation if this is unexpected
/Users/lhill/github/ansible-extreme/playbooks/hosts did not meet script requirements, check plugin documentation if this is unexpected

PLAY [vsp200] *******************************************************************************************************************

TASK [Description on 1/2] *******************************************************************************************************
changed: [vsp200] => {"changed": true, "commands": ["interface GigabitEthernet 1/2", "name \"ServerB\""], "updates": ["interface GigabitEthernet 1/2", "name \"ServerB\""]}

PLAY RECAP **********************************************************************************************************************
vsp200                     : ok=1    changed=1    unreachable=0    failed=0    skipped=0

(venv)Lindsays-MacBook:playbooks lhill$

Example second run (no change needed):

(venv)Lindsays-MacBook:playbooks lhill$ ansible-playbook -v voss_config_lines.yaml
Using /Users/lhill/github/ansible-extreme/playbooks/ansible.cfg as config file
/Users/lhill/github/ansible-extreme/playbooks/hosts did not meet host_list requirements, check plugin documentation if this is unexpected
/Users/lhill/github/ansible-extreme/playbooks/hosts did not meet script requirements, check plugin documentation if this is unexpected

PLAY [vsp200] *******************************************************************************************************************

TASK [Description on 1/2] *******************************************************************************************************
ok: [vsp200] => {"changed": false}

PLAY RECAP **********************************************************************************************************************
vsp200                     : ok=1    changed=0    unreachable=0    failed=0    skipped=0

(venv)Lindsays-MacBook:playbooks lhill$
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2018

Hi @LindsayHill, thank you for submitting this pull-request!

click here for bot help

@ansibot

This comment has been minimized.

@ansibot ansibot added needs_revision and removed core_review labels Oct 23, 2018

@LindsayHill

This comment has been minimized.

Copy link
Contributor Author

commented Oct 23, 2018

Looks like #46996 changed import statements for tests. Updated.

@LindsayHill

This comment has been minimized.

Copy link
Contributor Author

commented Oct 23, 2018

CI is failing due to unrelated transient failures for some systems (e.g. yum repo metadata download failures). Will close/re-open to re-trigger CI

@LindsayHill LindsayHill reopened this Oct 23, 2018

@LindsayHill

This comment has been minimized.

Copy link
Contributor Author

commented Oct 23, 2018

CI failures are due to unrelated things - e.g. upstream issues. Will try re-running CI tomorrow.

@bigmstone

This comment has been minimized.

Copy link
Contributor

commented Oct 24, 2018

Hopefully CI will get cleaned up quickly.

@bigmstone

This comment has been minimized.

Copy link
Contributor

commented Oct 24, 2018

shipit

@ansibot ansibot removed the needs_triage label Oct 24, 2018

@LindsayHill

This comment has been minimized.

Copy link
Contributor Author

commented Oct 24, 2018

Made a small docstring change to the parents: section. Has triggered another CI run

@LindsayHill LindsayHill reopened this Oct 24, 2018

@LindsayHill

This comment has been minimized.

Copy link
Contributor Author

commented Oct 24, 2018

Well, we're at "UNSTABLE" now. Guess that's an improvement. Needs this resolved: #47582

@LindsayHill LindsayHill reopened this Oct 25, 2018

@LindsayHill

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2018

Still more random unrelated CI failures. At least the MySQL issues seem to be resolved now

@LindsayHill

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2018

Still a few random failures due to unrelated upstream things. Will trigger rebuild next week.

@LindsayHill LindsayHill reopened this Oct 30, 2018

@ansibot ansibot added core_review and removed needs_revision labels Oct 30, 2018

@justjais justjais self-requested a review Oct 31, 2018

@ganeshrn

This comment has been minimized.

Copy link
Member

commented Nov 1, 2018

@ganeshrn ganeshrn merged commit a1b0d20 into ansible:devel Nov 1, 2018

1 check passed

Shippable Run 90907 status is SUCCESS.
Details

Tomorrow9 added a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018

New voss_config module (ansible#47533)
* New voss_config module

* Updated test import paths as per ansible#46996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.