示例#1
0
def nbrhosts(ansible_adhoc, testbed, creds):
    """
    Shortcut fixture for getting PTF host
    """

    vm_base = int(testbed['vm_base'][2:])
    devices = {}
    for k, v in testbed['topo']['properties']['topology']['VMs'].items():
        devices[k] = EosHost(ansible_adhoc, "VM%04d" % (vm_base + v['vm_offset']), creds['eos_login'], creds['eos_password'])
    return devices
示例#2
0
def nbrhosts(ansible_adhoc, testbed, creds):
    """
    Shortcut fixture for getting VM host
    """

    vm_base = int(testbed['vm_base'][2:])
    devices = {}
    for k, v in testbed['topo']['properties']['topology']['VMs'].items():
        devices[k] = {'host': EosHost(ansible_adhoc, \
                                      "VM%04d" % (vm_base + v['vm_offset']), \
                                      creds['eos_login'], \
                                      creds['eos_password']),
                      'conf': testbed['topo']['properties']['configuration'][k]}
    return devices