本文整理汇总了Python中AutoNetkit.interface_id方法的典型用法代码示例。如果您正苦于以下问题:Python AutoNetkit.interface_id方法的具体用法?Python AutoNetkit.interface_id怎么用?Python AutoNetkit.interface_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AutoNetkit
的用法示例。
在下文中一共展示了AutoNetkit.interface_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import AutoNetkit [as 别名]
# 或者: from AutoNetkit import interface_id [as 别名]
def __init__(self, network, services, igp="ospf", target=None, olive_qemu_patched=False):
self.network = network
self.services = services
self.igp = igp
self.target = target
self.olive_qemu_patched = olive_qemu_patched
self.interface_limit = 0
#TODO: tidy up platform: Olive/Junosphere between the vmm and the device configs
self.junosphere = False
self.junosphere_olive = False
if target in ['junosphere', 'junosphere_olive']:
self.junosphere = True
self.int_id_em = ank.naming.junos_int_id_em
self.junosphere_platform = config.settings['Junosphere']['platform']
if self.junosphere_platform == "Olive":
self.junosphere_olive = True
self.target = "junosphere_olive"
self.olive_qemu_patched = config.settings['Junosphere']['olive_qemu_patched']
self.int_id_em = ank.interface_id(self.target, olive_qemu_patched=olive_qemu_patched)
else:
self.interface_limit = 256 # TODO: check upper bound for VJX
self.int_id = ank.interface_id(self.target, olive_qemu_patched=olive_qemu_patched)
self.olive = False
if self.target in ['olive', 'junosphere_olive']:
self.olive = True
if self.olive:
self.interface_limit = 7
if self.olive_qemu_patched:
self.interface_limit = 8 # Patch allows 8 interfaces
示例2: __init__
# 需要导入模块: import AutoNetkit [as 别名]
# 或者: from AutoNetkit import interface_id [as 别名]
def __init__(self, network, services, zebra_password="1234"):
self.network = network
self.services = services
self.zebra_password = zebra_password
self.interface_id = ank.interface_id('netkit')
self.tap_interface_id = ank.tap_interface_id
self.lo_interface = lo_interface
self.default_weight = 1