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

Add additional ansible plays and safety checks for aruba CASMNET-2026 #248

Closed
lukebates123 opened this issue Jan 23, 2023 · 0 comments · Fixed by #256
Closed

Add additional ansible plays and safety checks for aruba CASMNET-2026 #248

lukebates123 opened this issue Jan 23, 2023 · 0 comments · Fixed by #256
Assignees
Labels
enhancement New feature or request

Comments

@lukebates123
Copy link
Contributor

lukebates123 commented Jan 23, 2023

Plays needed

  • Copy mgmt interface config from current running config to generated json.
  • Set checkpoint on switch before applying config.
  • Check for reachability after config is applied.
  • Accept checkpoint
  • Run tests
    CASMNET-2026

Limitations

  • Have to upload directly to running config. I was planning on uploading to a checkpoint then copy that to the running config.

Image
We might be able to upload to the startup config. It works with an 8325 running 10.09.0010, but does not work on aruba a aruba virtual switch.

  • We cannot get the mgmt_intf config directly from the API and copy to the running_config.json payload.
https://192.168.1.71/rest/v10.09/system?attributes=mgmt_intf&selector=configuration

output

{
  "mgmt_intf": {
    "admin_state": "up",
    "ip": "192.168.1.71",
    "lldp_trap_enable": true,
    "mode": "static",
    "name": "eth0",
    "subnet_mask": "24"
  }
}

From

"https://{{ ansible_host }}/rest/v10.09/configs/running-config"

output

        "mgmt_intf": {
            "ip": "192.168.1.71",
            "mode": "static",
            "name": "eth0",
            "subnet_mask": "24"
        },

The additional fields prevent us from uploading the json payload.

  • If you upload the running-config via json after you set a checkpoint timer, the checkpoint feature fails to work.
        - name: set checkpoint for one minute "checkpoint auto 1"
          vars:
            ansible_connection: network_cli
          aoscx_command:
            commands:
              - checkpoint auto 1

        # Finally, upload the new config as the running-config
        - name: upload local json config to the running-config
          aoscx_upload_config:
            config_name: "running-config"
            config_json: "{{ validated_config_json }}"
            vrf: "mgmt"
          timeout: 30

        # Accept the checkpoint
        - name: confirm checkpoint "checkpoint auto confirm"
          vars:
            ansible_connection: network_cli
          aoscx_command:
            commands:
              - checkpoint auto confirm
          retries: 5
          delay: 5
  • Uploading to a 6300 switch requires vsf commands. If not the switch will wipe itself once the config is copied to the running-config.
vsf member 1
    type jl762a
@lukebates123 lukebates123 self-assigned this Jan 23, 2023
@lukebates123 lukebates123 changed the title Add additional ansible plays and safety checks. Add additional ansible plays and safety checks for aruba. Jan 23, 2023
@lukebates123 lukebates123 changed the title Add additional ansible plays and safety checks for aruba. Add additional ansible plays and safety checks for aruba CASMNET-2026 Jan 23, 2023
@trad511 trad511 added the enhancement New feature or request label Jan 23, 2023
@lukebates123 lukebates123 linked a pull request Jan 24, 2023 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants