Skip to content

Commit 6a1a547

Browse files
committed
Do not configure spanning tree on L3 physical interfaces
1 parent 7a69d92 commit 6a1a547

22 files changed

+222570
-12
lines changed

.github/workflows/codeql.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
################################################################################
2+
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
3+
# Edit Makefile.maker.yaml instead. #
4+
################################################################################
5+
6+
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
7+
# SPDX-License-Identifier: Apache-2.0
8+
9+
name: CodeQL
10+
"on":
11+
push:
12+
branches:
13+
- main
14+
pull_request:
15+
branches:
16+
- main
17+
schedule:
18+
- cron: '00 07 * * 1'
19+
workflow_dispatch: {}
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write
24+
jobs:
25+
analyze:
26+
name: CodeQL
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check out code
30+
uses: actions/checkout@v5
31+
- name: Set up Go
32+
uses: actions/setup-go@v6
33+
with:
34+
check-latest: true
35+
go-version: 1.25.5
36+
- name: Run prepare make target
37+
run: make generate
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v4
40+
with:
41+
languages: go
42+
queries: security-extended
43+
- name: Autobuild
44+
uses: github/codeql-action/autobuild@v4
45+
- name: Perform CodeQL Analysis
46+
uses: github/codeql-action/analyze@v4

Tiltfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ k8s_resource(new_name='eth1-2', objects=['eth1-2:interface'], trigger_mode=TRIGG
5050
k8s_resource(new_name='svi-10', objects=['svi-10:interface'], resource_deps=['vlan-10'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
5151
k8s_resource(new_name='eth1-10', objects=['eth1-10:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
5252
# Interface resources relevant to vPC configuration are defined below in the "vpcdomain" sample
53-
#k8s_resource(new_name='eth1-30', objects=['eth1-30:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
54-
#k8s_resource(new_name='eth1-31', objects=['eth1-31:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
55-
#k8s_resource(new_name='eth1-32', objects=['eth1-32:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
5653
#k8s_resource(new_name='po1-cfg', objects=['po1-cfg:portchannelconfig'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
57-
#k8s_resource(new_name='po1', objects=['po1:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
5854
#k8s_resource(new_name='po2', objects=['po2:interface'], trigger_mode=TRIGGER_MODE_MANUAL, auto_init=False)
5955

6056
k8s_yaml('./config/samples/v1alpha1_banner.yaml')

api/core/v1alpha1/zz_generated.deepcopy.go

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

config/.DS_Store

6 KB
Binary file not shown.

go

Whitespace-only changes.

internal/provider/cisco/nxos/provider.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -914,9 +914,11 @@ func (p *Provider) DeleteInterface(ctx context.Context, req *provider.InterfaceR
914914
p.ID = name
915915
conf = append(conf, p)
916916

917-
stp := new(SpanningTree)
918-
stp.IfName = name
919-
conf = append(conf, stp)
917+
if req.Interface.Spec.Switchport != nil {
918+
stp := new(SpanningTree)
919+
stp.IfName = name
920+
conf = append(conf, stp)
921+
}
920922

921923
case v1alpha1.InterfaceTypeLoopback:
922924
lb := new(Loopback)

0 commit comments

Comments
 (0)