com.ibm.sysmgt.switchmgt
Class SwitchIdentifier

java.lang.Object
  extended bycom.ibm.sysmgt.switchmgt.SwitchIdentifier

public class SwitchIdentifier
extends java.lang.Object

This class holds and collects identifing information about switch modules.


Field Summary
static java.lang.String MGMT_APP_TELNET_INTERFACE
          Switch System Management Application definition for Telnet
static java.lang.String MGMT_APP_WEB_INTERFACE
          Switch System Management Application definition for WebClient
 
Constructor Summary
protected SwitchIdentifier()
          Internal instantiation method
  SwitchIdentifier(ChassisSubsystemInfo vpd, java.lang.String sysObjectId, java.lang.String[] clientServices)
          External Instantiation
 
Method Summary
protected static java.lang.String[] breakDownMgmtParam(java.lang.String parm)
          Break down a potential muilti-param string into its separate parts.
static long getChassisId(long switchId)
          Get the enclosing chassis's moid from a member switch moid
 long getChassisMoid()
          ChassisSubsystemInfo - chassis Moid
 java.lang.String getFRU()
          ChassisVPDAttributes - FRU
 java.lang.String getIPAddressString()
          ChassisVPDAttributes - ip address
 int getLocationID()
          ChassisSubsystemInfo - location/slot ID (1..4)
 java.lang.String getMACAddressString()
          ChassisVPDAttributes - mac address
 java.lang.String getMachineTypeModel()
          ChassisVPDAttributes - machine type model
 java.lang.String getManufacturer()
          Get switch manufacturer property
 java.lang.String getMfgId()
          ChassisVPDAttributes - manufacturing id (4 Characters)
 int getMfgVersionNumber()
          ChassisVPDAttributes - switch manufacturer version number
 java.lang.String[] getMgtApplications()
          Get switch management applications property
 long getMoid()
          ChassisSubsystemInfo - switch Moid
 java.lang.String getName()
          ChassisVPDAttributes - name
 java.lang.String getPartNumber()
          ChassisVPDAttributes - part number
 int getPOSId()
          ChassisVPDAttributes - machine type model
 java.lang.String getSerialNumber()
          ChassisVPDAttributes - serial number
 java.lang.String[] getServices()
          Get switch services property Switch services are used for binding tasks to managed objects and as a general means of identification
 int getSizeID()
          ChassisSubsystemInfo - slot occupation count
static SwitchIdentifier[] getSwitchDefinitions()
          Retrieve switch property file definitions
static SwitchIdentifier getSwitchIdentifier(long switchId)
          Retrieve chassis switch identifier
static SwitchIdentifier getSwitchIdentifier(long chassisId, int switchSlot)
          Retrieve chassis switch identifier
 java.lang.String getSysObjectId()
          Get switch MIB2 SystemObjectID property
 java.lang.String getUniqueTypeId()
          Get switch type identifier.
 java.lang.String getUUIDString()
          ChassisVPDAttributes - uuid
 ChassisSubsystemInfo getVpd()
          Get reference to the vpd data structure
 int getVPDId()
          ChassisVPDAttributes - machine type model
protected static void initializeSN()
          Check for need todo lazy servicenode creation
protected static boolean ipcSend(Command cmd)
          IPC send method Create a ServiceNode for server connectivity
 boolean isOccupied()
          ChassisSubsystemInfo - Is switch in slot
protected static SMAppLauncher loadCustomMgtLauncher(java.lang.String qualifiedClassName)
          Load an implementation of the SMAppLauncher custom module management class.
static boolean loadSwitchMOAttributes(long switchId, SwitchIdentifier sm)
          Load switch managed object attribute set
static boolean loadSwitchVpd(long chassisId, int slot, SwitchIdentifier sm)
          Load switch subsystem vital product data
static boolean loadSwitchVpd(long chassisId, long switchId, SwitchIdentifier sm)
          Load switch subsystem vital product data
static boolean loadSystemMgmtData(SwitchIdentifier sm)
          Load switch system management definition data.
protected  void setMachineTypeModel(java.lang.String mtm)
          ChassisVPDAttributes -- Set machine type model number
protected  void setManufacturer(java.lang.String manufacturer)
          Set switch manufacturer property
protected  void setMfgId(java.lang.String mfgId)
          ChassisVPDAttributes -- Set MfgId
protected  void setMgtApplications(java.lang.String[] mgtApplications)
          Set switch management applications property
