Exemplo n.º 1
0
    # Resister a VTEP with the 1st hypervisor
    overlay_manager.resister_vtep_on_hypervisor(vtep_hvsrA)

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

    # Resister a VTEP with the 2nd hypervisor
    overlay_manager.resister_vtep_on_hypervisor(vtep_hvsrB)

    # wait on input
    print "\n"
    user_input = raw_input("Press any key to build a tunnel between the VTEP Hypervisors: ")

    # Build a tunnel between the VTEP Hypervisors
    overlay_manager.create_tunnel_between_two_hypervisors("g2_tunnel", doo['vniId_1'], vtep_hvsrA, vtep_hvsrB)

    # wait on input
    print "\n"
    user_input = raw_input("Press any key to get first hypervisor details: ")

    # View VTEP Hypervisor #1 details
    overlay_manager.get_hypervisor_details(vtep_hvsrA)

    # wait on input
    print "\n"
    user_input = raw_input("Press any key to get second hypervisor details: ")

    # View VTEP Hypervisor #2 details
    overlay_manager.get_hypervisor_details(vtep_hvsrB)
Exemplo n.º 2
0
        # Configure VTEP 1 onto Hypervisor 3 and reference this set as vtep_hvsrA
        vtep_hvsrA['hvsrIp'] = doo['hvsrIp_3']
        vtep_hvsrA['hvsrPortNum'] = doo['hvsrPortNum_3']
        vtep_hvsrA['vtepName'] = doo['vtepName_3']
        vtep_hvsrA['hvsrName'] = doo['hvsrName_3']
        vtep_hvsrA['vtep_hvsr_name'] = doo['vtepName_3'] + doo['hvsrName_3']
        vtep_hvsrA['switchName'] = doo['switchName_3']

        # Configure VTEP 1 onto Hypervisor 4 and reference this set as vtep_hvsrB
        vtep_hvsrB['hvsrIp'] = doo['hvsrIp_4']
        vtep_hvsrB['hvsrPortNum'] = doo['hvsrPortNum_4']
        vtep_hvsrB['vtepName'] = doo['vtepName_4']
        vtep_hvsrB['hvsrName'] = doo['hvsrName_4']
        vtep_hvsrB['vtep_hvsr_name'] = doo['vtepName_4'] + doo['hvsrName_4']
        vtep_hvsrB['switchName'] = doo['switchName_4']
    else:
        parser.print_help()
        sys.exit(0)

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

    logging.info("Building tunnel %s (VNI ID %s) between vtep %s (switch %s) and vtep %s (switch %s)",
                 tunnel_name, vni_id,
                 vtep_hvsrA['vtepName'], vtep_hvsrA['switchName'],
                 vtep_hvsrB['vtepName'], vtep_hvsrA['switchName'])

    overlay_manager.create_tunnel_between_two_hypervisors(tunnel_name, vni_id, vtep_hvsrA, vtep_hvsrB)