Loading proto/.gitignore 0 → 100644 +2 −0 Original line number Diff line number Diff line src/ uml/generated proto/compile.sh +1 −1 Original line number Diff line number Diff line #!/bin/bash python3 -m grpc_tools.protoc -I=./ --python_out=src/ --grpc_python_out=src/ *.proto #requires installation of protoc-gen-uml export PATH=/home/osboxes/protoc-gen-uml/target/universal/stage/bin:$PATH export PATH=${HOME}/protoc-gen-uml/target/universal/stage/bin:$PATH protoc --uml_out=uml/ -I ./ *.proto cd uml java -jar plantuml.7997.jar *.puml Loading proto/policy.proto +50 −27 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ syntax = "proto3"; package policy; import "context.proto"; import "service.proto"; service PolicyService { rpc PolicyAdd (PolicyRule) returns (PolicyRuleState) {} Loading @@ -10,53 +9,77 @@ service PolicyService { rpc PolicyDelete (PolicyRule) returns (PolicyRuleState) {} rpc GetPolicy (PolicyRuleId) returns (PolicyRule) {} rpc GetPolicyByDeviceId (context.DeviceId) returns (PolicyRuleList) {} rpc GetPolicyByServiceId (service.ServiceId) returns (PolicyRuleList) {} rpc GetPolicyByServiceId (context.ServiceId) returns (PolicyRuleList) {} } message PolicyRuleList { repeated PolicyRule policyRuleList = 1; enum RuleState { POLICY_INACTIVE = 0; // Rule is currently inactive POLICY_PLANNED = 1; // Rule installation planned POLICY_ACTIVE = 2; // Rule is currently active } //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; enum PolicyRuleType { POLICYTYPE_DEVICE = 0; // Device-level POLICYTYPE_NETWORK = 1; // Network-wide } message PolicyRuleId { context.Uuid uuid = 1; } message PolicyRuleState { context.Uuid policyRuleId = 1; RuleState policyRuleState = 2; } message PolicyRuleVariable { string policyRuleVariable = 1; } message PolicyRuleValue { string policyRuleValue = 1; } // IETF draft: Framework for Use of ECA (Event Condition Action) in Network Self Management // Source: https://datatracker.ietf.org/doc/draft-bwd-netmod-eca-framework/ // Event message PolicyRuleEvent { context.Event event = 1; } // Condition message PolicyRuleCondition { PolicyRuleVariable polRuleConditionVar = 1; PolicyRuleValue polRuleConditionVal = 2; } // Action message PolicyRuleAction { PolicyRuleVariable polRuleActionVar = 1; PolicyRuleValue polRuleActionVal = 2; } message PolicyRuleVariable { string policyRuleVariable = 1; } // Policy rule partially complies with IETF’s: // RFC 3060: https://datatracker.ietf.org/doc/html/rfc3060 // RFC 3460: https://datatracker.ietf.org/doc/html/rfc3460 // Enhanced with a policy rule event according to the ECA model message PolicyRule { // Basic policy rule attributes PolicyRuleId policyRuleId = 1; PolicyRuleType policyRuleType = 2; uint32 PolicyRulePriority = 3; message PolicyRuleValue { string policyRuleValue = 1; } // Event-Condition-Action model PolicyRuleEvent event = 4; // A single event triggers the policy repeated PolicyRuleCondition polRuleConditionList = 5; // One or more conditions must be met repeated PolicyRuleAction polRuleActionList = 6; // One or more actions should be applied message PolicyRuleState { context.Uuid policyRuleId = 1; RuleState policyRuleState = 2; // Affected services and devices repeated context.ServiceId serviceList = 7; repeated context.DeviceId deviceList = 8; } enum RuleState { PLANNED = 0; ACTIVE = 1; // A list of policy rules message PolicyRuleList { repeated PolicyRule policyRuleList = 1; } proto/slice.proto +3 −6 Original line number Diff line number Diff line Loading @@ -3,24 +3,21 @@ syntax = "proto3"; package slice; import "context.proto"; import "service.proto"; service SliceService { rpc CreateUpdateSlice (TransportSlice) returns (SliceStatus) {} rpc DeleteSlice (TransportSlice) returns (context.Empty) {} } message SliceEndpoint { context.EndPoint port_id = 1; } message TransportSlice { SliceId slice_id = 1; repeated slice.SliceEndpoint endpoints = 2; repeated context.Constraint constraints = 3; repeated service.ServiceId services = 4; repeated context.ServiceId services = 4; repeated SliceId subSlicesId = 5; SliceStatus status = 6; } Loading Loading
proto/compile.sh +1 −1 Original line number Diff line number Diff line #!/bin/bash python3 -m grpc_tools.protoc -I=./ --python_out=src/ --grpc_python_out=src/ *.proto #requires installation of protoc-gen-uml export PATH=/home/osboxes/protoc-gen-uml/target/universal/stage/bin:$PATH export PATH=${HOME}/protoc-gen-uml/target/universal/stage/bin:$PATH protoc --uml_out=uml/ -I ./ *.proto cd uml java -jar plantuml.7997.jar *.puml Loading
proto/policy.proto +50 −27 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ syntax = "proto3"; package policy; import "context.proto"; import "service.proto"; service PolicyService { rpc PolicyAdd (PolicyRule) returns (PolicyRuleState) {} Loading @@ -10,53 +9,77 @@ service PolicyService { rpc PolicyDelete (PolicyRule) returns (PolicyRuleState) {} rpc GetPolicy (PolicyRuleId) returns (PolicyRule) {} rpc GetPolicyByDeviceId (context.DeviceId) returns (PolicyRuleList) {} rpc GetPolicyByServiceId (service.ServiceId) returns (PolicyRuleList) {} rpc GetPolicyByServiceId (context.ServiceId) returns (PolicyRuleList) {} } message PolicyRuleList { repeated PolicyRule policyRuleList = 1; enum RuleState { POLICY_INACTIVE = 0; // Rule is currently inactive POLICY_PLANNED = 1; // Rule installation planned POLICY_ACTIVE = 2; // Rule is currently active } //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; enum PolicyRuleType { POLICYTYPE_DEVICE = 0; // Device-level POLICYTYPE_NETWORK = 1; // Network-wide } message PolicyRuleId { context.Uuid uuid = 1; } message PolicyRuleState { context.Uuid policyRuleId = 1; RuleState policyRuleState = 2; } message PolicyRuleVariable { string policyRuleVariable = 1; } message PolicyRuleValue { string policyRuleValue = 1; } // IETF draft: Framework for Use of ECA (Event Condition Action) in Network Self Management // Source: https://datatracker.ietf.org/doc/draft-bwd-netmod-eca-framework/ // Event message PolicyRuleEvent { context.Event event = 1; } // Condition message PolicyRuleCondition { PolicyRuleVariable polRuleConditionVar = 1; PolicyRuleValue polRuleConditionVal = 2; } // Action message PolicyRuleAction { PolicyRuleVariable polRuleActionVar = 1; PolicyRuleValue polRuleActionVal = 2; } message PolicyRuleVariable { string policyRuleVariable = 1; } // Policy rule partially complies with IETF’s: // RFC 3060: https://datatracker.ietf.org/doc/html/rfc3060 // RFC 3460: https://datatracker.ietf.org/doc/html/rfc3460 // Enhanced with a policy rule event according to the ECA model message PolicyRule { // Basic policy rule attributes PolicyRuleId policyRuleId = 1; PolicyRuleType policyRuleType = 2; uint32 PolicyRulePriority = 3; message PolicyRuleValue { string policyRuleValue = 1; } // Event-Condition-Action model PolicyRuleEvent event = 4; // A single event triggers the policy repeated PolicyRuleCondition polRuleConditionList = 5; // One or more conditions must be met repeated PolicyRuleAction polRuleActionList = 6; // One or more actions should be applied message PolicyRuleState { context.Uuid policyRuleId = 1; RuleState policyRuleState = 2; // Affected services and devices repeated context.ServiceId serviceList = 7; repeated context.DeviceId deviceList = 8; } enum RuleState { PLANNED = 0; ACTIVE = 1; // A list of policy rules message PolicyRuleList { repeated PolicyRule policyRuleList = 1; }
proto/slice.proto +3 −6 Original line number Diff line number Diff line Loading @@ -3,24 +3,21 @@ syntax = "proto3"; package slice; import "context.proto"; import "service.proto"; service SliceService { rpc CreateUpdateSlice (TransportSlice) returns (SliceStatus) {} rpc DeleteSlice (TransportSlice) returns (context.Empty) {} } message SliceEndpoint { context.EndPoint port_id = 1; } message TransportSlice { SliceId slice_id = 1; repeated slice.SliceEndpoint endpoints = 2; repeated context.Constraint constraints = 3; repeated service.ServiceId services = 4; repeated context.ServiceId services = 4; repeated SliceId subSlicesId = 5; SliceStatus status = 6; } Loading