protected  void setName(java.lang.String name)
          set the name
 void setPOSId(int x)
          ChassisVPDAttributes - machine type model
protected  void setServices(java.lang.String[] services)
          Set switch services property Switch services are used for binding tasks to managed objects and as a general means of identification
protected  void setSysObjectId(java.lang.String sysObjectId)
          Set MIB2 SystemObjectID property
protected  void setUniqueTypeId(java.lang.String uniqueTypeId)
          Set the unique switch id value.
protected  void setVpd(ChassisSubsystemInfo vpd)
          Set the vpd data structure
 void setVPDId(int x)
          ChassisVPDAttributes - machine type model
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MGMT_APP_WEB_INTERFACE

public static final java.lang.String MGMT_APP_WEB_INTERFACE
Switch System Management Application definition for WebClient

See Also:
Constant Field Values

MGMT_APP_TELNET_INTERFACE

public static final java.lang.String MGMT_APP_TELNET_INTERFACE
Switch System Management Application definition for Telnet

See Also:
Constant Field Values
Constructor Detail

SwitchIdentifier

protected SwitchIdentifier()
Internal instantiation method


SwitchIdentifier

public SwitchIdentifier(ChassisSubsystemInfo vpd,
                        java.lang.String sysObjectId,
                        java.lang.String[] clientServices)
External Instantiation

Parameters:
vpd - ModuleVPD
sysObjectId - MIB2 system object ID
clientServices - Client service identifier list
Method Detail

getSwitchIdentifier

public static SwitchIdentifier getSwitchIdentifier(long switchId)
Retrieve chassis switch identifier

Parameters:
switchId - Director switch managed object id
Returns:
SwitchIdentifier based on id match, else null for failure

getSwitchIdentifier

public static SwitchIdentifier getSwitchIdentifier(long chassisId,
                                                   int switchSlot)
Retrieve chassis switch identifier

Parameters:
chassisId - Director chassis managed object id
switchSlot - Switch slot/location in chassis (1..4)
Returns:
SwitchIdentifier else null for failure

getSwitchDefinitions

public static SwitchIdentifier[] getSwitchDefinitions()
Retrieve switch property file definitions

Returns:
SwitchIdentifier[] else null for failure

getVpd

public ChassisSubsystemInfo getVpd()
Get reference to the vpd data structure

Returns:
Switch vpd data object

setVpd

protected void setVpd(ChassisSubsystemInfo vpd)
Set the vpd data structure

Parameters:
vpd - Switch vpd data object

setName

protected void setName(java.lang.String name)
set the name

Parameters:
name -

setManufacturer

protected void setManufacturer(java.lang.String manufacturer)
Set switch manufacturer property

Parameters:
manufacturer - Displayable switch manufacturer

setUniqueTypeId

protected void setUniqueTypeId(java.lang.String uniqueTypeId)
Set the unique switch id value.


setMfgId

protected void setMfgId(java.lang.String mfgId)
ChassisVPDAttributes -- Set MfgId

Parameters:
mfgId - Manufacture Id (4 Characters)

setMachineTypeModel

protected void setMachineTypeModel(java.lang.String mtm)
ChassisVPDAttributes -- Set machine type model number

Parameters:
mtm - Machine type model value

setSysObjectId

protected void setSysObjectId(java.lang.String sysObjectId)
Set MIB2 SystemObjectID property


setServices

protected void setServices(java.lang.String[] services)
Set switch services property Switch services are used for binding tasks to managed objects and as a general means of identification

Parameters:
services - Client services definition

setMgtApplications

protected void setMgtApplications(java.lang.String[] mgtApplications)
Set switch management applications property

Parameters:
mgtApplications - Switch management applications

getManufacturer

public java.lang.String getManufacturer()
Get switch manufacturer property


getSysObjectId

public java.lang.String getSysObjectId()
Get switch MIB2 SystemObjectID property


getUniqueTypeId

public java.lang.String getUniqueTypeId()
Get switch type identifier. This value can be used as a means of determining the exact switch type. Defined types will never change making this a stable id.

This value was created due to flux (via hardware development or whatever) which has occurred in MIB 2 sysObjectId, vpd manufacturer, and vpd machineTypemodel making them unsuitable as a long term mechanism of specific switch type identification.


getServices

public java.lang.String[] getServices()
Get switch services property Switch services are used for binding tasks to managed objects and as a general means of identification


getMgtApplications

public java.lang.String[] getMgtApplications()
Get switch management applications property


getChassisMoid

