diff --git a/netmiko/nokia/nokia_srl.py b/netmiko/nokia/nokia_srl.py index 781467aeb..930e7ced0 100644 --- a/netmiko/nokia/nokia_srl.py +++ b/netmiko/nokia/nokia_srl.py @@ -79,7 +79,7 @@ def config_mode( def check_config_mode( self, - check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", + check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* | \+\!\* | \+\! )candidate", pattern: str = r"#", force_regex: bool = True, ) -> bool: @@ -161,5 +161,7 @@ def _has_uncommitted_changes(self, prompt: str) -> bool: The exclamation mark (!) in the prompt indicates that another user has commited changes to the running datastore. """ - matches = re.search(r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", prompt) + matches = re.search( + r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* | \+\!\* | \+\! )candidate", prompt + ) return True if matches and "*" in matches.group() else False diff --git a/tests/etc/test_devices.yml.example b/tests/etc/test_devices.yml.example index 70839d115..f365b9583 100644 --- a/tests/etc/test_devices.yml.example +++ b/tests/etc/test_devices.yml.example @@ -269,6 +269,7 @@ nokia_srl: ip: clab-srltest-srl1 username: admin password: 'admin' + use_keys: "True" audiocode_72: device_type: audiocode_72 diff --git a/tests/test_nokia_srl/README.md b/tests/test_nokia_srl/README.md index f90c599be..c273b135d 100644 --- a/tests/test_nokia_srl/README.md +++ b/tests/test_nokia_srl/README.md @@ -15,7 +15,7 @@ The containerlab node hostname is clab-srltest-srl1. ## Run the test ``` -sudo sh test_srl.sh +./test_srl.sh ``` ## Destroy containerlab Node diff --git a/tests/test_nokia_srl/test_srl.sh b/tests/test_nokia_srl/test_srl.sh old mode 100644 new mode 100755 index 7e00f17e6..fdc4900c7 --- a/tests/test_nokia_srl/test_srl.sh +++ b/tests/test_nokia_srl/test_srl.sh @@ -5,8 +5,8 @@ RETURN_CODE=0 echo "Starting tests...:" \ && echo "Nokia SR Linux" \ && cd .. \ -&& py.test -s -x -v test_netmiko_show.py --test_device nokia_srl \ -&& py.test -s -x -v test_netmiko_config.py --test_device nokia_srl \ +&& pytest -s -x -v test_netmiko_show.py --test_device nokia_srl \ +&& pytest -s -x -v test_netmiko_config.py --test_device nokia_srl \ || RETURN_CODE=1 exit $RETURN_CODE