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

Additional Endpoints for VUI API #2948

Merged
merged 7 commits into from
Jun 7, 2022

Conversation

davidraker
Copy link
Contributor

Description

Added:

  • Platforms Agents Configs endpoints (configuration store management).

Fixes # (issue)
eclipse-volttron/volttron-lib-web/issues/11
eclipse-volttron/volttron-lib-web/issues/12
eclipse-volttron/volttron-lib-web/issues/13
eclipse-volttron/volttron-lib-web/issues/14
eclipse-volttron/volttron-lib-web/issues/15
eclipse-volttron/volttron-lib-web/issues/35

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Unit tests in volttrontesting/platform/web/test_vui_endpoints.py.

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@craig8
Copy link
Contributor

craig8 commented May 20, 2022

The agents end point only returns agents that are currently running on the platform.

http://localhost:8070/vui/platforms/volttron1 ==============================
DEBUG:volttron.web.client.base:============================== GET /vui/platforms/volttron1/agents ==============================
DEBUG:volttron.web.client.base:{'route_options': {'platform.driver': '/vui/platforms/volttron1/agents/platform.driver'}}
DEBUG:volttron.web.client.base:============================== END GET http://localhost:8070/vui/platforms/volttron1/agents ==============================
vctl list
  AGENT                    IDENTITY            TAG                   PRI
a listeneragent-3.3        listeneragent-3.3_1 listener
1 platform_driveragent-4.0 platform.driver     platform_driver
b sqlhistorianagent-4.0.0  platform.historian  platform_historian

@davidraker
Copy link
Contributor Author

The default value of the sgent-state query parameter is "r unning". To see all installed agents, try:
GET /vui/platforms/volttron1/agents?agent-state=installed

@craig8
Copy link
Contributor

craig8 commented May 20, 2022

beautiful.

@craig8
Copy link
Contributor

craig8 commented May 20, 2022

Calling /vui/platforms/{self.name}/agents/{identity} with an identity that doesn't exist, returns a 200 and paths to links that shouldn't exist.

Should we instead do a 404 or 405? response code?

I think you have this as a pattern for config store entries...but this should be a different pattern.

So after the call to /vui/platforms/{self.name}/agents/{identity}

I then make a call to the status link and get a 400 error. So I am thinking the agents should return 400.

@davidraker
Copy link
Contributor Author

davidraker commented May 21, 2022 via email

@craig8
Copy link
Contributor

craig8 commented May 23, 2022

the post with an identity that doesn't exist for config store should be ok as well.

@craig8 craig8 merged commit d7d30aa into VOLTTRON:develop Jun 7, 2022
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.

3 participants