Mattias Walström
82ff83c50d
infamy: Set hostname from logical topology
...
If no hostname is specified, set it to the dut-name in
logical topology
2024-11-07 09:47:36 +01:00
Mattias Walström
a23634dd7e
test: Implement put_config_dicts
...
Add all configuration in one command.
Also update the test igmp_vlan to use
put_config_dicts instead of put_config_dict
2024-11-06 12:06:19 +01:00
Joachim Wiberg
c0a79c3e00
test: return None instead of 404 Exception for missing XPaths
...
Fixes to following exception calling iface.interface_exist(target, veth0): requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://[fe80::2a0:85ff:fe00:201%d2a]:443/restconf/ds/ietf-datastores%3Aoperational/ietf-interfaces%3Ainterfaces/interface=veth0a/name
Removing interface veth0a, and then checking operational if it has been
properly removed, should not cause an exception. Better to return None
object instead.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-09-27 16:37:16 +02:00
Mattias Walström
35a909edf0
test: infamy: Make possible to override username and password
...
This is now possible for SSH/RESTCONF/NETCONF, most useful with
SSH and adding/modify users.
2024-09-17 08:27:23 +02:00
Joachim Wiberg
f071dacf8b
test: add __str__ to Device class for reading device name
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-09-05 07:04:58 +02:00
Joachim Wiberg
5e03b20bb2
test: minor, cleanup & pep-8 fixes
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-09-05 07:04:58 +02:00
Mattias Walström
dc4c38ede6
test: Adapt tests/infamy for the new test config
...
Instead of copy factoy config to reset between tests,
use the new test-config.cfg.
Change the logic in the factory config since the default values have changed.
2024-08-30 17:40:02 +02:00
Mattias Walström
b76904c0e6
Add retry if HTTP error 502 (bad gateway)
...
This is most likely caused by nginx is up but rousette
is not fully started yet.
2024-08-29 16:29:44 +02:00
Mattias Walström and Tobias Waldekranz
60e8b24d01
infamy: Refactor xpath handling between restconf and netconf implmentation
...
Previous xpath may or may not been an xpath, we still called it xpath.
Remove the obscure function get_xpath() and instead transform to a
URI in restconf.py
This fix issue #490
Signed-off-by: Mattias Walström <lazzer@gmail.com >
2024-08-16 16:50:13 +02:00
Mattias Walström
d27153ea95
Refactor randomization of transport protocol
...
Simplify the logic and add a parameter to the command line parser
instead of environment variable.
2024-06-27 15:43:06 +02:00
Mattias Walström
e3cd981830
restconf: Add workaround for bug in request 2.32.x
2024-06-27 15:43:06 +02:00
Mattias Walström
d340ba7407
infamy: Wait for NETCONF and RESTCONF
...
Also remove some code duplication.
2024-06-27 15:43:06 +02:00
Mattias Walström
b790c46dc4
restconf: Bugfix download yang modules
...
Actually check if the model is already downloaded,
before download.
2024-06-27 15:43:06 +02:00
Mattias Walström
4cc23092b2
restconf: Implement actions
...
And refactor how it was implemented in netconf
2024-06-27 15:43:06 +02:00
Mattias Walström
dd0f1610ab
Add get_current_time_with_offset to netconf/restconf
...
This allows the timezone tests to run on restconf as well
2024-06-27 15:43:06 +02:00
Mattias Walström
29f56eb384
Restconf, netconf: Implement full feature compatibility
...
Abstract functions and common functions are located in transport.py
Some quirks has been required due to how rousette works,
these functions has been added to the abstract class
Can be removed when rousette behaves as expected.
2024-06-27 15:43:06 +02:00
Mattias Walström
ef09c65f40
restconf: Add support to download YANG-modules
2024-06-27 15:43:06 +02:00
Mattias Walström
23585486de
test: Add backend to run tests with restconf
...
Very simple tests work (hostname.py), more complex
tests (static_routing.py) failes due to the lack of
model prefix, for example. infix-ip:ipv4 instead of just
ipv4.
We need to fix this before you send your configuration, run
it through libyang for example and get the full model-name.
2024-06-04 13:38:03 +02:00