Refactor Cisco MAC Monitor: Implement HTTPS service and restructure code
- Removed old requirements.txt and test_new_format.py files. - Added new src/cisco_mac_http_service.py to implement an HTTPS service for MAC monitoring. - Introduced src/cisco_mac_monitor.py for the main MAC monitoring functionality. - Created new requirements.txt for dependencies. - Added example usage documentation in Docs/example. - Updated test_new_format.py to validate new JSON output format.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
CHANGELOG.md
|
||||
|
||||
2026/02/09
|
||||
Refactor Cisco MAC Monitor: Implement HTTPS service and restructure code
|
||||
|
||||
- Removed old requirements.txt and test_new_format.py files.
|
||||
- Added new src/cisco_mac_http_service.py to implement an HTTPS service for MAC monitoring.
|
||||
- Introduced src/cisco_mac_monitor.py for the main MAC monitoring functionality.
|
||||
- Created new requirements.txt for dependencies.
|
||||
- Added example usage documentation in Docs/example.
|
||||
- Updated test_new_format.py to validate new JSON output format.
|
||||
+3
-3
@@ -36,7 +36,7 @@ RUN dnf update -y && \
|
||||
RUN useradd -m -u 1000 -s /bin/bash monitor
|
||||
|
||||
# Copiar requirements.txt primero para cache de Docker
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
COPY src/requirements.txt /tmp/requirements.txt
|
||||
|
||||
# Instalar dependencias Python desde requirements.txt
|
||||
RUN pip3 install --no-cache-dir --upgrade pip && \
|
||||
@@ -48,8 +48,8 @@ USER monitor
|
||||
WORKDIR /app
|
||||
|
||||
# Copiar scripts principales
|
||||
COPY --chmod=755 --chown=monitor:monitor cisco_mac_monitor.py /app/
|
||||
COPY --chmod=755 --chown=monitor:monitor cisco_mac_http_service.py /app/
|
||||
COPY --chmod=755 --chown=monitor:monitor src/cisco_mac_monitor.py /app/
|
||||
COPY --chmod=755 --chown=monitor:monitor src/cisco_mac_http_service.py /app/
|
||||
|
||||
# Exponer puerto HTTPS
|
||||
EXPOSE 8443
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker build --platform linux/amd64 -t localhost/cisco-friends:$(date +%Y%m%d%H) .
|
||||
docker build --platform linux/amd64 --no-cache -t localhost/cisco-friends:$(date +%Y%m%d%H) .
|
||||
Reference in New Issue
Block a user