Пример #1
0
def plug_l2_gw_service(cluster, lswitch_id, lport_id,
                       gateway_id, vlan_id=None):
    """Plug a Layer-2 Gateway Attachment object in a logical port."""
    att_obj = {'type': 'L2GatewayAttachment',
               'l2_gateway_service_uuid': gateway_id}
    if vlan_id:
        att_obj['vlan_id'] = vlan_id
    return switch.plug_interface(cluster, lswitch_id, lport_id, att_obj)
Пример #2
0
def plug_l2_gw_service(cluster, lswitch_id, lport_id, gateway_id, vlan_id=None):
    """Plug a Layer-2 Gateway Attachment object in a logical port."""
    att_obj = {"type": "L2GatewayAttachment", "l2_gateway_service_uuid": gateway_id}
    if vlan_id:
        att_obj["vlan_id"] = vlan_id
    return switch.plug_interface(cluster, lswitch_id, lport_id, att_obj)