Skip to content

Commit

Permalink
fix regression when checking upstream netconf protocol version
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-sahlmann committed Jan 14, 2025
1 parent c410595 commit d7d2faf
Show file tree
Hide file tree
Showing 4 changed files with 461 additions and 3 deletions.
1 change: 0 additions & 1 deletion mb_netmgmt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# along with mb-netmgmt. If not, see <https://www.gnu.org/licenses/

"""Network Management Protocols for Mountebank"""
__version__ = "0.0.89"

import os
import subprocess
Expand Down
2 changes: 1 addition & 1 deletion mb_netmgmt/netconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def handle_prompt(self):
self.channel.sendall(to_xml(hello) + MSG_DELIM.decode())

def init_cb(id, client_capabilities):
if NETCONF_11 in client_capabilities and NETCONF_11 in capabilities:
if NETCONF_11 in client_capabilities and NETCONF_11 in response:
self.session._base = NetconfBase.BASE_11

self.session.add_listener(HelloHandler(init_cb, lambda ex: None))
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ build-backend = "flit_core.buildapi"

[project]
name = "mb_netmgmt"
dynamic = ["version", "description"]
version = "0.0.90"
dynamic = ["description"]
dependencies = [
"ncclient>=0.6.15",
"paramiko>=2.12.0",
Expand All @@ -13,3 +14,6 @@ dependencies = [
"scapy>=2.6.0",
"exscript",
]

[tool.uv]
dev-dependencies = ["pytest", "flit"]
Loading

0 comments on commit d7d2faf

Please sign in to comment.