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:
Nathaniel Case 2018-05-17 18:47:15 -04:00 committed by GitHub
commit e9d7fa0418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
277 changed files with 1325 additions and 1676 deletions

View file

@ -14,9 +14,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local ansible_become=no"
with_first_found: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -9,8 +9,8 @@
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
- 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

View file

@ -4,7 +4,6 @@
- name: test getting all facts
eos_facts:
provider: "{{ cli }}"
gather_subset:
- all
become: yes

View file

@ -4,7 +4,6 @@
- name: test getting default facts
eos_facts:
provider: "{{ cli }}"
become: yes
register: result

View file

@ -4,7 +4,6 @@
- name: test invalid subset (foobar)
eos_facts:
provider: "{{ cli }}"
gather_subset:
- "foobar"
register: result
@ -26,7 +25,6 @@
- name: test subset specified multiple times
eos_facts:
provider: "{{ cli }}"
gather_subset:
- "!hardware"
- "hardware"

View file

@ -4,7 +4,6 @@
- name: test not hardware
eos_facts:
provider: "{{ cli }}"
gather_subset:
- "!hardware"
become: yes

View file

@ -5,11 +5,9 @@
eos_config:
lines: lldp run
authorize: yes
provider: "{{ eapi }}"
- name: test getting all facts
eos_facts:
provider: "{{ eapi }}"
gather_subset:
- all
register: result
@ -35,6 +33,5 @@
eos_config:
lines: no lldp run
authorize: yes
provider: "{{ eapi }}"
- debug: msg="END eapi/all_facts.yaml"

View file

@ -5,11 +5,9 @@
eos_config:
lines: lldp run
authorize: yes
provider: "{{ eapi }}"
- name: test getting default facts
eos_facts:
provider: "{{ eapi }}"
register: result
- assert:
@ -37,6 +35,5 @@
eos_config:
lines: lldp run
authorize: yes
provider: "{{ eapi }}"
- debug: msg="END eapi/default.yaml"

View file

@ -4,7 +4,6 @@
- name: test invalid subset (foobar)
eos_facts:
provider: "{{ eapi }}"
gather_subset:
- "foobar"
register: result
@ -26,7 +25,6 @@
- name: test subset specified multiple times
eos_facts:
provider: "{{ eapi }}"
gather_subset:
- "!hardware"
- "hardware"

View file

@ -5,11 +5,9 @@
eos_config:
lines: lldp run
authorize: yes
provider: "{{ eapi }}"
- name: test not hardware
eos_facts:
provider: "{{ eapi }}"
gather_subset:
- "!hardware"
register: result
@ -36,6 +34,5 @@
eos_config:
lines: no lldp run
authorize: yes
provider: "{{ eapi }}"
- debug: msg="END eapi/not_hardware_facts.yaml"