Skip to content

Commit

Permalink
fix raid creation on server's registration (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
Solvik authored Sep 10, 2019
1 parent d402b56 commit 0cf2d4f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions netbox_agent/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,7 @@ def create_netbox_raid_card(self, raid_card):
))
return nb_raid_card

def create_netbox_raid_cards(self):
for raid_card in self.get_netbox_inventory(
device_id=self.device_id,
tag=[INVENTORY_TAG['raid_card']['slug']]
):
self.create_netbox_raid_card(raid_card)

def update_netbox_raid_cards(self):
def do_netbox_raid_cards(self):
"""
Update raid cards in netbobx
Since we only push:
Expand Down Expand Up @@ -445,7 +438,7 @@ def create(self):
return False
self.do_netbox_cpus()
self.do_netbox_memories()
self.create_netbox_raid_cards()
self.do_netbox_raid_cards()
self.do_netbox_disks()
self.do_netbox_interfaces()
self.do_netbox_motherboard()
Expand All @@ -456,7 +449,7 @@ def update(self):
return False
self.do_netbox_cpus()
self.do_netbox_memories()
self.update_netbox_raid_cards()
self.do_netbox_raid_cards()
self.do_netbox_disks()
self.do_netbox_interfaces()
self.do_netbox_motherboard()
Expand Down

0 comments on commit 0cf2d4f

Please sign in to comment.