Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//Example of topology
syntax = "proto3";
package automation;
import "context.proto";
service AutomationService {
rpc ZtpGetDeviceRole(DeviceRoleId) returns (DeviceRole) {}
rpc ZtpGetDeviceRolesByDeviceId(context.DeviceId) returns (DeviceRoleList) {}
rpc ZtpAdd(DeviceRole) returns (DeviceRoleState) {}
rpc ZtpUpdate(DeviceRole) returns (DeviceRoleState) {}
rpc ZtpDelete(DeviceRole) returns (DeviceRoleState) {}
rpc ZtpDeleteAllByDeviceId(context.DeviceId) returns (DeviceRoleState) {}
}
enum DeviceRoleType {
NONE = 0;
DEV_OPS = 1;
DEV_CONF = 2;
PIPELINE_CONF = 3;
}
message DeviceRoleId {
context.Uuid devRoleId = 1;
context.DeviceId devId = 2;
}
message DeviceRole {
DeviceRoleId devRoleId = 1;
DeviceRoleType devRoleType = 2;
}
message DeviceRoleList {
repeated DeviceRole devRole = 1;
}
message DeviceRoleState {
DeviceRoleId devRoleId = 1;
ZtpDeviceState devRoleState = 2;
}
enum ZtpDeviceState {
PLANNED = 0;
POTENCIAL_AVAILABLE = 1;
POTENCIAL_BUSY = 2;
INSTALLED = 3;
PENDING_REMOVAL = 4;
}