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

Many specs don't specify the 'message' field in the response object #13

Open
tbird20d opened this issue Feb 26, 2021 · 2 comments
Open
Assignees
Labels
invalid This doesn't seem right

Comments

@tbird20d
Copy link
Collaborator

For the device status field, one possible field in the return message (according to the 'ebf' client code) is "message". However, this field is not specified in spec/device_management/device_status.yaml.

There appear to be many files which 'ebf' expects to return a "message" field on error, but which do not have this in their spec file.

Here are some I found:

  • device_management/device_info.yaml
  • hotplug/hotplug_off.yaml
  • hotplug/hotplug_on.yaml
  • hotplug/hotplug_list.yaml
  • hotplug/hotplug_status.yaml
  • power/power_off.yaml
  • power/power_on.yaml
  • power/power_reboot.yaml
  • power/power_status.yaml
  • power/power_user_cmd.yaml
  • netboot/netboot_transfer_file_status.yaml
  • netboot/netboot_fmanager_download.yaml
  • netboot/netboot_transfer_file_cancel.yaml
  • netboot/netboot_transfer_file.yaml
  • netboot/netboot_fsroot_symlink_info_create.yaml
  • netboot/netboot_transfer_file_queue.yaml
  • netboot/netboot_fmanager_list.yaml
  • (and more)

ebf does not use these apis:
/api/v0.2/device/{DeviceName}/status/
/api/v0.2/device/{DeviceName}/webcam/restartfeed
/api/v0.2/device/{DeviceName}/image/capture

So I could not verify if these are intended to have a 'message' field or not.

I think it would be good to have all message specs include the 'message' field, and have the convention be that
if there's a bad result, then the message field has the error message (or reason why). This appears to be how
ebf is using this field.

@tbird20d tbird20d added the invalid This doesn't seem right label Feb 26, 2021
@tbird20d tbird20d changed the title Some specs don't specify the 'message' field in the response object Many specs don't specify the 'message' field in the response object Feb 26, 2021
@harishbansal harishbansal self-assigned this Feb 28, 2021
@harishbansal
Copy link
Contributor

message fields included in response definitions [see pull request] (#15)

ebf does not use these apis:
/api/v0.2/device/{DeviceName}/status/
/api/v0.2/device/{DeviceName}/webcam/restartfeed
/api/v0.2/device/{DeviceName}/image/capture

Task added on the embedded boardfarm project to standardize above APIs and add its support in ebf-cli tool.

@harishbansal
Copy link
Contributor

standardized specs for below api:
/api/v0.2/device/{DeviceName}/status/
/api/v0.2/device/{DeviceName}/webcam/restartfeed
/api/v0.2/device/{DeviceName}/image/capture

Pending:

  • support in ebf-cli tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants