Attention is currently required from: Name of user not set #1000061.

Arne Schwabe has posted comments on this change by Arne Schwabe. ( 
https://gerrit.openvpn.net/c/openvpn/+/1859?usp=email )

Change subject: Add python scripts that demonstrate using the mangement 
interface
......................................................................


Patch Set 5:

(18 comments)

File sample/management/omi.py:

https://gerrit.openvpn.net/c/openvpn/+/1859/comment/1643a01f_f130b016?usp=email 
:
PS5, Line 32: import asyncio
> We should have full typing in this file, currently it's only partial
Done


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/7573c2e7_8fec8a78?usp=email 
:
PS5, Line 79:         # Event to
> ?
Done


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/8389385f_aad52f69?usp=email 
:
PS5, Line 88:         self._send_queue = asyncio.Queue()
> self._send_queue = asyncio.Queue() should be declared before self. […]
Done


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/b39ff904_d6c12a4f?usp=email 
:
PS5, Line 99:             logger.info(f'Connection lost ({excp}). Shutting 
down.')
> Maybe warning? Or even error?
Done


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/316c8db6_bdda66ad?usp=email 
:
PS5, Line 106:             self._send_task.cancel()
> Is this enough? What if we still have items left in _send_queue, for example? 
> I know it's just a dem […]
I will add a comment that indicates that we just drop all outstanding commands


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/719060e8_c3265fcc?usp=email 
:
PS5, Line 109:     async def _send_loop(self):
> Shouldn't we wrap this loop in a try-except? If there's any error—like an 
> IndexError or ValueError—t […]
It will still trigger a backtrace but also the whole program will stop working 
and that is somewhat expected/intended here as we don't really have code here 
to recover from a situation where we misparse/get confused by the management 
protocol state


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/b103bba0_5151318e?usp=email 
:
PS5, Line 146:                     pass
> We can remove it
Done


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/8b477512_94e9d575?usp=email 
:
PS5, Line 171:         if self._connect_data.password:
> If we are checking password, maybe it should be declared as Optional[str]?
Acknowledged


File sample/management/omi_client_protocol.py:

https://gerrit.openvpn.net/c/openvpn/+/1859/comment/c00cbabb_dac731cc?usp=email 
:
PS5, Line 73:             await self.queue_command(command)
> Could message chunks get mixed up? We yield control here with await, so in 
> theory it could happen?
I changed it to queue all and then use asyncio.gather to wait for all of them


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/711fdb0e_985ecedf?usp=email 
:
PS5, Line 101:             logger.error(f"Error parsing ACC message: {e}", 
exc_info=True)
> Shouldn't we have self. […]
Done


File sample/management/omi_server_demo.py:

https://gerrit.openvpn.net/c/openvpn/+/1859/comment/ffb38866_1b18da41?usp=email 
:
PS5, Line 82:     logger.info("pytop module not found. TOTP testing disabled")
> typo:)
Done


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/088ca83e_4f70f766?usp=email 
:
PS5, Line 89: class ServerDemoProtocol(OMIServerProtocol):
> Same as other files - missing typing
Acknowledged


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/30da819e_89df89ae?usp=email 
:
PS5, Line 97:         kid = client.authenticated_kid
> Dow we need it?
Not really but I wanted to keep it as example here.


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/954789e9_87780a59?usp=email 
:
PS5, Line 166:             await self.send_pending_auth(client, webauth + 
"https://community.openvpn.net";)
> Missing kid parameter?
Acknowledged


File sample/management/omi_server_protocol.py:

https://gerrit.openvpn.net/c/openvpn/+/1859/comment/fbf1707e_02ccf031?usp=email 
:
PS5, Line 112:         elif event in ("ACC", ):
> Why tuple?
Acknowledged


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/9ba2d70b_740f5d9c?usp=email 
:
PS5, Line 116:             logger.info(f"Client event {event} not handled. 
(message: {args!r})")
> debug instead of info?
I think this should probably handle all event type and dispatch them so we 
should not really see this message.


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/3f570585_c2eaf13c?usp=email 
:
PS5, Line 127:         if client._partial_acc_msg and client._kid_acc_msg != kd:
> kd? Should be probably kid
Acknowledged


https://gerrit.openvpn.net/c/openvpn/+/1859/comment/150d9ff1_45f91dcf?usp=email 
:
PS5, Line 197:     async def get_client_status(self) -> OmiCommandResult:
> Missing import for OmiCommandResult
Done



--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/1859?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib09bafabf612e9501ea757647c86a450c73228a5
Gerrit-Change-Number: 1859
Gerrit-PatchSet: 5
Gerrit-Owner: Arne Schwabe <[email protected]>
Gerrit-CC: Name of user not set #1000061
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Name of user not set #1000061
Gerrit-Comment-Date: Thu, 29 Oct 2026 17:08:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Name of user not set #1000061
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to