Univention Bugzilla – Bug 52183
Create python client for Veyon Network API
Last modified: 2020-12-22 08:29:22 CET
We want a package (ucs-school-veyon-client) which provides a python lib to interface with the veyon network API developed by Tobias Junghans
New package ucs-school-veyon-client in oschwieg/4.4/veyon-cli Please check code, implementation, function, tests, debian package definitions and manual integration tests (for test setup give me a holler) REOPEN for errors or merge&build
QA -> leaving resolved since you told me you want to fix/ move the unittests. Other than that everything looks good. - Debian Package -> Looks good - Code -> Looks good - Unittests (as discussed): The build didn't succeed with the unittests. After removing them I had no problem (and running them afterwards). - Functionalities: 1. Authentifizierung -> OK 2. one Get -> get_screenshot -> OK 3. one Set -> SCREEN_LOCK & others -> OK ----------------------------------- Functional Review within ipython: -> I sent signals to a windows client (win01) client = VeyonClient(http://non-existent:5589/api/v1, CREDENTIALS, AuthenticationMethod.AUTH_LOGON, "localhost") client.ping -> ConnectionError client.set_feature(None, active=False) -> VeyonError: Invalid feature -> OK client = VeyonClient(URL, wrong_CREDENTIALS, AuthenticationMethod.AUTH_LOGON, "localhost") -> VeyonError: Authentication failed -> OK client.get_user_info() Out[37]: VeyonUser(login=u'REALM2\\test.student', fullname=u'Test Student', session=0) -> OK client = VeyonClient(URL, CREDENTIALS, AuthenticationMethod.AUTH_LOGON, "localhost") my_time = datetime.now() uid = client._create_session("localhost").connection_uid client._session_cache["localhost"] = VeyonSession( uid, calendar.timegm(my_time.replace(my_time.year + 1).timetuple()) ) -> no errors, I was able to set features afterwards -> OK client.set_feature(Feature.SCREEN_LOCK, active=True) -> client is locked -> OK client.set_feature(Feature.SCREEN_LOCK, active=False) -> win01 is unlocked -> OK client.set_feature(Feature.REBOOT, active=True) -> win01 reboots -> OK client.set_feature(Feature.POWER_DOWN, active=True) -> win01 shuts down -> OK client.set_feature(Feature.USER_LOGOFF, active=True) -> win01 log off -> OK client.set_feature(Feature.INPUT_DEVICE_LOCK, active=True) -> win01: black screen/ locked -> OK client.set_feature(Feature.INPUT_DEVICE_LOCK, active=False) -> win01: nothing happens -> OK for QA, because the other features are ok. This seems to be an issue in veyon -> has to be fixed by Tobias https://github.com/veyon/web-api/issues/6 Test what happens, if a feature is not active and I run client.set_feature(Feature.*, active=False) -> no errors, nothing happens on client -> OK client.get_screenshot((screenshot_format='PNG', quality=6, compression=80) -> PNG as bytes -> OK jpeg-> not supported, see https://github.com/veyon/web-api/issues/4 -> OK for QA client.get_screenshot((screenshot_format='gif', quality=6, compression=80) -> VeyonError: Unsupported image format -> OK
Thanks for fixing the unittests! Now they are run during the build-process. REOPEN -> please merge, build, add changelog & yaml
Package: ucs-school-veyon-client Version: 1.0.0-1A~4.4.0.202010070957 Branch: ucs_4.4-0 Scope: ucs-school-4.4 Package build. Please confirm, that it is in maintained
QA -> all OK -> VERIFY Changelog -> OK YAML -> OK Merge without changes -> OK
UCS@school 4.4 v7 has been released. https://docs.software-univention.de/changelog-ucsschool-4.4v7-de.html If this error occurs again, please clone this bug.