Skip to content

Commit 3ba02bc

Browse files
Atualiza vitrine publica em PT-BR
1 parent 1a9297a commit 3ba02bc

10 files changed

Lines changed: 108 additions & 122 deletions

File tree

.github/workflows/smoke.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Teste Smoke Python
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
smoke:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.11'
17+
- run: python -m compileall .

LICENSE

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
2-
3-
Copyright (c) 2026 Alberto Mateus P. da Gama
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
MIT License
2+
3+
Copyright (c) 2026 Alberto Mateus P. da Gama
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 26 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,26 @@
1-
# NetMaster CLI/API
2-
3-
Network automation template for provisioning and documenting network devices with a clean, extensible Python architecture.
4-
5-
## Overview
6-
7-
NetMaster CLI/API is an educational and technical starter project for network automation. It separates domain rules, application use cases, interface adapters, and infrastructure details so students and engineers can evolve the repository into a CLI, REST API, or lab automation tool without mixing business logic with device-specific integrations.
8-
9-
## Problem
10-
11-
Network teams often start automation scripts as isolated one-off files. That makes testing, reuse, and onboarding difficult. This repository demonstrates a more professional baseline for VLAN provisioning, device inventory, and future SSH/API integrations.
12-
13-
## Architecture
14-
15-
- `domain/`: pure entities such as `NetworkDevice` and `VLAN`.
16-
- `application/`: use cases such as `ProvisionVLANUseCase`.
17-
- `interface_adapters/`: future FastAPI routes, Typer commands, and serializers.
18-
- `infrastructure/`: future persistence, Netmiko drivers, and vendor-specific adapters.
19-
20-
## Stack
21-
22-
- Python 3.10+
23-
- FastAPI and Uvicorn for REST APIs
24-
- Typer for command-line workflows
25-
- SQLAlchemy for persistence
26-
- Netmiko for SSH-based network device automation
27-
28-
## Getting Started
29-
30-
```bash
31-
git clone https://github.com/albertomateus9/netmaster-cli-api.git
32-
cd netmaster-cli-api
33-
python -m venv .venv
34-
.venv\Scripts\activate
35-
pip install -r requirements.txt
36-
```
37-
38-
On Linux or macOS, activate the environment with:
39-
40-
```bash
41-
source .venv/bin/activate
42-
```
43-
44-
## Development Direction
45-
46-
- Implement repository interfaces for device inventory.
47-
- Add a Netmiko-backed network service for lab devices.
48-
- Expose the provisioning use case through FastAPI and Typer.
49-
- Add tests for domain entities and use-case orchestration.
50-
51-
## Professional Context
52-
53-
This repository reflects practical interests in telecom infrastructure, routing, network automation, and teaching software architecture through realistic engineering scenarios.
54-
55-
## License
56-
57-
MIT. See [LICENSE](LICENSE).
1+
# NetMaster CLI/API
2+
3+
Template profissional de automacao de redes com Python, FastAPI, Typer, Netmiko e arquitetura limpa.
4+
5+
## Visão Geral
6+
7+
NetMaster CLI/API é um projeto de vitrine do portfólio técnico de Alberto Mateus P. da Gama. O objetivo é demonstrar maturidade profissional em redes, telecomunicações, automação, educação tecnológica e sistemas aplicados.
8+
9+
## Contexto Profissional
10+
11+
- Infraestrutura de redes, telecomunicações e operação técnica.
12+
- Documentação clara para leitura pública no GitHub.
13+
- Dados sintéticos ou escopo conceitual, sem exposição de clientes, alunos ou documentos internos.
14+
- Estrutura pensada para evolução incremental.
15+
16+
## Como Rodar
17+
18+
Consulte `requirements.txt` e os pacotes Python do repositório. O projeto é um template técnico e pode ser expandido para CLI, API ou laboratório.
19+
20+
## Política De Dados
21+
22+
Nenhum dado real de estudantes, clientes, credenciais, telefones, e-mails pessoais ou documentos internos é publicado neste repositório.
23+
24+
## Licença
25+
26+
MIT. Consulte [LICENSE](LICENSE).

application/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Módulo application
1+
# Módulo application

application/use_cases.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
from domain.entities import NetworkDevice, VLAN
2-
3-
class ProvisionVLANUseCase:
4-
def __init__(self, device_repository, network_service):
5-
self.device_repository = device_repository
6-
self.network_service = network_service
7-
8-
def execute(self, device_ip: str, vlan_id: int, vlan_name: str) -> bool:
9-
"""
10-
Caso de uso de orquestração para provisionar uma VLAN em um dispositivo.
11-
"""
12-
# 1. Obter o dispositivo pelo IP
13-
# device = self.device_repository.get_by_ip(device_ip)
14-
15-
# 2. Criar a entidade VLAN
16-
# vlan = VLAN(vlan_id=vlan_id, name=vlan_name)
17-
18-
# 3. Chamar o serviço de rede (infraestrutura) para aplicar a configuração
19-
# success = self.network_service.create_vlan(device, vlan)
20-
21-
# return success
22-
pass
1+
from domain.entities import NetworkDevice, VLAN
2+
3+
class ProvisionVLANUseCase:
4+
def __init__(self, device_repository, network_service):
5+
self.device_repository = device_repository
6+
self.network_service = network_service
7+
8+
def execute(self, device_ip: str, vlan_id: int, vlan_name: str) -> bool:
9+
"""
10+
Caso de uso de orquestração para provisionar uma VLAN em um dispositivo.
11+
"""
12+
# 1. Obter o dispositivo pelo IP
13+
# device = self.device_repository.get_by_ip(device_ip)
14+
15+
# 2. Criar a entidade VLAN
16+
# vlan = VLAN(vlan_id=vlan_id, name=vlan_name)
17+
18+
# 3. Chamar o serviço de rede (infraestrutura) para aplicar a configuração
19+
# success = self.network_service.create_vlan(device, vlan)
20+
21+
# return success
22+
pass

domain/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Módulo domain
1+
# Módulo domain

domain/entities.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
from dataclasses import dataclass
2-
3-
@dataclass
4-
class NetworkDevice:
5-
ip: str
6-
model: str
7-
username: str
8-
password: str
9-
10-
@dataclass
11-
class VLAN:
12-
vlan_id: int
13-
name: str
1+
from dataclasses import dataclass
2+
3+
@dataclass
4+
class NetworkDevice:
5+
ip: str
6+
model: str
7+
username: str
8+
password: str
9+
10+
@dataclass
11+
class VLAN:
12+
vlan_id: int
13+
name: str

infrastructure/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Módulo infrastructure
1+
# Módulo infrastructure

interface_adapters/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Módulo interface_adapters
1+
# Módulo interface_adapters

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
fastapi
2-
uvicorn
3-
typer
4-
sqlalchemy
5-
netmiko
1+
fastapi
2+
uvicorn
3+
typer
4+
sqlalchemy
5+
netmiko

0 commit comments

Comments
 (0)