Commit 081d38c9 authored by Alexander Hendrich's avatar Alexander Hendrich Committed by Commit Bot

Sync device management proto changes from the server side

This CL syncs the server-side changes (http://cl/214625862) and also
updates the list of error codes.

Bug: none
Change-Id: I86ea8d9ad0cb0d29004e552194e14c8217a76b22
Reviewed-on: https://chromium-review.googlesource.com/1251083
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595403}
parent 744ffee2
...@@ -1987,9 +1987,14 @@ message DeviceManagementRequest { ...@@ -1987,9 +1987,14 @@ message DeviceManagementRequest {
// 200 OK: valid response is returned to client. // 200 OK: valid response is returned to client.
// 400 Bad Request: invalid argument. // 400 Bad Request: invalid argument.
// 401 Unauthorized: invalid auth cookie or DM token. // 401 Unauthorized: invalid auth cookie or DM token.
// 402 Missing licenses.
// 403 Forbidden: device management is not allowed. // 403 Forbidden: device management is not allowed.
// 404 Not Found: the request URL is invalid. // 404 Not Found: the request URL is invalid.
// 405 Invalid serial number.
// 409 Device id conflict.
// 410 Device Not Found: the device id is not found. // 410 Device Not Found: the device id is not found.
// 412 Pending approval.
// 417 Consumer account with packaged license.
// 491 Request Pending: the request is pending approval. // 491 Request Pending: the request is pending approval.
// 500 Internal Server Error: most likely a bug in DM server. // 500 Internal Server Error: most likely a bug in DM server.
// 503 Service Unavailable: most likely a backend error. // 503 Service Unavailable: most likely a backend error.
...@@ -1997,36 +2002,7 @@ message DeviceManagementRequest { ...@@ -1997,36 +2002,7 @@ message DeviceManagementRequest {
// 903 Deprovisioned: the device has been deprovisioned. // 903 Deprovisioned: the device has been deprovisioned.
// 904 Arc Disabled: ARC is not enabled on the domain. // 904 Arc Disabled: ARC is not enabled on the domain.
message DeviceManagementResponse { message DeviceManagementResponse {
reserved 24; reserved 1, 24;
// TODO(hong): move error handling to HTTP level.
// Error code to client.
enum ErrorCode {
SUCCESS = 0;
// Returned for register request when device management is not supported
// for the domain.
DEVICE_MANAGEMENT_NOT_SUPPORTED = 1;
// Returned when the device is not found.
DEVICE_NOT_FOUND = 2;
// Returned when passed in device management token doesn't match the token
// on server side.
DEVICE_MANAGEMENT_TOKEN_INVALID = 3;
// Returned when device registration is pending approval (if required).
ACTIVATION_PENDING = 4;
// Returned when the policy is not found.
POLICY_NOT_FOUND = 5;
}
// Error code for this response.
//
// For responses to TT clients, this field MUST be set, since it WAS
// a required field. For special error code listed above, we return
// 200 in HTTP Status Code and set the real error code here.
//
// For release clients, we plan to move all error code to HTTP
// Status Code, so it is much easier for log analysis. If possible,
// we plan to remove this field once Chrome OS TT phase is over.
optional ErrorCode error = 1 [default = SUCCESS];
// Error message. // Error message.
optional string error_message = 2; optional string error_message = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment