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
def __init__(self, network, services, zebra_password="******"): 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