-- =====================================================================
-- Copyright (c) 2010-2013 Hewlett-Packard Development Company, L.P.
--
-- Description:
--      This MIB module is for the management of the Fibre Channel
--      Ping functionality.
-- Reference:
-- Version: V1.0
-- History:
--      V1.0 Initial version created by liuyanchao 2013-03-15
-- =====================================================================
HPN-ICF-FC-PING-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Unsigned32, Integer32
        FROM SNMPv2-SMI
    RowStatus, TruthValue
        FROM SNMPv2-TC
    HpnicfFcVsanIndex, HpnicfFcAddressType, HpnicfFcAddress,
    HpnicfFcStartOper
        FROM HPN-ICF-FC-TC-MIB
    hpnicfSan
        FROM HPN-ICF-VSAN-MIB;


hpnicfFcPing  MODULE-IDENTITY
    LAST-UPDATED "201303150000Z"
    ORGANIZATION
        ""
    CONTACT-INFO
        ""
    DESCRIPTION
        "This MIB module is for the management of the Fibre Channel
         Ping functionality."
    REVISION "201303150000Z"
    DESCRIPTION
        "Initial version of this MIB module."
    ::= { hpnicfSan 5 }

hpnicfFcPingObjects             OBJECT IDENTIFIER
    ::= { hpnicfFcPing 1 }
hpnicfFcPingConfigurations      OBJECT IDENTIFIER
    ::= { hpnicfFcPingObjects 1 }
hpnicfFcPingStatistics          OBJECT IDENTIFIER
    ::= { hpnicfFcPingObjects 2 }
hpnicfFcPingNotifications       OBJECT IDENTIFIER
    ::= { hpnicfFcPingObjects 3 }
hpnicfFcPingNotifyPrefix        OBJECT IDENTIFIER
    ::= { hpnicfFcPingNotifications 0 }

-- FC Ping table

hpnicfFcPingTable OBJECT-TYPE
    SYNTAX        SEQUENCE OF HpnicfFcPingEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "A table of FC ping entries containing a group of
         FC ping requests that need to be executed at the
         agent."
    ::= { hpnicfFcPingConfigurations 1 }

hpnicfFcPingEntry OBJECT-TYPE
    SYNTAX        HpnicfFcPingEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "A FC ping request entry that need to be executed
         at the agent."
    INDEX         { hpnicfFcPingIndex }
    ::= { hpnicfFcPingTable 1 }

HpnicfFcPingEntry ::= SEQUENCE {
    hpnicfFcPingIndex              Unsigned32,
    hpnicfFcPingVsan               HpnicfFcVsanIndex,
    hpnicfFcPingAddressType        HpnicfFcAddressType,
    hpnicfFcPingAddress            HpnicfFcAddress,
    hpnicfFcPingPacketCount        Unsigned32,
    hpnicfFcPingPayloadSize        Unsigned32,
    hpnicfFcPingTimeout            Unsigned32,
    hpnicfFcPingDelay              Unsigned32,
    hpnicfFcPingAgeInterval        Unsigned32,
    hpnicfFcPingAdminStatus        HpnicfFcStartOper,
    hpnicfFcPingOperStatus         INTEGER,
    hpnicfFcPingTrapOnCompletion   TruthValue,
    hpnicfFcPingRowStatus          RowStatus
}

hpnicfFcPingIndex OBJECT-TYPE
    SYNTAX        Unsigned32 (1..65535)
    MAX-ACCESS    accessible-for-notify
    STATUS        current
    DESCRIPTION
        "The index of the current FC ping entry.  This object
         identifies a FC ping request entry uniquely in a
         specified VSAN (Virtual Storage Area Network)."
    ::= { hpnicfFcPingEntry 1 }

hpnicfFcPingVsan OBJECT-TYPE
    SYNTAX        HpnicfFcVsanIndex
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The VSAN on which the FC ping request will be
         performed.  If the corresponding instance value of
         hpnicfFcPingOperStatus is 'inProgress', the object
         cannot be modified."
    ::= { hpnicfFcPingEntry 2 }

hpnicfFcPingAddressType OBJECT-TYPE
    SYNTAX        HpnicfFcAddressType
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The type of the corresponding instance of
         hpnicfFcPingAddress object."
    DEFVAL        { fcid }
    ::= { hpnicfFcPingEntry 3 }

hpnicfFcPingAddress OBJECT-TYPE
    SYNTAX        HpnicfFcAddress
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The address to which the route will be pinged.

         This object will contain an 8 octet long WWN(World Wide Name),
         if the value of the associated instance of hpnicfFcPingAddressType
         object is 'wwn'.

         This object will contain a 3 octet long Fibre Channel Address ID,
         if the value of the associated instance of hpnicfFcPingAddressType
         object is 'fcid'."
    ::= { hpnicfFcPingEntry 4 }

hpnicfFcPingPacketCount OBJECT-TYPE
    SYNTAX      Unsigned32 (1..2147483647)
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The number of FC ping packets to be sent to the
         target in this sequence."
    DEFVAL        { 5 }
    ::= { hpnicfFcPingEntry 5 }

hpnicfFcPingPayloadSize OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "This object specifies the size of the FC ping packet
         payload to be sent to the target in this sequence."
    ::= { hpnicfFcPingEntry 6 }

hpnicfFcPingTimeout OBJECT-TYPE
    SYNTAX        Unsigned32 (1..10)
    UNITS         "seconds"
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The value of timeout for this FC ping request."
    DEFVAL        { 5 }
    ::= { hpnicfFcPingEntry 7 }

