Exemplo n.º 1
0
    vtep_hvsrB['hvsrPortNum'] = doo['hvsrPortNum_2']
    vtep_hvsrB['vtepName'] = doo['vtepName_2']
    vtep_hvsrB['hvsrName'] = doo['hvsrName_2']
    vtep_hvsrB['vtep_hvsr_name'] = doo['vtepName_1'] + doo['hvsrName_2']
    vtep_hvsrB['switchName'] = doo['switchName_2'] + doo['hvsrName_2']

    # Instantiate the Overlay Manager
    overlay_manager = Ovrly_mgr(doo['ctrlIpAddr'], doo['ctrlPortNum'], doo['ctrlUname'],
                                doo['ctrlPswd'], doo['ctrlTimeOut'])

    # wait on input
    print "\n"
    user_input = raw_input("Press any key to register the first Hypervisor: ")

    # Register the 1st hypervisor
    overlay_manager.register_hypervisor(vtep_hvsrA)

    # wait on input
    print "\n"
    user_input = raw_input("Press any key to register the second Hypervisor: ")

    # Register the 2nd Hypervisor
    overlay_manager.register_hypervisor(vtep_hvsrB)

    # wait on input
    print "\n"
    user_input = raw_input("Press any key to register a VTEP with the first Hypervisor: ")

    # Resister a VTEP with the 1st hypervisor
    overlay_manager.resister_vtep_on_hypervisor(vtep_hvsrA)