wwndesc  1.0-76
CiscoSwitchDescription Class Reference

CiscoSwitchDescription (ie Cisco-001560-0123456:0) breaks out the uniqueness number and port index from the WWPN. More...

Inheritance diagram for CiscoSwitchDescription:
Collaboration diagram for CiscoSwitchDescription:

Public Member Functions

 CiscoSwitchDescription (String wwn)
 create an instance with brief set to false. More...
 
 CiscoSwitchDescription (boolean brief, String wwn)
 create an instance with the given WWN. More...
 
String descPort ()
 describe the WWPN's unique port label/index More...
 
String toString ()
 return a description or alias for this WWN; if brief is set to true during the call to getDesc(), then a shorter description or alias will be returned More...
 
- Public Member Functions inherited from WWNDesc.WWNDescSwitch
 WWNDescSwitch (String wwn)
 create an instance with brief set to false. More...
 
 WWNDescSwitch (boolean brief, String wwn)
 create an instance with the given WWN. More...
 
- Public Member Functions inherited from WWNDesc
 WWNDesc (String wwn)
 create an instance with brief set to false. More...
 
 WWNDesc (boolean brief, String wwn)
 create an instance with the given WWN. More...
 
 WWNDesc (boolean brief, String wwn, DevRole role)
 create an instance with the given WWN. More...
 
String descPort ()
 describe the WWPN's unique port label/index More...
 
String toString ()
 describe the WWN: produce a short (shorter if this.brief = true) description suitable for use as an alias for this WWN More...
 

Static Public Member Functions

static WWNDesc getDesc (boolean strong, boolean brief, String wwn)
 If this class matches or describes the given WWN, returns a new instance of this class loaded with the given WWN. More...
 
static WWNDesc getDesc (boolean strong, boolean brief, String wwn, int role)
 If this class matches or describes the given WWN, returns a new instance of this class loaded with the given WWN. More...
 
- Static Public Member Functions inherited from WWNDesc.WWNDescSwitch
static boolean isA (int role)
 convenience function to use bit-masks to check for membership in this role More...
 

Additional Inherited Members

- Protected Attributes inherited from WWNDesc
boolean brief
 whether a more brief output should be offered in toString() (ie the difference between "VMax-HK192601234-12gB" and "VMax-1234-12gB") . More...
 
DevRole role = DevRole.TARGET
 role of the device: Target, Switch, Initiator
 
BigInteger wwn
 the WWN that the instance tried to describe
 

Detailed Description

CiscoSwitchDescription (ie Cisco-001560-0123456:0) breaks out the uniqueness number and port index from the WWPN.

There may be difficulty here in determining whether a device is a switch or a NPIV bladecenter for servers; it's not obvious from the WWPNs

Definition at line 9 of file CiscoSwitchDescription.java.

Constructor & Destructor Documentation

CiscoSwitchDescription ( String  wwn)
inline

create an instance with brief set to false.

This is a convenience function to support the older constructor model

Exceptions
java.lang.NullPointerExceptionif the given wwn is null
Parameters
wwnthe WWN to evaluate and describe

Definition at line 12 of file CiscoSwitchDescription.java.

Referenced by CiscoSwitchDescription.getDesc().

CiscoSwitchDescription ( boolean  brief,
String  wwn 
)
inline

create an instance with the given WWN.

Values given to the constructor are simply copied to internal variables for later use

Exceptions
java.lang.NullPointerExceptionif the given wwn is null
Parameters
briefwhether an abbreviated description is requested
wwnthe WWN to evaluate and describe

Definition at line 52 of file CiscoSwitchDescription.java.

Member Function Documentation

String descPort ( )
inline

describe the WWPN's unique port label/index

Returns
the unique name for the port WWPN

Definition at line 88 of file CiscoSwitchDescription.java.

References WWNDesc.wwn.

static WWNDesc getDesc ( boolean  strong,
boolean  brief,
String  wwn 
)
inlinestatic

If this class matches or describes the given WWN, returns a new instance of this class loaded with the given WWN.

Returns
new instance of this class, or null if the given wwn does not match this class
Parameters
strongused to restrict matching to strong-matches only. This is a weak-confidence description, so will return null for strong-only matching
briefis used to ask for a shorter description: a more concise nickname or alias
wwnthe WWN (WWPN or WWNN, but typically WWPN) to match

Definition at line 25 of file CiscoSwitchDescription.java.

References DevRole.max.

Referenced by WWNDescription.getWWNDescriptor().

static WWNDesc getDesc ( boolean  strong,
boolean  brief,
String  wwn,
int  role 
)
inlinestatic

If this class matches or describes the given WWN, returns a new instance of this class loaded with the given WWN.

Returns
new instance of this class, or null if the given wwn does not match this class
Parameters
strongused to restrict matching to strong-matches only. This is a weak-confidence description, so will return null for strong-only matching
briefis used to ask for a shorter description: a more concise nickname or alias
wwnthe WWN (WWPN or WWNN, but typically WWPN) to match
roleRole (Initiator/Switch/Target) to check for

Definition at line 33 of file CiscoSwitchDescription.java.

References CiscoSwitchDescription.CiscoSwitchDescription(), and WWNDesc.WWNDescSwitch.isA().

Here is the call graph for this function:

String toString ( )
inline

return a description or alias for this WWN; if brief is set to true during the call to getDesc(), then a shorter description or alias will be returned

See also
getDesc(boolean,boolean,String)
Returns
generated alias or nickname for the WWN

Definition at line 63 of file CiscoSwitchDescription.java.

References WWNDesc.brief, and WWNDesc.wwn.


The documentation for this class was generated from the following file: