Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Returns appropriate naming function based on target
olive_qemu_patched means can do int 0->6

        def interface_id(platform, olive_qemu_patched=False):
    """Returns appropriate naming function based on target
    olive_qemu_patched means can do int 0->6
    
    """
    if platform == 'netkit':
        return netkit_interface_id
    if platform in ['junosphere']:
            return junos_int_id_ge
    if platform in ['junosphere_olive']:
        return junos_int_id_junosphere_olive
    if platform in ['olive']:
        if olive_qemu_patched:
            return junos_int_id_olive_patched
        return junos_int_id_olive

    LOG.warn("Unable to map interface id for platform %s" % platform)
        


src/a/n/ank_le-HEAD/AutoNetkit/compiler/junoscompiler.py   ank_le(Download)
                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)

src/a/n/ank_le-HEAD/AutoNetkit/compiler/netkitcompiler.py   ank_le(Download)
    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')