fix(fabric): add leaf number variable (#11)
This commit is contained in:
@@ -9,10 +9,24 @@
|
|||||||
|
|
||||||
### Popule data in Netbox
|
### Popule data in Netbox
|
||||||
|
|
||||||
Generate a Netbox token via webui and execute the python script
|
Generate a Netbox token via webui and execute the python script, and on utilities folder start population :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python import.py http://localhost:8080 YOUR_NETBOX_TOKEN device_model.yml subnets.yml
|
uv run import.py http://localhost:8080 YOUR_TOKEN Devices/devices_model.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create Fabric
|
## Create Fabric
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv run Create_Fabric/main.py
|
||||||
|
NetBox URL: http://localhost:8080
|
||||||
|
NetBox API Token:
|
||||||
|
Number of buildings (1-5): 4
|
||||||
|
Spine device type slug: ceos
|
||||||
|
Leaf device type slug: ceos
|
||||||
|
Access switch device type slug: ceos
|
||||||
|
|
||||||
|
Existing Sites:
|
||||||
|
1. Paris (slug=paris)
|
||||||
|
Choose site number or 'new': 1
|
||||||
|
```
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class VXLANFabricCreator:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Création Leaf
|
# Création Leaf
|
||||||
leaf_name = f"{self.config.site_code.lower()}{str(building_num).zfill(2)}_lf1_00"
|
leaf_name = f"{self.config.site_code.lower()}{str(building_num).zfill(2)}_lf{str(building_num).zfill(1)}_00"
|
||||||
leaf = self.nb.create_device(
|
leaf = self.nb.create_device(
|
||||||
name=leaf_name,
|
name=leaf_name,
|
||||||
device_type_slug=self.config.leaf_type,
|
device_type_slug=self.config.leaf_type,
|
||||||
|
|||||||
Reference in New Issue
Block a user