diff --git a/pkg/api/intent.pb.go b/pkg/api/intent.pb.go index d309813..25e96c8 100644 --- a/pkg/api/intent.pb.go +++ b/pkg/api/intent.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.12.4 +// protoc-gen-go v1.31.0 +// protoc v3.19.6 // source: proto/intent.proto package api @@ -31,6 +31,7 @@ const ( IntentType_INTENT_TYPE_LOW_JITTER IntentType = 5 IntentType_INTENT_TYPE_FLEX_ALGO IntentType = 6 IntentType_INTENT_TYPE_SFC IntentType = 7 + IntentType_INTENT_TYPE_LOW_UTILIZATION IntentType = 8 ) // Enum value maps for IntentType. @@ -44,6 +45,7 @@ var ( 5: "INTENT_TYPE_LOW_JITTER", 6: "INTENT_TYPE_FLEX_ALGO", 7: "INTENT_TYPE_SFC", + 8: "INTENT_TYPE_LOW_UTILIZATION", } IntentType_value = map[string]int32{ "INTENT_TYPE_UNSPECIFIED": 0, @@ -54,6 +56,7 @@ var ( "INTENT_TYPE_LOW_JITTER": 5, "INTENT_TYPE_FLEX_ALGO": 6, "INTENT_TYPE_SFC": 7, + "INTENT_TYPE_LOW_UTILIZATION": 8, } ) @@ -433,7 +436,7 @@ var file_proto_intent_proto_rawDesc = []byte{ 0x74, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x73, 0x69, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x69, 0x70, 0x76, 0x36, 0x53, - 0x69, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x2a, 0xf2, 0x01, 0x0a, 0x0a, + 0x69, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x2a, 0x93, 0x02, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x49, 0x4e, 0x54, 0x45, 0x4e, @@ -449,21 +452,23 @@ var file_proto_intent_proto_rawDesc = []byte{ 0x12, 0x19, 0x0a, 0x15, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x45, 0x58, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x43, 0x10, 0x07, - 0x2a, 0x8c, 0x01, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, - 0x0a, 0x16, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x41, - 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x41, 0x4c, - 0x55, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x12, 0x12, - 0x0a, 0x0e, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x43, - 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x46, 0x4c, 0x45, 0x58, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x5f, 0x4e, 0x52, 0x10, 0x04, 0x32, - 0x4a, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x50, 0x61, 0x74, 0x68, 0x12, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x74, - 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x28, 0x01, 0x30, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x12, 0x1f, 0x0a, 0x1b, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4c, 0x4f, 0x57, 0x5f, 0x55, 0x54, 0x49, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x08, 0x2a, 0x8c, 0x01, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x16, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x56, + 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x41, + 0x4c, 0x55, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x12, + 0x12, 0x0a, 0x0e, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, + 0x43, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x4c, 0x45, 0x58, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x5f, 0x4e, 0x52, 0x10, 0x04, + 0x32, 0x4a, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, + 0x74, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x28, 0x01, 0x30, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/intent_grpc.pb.go b/pkg/api/intent_grpc.pb.go index 99f9c19..dac7f3d 100644 --- a/pkg/api/intent_grpc.pb.go +++ b/pkg/api/intent_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.12.4 +// - protoc v3.19.6 // source: proto/intent.proto package api diff --git a/pkg/types/types.go b/pkg/types/types.go index b0bfe29..88fedd7 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -51,14 +51,15 @@ func ParseIntentValueType(s string) (IntentValueType, error) { type IntentType api.IntentType const ( - IntentTypeUnspecified = IntentType(api.IntentType_INTENT_TYPE_UNSPECIFIED) - IntentTypeHighBandwidth = IntentType(api.IntentType_INTENT_TYPE_HIGH_BANDWIDTH) - IntentTypeLowBandwidth = IntentType(api.IntentType_INTENT_TYPE_LOW_BANDWIDTH) - IntentTypeLowLatency = IntentType(api.IntentType_INTENT_TYPE_LOW_LATENCY) - IntentTypeLowPacketLoss = IntentType(api.IntentType_INTENT_TYPE_LOW_PACKET_LOSS) - IntentTypeLowJitter = IntentType(api.IntentType_INTENT_TYPE_LOW_JITTER) - IntentTypeFlexAlgo = IntentType(api.IntentType_INTENT_TYPE_FLEX_ALGO) - IntentTypeSfc = IntentType(api.IntentType_INTENT_TYPE_SFC) + IntentTypeUnspecified = IntentType(api.IntentType_INTENT_TYPE_UNSPECIFIED) + IntentTypeHighBandwidth = IntentType(api.IntentType_INTENT_TYPE_HIGH_BANDWIDTH) + IntentTypeLowBandwidth = IntentType(api.IntentType_INTENT_TYPE_LOW_BANDWIDTH) + IntentTypeLowLatency = IntentType(api.IntentType_INTENT_TYPE_LOW_LATENCY) + IntentTypeLowPacketLoss = IntentType(api.IntentType_INTENT_TYPE_LOW_PACKET_LOSS) + IntentTypeLowJitter = IntentType(api.IntentType_INTENT_TYPE_LOW_JITTER) + IntentTypeFlexAlgo = IntentType(api.IntentType_INTENT_TYPE_FLEX_ALGO) + IntentTypeSfc = IntentType(api.IntentType_INTENT_TYPE_SFC) + IntentTypeLowUtilization = IntentType(api.IntentType_INTENT_TYPE_LOW_UTILIZATION) ) func (it IntentType) String() string { @@ -77,6 +78,8 @@ func (it IntentType) String() string { return "flex-algo" case IntentTypeSfc: return "sfc" + case IntentTypeLowUtilization: + return "low-utilization" default: return "unspecified" } @@ -100,6 +103,8 @@ func ParseIntentType(s string) (IntentType, error) { return IntentTypeFlexAlgo, nil case "sfc": return IntentTypeSfc, nil + case "low-utilization": + return IntentTypeLowUtilization, nil default: return 0, fmt.Errorf("invalid IntentType: %s", s) } diff --git a/pkg/types/types_test.go b/pkg/types/types_test.go index 8e49103..70e7478 100644 --- a/pkg/types/types_test.go +++ b/pkg/types/types_test.go @@ -224,6 +224,13 @@ func TestIntentTypeToString(t *testing.T) { }, want: "unspecified", }, + { + name: "IntentTypeLowUtilization", + args: args{ + it: IntentTypeLowUtilization, + }, + want: "low-utilization", + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -332,6 +339,14 @@ func TestParseIntentType(t *testing.T) { want: IntentTypeUnspecified, wantErr: true, }, + { + name: "IntentTypeLowUtilization", + args: args{ + s: "low-utilization", + }, + want: IntentTypeLowUtilization, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/proto b/proto index 3f4acf0..3ba0c1b 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 3f4acf0967a7e4696edc3a02db611d879ca5f063 +Subproject commit 3ba0c1bdcacd5c2076c76a1aa7e5ebf5485ae3dd