hpnicfFcPingDelay OBJECT-TYPE
    SYNTAX      Unsigned32
    UNITS       "seconds"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The minimum amount of time to wait before sending
         the next packet in a sequence, after receiving a
         response or declaring a timeout for a previously
         transmitted packet."
    ::= { hpnicfFcPingEntry 8 }

hpnicfFcPingAgeInterval OBJECT-TYPE
    SYNTAX        Unsigned32 (500..900)
    UNITS         "seconds"
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The interval time after a FC ping test completes
         before the entry is aged out."
    DEFVAL        { 500 }
    ::= { hpnicfFcPingEntry 9 }

hpnicfFcPingAdminStatus OBJECT-TYPE
    SYNTAX        HpnicfFcStartOper
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The administrative status of each hpnicfFcPingEntry.

         The object has two values:
         enable     -  Activate the entry.
         disable    -  Deactivate the entry.

         When the FC ping entry is executing, this object cannot be
         modified.  If this object is read at such a time, a value of
         'enable' will be returned.  When the test finishes, the value
         of this object will be set to 'disable'."
    DEFVAL        { disable }
    ::= { hpnicfFcPingEntry 10 }

hpnicfFcPingOperStatus OBJECT-TYPE
    SYNTAX        INTEGER {
      inProgress(1),     -- FC ping in progress
      complete(2),       -- FC ping complete
      disabled(3),       -- FC ping disabled
      failed(4)          -- FC ping failed
      }
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "This object indicates the operational status
         of this hpnicfFcPingEntry.

         The value specifications are listed as follows:
         inProgress     - FC ping is in progress.
         complete       - FC ping is complete.
         disabled       - FC ping is disabled.
         failed         - FC ping has failed due to resource limitations."
    ::= { hpnicfFcPingEntry 11 }

hpnicfFcPingTrapOnCompletion OBJECT-TYPE
    SYNTAX        TruthValue
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "This object indicates that if hpnicfFcPingCompletionNotify
         notification should be generated or not when the corresponding
         ping sequence completes."
    DEFVAL        { false }
    ::= { hpnicfFcPingEntry 12 }

hpnicfFcPingRowStatus OBJECT-TYPE
    SYNTAX        RowStatus
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The status of this conceptual row."
    ::= { hpnicfFcPingEntry 13 }

-- FC Ping Statistics Table

hpnicfFcPingStatTable OBJECT-TYPE
    SYNTAX        SEQUENCE OF HpnicfFcPingStatEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "A table of FC ping statistics.
         This table notes the FC ping statistics of a FC ping test
         associated with an entry in the hpnicfFcPingTable."
    ::= { hpnicfFcPingStatistics 1 }

hpnicfFcPingStatEntry OBJECT-TYPE
    SYNTAX        HpnicfFcPingStatEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "A FC ping statistics entry.

         An entry will be created automatically in this table when the
         hpnicfFcPingRowStatus of a ping request in the hpnicfFcPingTable
         is set to 'active'.

         The entry in this table will have the same indices as the entry
         that in the hpnicfFcPingTable.

         An entry in this table will be deleted when the corresponding
         entry in the hpnicfFcPingTable is deleted."
    INDEX         { hpnicfFcPingIndex }
    ::= { hpnicfFcPingStatTable 1 }

HpnicfFcPingStatEntry ::= SEQUENCE {
    hpnicfFcPingReqPackets      Unsigned32,
    hpnicfFcPingResPackets      Unsigned32,
    hpnicfFcPingMinTime         Integer32,
    hpnicfFcPingAverageTime     Integer32,
    hpnicfFcPingMaxTime         Integer32,
    hpnicfFcPingTimeoutNum      Unsigned32
}

hpnicfFcPingReqPackets OBJECT-TYPE
    SYNTAX        Unsigned32
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "The number of FC ping packets request in this sequence."
    ::= { hpnicfFcPingStatEntry 1 }

hpnicfFcPingResPackets OBJECT-TYPE
    SYNTAX        Unsigned32
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "The number of FC ping packets response in this sequence."
    ::= { hpnicfFcPingStatEntry 2 }

hpnicfFcPingMinTime OBJECT-TYPE
    SYNTAX        Integer32
    UNITS         "microseconds"
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "The minimum round trip time of all the packets that
         have been sent in this sequence."
    ::= { hpnicfFcPingStatEntry 3 }

hpnicfFcPingAverageTime OBJECT-TYPE
    SYNTAX        Integer32
    UNITS         "microseconds"
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "The average round trip time of all the packets that
         have been sent in this sequence."
    ::= { hpnicfFcPingStatEntry 4 }

hpnicfFcPingMaxTime OBJECT-TYPE
    SYNTAX        Integer32
    UNITS         "microseconds"
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "The maximum round trip time of all the packets that
         have been sent in this sequence."
    ::= { hpnicfFcPingStatEntry 5 }


hpnicfFcPingTimeoutNum OBJECT-TYPE
    SYNTAX        Unsigned32
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "The number of timeouts encountered in this sequence."
    ::= { hpnicfFcPingStatEntry 6 }

-- Notifications

hpnicfFcPingCompletionNotify NOTIFICATION-TYPE
    OBJECTS       { hpnicfFcPingIndex,
                    hpnicfFcPingVsan,
                    hpnicfFcPingAddressType,
                    hpnicfFcPingAddress,
                    hpnicfFcPingReqPackets,
                    hpnicfFcPingResPackets}
    STATUS        current
    DESCRIPTION
        "When a FC ping test is finished and the instance of
         hpnicfFcPingTrapOnCompletion associated with the test
         is set to 'true', this notification occurred."
    ::= { hpnicfFcPingNotifyPrefix 1 }

END
