Skip to content

Commit d9d55ba

Browse files
committed
BUG/MINOR: spec: remove unused track-sc actions in enums
1 parent aeaae54 commit d9d55ba

File tree

9 files changed

+12
-264
lines changed

9 files changed

+12
-264
lines changed

configuration/tcp_request_rule.go

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -801,39 +801,6 @@ func SerializeTCPRequestRule(f models.TCPRequestRule, opt *options.Configuration
801801
CondTest: f.CondTest,
802802
},
803803
}, nil
804-
case models.TCPRequestRuleActionTrackDashSc0:
805-
return &tcp_types.Connection{
806-
Action: &actions.TrackSc{
807-
Type: actions.TrackScType,
808-
StickCounter: 0,
809-
Key: f.TrackKey,
810-
Table: f.TrackTable,
811-
Cond: f.Cond,
812-
CondTest: f.CondTest,
813-
},
814-
}, nil
815-
case models.TCPRequestRuleActionTrackDashSc1:
816-
return &tcp_types.Connection{
817-
Action: &actions.TrackSc{
818-
Type: actions.TrackScType,
819-
StickCounter: 1,
820-
Key: f.TrackKey,
821-
Table: f.TrackTable,
822-
Cond: f.Cond,
823-
CondTest: f.CondTest,
824-
},
825-
}, nil
826-
case models.TCPRequestRuleActionTrackDashSc2:
827-
return &tcp_types.Connection{
828-
Action: &actions.TrackSc{
829-
Type: actions.TrackScType,
830-
StickCounter: 2,
831-
Key: f.TrackKey,
832-
Table: f.TrackTable,
833-
Cond: f.Cond,
834-
CondTest: f.CondTest,
835-
},
836-
}, nil
837804
case models.TCPRequestRuleActionTrackDashSc:
838805
if f.TrackStickCounter == nil {
839806
return nil, NewConfError(ErrValidationError, "track_sc_stick_counter must be set")
@@ -1068,39 +1035,6 @@ func SerializeTCPRequestRule(f models.TCPRequestRule, opt *options.Configuration
10681035
CondTest: f.CondTest,
10691036
},
10701037
}, nil
1071-
case models.TCPRequestRuleActionTrackDashSc0:
1072-
return &tcp_types.Content{
1073-
Action: &actions.TrackSc{
1074-
Type: actions.TrackScType,
1075-
StickCounter: 0,
1076-
Key: f.TrackKey,
1077-
Table: f.TrackTable,
1078-
Cond: f.Cond,
1079-
CondTest: f.CondTest,
1080-
},
1081-
}, nil
1082-
case models.TCPRequestRuleActionTrackDashSc1:
1083-
return &tcp_types.Content{
1084-
Action: &actions.TrackSc{
1085-
Type: actions.TrackScType,
1086-
StickCounter: 1,
1087-
Key: f.TrackKey,
1088-
Table: f.TrackTable,
1089-
Cond: f.Cond,
1090-
CondTest: f.CondTest,
1091-
},
1092-
}, nil
1093-
case models.TCPRequestRuleActionTrackDashSc2:
1094-
return &tcp_types.Content{
1095-
Action: &actions.TrackSc{
1096-
Type: actions.TrackScType,
1097-
StickCounter: 2,
1098-
Key: f.TrackKey,
1099-
Table: f.TrackTable,
1100-
Cond: f.Cond,
1101-
CondTest: f.CondTest,
1102-
},
1103-
}, nil
11041038
case models.TCPRequestRuleActionTrackDashSc:
11051039
if f.TrackStickCounter == nil {
11061040
return nil, NewConfError(ErrValidationError, "track_sc_stick_counter must be set")
@@ -1375,39 +1309,6 @@ func SerializeTCPRequestRule(f models.TCPRequestRule, opt *options.Configuration
13751309
CondTest: f.CondTest,
13761310
},
13771311
}, nil
1378-
case models.TCPRequestRuleActionTrackDashSc0:
1379-
return &tcp_types.Session{
1380-
Action: &actions.TrackSc{
1381-
Type: actions.TrackScType,
1382-
StickCounter: 0,
1383-
Key: f.TrackKey,
1384-
Table: f.TrackTable,
1385-
Cond: f.Cond,
1386-
CondTest: f.CondTest,
1387-
},
1388-
}, nil
1389-
case models.TCPRequestRuleActionTrackDashSc1:
1390-
return &tcp_types.Session{
1391-
Action: &actions.TrackSc{
1392-
Type: actions.TrackScType,
1393-
StickCounter: 1,
1394-
Key: f.TrackKey,
1395-
Table: f.TrackTable,
1396-
Cond: f.Cond,
1397-
CondTest: f.CondTest,
1398-
},
1399-
}, nil
1400-
case models.TCPRequestRuleActionTrackDashSc2:
1401-
return &tcp_types.Session{
1402-
Action: &actions.TrackSc{
1403-
Type: actions.TrackScType,
1404-
StickCounter: 2,
1405-
Key: f.TrackKey,
1406-
Table: f.TrackTable,
1407-
Cond: f.Cond,
1408-
CondTest: f.CondTest,
1409-
},
1410-
}, nil
14111312
case models.TCPRequestRuleActionTrackDashSc:
14121313
if f.TrackStickCounter == nil {
14131314
return nil, NewConfError(ErrValidationError, "track_sc_stick_counter must be set")

models/http_request_rule.go

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

models/http_response_rule.go

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

models/tcp_request_rule.go

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/build/haproxy_spec.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4911,9 +4911,6 @@ definitions:
49114911
- silent-drop
49124912
- strict-mode
49134913
- tarpit
4914-
- track-sc0
4915-
- track-sc1
4916-
- track-sc2
49174914
- track-sc
49184915
- unset-var
49194916
- use-service
@@ -5472,9 +5469,6 @@ definitions:
54725469
- set-var-fmt
54735470
- silent-drop
54745471
- strict-mode
5475-
- track-sc0
5476-
- track-sc1
5477-
- track-sc2
54785472
- track-sc
54795473
- unset-var
54805474
- wait-for-body
@@ -6220,9 +6214,6 @@ definitions:
62206214
- set-var-fmt
62216215
- silent-drop
62226216
- switch-mode
6223-
- track-sc0
6224-
- track-sc1
6225-
- track-sc2
62266217
- track-sc
62276218
- unset-var
62286219
- use-service
@@ -6568,9 +6559,6 @@ definitions:
65686559
action:
65696560
required: true
65706561
value:
6571-
- track-sc0
6572-
- track-sc1
6573-
- track-sc2
65746562
- track-sc
65756563
type:
65766564
value:
@@ -6584,9 +6572,6 @@ definitions:
65846572
action:
65856573
required: false
65866574
value:
6587-
- track-sc0
6588-
- track-sc1
6589-
- track-sc2
65906575
- track-sc
65916576
type:
65926577
value:
@@ -6601,9 +6586,6 @@ definitions:
66016586
action:
66026587
required: false
66036588
value:
6604-
- track-sc0
6605-
- track-sc1
6606-
- track-sc2
66076589
- track-sc
66086590
type:
66096591
value:

specification/models/configuration/http/request.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ http_request_rule:
6565
- silent-drop
6666
- strict-mode
6767
- tarpit
68-
- track-sc0
69-
- track-sc1
70-
- track-sc2
7168
- track-sc
7269
- unset-var
7370
- use-service

specification/models/configuration/http/response.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ http_response_rule:
4444
- set-var-fmt
4545
- silent-drop
4646
- strict-mode
47-
- track-sc0
48-
- track-sc1
49-
- track-sc2
5047
- track-sc
5148
- unset-var
5249
- wait-for-body

specification/models/configuration/tcp/request.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ tcp_request_rule:
4747
- set-var-fmt
4848
- silent-drop
4949
- switch-mode
50-
- track-sc0
51-
- track-sc1
52-
- track-sc2
5350
- track-sc
5451
- unset-var
5552
- use-service
@@ -210,7 +207,7 @@ tcp_request_rule:
210207
x-display-name: Sample expression rule
211208
x-dependency:
212209
action:
213-
value: [track-sc0, track-sc1, track-sc2, track-sc]
210+
value: [track-sc]
214211
required: true
215212
type:
216213
value: [session, connection, content]
@@ -219,7 +216,7 @@ tcp_request_rule:
219216
x-display-name: Optional table name
220217
x-dependency:
221218
action:
222-
value: [track-sc0, track-sc1, track-sc2, track-sc]
219+
value: [track-sc]
223220
required: false
224221
type:
225222
value: [session, connection, content]
@@ -229,7 +226,7 @@ tcp_request_rule:
229226
x-nullable: true
230227
x-dependency:
231228
action:
232-
value: [track-sc0, track-sc1, track-sc2, track-sc]
229+
value: [track-sc]
233230
required: false
234231
type:
235232
value: [session, connection, content]

0 commit comments

Comments
 (0)