Skip to content

Commit

Permalink
Fix CI test and update sphinx configuration (#1096)
Browse files Browse the repository at this point in the history
* Remove commented out test
* Pin jinja dependency (RTD)
* Add sphinx_rtd_theme as dependency (RTD)
  • Loading branch information
rodvand authored Oct 18, 2023
1 parent ccd88fc commit 88ed8a3
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 70 deletions.
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ansible
antsibull==0.48.0
sphinx==3.4.2
Jinja2<3.1
sphinx_rtd_theme
135 changes: 65 additions & 70 deletions tests/integration/targets/v3.6/tasks/netbox_ip_address.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,81 +211,76 @@
state: new
register: test_ten

###
# Bug 13876 in netbox-community/netbox
###

#- name: "10 - ASSERT"
# assert:
# that:
# - test_ten is changed
# - test_ten['diff']['before']['state'] == "absent"
# - test_ten['diff']['after']['state'] == "present"
# - test_ten['msg'] == "ip_address 10.10.0.1/16 created"
# - test_ten['ip_address']['address'] == "10.10.0.1/16"
# - test_ten['ip_address']['family'] == 4
# - test_ten['ip_address']['assigned_object_type'] == "dcim.interface"
# - test_ten['ip_address']['assigned_object_id'] == 4

#- name: "11 - Create IP address on GigabitEthernet2 - test100 - State: present"
# netbox.netbox.netbox_ip_address:
# netbox_url: http://localhost:32768
# netbox_token: 0123456789abcdef0123456789abcdef01234567
# data:
# family: 4
# prefix: 192.168.100.0/24
# assigned_object:
# name: GigabitEthernet2
# device: test100
# state: present
# register: test_eleven

#- name: "11 - ASSERT"
# assert:
# that:
# - test_eleven is changed
# - test_eleven['diff']['before']['state'] == "absent"
# - test_eleven['diff']['after']['state'] == "present"
# - test_eleven['msg'] == "ip_address 192.168.100.2/24 created"
# - test_eleven['ip_address']['address'] == "192.168.100.2/24"
- name: "10 - ASSERT"
assert:
that:
- test_ten is changed
- test_ten['diff']['before']['state'] == "absent"
- test_ten['diff']['after']['state'] == "present"
- test_ten['msg'] == "ip_address 10.10.0.1/16 created"
- test_ten['ip_address']['address'] == "10.10.0.1/16"
- test_ten['ip_address']['family'] == 4
- test_ten['ip_address']['assigned_object_type'] == "dcim.interface"
- test_ten['ip_address']['assigned_object_id'] == 4

- name: "11 - Create IP address on GigabitEthernet2 - test100 - State: present"
netbox.netbox.netbox_ip_address:
netbox_url: http://localhost:32768
netbox_token: 0123456789abcdef0123456789abcdef01234567
data:
family: 4
prefix: 192.168.100.0/24
assigned_object:
name: GigabitEthernet2
device: test100
state: present
register: test_eleven

#- name: "12 - Duplicate - 192.168.100.2/24 on interface"
# netbox.netbox.netbox_ip_address:
# netbox_url: http://localhost:32768
# netbox_token: 0123456789abcdef0123456789abcdef01234567
# data:
# address: 192.168.100.2/24
# assigned_object:
# name: GigabitEthernet2
# device: test100
# state: present
# register: test_twelve
- name: "11 - ASSERT"
assert:
that:
- test_eleven is changed
- test_eleven['diff']['before']['state'] == "absent"
- test_eleven['diff']['after']['state'] == "present"
- test_eleven['msg'] == "ip_address 192.168.100.2/24 created"
- test_eleven['ip_address']['address'] == "192.168.100.2/24"

#- name: "12 - ASSERT"
# assert:
# that:
# - not test_twelve['changed']
# - test_twelve['msg'] == "ip_address 192.168.100.2/24 already exists"
# - test_twelve['ip_address']['address'] == "192.168.100.2/24"
# - test_twelve['ip_address']['assigned_object_type'] == "dcim.interface"
# - test_twelve['ip_address']['assigned_object_id'] == 4
- name: "12 - Duplicate - 192.168.100.2/24 on interface"
netbox.netbox.netbox_ip_address:
netbox_url: http://localhost:32768
netbox_token: 0123456789abcdef0123456789abcdef01234567
data:
address: 192.168.100.2/24
assigned_object:
name: GigabitEthernet2
device: test100
state: present
register: test_twelve

#- name: "13 - Duplicate - 192.168.100.2/24"
# netbox.netbox.netbox_ip_address:
# netbox_url: http://localhost:32768
# netbox_token: 0123456789abcdef0123456789abcdef01234567
# data:
# address: 192.168.100.2/24
# state: present
# register: test_thirteen
- name: "12 - ASSERT"
assert:
that:
- not test_twelve['changed']
- test_twelve['msg'] == "ip_address 192.168.100.2/24 already exists"
- test_twelve['ip_address']['address'] == "192.168.100.2/24"
- test_twelve['ip_address']['assigned_object_type'] == "dcim.interface"
- test_twelve['ip_address']['assigned_object_id'] == 4

#- name: "13 - ASSERT"
# assert:
# that:
# - not test_thirteen['changed']
# - test_thirteen['msg'] == "ip_address 192.168.100.2/24 already exists"
# - test_thirteen['ip_address']['address'] == "192.168.100.2/24"
- name: "13 - Duplicate - 192.168.100.2/24"
netbox.netbox.netbox_ip_address:
netbox_url: http://localhost:32768
netbox_token: 0123456789abcdef0123456789abcdef01234567
data:
address: 192.168.100.2/24
state: present
register: test_thirteen

- name: "13 - ASSERT"
assert:
that:
- not test_thirteen['changed']
- test_thirteen['msg'] == "ip_address 192.168.100.2/24 already exists"
- test_thirteen['ip_address']['address'] == "192.168.100.2/24"

- name: "14 - Create IP address on Eth0 - test100-vm - State: present"
netbox.netbox.netbox_ip_address:
Expand Down

0 comments on commit 88ed8a3

Please sign in to comment.