예제 #1
0
def get_prefix_and_vlan(prefix_id):
    """Gets the prefix object and vlan object for this prefix id"""
    prefix = _get_object(Prefix, prefix_id, 'pk')
    vlan = prefix.vlan if prefix else None
    return prefix, vlan
예제 #2
0
def get_prefix_and_vlan(prefix_id):
    """Gets the prefix object and vlan object for this prefix id"""
    prefix = _get_object(Prefix, prefix_id, 'pk')
    vlan = prefix and prefix.vlan or None
    return prefix, vlan