-- =====================================================================
-- Copyright (c) 2004-2013 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
--
-- Description:
--      This MIB module is for the management of the Fibre Channel
--      Trace Route functionality.
-- Reference:
-- Version: V1.0
-- History:
--      V1.0 Initial version created by liuyanchao 2013-02-27
-- =====================================================================
H3C-FC-TRACE-ROUTE-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Unsigned32
        FROM SNMPv2-SMI
    RowStatus, TruthValue
        FROM SNMPv2-TC
    H3cFcVsanIndex, H3cFcAddressType, H3cFcAddress, H3cFcNameId,
    H3cFcStartOper
        FROM H3C-FC-TC-MIB
    h3cSan
        FROM H3C-VSAN-MIB;


h3cFcTraceRoute  MODULE-IDENTITY
    LAST-UPDATED "201302270000Z"
    ORGANIZATION "Hangzhou H3C Tech. Co., Ltd."
    CONTACT-INFO
        "Platform Team Hangzhou H3C Tech. Co., Ltd.
         Hai-Dian District Beijing P.R. China
         http://www.h3c.com
         Zip:100085"
    DESCRIPTION
        "This MIB module is for the management of the Fibre Channel
         Trace Route functionality."
    REVISION "201302270000Z"
    DESCRIPTION
        "Initial version of this MIB module."
    ::= { h3cSan 4 }

h3cFcTraceRouteObjects             OBJECT IDENTIFIER
    ::= { h3cFcTraceRoute 1 }
h3cFcTraceRouteConfigurations      OBJECT IDENTIFIER
    ::= { h3cFcTraceRouteObjects 1 }
h3cFcTraceRouteResults             OBJECT IDENTIFIER
    ::= { h3cFcTraceRouteObjects 2 }
h3cFcTraceRouteNotifications       OBJECT IDENTIFIER
    ::= { h3cFcTraceRouteObjects 3 }
h3cFcTraceRouteNotifyPrefix        OBJECT IDENTIFIER
    ::= { h3cFcTraceRouteNotifications 0 }

-- Trace Route table.

h3cFcTraceRouteTable OBJECT-TYPE
    SYNTAX        SEQUENCE OF H3cFcTraceRouteEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "A table of trace route entries containing a group
         of trace route requests that need to be executed
         at the agent."
    ::= { h3cFcTraceRouteConfigurations 1 }

h3cFcTraceRouteEntry OBJECT-TYPE
    SYNTAX        H3cFcTraceRouteEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "A trace route request entry that needs to be executed
         at the agent."
    INDEX         { h3cFcTraceRouteIndex }
    ::= { h3cFcTraceRouteTable 1 }


H3cFcTraceRouteEntry ::= SEQUENCE {
    h3cFcTraceRouteIndex              Unsigned32,
    h3cFcTraceRouteVsan               H3cFcVsanIndex,
    h3cFcTraceRouteAddressType        H3cFcAddressType,
    h3cFcTraceRouteAddress            H3cFcAddress,
    h3cFcTraceRouteTimeout            Unsigned32,
    h3cFcTraceRouteAdminStatus        H3cFcStartOper,
    h3cFcTraceRouteOperStatus         INTEGER,
    h3cFcTraceRouteAgeInterval        Unsigned32,
    h3cFcTraceRouteTrapOnCompletion   TruthValue,
    h3cFcTraceRouteRowStatus          RowStatus
}

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

h3cFcTraceRouteVsan OBJECT-TYPE
    SYNTAX        H3cFcVsanIndex
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The VSAN on which the trace route request will be
         executed.  If the corresponding instance value of
         h3cFcTraceRouteOperStatus is 'inProgress', the
         object cannot be modified."
    ::= { h3cFcTraceRouteEntry 2 }

h3cFcTraceRouteAddressType OBJECT-TYPE
    SYNTAX        H3cFcAddressType
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The type of the corresponding instance of
         h3cFcTraceRouteAddress object."
    DEFVAL        { fcid }
    ::= { h3cFcTraceRouteEntry 3 }

h3cFcTraceRouteAddress OBJECT-TYPE
    SYNTAX        H3cFcAddress
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The address to which the route will be traced.
         This object will contain an 8-octet WWN (World Wide Name),
         if the value of the associated instance of
         h3cFcTraceRouteAddressType object is 'wwn'.
         This object will contain a 3-octet Fibre Channel ID,
         if the value of the associated instance of
         h3cFcTraceRouteAddressType object is 'fcid'."
    ::= { h3cFcTraceRouteEntry 4 }

h3cFcTraceRouteTimeout OBJECT-TYPE
    SYNTAX        Unsigned32 (1..10)
    UNITS         "seconds"
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The value of timeout for this trace route request.
         If the corresponding instance value of
         h3cFcTraceRouteOperStatus object is 'inProgress',
         this object cannot be modified."
    DEFVAL        { 5 }
    ::= { h3cFcTraceRouteEntry 5 }

h3cFcTraceRouteAdminStatus OBJECT-TYPE
    SYNTAX        H3cFcStartOper
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The administrative status of each h3cFcTraceRouteEntry.

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

         When the trace route entry is being executed, this object
         cannot be modified.  If this object is being read, a value
         of 'enable' will be returned.  When the execution finishes,
         the value of this object will be set to 'disable'."
    DEFVAL        { disable }
    ::= { h3cFcTraceRouteEntry 6 }

h3cFcTraceRouteOperStatus OBJECT-TYPE
    SYNTAX        INTEGER {
      inProgress(1),     -- trace route in progress
      success(2),        -- trace route success
      partialSuccess(3), -- trace route partial success
      failure(4),        -- trace route failure
      disabled(5)        -- trace route is disabled
                  }
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "This object indicates the operational status
         of this h3cFcTraceRouteEntry.

         The value specifications are listed as follows:
         inProgress     - Trace route is in progress.
         success        - Trace route has succeeded.
         partialSuccess - Trace route has partially succeeded.
         failure        - Trace route has failed due to resource limitations.
         disabled       - Trace route is disabled."
    ::= { h3cFcTraceRouteEntry 7 }

h3cFcTraceRouteAgeInterval OBJECT-TYPE
    SYNTAX        Unsigned32 (500..900)
    UNITS         "seconds"
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "The interval time for an entry to age out
         after a trace route test is completed."
    DEFVAL        { 500 }
    ::= { h3cFcTraceRouteEntry 8 }

h3cFcTraceRouteTrapOnCompletion OBJECT-TYPE
    SYNTAX        TruthValue
    MAX-ACCESS    read-create
    STATUS        current
    DESCRIPTION
        "This object indicates whether a h3cFcTraceRouteCompletionNotify
         notification should be generated when this trace route test
         completes."
    DEFVAL        { false }
    ::= { h3cFcTraceRouteEntry 9 }

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


-- Trace Route Hops Table
-- The h3cFcTraceRouteHopsTable contains the hop-by-hop result
-- of a trace route test performed for an entry in the
-- h3cFcTraceRouteTable.

h3cFcTraceRouteHopsTable OBJECT-TYPE
    SYNTAX        SEQUENCE OF H3cFcTraceRouteHopsEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "A table of trace route hop results.
         This table indicates the hop-by-hop result of a trace route test
         associated with an entry in the h3cFcTraceRouteTable."
    ::= { h3cFcTraceRouteResults 1 }

h3cFcTraceRouteHopsEntry OBJECT-TYPE
    SYNTAX        H3cFcTraceRouteHopsEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "A trace route hop entry.

         The first index member specifies the h3cFcTraceRouteEntry
         that an h3cFcTraceRouteHopsEntry is associated with.  The
         second index element identifies a hop in a trace route path.

         In the case of a complete path being traced, entries
         corresponding to an h3cFcTraceRouteEntry are created
         automatically in this table.

         Each hop in the complete path will be listed in this table.

         When an h3cFcTraceRouteEntry is deleted or aged out, the
         entries corresponding to the h3cFcTraceRouteEntry in this
         table are also deleted."
    INDEX         { h3cFcTraceRouteIndex, h3cFcTraceRouteHopsIndex }
    ::= { h3cFcTraceRouteHopsTable 1 }

H3cFcTraceRouteHopsEntry ::= SEQUENCE {
    h3cFcTraceRouteHopsIndex           Unsigned32,
    h3cFcTraceRouteHopsAddr            H3cFcNameId
}

h3cFcTraceRouteHopsIndex OBJECT-TYPE
    SYNTAX        Unsigned32 (1..65535)
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "This object indicates the hop index for a trace route hop.

         Values for this object associated with the same
         h3cFcTraceRouteIndex MUST begin with 1 and
         automatically increase by 1."
    ::= { h3cFcTraceRouteHopsEntry 1 }

h3cFcTraceRouteHopsAddr OBJECT-TYPE
    SYNTAX        H3cFcNameId
    MAX-ACCESS    read-only
    STATUS        current
    DESCRIPTION
        "This object specifies the WWN of the device associated
         with this hop."
    ::= { h3cFcTraceRouteHopsEntry 2 }

-- Notifications

h3cFcTraceRouteCompletionNotify NOTIFICATION-TYPE
    OBJECTS       { h3cFcTraceRouteIndex,
                    h3cFcTraceRouteVsan,
                    h3cFcTraceRouteAddressType,
                    h3cFcTraceRouteAddress,
                    h3cFcTraceRouteOperStatus }
    STATUS        current
    DESCRIPTION
        "When a trace route test is finished and the instance of
         h3cFcTraceRouteTrapOnCompletion associated with the test
         is set to 'true', this notification occurred."
    ::= { h3cFcTraceRouteNotifyPrefix 1 }

END
