Esempio n. 1
0
def main(runtime):

    gRun(
        mapping_datafile='mapping_datafile.yaml',
        trigger_uids=And('TriggerDisableEnableBgp\.'),
        verification_uids=And('Verify_BgpAllNexthopDatabase\.'),
    )
Esempio n. 2
0
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))
    gRun(
        trigger_datafile=test_path + '/trigger_datafile.yaml',
        subsection_datafile=test_path + '/subsection_datafile.yaml',
        trigger_groups=And('tenant'),
    )
Esempio n. 3
0
def main():
    datafile_path = os.path.dirname(os.path.abspath(__file__))
    datafile_path += '/datafiles'

    gRun(trigger_datafile=datafile_path + '/trigger_datafile.yaml',
         subsection_datafile=datafile_path + '/subsection_datafile.yaml',
         trigger_uids=Or(''))
Esempio n. 4
0
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--config_file',
                        dest='features_datafile',
                        default='pts_features.yaml')
    parser.add_argument('--after', dest='after', action='store_true')
    parser.set_defaults(after=False)

    args, unknown = parser.parse_known_args()
    # common definition of features to profile
    with open(args.features_datafile, 'r') as f:
        features = yaml.safe_load(f)
        features = features['features']

    if args.after:

        gRun(mapping_datafile='mapping_datafile.yaml',
             pts_datafile='pts_datafile.yaml',
             pts_features=features,
             subsection_datafile='subsection_datafile.yaml',
             pts_golden_config='pts')
    else:

        gRun(mapping_datafile='mapping_datafile.yaml',
             pts_datafile='pts_datafile.yaml',
             pts_features=features,
             subsection_datafile='subsection_datafile.yaml')
Esempio n. 5
0
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))

    # pts_features mentions to Genie which feature to learn in CommonSetup, and then compare at the CommonCleanup
    # trigger_uids and verification_uids limit which test to execute
    gRun(pts_features=['platform', 'bgp', 'interface'],
         verification_uids=['Verify_IpInterfaceBrief', 'Verify_IpRoute_vrf_all'],
         trigger_uids=['TriggerUnconfigConfigBgp.uut', 'TriggerShutNoShutBgpNeighbors', 'TriggerModifyLoopbackInterfaceIp.uut', 'TriggerShutNoShutEthernetInterface'])
Esempio n. 6
0
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))
    gRun(
        trigger_datafile=test_path + '/blitz.yaml',
        subsection_datafile=test_path + '/subsection_datafile.yaml',
        mapping_datafile=test_path + '/mapping_datafile.yaml',
        trigger_groups=And('all'),
    )
Esempio n. 7
0
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))

    # mapping_datafile is mandatory
    # trigger_uids limit which test to execute
    gRun(trigger_uids=['TriggerCluster'],
         verification_uids=['Verify_BgpVrfAllAll', 'Verify_Interface'],
         trigger_datafile='trigger_datafile.yaml')
def main(task):
    testbedfile = (
        f'/home/segunorodeji_gmail_com/Projects/Network_Infrastructure_repo/pyats/testbed/testbed_{task.host}.yaml'
    )
    testbed_1 = topology.loader.load(testbedfile)
    gRun(
        verification_datafile=
        '/usr/local/lib/python3.8/dist-packages/genie/libs/sdk/genie_yamls/verification_datafile.yaml',
        devices=[f'{task.host}'],
        verification_uids=['Verify_IpInterfaceBrief'],
        testbed=testbed_1)
Esempio n. 9
0
def main(*args, **kwargs):
    # cleanup section calls this also so make sure we have args.
    if not args:
        return

    trigger_uids, trigger_datafile = args

    gRun(trigger_uids=trigger_uids,
         trigger_datafile=trigger_datafile,
         mapping_datafile="mapping_datafile.yaml",
         subsection_datafile="subsection_datafile.yaml")
Esempio n. 10
0
def main():
    trigger_uids = [
        'native_oper_interface_statistics_get',
        'openconfig_gnmi_fan_statistics_subscribe',
        'native_netconf_cpu_statistics_subscribe',
        'nexus_openconfig_gnmi_fan_statistics_subscribe',
        'nexus_netconf_interface_state_subscribe',
    ]

    gRun(trigger_uids=trigger_uids,
         trigger_datafile="test_trigger.yaml",
         mapping_datafile="mapping.yaml",
         subsection_datafile="subsection.yaml")
