fix logic order while using all nvme disk, round disk size to 2 digit after point
This commit is contained in:
commit
cb81bb484c
1 changed files with 6 additions and 0 deletions
|
|
@ -198,10 +198,13 @@ class Network(object):
|
|||
def get_or_create_vlan(self, vlan_id):
|
||||
# FIXME: we may need to specify the datacenter
|
||||
# since users may have same vlan id in multiple dc
|
||||
<<<<<<< HEAD
|
||||
logging.debug(f"VLAN ID is: {vlan_id}")
|
||||
vlan = nb.ipam.vlans.get(
|
||||
vid=vlan_id,
|
||||
)
|
||||
=======
|
||||
>>>>>>> 4b0b3997f5fa5ef8ef871ed60a060ab05e2cd7ee
|
||||
#/var/tmp/netbox-agent# lldpctl
|
||||
# -------------------------------------------------------------------------------
|
||||
# LLDP neighbors:
|
||||
|
|
@ -218,6 +221,9 @@ class Network(object):
|
|||
# on Cisco SMB, the vlan will be 4095 for port is member of Port-Channel instead of VLAN 1
|
||||
if vlan_id == "4095":
|
||||
vlan_id = "1"
|
||||
vlan = nb.ipam.vlans.get(
|
||||
vid=vlan_id,
|
||||
)
|
||||
if vlan is None:
|
||||
vlan = nb.ipam.vlans.create(
|
||||
name='VLAN {}'.format(vlan_id),
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue