Open davidraker opened 2 years ago
@davidraker is there a pull request associated with any of these in review items?
Not yet. Perhaps I moved that prematurely. Waiting on tests. Did you not want it in review until the pull request upstream? It was submitted for my review. I could add an internal review column, though, too, if that would be better.
-------- Original message -------- From: Craig @.> Date: 2/2/22 16:22 (GMT-05:00) To: VOLTTRON/volttron-web @.> Cc: "Raker, David M" @.>, Mention @.> Subject: [EXTERNAL] Re: [VOLTTRON/volttron-web] Implement GET /platforms/:platform/agents/:vip_identity/enabled in API (Issue #2)
@davidrakerhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdavidraker&data=04%7C01%7CDavid.Raker%40rockets.utoledo.edu%7Cf278da6f5ee3477ddbb508d9e6921f98%7C1d6b1707baa94a3da8f8deabfb3d467b%7C0%7C0%7C637794337537637533%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=lC2kiXDgWiuUdJvQccN5rsAeLbNAbhyoICm168IDsuI%3D&reserved=0 is there a pull request associated with any of these in review items?
— Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FVOLTTRON%2Fvolttron-web%2Fissues%2F2%23issuecomment-1028369841&data=04%7C01%7CDavid.Raker%40rockets.utoledo.edu%7Cf278da6f5ee3477ddbb508d9e6921f98%7C1d6b1707baa94a3da8f8deabfb3d467b%7C0%7C0%7C637794337537637533%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=z%2BIALmCqFZOLSxpvmqrtO7dhU%2FeWcDhqrlwEWPy3TSA%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGXWOAG45SUB6H62DGFP65TUZGOBPANCNFSM5MQGGLMQ&data=04%7C01%7CDavid.Raker%40rockets.utoledo.edu%7Cf278da6f5ee3477ddbb508d9e6921f98%7C1d6b1707baa94a3da8f8deabfb3d467b%7C0%7C0%7C637794337537637533%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=LsffU%2B%2B2rv13RAx3Ut5taJyUJwyjdwSEAu9kyGCQZ7g%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7CDavid.Raker%40rockets.utoledo.edu%7Cf278da6f5ee3477ddbb508d9e6921f98%7C1d6b1707baa94a3da8f8deabfb3d467b%7C0%7C0%7C637794337537637533%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fypJ70ExTCK0q3FJGhdUkjqHoZNLBQzp9pqaP9QErxY%3D&reserved=0 or Androidhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7CDavid.Raker%40rockets.utoledo.edu%7Cf278da6f5ee3477ddbb508d9e6921f98%7C1d6b1707baa94a3da8f8deabfb3d467b%7C0%7C0%7C637794337537637533%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nWoC9ZPjyHdX7agrFBHmk8vN8ro%2BFR%2FwIxVp7%2B0ud3Y%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>
Currently this issue returns the following
http://localhost:8070/vui/platforms/volttron1/agents/listeneragent-3.3_1/enabled
{'tag': 'listener'}
Wrong my bad the error was in my testing.
The enabled endpoint does not interpolate 'False' and 'None' to be False and None respectivelly.
None of the enabled endpoints are supposed to accept False or None as parameters. The only one with a parameter is the PUT method, which accepts 0-99 for the "priority" query parameter. To set the priority to None, just use the DELTETE method (no parameters required).
I mean the get doesn't returning as a json true/false
{'priority': '20', 'status': 'True'}
I'll take a look at that. It should have true or false for the status and an integer or null for the priority. Is it returning strings?
Yes
I see. I'll look into why that is. I expected that means the underlying RPC does the same, as I don't recall any conversion. We should be able to convert them, though, before returning. If we are accidentally converting them to strings, that can be fixed too.
The integers are strings in the response of the RPC, but None should have been None. I pushed an update which returns booleans and integers.
Retrieve the enabled status of the specified agent. If true, the agent will start with the platform.
Request:
BEARER <jwt_token>
Response:
200 OK
application/json
400 Bad Request
application/json
401 Unauthorized