Esempio n. 11
0
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))

    #gRun(trigger_uids=['TriggerDemoShutNoShutBgp'],
    #     trigger_datafile='trigger_datafile.yaml')

    #gRun(verification_uids=['Verify_BgpProcessVrfAll'],
    #     trigger_uids=['TriggerDemoShutNoShutBgp'],
    #     trigger_datafile='trigger_datafile.yaml')

    gRun(verification_uids=['Verify_Bgp'],
         trigger_uids=['TriggerDemoShutNoShutBgp'],
         verification_datafile='verification_datafile.yaml',
         trigger_datafile='trigger_datafile.yaml')
Esempio n. 12
0
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))

    # the trigger_datafile is custom created by the user for a newly developed trigger
    # pts_features mentions to Genie which feature to learn in CommonSetup, and then compare at the CommonCleanup
    # trigger_uids and verification_uids limit which test to execute
    gRun(trigger_datafile=os.path.join(test_path,
                                       'trigger_datafile_demo.yaml'),
         pts_features=['platform', 'bgp', 'interface'],
         verification_uids=[
             'Verify_IpInterfaceBrief', 'Verify_IpRoute_vrf_all'
         ],
         trigger_uids=[
             'TriggerUnconfigConfigBgp', 'TriggerShutNoShutBgpNeighbors',
             'TriggerModifyLoopbackInterfaceIp',
             'TriggerShutNoShutEthernetInterface',
             'TriggerClearArpVrfAllForceDelete'
         ])
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--trigger', dest='trigger', default=None)
    # parser.add_argument('--inventory',
    #                     dest='inventory',
    #                     default='inventory/test.yaml')
    args, unknown = parser.parse_known_args()

    test_path = os.path.dirname(os.path.abspath(__file__))
    # print(args)

    # mapping_datafile is mandatory
    # trigger_uids limit which test to execute

    if args.trigger:
        trigger = args.trigger
    else:
        trigger = RANDOM_TRIGGER

    gRun(mapping_datafile=os.path.join(test_path, 'mapping_datafile.yaml'),
         pts_datafile='pts_datafile.yaml',
         pts_features=['ospf', 'bgp'],
         trigger_uids=Or(trigger))
Esempio n. 14
0
def main():
    # pts_features mentions to Genie which feature to learn in CommonSetup, and then compare at the CommonCleanup
    # trigger_uids and verification_uids limit which test to execute
    # test_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    testbedfile = (
        '/home/segunorodeji_gmail_com/Projects/Network_Infrastructure_repo/pyats/testbed/testbed_R2.yaml'
    )
    testbed_1 = topology.loader.load(testbedfile)
    testscript_1 = gRun(
        verification_datafile=
        '/usr/local/lib/python3.8/dist-packages/genie/libs/sdk/genie_yamls/verification_datafile.yaml',
        devices=['R2'],
        verification_uids=['Verify_IpInterfaceBrief'],
        testbed=testbed_1)
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))

    gRun(trigger_uids=['TriggerUnconfigConfigDescriptionInterface'],
         trigger_datafile='trigger_datafile.yaml',
         devices=['uut'])
Esempio n. 16
0
def main():

    test_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

    gRun(
        trigger_datafile=os.path.join(test_path, 'trigger_datafile_demo.yaml'))
Esempio n. 17
0
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))
    gRun(trigger_uids=('TestBgpShutdown'), trigger_datafile='blitz.yml')
def main(task):
    # pts_features mentions to Genie which feature to learn in CommonSetup, and then compare at the CommonCleanup
    # trigger_uids and verification_uids limit which test to execute
    # test_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    gRun(verification_datafile='/usr/local/lib/python3.8/dist-packages/genie/libs/sdk/genie_yamls/verification_datafile.yaml',
         devices=[f'{task.host}'], verification_uids=['Verify_IpInterfaceBrief'])
Esempio n. 19
0
def main():
    test_path = os.path.dirname(os.path.abspath(__file__))

    # mapping_datafile is mandatory
    # trigger_uids limit which test to execute
    gRun(trigger_uids=['TriggerSleep'])
Esempio n. 20
0
def main(runtime):

    gRun(
        trigger_datafile='trigger_datafile.yaml',
        trigger_uids=['TriggerShutNoShutBgp'],
    )