Upcoming maintenance: Thursday 21 August @ 12:00-14:00 CEST.
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
7668bd09
Commit
7668bd09
authored
3 years ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
DLT component:
- Defined new dlt.proto file
parent
4fac8d76
No related branches found
No related tags found
1 merge request
!54
Release 2.0.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
proto/dlt.proto
+54
-41
54 additions, 41 deletions
proto/dlt.proto
with
54 additions
and
41 deletions
proto/dlt.proto
+
54
−
41
View file @
7668bd09
...
...
@@ -12,72 +12,85 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//Example of topology
syntax
=
"proto3"
;
package
dlt
;
import
"context.proto"
;
service
DltService
{
rpc
RecordToDlt
(
DltRecord
)
returns
(
RecordStatus
)
{}
rpc
GetFromDlt
(
DltRecordId
)
returns
(
DltRecord
)
{}
rpc
SubscribeToDlt
(
DltRecordSubscription
)
returns
(
stream
DltRecord
)
{}
rpc
GetDltStatus
(
context.Empty
)
returns
(
DltStatus
)
{}
rpc
RecordToDlt
(
DltRecord
)
returns
(
DltRecordStatus
)
{}
rpc
GetFromDlt
(
DltRecordId
)
returns
(
DltRecord
)
{}
rpc
SubscribeToDlt
(
DltRecordSubscription
)
returns
(
stream
DltRecordEvent
)
{}
rpc
GetDltStatus
(
context.TeraFlowController
)
returns
(
DltPeerStatus
)
{}
// NEC is checkig if it is possible
rpc
GetDltPeers
(
context.Empty
)
returns
(
DltPeerStatusList
)
{}
// NEC is checkig if it is possible
}
message
DltRecordSubscription
{
DltRecordType
type
=
1
;
DltRecordOperation
operation
=
2
;
enum
DltRecordTypeEnum
{
DLTRECORDTYPE_UNDEFINED
=
0
;
DLTRECORDTYPE_CONTEXT
=
1
;
DLTRECORDTYPE_TOPOLOGY
=
2
;
DLTRECORDTYPE_DEVICE
=
3
;
DLTRECORDTYPE_LINK
=
4
;
DLTRECORDTYPE_SERVICE
=
5
;
DLTRECORDTYPE_SLICE
=
6
;
}
enum
DltRecord
Type
{
UNKNOWN
=
0
;
SERVICE
=
1
;
D
EVICE
=
2
;
SLICE
=
3
;
enum
DltRecord
OperationEnum
{
DLTRECORDOPERATION_UNDEFINED
=
0
;
DLTRECORDOPERATION_ADD
=
1
;
D
LTRECORDOPERATION_UPDATE
=
2
;
DLTRECORDOPERATION_DELETE
=
3
;
}
enum
DltRecord
Operation
{
A
DD
=
0
;
UPDATE
=
1
;
D
ELETE
=
2
;
enum
DltRecord
StatusEnum
{
D
LTRECORDSTATUS_UNDEFINE
D
=
0
;
DLTRECORDSTATUS_SUCCEEDED
=
1
;
D
LTRECORDSTATUS_FAILED
=
2
;
}
message
DltRecord
{
DltRecordId
id
=
1
;
DltRecordType
type
=
2
;
DltRecordOperation
operation
=
3
;
string
json
=
4
;
enum
DltStatusEnum
{
DLTSTATUS_UNDEFINED
=
0
;
DLTSTATUS_NOTAVAILABLE
=
1
;
DLTSTATUS_INITIALIZED
=
2
;
DLTSTATUS_AVAILABLE
=
3
;
DLTSTATUS_DEINIT
=
4
;
}
message
DltRecordId
{
context.Uuid
id
=
1
;
context.Uuid
domain_uuid
=
1
;
// unique identifier of domain owning the record
DltRecordTypeEnum
type
=
2
;
// type of record
context.Uuid
record_uuid
=
3
;
// unique identifier of the record within the domain context_uuid/topology_uuid
}
message
RecordStatus
{
DltRecordId
id
=
1
;
DltRecordStatusEnum
status
=
2
;
message
DltRecord
{
DltRecordId
record_id
=
1
;
// record identifier
DltRecordOperation
operation
=
2
;
// operation to be performed over the record
string
data_json
=
3
;
// record content: JSON-encoded record content
}
enum
DltRecordStatusEnum
{
REQUESTED
=
0
;
STORED
=
1
;
DISABLED
=
2
;
message
DltRecordSubscription
{
// retrieved events should match both conditions
// TODO: consider adding a more sophisticated filtering
repeated
DltRecordType
type
=
1
;
// only receive subscriptions of the selected types, empty=all
repeated
DltRecordOperation
operation
=
2
;
// only receive subscriptions of the selected operations, empty=all
}
message
DltStatus
{
context.TeraFlowController
ctl
=
1
;
DltStatusEnum
status
=
2
;
message
DltRecordEvent
{
context.Event
event
=
1
;
// common event data (timestamp & event_type)
DltRecordId
record_id
=
2
;
// record identifier associated with this event
}
enum
DltStatusEnum
{
NOT_AVAILABLE
=
0
;
INITIALIZED
=
1
;
AVAILABLE
=
2
;
DEINIT
=
3
;
message
DltRecordStatus
{
DltRecordId
record_id
=
1
;
// identifier of the associated record
DltRecordStatusEnum
status
=
2
;
// status of the record
string
error_message
=
3
;
// error message in case of failure, empty otherwise
}
message
DltPeerStatus
{
context.TeraFlowController
controller
=
1
;
// Identifier of the TeraFlow controller instance
DltStatusEnum
status
=
2
;
// Status of the TeraFlow controller instance
}
message
DltPeerStatusList
{
repeated
DltPeerStatus
peers
=
1
;
// List of peers and their status
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment