def show_logical_switch(session, vfid):
    ls_object = fibrechannel_logical_switch()
    if vfid is None:
        result = ls_object.get(session, None)
    else:
        result = ls_object.get(session, vfid)
    return result
Exemplo n.º 2
0
def delete_logical_switch(session, fid, ports, geports):
    ls_delete_obj = fibrechannel_logical_switch()
    ls_delete_obj.set_fabric_id(fid)
    if ports is not None:
        ls_delete_obj.set_port_member_list_port_member(ports)
    if geports is not None:
        ls_delete_obj.set_ge_port_member_list_port_member(geports)
    result = _delete_logical_switch(session, ls_delete_obj)
    return result
def create_logical_switch(session, fid, base, ficon, lislenable,
                          ports, geports):
    value_dict = {'fabric_id': fid,
                  'base_switch_enabled': base,
                  'ficon_mode_enabled': ficon,
                  'logical_isl_enabled': lislenable,
                  'port_member_list_port_member': ports,
                  'ge_port_member_list_port_member': geports}
    ls_obj = fibrechannel_logical_switch()
    ls_obj.load(value_dict, 1)
    result = _create_logical_switch(session, ls_obj)
    return result