Exemplo n.º 1
0
def createLinkLevelPolicy(linkLevelPolicyList):
    infraInfra = aciInfra.Infra(aciPol.Uni(''))
    for linkLevelPolicy in linkLevelPolicyList:
        aciFabric.HIfPol(infraInfra, name=linkLevelPolicy['name'],
                         fecMode='inherit', autoNeg=linkLevelPolicy['autoNeg'],
                         speed=linkLevelPolicy['speed'], linkDebounce='100')
    return infraInfra
Exemplo n.º 2
0
def create_link_level_policy(mo, policy):
    # Validate input
    required_attributes(link_level_attributes, list(policy.keys()))

    # Create new object if needed
    if mo is None:
        mo = aciInfra.Infra(aciPol.Uni(''))

    aciFabric.HIfPol(mo,
                     name=policy['name'],
                     autoNeg=policy['autoNeg'],
                     speed=policy['speed'],
                     fecMode=policy['fecMode'],
                     linkDebounce=policy['linkDebounce'])

    return mo