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

feat: Add workspace field to httpconfiguration #64

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

santhoshramaraj
Copy link
Member

@santhoshramaraj santhoshramaraj commented Jun 18, 2024

What does this Pull Request accomplish?

  • Add workspace field to httpconfiguration

  • Read the workspace from <ProgramData>\National Instruments\salt\conf\grain for file-based httpconfiguration

  • Add os.getenv("PROGRAMDATA") as a fallback option to get <ProgramData> path logic.

Why should this Pull Request be merged?

Automated Agent role does not support write access to several services. Applications that run on the remote system that need write access to these unsupported services must use user's API key. Default workspace of user's API key may not be the same as that of an Automated Agent.

workspace field of httpconfiguration helps the user application to use the remote system's default workspace even when using user's API key.

What testing has been done?

Manually tested on local machine with SystemLink client,

from nisystemlink.clients.core import HttpConfigurationManager
print(HttpConfigurationManager.get_configuration().workspace)

Test Result:

  • If the SystemLink Client is connected, workspace_id is successfully obtained
  • If the SystemLink Client is not connected, ApiException: No SystemLink configurations available

@santhoshramaraj santhoshramaraj self-assigned this Jun 18, 2024
@santhoshramaraj santhoshramaraj changed the title feat: Make httpconfiguration workspace aware feat: Add workspace property to httpconfiguration Jul 2, 2024
@santhoshramaraj santhoshramaraj changed the title feat: Add workspace property to httpconfiguration feat: Add workspace field to httpconfiguration Jul 2, 2024
@santhoshramaraj santhoshramaraj marked this pull request as ready for review July 2, 2024 17:22
@santhoshramaraj santhoshramaraj added the enhancement New feature or request label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant