-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathconfiguration.proto
99 lines (77 loc) · 3.24 KB
/
configuration.proto
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
//
// SPDX-License-Identifier: Apache-2.0
syntax = "proto3";
package onos.config.v2;
import "gogoproto/gogo.proto";
import "onos/config/v2/object.proto";
import "onos/config/v2/value.proto";
// Configuration represents complete desired target configuration
message Configuration {
ObjectMeta meta = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
// 'id' is a unique configuration identifier
string id = 2 [(gogoproto.customname) = "ID", (gogoproto.casttype) = "ConfigurationID"];
// 'target_id' is the target to which the desired target configuration applies
string target_id = 3 [(gogoproto.customname) = "TargetID", (gogoproto.casttype) = "TargetID"];
// 'values' is a map of path/values to set
map<string, PathValue> values = 4;
// 'index' is the index of the configuration values
uint64 index = 5 [(gogoproto.casttype) = "Index"];
// 'ConfigurationStatus' is the current lifecycle status of the configuration
ConfigurationStatus status = 6 [(gogoproto.nullable) = false];
TargetTypeVersion target_info = 7 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
}
// ConfigurationStatus is the status of a Configuration
message ConfigurationStatus {
// 'state' is the configuration state
State state = 1;
// 'mastership' is the current mastership info for the configuration
MastershipInfo mastership = 2 [(gogoproto.nullable) = false];
// 'proposed' is the proposed configuration status
ProposedConfigurationStatus proposed = 3 [(gogoproto.nullable) = false];
// 'committed' is the committed configuration status
CommittedConfigurationStatus committed = 4 [(gogoproto.nullable) = false];
// 'applied' is the applied configuration status
AppliedConfigurationStatus applied = 5 [(gogoproto.nullable) = false];
// State is the configuration state
enum State {
UNKNOWN = 0;
SYNCHRONIZING = 1;
SYNCHRONIZED = 2;
PERSISTED = 3;
}
}
message ProposedConfigurationStatus {
uint64 index = 1 [(gogoproto.casttype) = "Index"];
}
message CommittedConfigurationStatus {
uint64 index = 1 [(gogoproto.casttype) = "Index"];
}
message AppliedConfigurationStatus {
uint64 index = 1 [(gogoproto.casttype) = "Index"];
MastershipInfo mastership = 2 [(gogoproto.nullable) = false];
map<string, PathValue> values = 3;
}
message MastershipInfo {
string master = 1;
uint64 term = 2 [(gogoproto.casttype) = "MastershipTerm"];
}
// ConfigurationEvent configuration store event
message ConfigurationEvent {
// EventType configuration event types for configuration store
enum EventType {
// UNKNOWN indicates unknown configuration store event
UNKNOWN = 0;
// CREATED indicates the configuration entry in the store is created
CREATED = 1;
// UPDATED indicates the configuration entry in the store is updated
UPDATED = 2;
// DELETED indicates the configuration entry in the store is deleted
DELETED = 3;
// REPLAYED
REPLAYED = 4;
}
// EventType configuration event type
EventType type = 1;
Configuration configuration = 2 [(gogoproto.nullable) = false];
}