Skip to content

Commit 07f4adc

Browse files
committed
Merge v2 branch for v2.2.0 release
Features: - CDP neighbor discovery fix (proper OID walking) - Multiple CDP neighbors per interface support - Network Adapters vs Ports separation - CheckPoint/SonicWall/WatchGuard firewall detection - Switch stack serial number fix (returns master serial) - CDP/LLDP preference (prefers CDP when available) - ifType-based physical interface detection - Multi-platform builds (Windows, Debian, RHEL)
2 parents bf49f1c + 2d6ce4c commit 07f4adc

33 files changed

Lines changed: 13605 additions & 8706 deletions
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
8-
---
9-
10-
**Describe the bug**
11-
A clear and concise description of what the bug is.
12-
13-
**To Reproduce**
14-
Steps to reproduce the behavior:
15-
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
18-
4. See error
19-
20-
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
22-
23-
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
25-
26-
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
30-
31-
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
36-
37-
**Additional context**
38-
Add any other context about the problem here.
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
8-
---
9-
10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12-
13-
**Describe the solution you'd like**
14-
A clear and concise description of what you want to happen.
15-
16-
**Describe alternatives you've considered**
17-
A clear and concise description of any alternative solutions or features you've considered.
18-
19-
**Additional context**
20-
Add any other context or screenshots about the feature request here.
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5-
6-
version: 2
7-
updates:
8-
- package-ecosystem: "pip" # See documentation for possible values
9-
directory: "/" # Location of package manifests
10-
schedule:
11-
interval: "monthly"
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "monthly"

.github/workflows/build.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Build Binaries
2+
3+
on:
4+
push:
5+
branches: [ "main", "v2" ]
6+
tags: [ "v*" ]
7+
pull_request:
8+
branches: [ "main", "v2" ]
9+
10+
jobs:
11+
build-standard:
12+
name: Build on ${{ matrix.name }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- os: windows-latest
19+
name: Windows
20+
binary_name: snmp-discovery-windows
21+
- os: ubuntu-22.04
22+
name: Debian
23+
binary_name: snmp-discovery-debian
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.12'
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r requirements.txt
37+
pip install pyinstaller
38+
39+
- name: Build with PyInstaller
40+
run: |
41+
pyinstaller --onefile --name ${{ matrix.binary_name }} main.py
42+
43+
- name: Upload Artifacts
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: ${{ matrix.binary_name }}
47+
path: dist/
48+
49+
build-rhel:
50+
name: Build on RHEL
51+
runs-on: ubuntu-latest
52+
container:
53+
image: rockylinux:9
54+
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Install Python and dependencies
59+
run: |
60+
dnf install -y python3.11 python3.11-pip python3.11-devel gcc binutils
61+
python3.11 -m pip install --upgrade pip
62+
python3.11 -m pip install -r requirements.txt
63+
python3.11 -m pip install pyinstaller
64+
65+
- name: Build with PyInstaller
66+
run: |
67+
python3.11 -m PyInstaller --onefile --name snmp-discovery-rhel main.py
68+
69+
- name: Upload Artifacts
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: snmp-discovery-rhel
73+
path: dist/

.github/workflows/release.yml

Lines changed: 124 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,124 @@
1-
name: Build and Release
2-
3-
on:
4-
push:
5-
tags:
6-
- 'v*.*.*' # Trigger the workflow on version tags
7-
8-
jobs:
9-
release:
10-
runs-on: ubuntu-20.04
11-
12-
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v2
15-
16-
- name: Zip source code
17-
run: |
18-
zip -r source_code.zip .
19-
20-
- name: Create release
21-
id: create_release
22-
uses: actions/create-release@v1
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
25-
with:
26-
tag_name: ${{ github.ref }}
27-
release_name: Release ${{ github.ref }}
28-
draft: false
29-
prerelease: false
30-
31-
- name: Upload Release Asset
32-
uses: actions/upload-release-asset@v1
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
35-
with:
36-
upload_url: ${{ steps.create_release.outputs.upload_url }}
37-
asset_path: source_code.zip
38-
asset_name: source_code.zip
39-
asset_content_type: application/zip
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build-standard:
10+
name: Build on ${{ matrix.name }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- os: windows-latest
17+
name: Windows
18+
binary_name: snmp-discovery-windows
19+
asset_name: snmp-discovery-windows.exe
20+
- os: ubuntu-22.04
21+
name: Debian
22+
binary_name: snmp-discovery-debian
23+
asset_name: snmp-discovery-debian
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.12'
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install -r requirements.txt
37+
pip install pyinstaller
38+
39+
- name: Build with PyInstaller
40+
run: |
41+
pyinstaller --onefile --name ${{ matrix.binary_name }} main.py
42+
43+
- name: Upload Artifacts
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: ${{ matrix.binary_name }}
47+
path: dist/
48+
49+
build-rhel:
50+
name: Build on RHEL
51+
runs-on: ubuntu-latest
52+
container:
53+
image: rockylinux:9
54+
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Install Python and dependencies
59+
run: |
60+
dnf install -y python3.11 python3.11-pip python3.11-devel gcc binutils
61+
python3.11 -m pip install --upgrade pip
62+
python3.11 -m pip install -r requirements.txt
63+
python3.11 -m pip install pyinstaller
64+
65+
- name: Build with PyInstaller
66+
run: |
67+
python3.11 -m PyInstaller --onefile --name snmp-discovery-rhel main.py
68+
69+
- name: Upload Artifacts
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: snmp-discovery-rhel
73+
path: dist/
74+
75+
release:
76+
needs: [build-standard, build-rhel]
77+
runs-on: ubuntu-latest
78+
permissions:
79+
contents: write
80+
81+
steps:
82+
- uses: actions/checkout@v4
83+
84+
- name: Download Windows artifact
85+
uses: actions/download-artifact@v4
86+
with:
87+
name: snmp-discovery-windows
88+
path: dist/windows/
89+
90+
- name: Download Debian artifact
91+
uses: actions/download-artifact@v4
92+
with:
93+
name: snmp-discovery-debian
94+
path: dist/debian/
95+
96+
- name: Download RHEL artifact
97+
uses: actions/download-artifact@v4
98+
with:
99+
name: snmp-discovery-rhel
100+
path: dist/rhel/
101+
102+
- name: Prepare assets
103+
run: |
104+
mkdir -p release
105+
cp dist/windows/snmp-discovery-windows.exe release/ 2>/dev/null || cp dist/windows/snmp-discovery-windows release/snmp-discovery-windows.exe
106+
cp dist/debian/snmp-discovery-debian release/
107+
cp dist/rhel/snmp-discovery-rhel release/
108+
chmod +x release/snmp-discovery-debian release/snmp-discovery-rhel
109+
zip -r release/source-code.zip . -x ".git/*" -x "dist/*" -x "release/*" -x "build/*" -x "__pycache__/*"
110+
ls -la release/
111+
112+
- name: Create Release
113+
uses: softprops/action-gh-release@v1
114+
with:
115+
name: Release ${{ github.ref_name }}
116+
tag_name: ${{ github.ref_name }}
117+
generate_release_notes: true
118+
files: |
119+
release/snmp-discovery-windows.exe
120+
release/snmp-discovery-debian
121+
release/snmp-discovery-rhel
122+
release/source-code.zip
123+
env:
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)