Skip to content

Commit a62d839

Browse files
committed
improve(network): simplify if condition to adding router interface (#82)
1 parent f5f3dcf commit a62d839

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/openstack_mcp_server/tools/network_tools.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,10 +1059,8 @@ def add_router_interface(
10591059
"""
10601060
conn = get_openstack_conn()
10611061
args: dict = {}
1062-
if subnet_id is not None:
1063-
args["subnet_id"] = subnet_id
1064-
if port_id is not None:
1065-
args["port_id"] = port_id
1062+
args["subnet_id"] = subnet_id
1063+
args["port_id"] = port_id
10661064
res = conn.network.add_interface_to_router(router_id, **args)
10671065
return RouterInterface(
10681066
router_id=res.get("router_id", router_id),

0 commit comments

Comments
 (0)