Modifies default chassis role

This commit is contained in:
Pierre Lannoy 2024-03-11 19:37:53 +01:00
commit 7886c4315b
Signed by: Pierre Lannoy
GPG key ID: D27231EF87D53F31

View file

@ -199,7 +199,7 @@ class ServerBase():
name=self.get_chassis_name(), name=self.get_chassis_name(),
device_type=device_type.id, device_type=device_type.id,
serial=serial, serial=serial,
device_role=4, role=device_role.id,
site=datacenter.id if datacenter else None, site=datacenter.id if datacenter else None,
tenant=tenant.id if tenant else None, tenant=tenant.id if tenant else None,
rack=rack.id if rack else None, rack=rack.id if rack else None,
@ -220,7 +220,7 @@ class ServerBase():
new_blade = nb.dcim.devices.create( new_blade = nb.dcim.devices.create(
name=hostname, name=hostname,
serial=serial, serial=serial,
role=3, role=device_role.id,
device_type=device_type.id, device_type=device_type.id,
parent_device=chassis.id, parent_device=chassis.id,
site=datacenter.id if datacenter else None, site=datacenter.id if datacenter else None,