make InventoryItem's name attribute <50 char for memory DIMM (#67)
This commit is contained in:
parent
f68fed18b4
commit
ba8f58180e
1 changed files with 3 additions and 3 deletions
|
@ -399,16 +399,16 @@ class Inventory():
|
|||
|
||||
def create_netbox_memory(self, memory):
|
||||
manufacturer = self.find_or_create_manufacturer(memory['vendor'])
|
||||
|
||||
name = 'Slot {} ({}GB)'.format(memory['slot'], memory['size'])
|
||||
nb_memory = nb.dcim.inventory_items.create(
|
||||
device=self.device_id,
|
||||
discovered=True,
|
||||
manufacturer=manufacturer.id,
|
||||
tags=[INVENTORY_TAG['memory']['name']],
|
||||
name='{} ({}GB)'.format(memory['description'], memory['size']),
|
||||
name=name,
|
||||
part_id=memory['product'],
|
||||
serial=memory['serial'],
|
||||
description='Slot {}'.format(memory['slot']),
|
||||
description=memory['description'],
|
||||
)
|
||||
|
||||
logging.info('Creating Memory {location} {type} {size}GB'.format(
|
||||
|
|
Loading…
Reference in a new issue