mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
HTTP(S) API connection plugin (#39224)
* HTTPAPI connection * Punt run_commands to cliconf or httpapi * Fake enable_mode on eapi * Pull changes to nxos * Move load_config to edit_config for future-preparedness * Don't fail on lldp disabled * Re-enable check_rc on nxos' run_commands * Reorganize nxos httpapi plugin for compatibility * draft docs for connection: httpapi * restores docs for connection:local for eapi * Add _remote_is_local to httpapi
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: collect common nxapi test cases
|
||||
- name: collect common test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/common"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
@@ -20,8 +20,8 @@
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test cases (connection=local)
|
||||
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
|
||||
- name: run test cases (connection=httpapi)
|
||||
include: "{{ test_case_to_run }} ansible_connection=httpapi"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
nxos_config: &default
|
||||
lines:
|
||||
- "default interface {{ intname }}"
|
||||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "Setup: Put interface into no switch port mode"
|
||||
@@ -23,7 +22,6 @@
|
||||
parents:
|
||||
- "interface {{ intname }}"
|
||||
match: none
|
||||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "Setup: Cleanup possibly existing acl"
|
||||
@@ -31,7 +29,6 @@
|
||||
name: ANSIBLE_ACL
|
||||
seq: 10
|
||||
state: delete_acl
|
||||
provider: "{{ connection }}"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Configure Supporting ACL
|
||||
@@ -42,7 +39,6 @@
|
||||
proto: tcp
|
||||
src: 1.1.1.1/24
|
||||
dest: any
|
||||
provider: "{{ connection }}"
|
||||
|
||||
- block:
|
||||
- name: Configure acl interface egress
|
||||
@@ -51,7 +47,6 @@
|
||||
interface: "{{ intname }}"
|
||||
direction: egress
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: &true
|
||||
@@ -72,7 +67,6 @@
|
||||
interface: "{{ intname }}"
|
||||
direction: ingress
|
||||
state: present
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
@@ -89,7 +83,6 @@
|
||||
interface: "{{ intname }}"
|
||||
direction: egress
|
||||
state: absent
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
@@ -106,7 +99,6 @@
|
||||
interface: "{{ intname }}"
|
||||
direction: ingress
|
||||
state: absent
|
||||
provider: "{{ connection }}"
|
||||
register: result
|
||||
|
||||
- assert: *true
|
||||
|
||||
Reference in New Issue
Block a user