Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enumerate_software functionality #773

Merged
merged 28 commits into from
Nov 4, 2022

Conversation

Wedgetable
Copy link
Contributor

What does this Pull Request accomplish?

Similar to enumerate_devices, this uses the NI System Configuration API to find NI software on the server and enables clients to get a list of these packages.

I'm still pretty new to this codebase, so I based my implementation heavily on that of the existing enumerate_devices functionality. Feel free to point out methods that could/should be shared, or other places that are too copy/pasta-ish.

Why should this Pull Request be merged?

Enables applications to check for certain packages and versions on the remote server - drivers especially - in order to know what functionality is available.

What testing has been done?

  • Created unit tests for the new SoftwareEnumerator class and ran them
  • Added integration and system tests similar to those for DeviceEnumerator and ran them
  • Created enumerate-software example and used it to get a list of NI packages off a remote machine running ni_grpc_device_server

examples/session/enumerate-software.py Outdated Show resolved Hide resolved
source/server/core_service_registrar.cpp Outdated Show resolved Hide resolved
source/server/syscfg_library.cpp Show resolved Hide resolved
source/server/software_enumerator.cpp Show resolved Hide resolved
source/server/syscfg_library.h Outdated Show resolved Hide resolved
# Conflicts:
#	CMakeLists.txt
#	source/server/session_utilities_service.cpp
#	source/server/session_utilities_service.h
#	source/server/session_utilities_service_registrar.cpp
#	source/server/syscfg_library.cpp
#	source/server/syscfg_library.h
#	source/server/syscfg_library_interface.h
#	source/tests/unit/device_enumerator_tests.cpp
#	source/tests/utilities/syscfg_mock_library.h
@harsha-bhushan
Copy link
Contributor

We could avoid having a separate example for this function. I recommend combining it with device enumeration example & rename it appropriately. That way, going ahead, when we add more sys config functions, we can just put them in the same example.
When you do that, you need not accept the 'hidden package argument' for the example itself, you can just pass it in the function as True.

@dmondrik
Copy link
Contributor

dmondrik commented Nov 4, 2022

When you do that, you need not accept the 'hidden package argument' for the example itself, you can just pass it in the function as True

Actually for the example, I'd either not specify it, or make it False. Most users would care only about the visible packages.

@Wedgetable Wedgetable merged commit 8cb3942 into ni:main Nov 4, 2022
@Wedgetable Wedgetable deleted the users/khawesdo/enumerate-software branch November 4, 2022 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants