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):
|
def get_or_create_vlan(self, vlan_id):
|
||||||
# FIXME: we may need to specify the datacenter
|
# FIXME: we may need to specify the datacenter
|
||||||
# since users may have same vlan id in multiple dc
|
# since users may have same vlan id in multiple dc
|
||||||
|
<<<<<<< HEAD
|
||||||
logging.debug(f"VLAN ID is: {vlan_id}")
|
logging.debug(f"VLAN ID is: {vlan_id}")
|
||||||
vlan = nb.ipam.vlans.get(
|
vlan = nb.ipam.vlans.get(
|
||||||
vid=vlan_id,
|
vid=vlan_id,
|
||||||
)
|
)
|
||||||
|
=======
|
||||||
|
>>>>>>> 4b0b3997f5fa5ef8ef871ed60a060ab05e2cd7ee
|
||||||
#/var/tmp/netbox-agent# lldpctl
|
#/var/tmp/netbox-agent# lldpctl
|
||||||
# -------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------
|
||||||
# LLDP neighbors:
|
# 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
|
# on Cisco SMB, the vlan will be 4095 for port is member of Port-Channel instead of VLAN 1
|
||||||
if vlan_id == "4095":
|
if vlan_id == "4095":
|
||||||
vlan_id = "1"
|
vlan_id = "1"
|
||||||
|
vlan = nb.ipam.vlans.get(
|
||||||
|
vid=vlan_id,
|
||||||
|
)
|
||||||
if vlan is None:
|
if vlan is None:
|
||||||
vlan = nb.ipam.vlans.create(
|
vlan = nb.ipam.vlans.create(
|
||||||
name='VLAN {}'.format(vlan_id),
|
name='VLAN {}'.format(vlan_id),
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue