Skip to content

Commit 296fb38

Browse files
committed
remove legacy call
1 parent 5ac8947 commit 296fb38

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

outbound.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func generateChainName(netName, containerID string) string {
6767
}
6868

6969
// parseArgs extracts additional outbound rules and metadata from CNI_ARGS.
70-
func parseArgs(args, containerID string) ([]iptables.OutboundRule, map[string]string, error) {
70+
func parseArgs(args string) ([]iptables.OutboundRule, map[string]string, error) {
7171
logger.Log(context.Background(), slog.LevelInfo,
7272
"Parsing CNI arguments",
7373
getLogAttrs(),
@@ -234,7 +234,7 @@ func applyAdditionalRules(conf *PluginConf, additionalRules []iptables.OutboundR
234234
// parseConfig is the main entry for reading stdin config + CNI_ARGS.
235235
// It delegates to smaller helper functions for clarity.
236236
func parseConfig(stdin []byte, args, containerID string) (*PluginConf, error) {
237-
additionalRules, argsMetadata, err := parseArgs(args, containerID)
237+
additionalRules, argsMetadata, err := parseArgs(args)
238238
if err != nil {
239239
return nil, err
240240
}

outbound_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ func TestParseAdditionalRules(t *testing.T) {
15551555

15561556
for _, tc := range testCases {
15571557
t.Run(tc.name, func(t *testing.T) {
1558-
rules, _, err := parseArgs(tc.args, "test-container")
1558+
rules, _, err := parseArgs(tc.args)
15591559
if tc.expectedError {
15601560
assert.Error(t, err)
15611561
} else {
@@ -1623,7 +1623,7 @@ func TestParseArgsWithLogging(t *testing.T) {
16231623
t.Run(tc.name, func(t *testing.T) {
16241624
logBuffer.Reset()
16251625

1626-
rules, metadata, err := parseArgs(tc.args, "test-container")
1626+
rules, metadata, err := parseArgs(tc.args)
16271627

16281628
if tc.expectError {
16291629
assert.Error(t, err)
@@ -1713,7 +1713,7 @@ func TestParseArgs(t *testing.T) {
17131713

17141714
for _, tc := range testCases {
17151715
t.Run(tc.name, func(t *testing.T) {
1716-
rules, meta, err := parseArgs(tc.args, "test-container")
1716+
rules, meta, err := parseArgs(tc.args)
17171717

17181718
if tc.expectError {
17191719
assert.Error(t, err)

0 commit comments

Comments
 (0)