コード例 #1
0
ファイル: ovrly_mgr_script.py プロジェクト: brocade/pysdn
    vtep_hvsrA['hvsrPortNum'] = doo['hvsrPortNum_1']
    vtep_hvsrA['vtepName'] = doo['vtepName_1']
    vtep_hvsrA['hvsrName'] = doo['hvsrName_1']
    vtep_hvsrA['vtep_hvsr_name'] = doo['vtepName_1'] + doo['hvsrName_1']
    vtep_hvsrA['switchName'] = doo['switchName_1'] + doo['hvsrName_1']

    # Configure VTEP 1 onto Hypervisor 1 and reference this set as vtep_hvsrA
    vtep_hvsrB['hvsrIp'] = doo['hvsrIp_2']
    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)
コード例 #2
0
ファイル: build_tunnel.py プロジェクト: g2github/pysdn
        # 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)

コード例 #3
0
ファイル: create_vteps.py プロジェクト: g2github/pysdn
        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("Creating 2 tunnel VTEP endpoints: %s on hypervisor %s and %s on hypervisor %s",
                 vtep_hvsrA['vtepName'], vtep_hvsrA['hvsrName'],
                 vtep_hvsrB['vtepName'], vtep_hvsrB['hvsrName'])

    overlay_manager.register_hypervisor(vtep_hvsrA)
    overlay_manager.resister_vtep_on_hypervisor(vtep_hvsrA)
    overlay_manager.register_hypervisor(vtep_hvsrB)
    overlay_manager.resister_vtep_on_hypervisor(vtep_hvsrB)
コード例 #4
0
ファイル: delete_tunnel.py プロジェクト: g2github/pysdn
        # 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("Deleting 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.delete_tunnel_between_two_hypervisors(tunnel_name)

コード例 #5
0
ファイル: delete_vteps.py プロジェクト: g2github/pysdn
        # 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("Deleting 2 tunnel VTEP endpoints: %s on hypervisor %s and %s on hypervisor %s",
                 vtep_hvsrA['vtepName'], vtep_hvsrA['hvsrName'],
                 vtep_hvsrB['vtepName'], vtep_hvsrB['hvsrName'])

    overlay_manager.delete_hypervisor(vtep_hvsrA)
    overlay_manager.delete_hypervisor(vtep_hvsrB)