public long getChassisMoid()
ChassisSubsystemInfo - chassis Moid


getLocationID

public int getLocationID()
ChassisSubsystemInfo - location/slot ID (1..4)


getSizeID

public int getSizeID()
ChassisSubsystemInfo - slot occupation count


isOccupied

public boolean isOccupied()
ChassisSubsystemInfo - Is switch in slot


getMoid

public long getMoid()
ChassisSubsystemInfo - switch Moid


getUUIDString

public java.lang.String getUUIDString()
ChassisVPDAttributes - uuid


getName

public java.lang.String getName()
ChassisVPDAttributes - name


getFRU

public java.lang.String getFRU()
ChassisVPDAttributes - FRU


getSerialNumber

public java.lang.String getSerialNumber()
ChassisVPDAttributes - serial number


getMfgId

public java.lang.String getMfgId()
ChassisVPDAttributes - manufacturing id (4 Characters)


getVPDId

public int getVPDId()
ChassisVPDAttributes - machine type model


getPOSId

public int getPOSId()
ChassisVPDAttributes - machine type model


setVPDId

public void setVPDId(int x)
ChassisVPDAttributes - machine type model


setPOSId

public void setPOSId(int x)
ChassisVPDAttributes - machine type model


getMachineTypeModel

public java.lang.String getMachineTypeModel()
ChassisVPDAttributes - machine type model


getPartNumber

public java.lang.String getPartNumber()
ChassisVPDAttributes - part number


getMACAddressString

public java.lang.String getMACAddressString()
ChassisVPDAttributes - mac address


getIPAddressString

public java.lang.String getIPAddressString()
ChassisVPDAttributes - ip address


getMfgVersionNumber

public int getMfgVersionNumber()
ChassisVPDAttributes - switch manufacturer version number


loadCustomMgtLauncher

protected static SMAppLauncher loadCustomMgtLauncher(java.lang.String qualifiedClassName)
Load an implementation of the SMAppLauncher custom module management class.

Parameters:
qualifiedClassName - Fully qualified SMAppLauncher implementation return instantiated custum module management class, null for failure

breakDownMgmtParam

protected static java.lang.String[] breakDownMgmtParam(java.lang.String parm)
Break down a potential muilti-param string into its separate parts.

The typical format will be as: qualifiedClassName arg1 arg2 arg3

Parameters:
parm - Management sting including qualified management class and potential arguments return Tokens from parm string

loadSwitchMOAttributes

public static boolean loadSwitchMOAttributes(long switchId,
                                             SwitchIdentifier sm)
Load switch managed object attribute set

Parameters:
switchId - switch managed object id
sm - switch-module identifier class container (object to update)
Returns:
boolean true for success, false for failure

getChassisId

public static long getChassisId(long switchId)
Get the enclosing chassis's moid from a member switch moid

Parameters:
switchId - Director switch object identifier
Returns:
Chassis managed object id on success, else -1 on failure

loadSwitchVpd

public static boolean loadSwitchVpd(long chassisId,
                                    long switchId,
                                    SwitchIdentifier sm)
Load switch subsystem vital product data

Parameters:
chassisId - Director chassis object id which contains the switch
switchId - Director switch object identifier
sm - Switch-module identifier class container
Returns:
boolean true for success, false for failure

loadSwitchVpd

public static boolean loadSwitchVpd(long chassisId,
                                    int slot,
                                    SwitchIdentifier sm)
Load switch subsystem vital product data

Parameters:
chassisId - Director chassis object id which contains the switch
slot - Switch location in chassis (1..4)
sm - Switch-module identifier class container (object to update)
Returns:
boolean true for success, false for failure

loadSystemMgmtData

public static boolean loadSystemMgmtData(SwitchIdentifier sm)
Load switch system management definition data. This is done by matching switch identifiers (sysObjectId, MachineTypeModel, Services) with data file definitions. The management information comes from the matched data file.

Parameters:
sm - Switch-module identifier class container (object to update) object must have either the MIB2 SystemObjectID, MachineTypeModel, or services populated for the method to complete successfully
Returns:
boolean true for success, false for failure

initializeSN

protected static final void initializeSN()
Check for need todo lazy servicenode creation


ipcSend

protected static final boolean ipcSend(Command cmd)
IPC send method Create a ServiceNode for server connectivity


toString

public java.lang.String toString()
Returns a string representation of the object. Important classs defining attributes are packaged in a formatted manner.

Returns:
a string representation of the object.