2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * @memo Construct a new HandlePort for state tracking 2N/A * @precondition Handle must be open 2N/A * @param myHandle The open handle for this HBA 2N/A * @param myHBA The HBA for this port 2N/A * @param myPort The HBA Port to open 2N/A * @memo Reset the state tracking values for stale index detection 2N/A * @postcondition The first subsequent call to any index based routine 2N/A * will always succed. 2N/A * @memo Validate the current state of the handle port 2N/A * @exception StaleDataException Thrown if the state has changed 2N/A * @param newState The new state of the port 2N/A * @doc After opening a port or refreshing, no state is tracked. 2N/A * The first time validate is called, the state is recorded. 2N/A * Subsequent calls will verify that the state is the same. 2N/A * If the state has changed, the exception will be thrown. 2N/A * @memo Verify this port has the stated port wwn 2N/A * @return TRUE if the argument matches this port 2N/A * @return FALSE if the argument does not match this port 2N/A * @param portWWN The Port WWN to compare against this port 2N/A * @memo Verify this port is the stated index 2N/A * @return TRUE if the argument matches this port 2N/A * @return FALSE if the argument does not match this port 2N/A * @param index The index value to compare against this port 2N/A * @memo Get attributes from a discovered port. 2N/A * @exception ... underlying exceptions will be thrown 2N/A * @return The discovered port attributes 2N/A * @param wwn The node or port wwn of the discovered port 2N/A * @doc This routine will not perform any state validation 2N/A // We don't validate when a WWN was used 2N/A * @memo Get attributes from this port. 2N/A * @exception ... underlying exceptions will be thrown 2N/A * @return The port attributes 2N/A * @see HandlePort::validate 2N/A * @doc This routine will perform state validation 2N/A * @memo Get attributes from a discovered port. 2N/A * @exception ... underlying exceptions will be thrown 2N/A * @return The discovered port attributes 2N/A * @param discoveredport The index of the discovered port 2N/A * @see HandlePort::validate 2N/A * @doc This routine will perform state validation 2N/A Trace log(
"HandlePort::getDiscoveredAttributes(index)");
2N/A Trace log(
"HandlePort::getHandleNPIVPortByIndex(int index)");
2N/A // Check to see if the wwn is in the map 2N/A // Not found, add a new one