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
51
52
53
54
55
56
57
58
59
60
61
62
syntax = "proto3";
package policy;
import "context.proto";
import "service.proto";
service PolicyService {
rpc PolicyAdd (PolicyRule) returns (PolicyRuleState) {}
rpc PolicyUpdate (PolicyRule) returns (PolicyRuleState) {}
rpc PolicyDelete (PolicyRule) returns (PolicyRuleState) {}
rpc GetPolicy (PolicyRuleId) returns (PolicyRule) {}
rpc GetPolicyByDeviceId (context.DeviceId) returns (PolicyRuleList) {}
rpc GetPolicyByServiceId (service.ServiceId) returns (PolicyRuleList) {}
}
message PolicyRuleList {
repeated PolicyRule policyRuleList = 1;
}
//according to IETF’s RFC 3060 [] and RFC 3460 []
message PolicyRule {
PolicyRuleId policyRuleId = 1;
repeated service.ServiceId serviceList = 2;
repeated context.DeviceId deviceList = 3;
string policyRuleType = 4;
string PolicyRulePriority = 5;
repeated PolicyRuleCondition polRuleConditionList = 6;
repeated PolicyRuleAction polRuleActionList = 7;
}
message PolicyRuleId {
context.Uuid uuid = 1;
}
message PolicyRuleCondition {
PolicyRuleVariable polRuleConditionVar = 1;
PolicyRuleValue polRuleConditionVal = 2;
}
message PolicyRuleAction {
PolicyRuleVariable polRuleActionVar = 1;
PolicyRuleValue polRuleActionVal = 2;
}
message PolicyRuleVariable {
string policyRuleVariable = 1;
}
message PolicyRuleValue {
string policyRuleValue = 1;
}
message PolicyRuleState {
context.Uuid policyRuleId = 1;
RuleState policyRuleState = 2;
}
enum RuleState {
PLANNED = 0;
ACTIVE = 1;
}