--**MOD+****************************************************************************
--* Module:    hpicfConfig.mib
--*
--* Copyright (C) 2017 Hewlett Packard Enterprise Development LP
--* All Rights Reserved.
--* 
--* The contents of this software are proprietary and confidential
--* to the Hewlett Packard Enterprise Development LP.  No part of this
--* program may be photocopied, reproduced, or translated into another
--* programming language without prior written consent of the
--* Hewlett Packard Enterprise Development LP.
--*
--* Purpose: This file contains MIB definition of HP-ICF-CFGRESTORE-MIB
--*
--**MOD-****************************************************************************
HP-ICF-CONFIG-MIB DEFINITIONS ::= BEGIN

    IMPORTS
        hpSwitch
            FROM HP-ICF-OID
        OBJECT-GROUP, MODULE-COMPLIANCE
            FROM SNMPv2-CONF
        Unsigned32, OBJECT-TYPE, MODULE-IDENTITY
            FROM SNMPv2-SMI
        DateAndTime
            FROM SNMPv2-TC;

    hpicfConfig MODULE-IDENTITY
       LAST-UPDATED "201710070000Z" -- October 07, 2017
       ORGANIZATION "HP Networking"
       CONTACT-INFO
            "Hewlett Packard Enterprise Development LP.
             8000 Foothills Blvd.
             Roseville, CA 95747"
        DESCRIPTION
            "This MIB module contains HPE proprietary objects for 
             handling the Configuration Restore feature."

        REVISION "201710070000Z"  -- October 07, 2017
        DESCRIPTION "Removed default value field of recovery mode."

        REVISION "201704190000Z"  -- April 19, 2017
        DESCRIPTION "Added recovery mode for config restore."

        REVISION "201703080000Z"  -- March 08, 2017
        DESCRIPTION "Initial version."
        ::= { hpSwitch 136 }
-- ----------------------------------------------------------------------
-- Starting node of config restore feature is "hpicfConfig".
-- hpicfConfig is added to 136th position of "hpSwitch".
-- OID of "hpicfConfig"
-- 1.3.6.1.4.1.11.2.14.11.5.1.136 --
-- ----------------------------------------------------------------------
-- Node definitions.
-- ----------------------------------------------------------------------
-- Node zero  of hpicfConfig is reserved for notifications.
-- Node one   of hpicfConfig is reserved for scalars.
-- Node two   of hpicfConfig is reserved for globals.
-- Node three of hpicfConfig is for conformance.
-- Node four  of hpicfConfig is for config restoring.
-- ----------------------------------------------------------------------
    hpicfConfigNotifications OBJECT IDENTIFIER  ::= { hpicfConfig 0 }
    hpicfConfigScalar        OBJECT IDENTIFIER  ::= { hpicfConfig 1 }
    hpicfConfigGlobals       OBJECT IDENTIFIER  ::= { hpicfConfig 2 }
    hpicfConfigConformance   OBJECT IDENTIFIER  ::= { hpicfConfig 3 }
    hpicfConfigConfig	     OBJECT IDENTIFIER  ::= { hpicfConfig 4 }
-- ---------------------------------------------------------------------
-- "hpicfConfigConfig" is the 4th node of "hpicfConfig"
--  and has 2 child nodes.
-- 1 for config restore objects.
-- 2 for config backup objects.
-- ---------------------------------------------------------------------

-- ---------------------------------------------------------------------
-- 1st member of hpicfConfigConfig.
-- This is for storing config restore attributes 
-- ---------------------------------------------------------------------
   hpicfConfigObjects       OBJECT IDENTIFIER  ::= { hpicfConfigConfig 1 }

   hpicfConfigRestoreFileName OBJECT-TYPE
        SYNTAX        OCTET STRING (SIZE (0..128))
        MAX-ACCESS    read-write
        STATUS        current
        DESCRIPTION   "This object contains the configuration file name 
                      to be restored." 
        ::= { hpicfConfigObjects 1 }

   hpicfConfigRunningConfigSHA OBJECT-TYPE
        SYNTAX        OCTET STRING (SIZE (0..128))
        MAX-ACCESS    read-only
        STATUS        current
        DESCRIPTION   "This object contains the SHA ID of running 
                      configuration." 
        ::= { hpicfConfigObjects 2 }

   hpicfConfigStartupConfigSHA OBJECT-TYPE
        SYNTAX        OCTET STRING (SIZE (0..128))
        MAX-ACCESS    read-only
        STATUS        current
        DESCRIPTION   "This object contains the SHA ID of startup 
                      configuration." 
        ::= { hpicfConfigObjects 3 }
 
   hpicfConfigRestoreStatus  OBJECT-TYPE
        SYNTAX        INTEGER
        {
            notYetRun(1),
            inProgress(2),
            success(3),
            failed(4) 
        }
        MAX-ACCESS    read-only
        STATUS        current
        DESCRIPTION   "This object contains the status of cfg-restore."
        DEFVAL{ notYetRun }
        ::= { hpicfConfigObjects 4 }

   hpicfConfigRecoveryMode  OBJECT-TYPE
        SYNTAX        INTEGER
        {
            enabled(1),
            disabled(2)
        }
        MAX-ACCESS    read-write
        STATUS        current
        DESCRIPTION   "This object contains the recovery mode for cfg-restore.
                       Default value of RecoveryMode is enabled."
        ::= { hpicfConfigObjects 5 }


-- ---------------------------------------------------------------------
-- 2nd member of hpicfConfigConfig.
-- This is for storing config backup attributes 
-- ---------------------------------------------------------------------
   hpicfConfigFilesObjects       OBJECT IDENTIFIER  ::= { hpicfConfigConfig 2 }

   hpicfConfigFilesTable OBJECT-TYPE
        SYNTAX        SEQUENCE OF HpicfConfigFilesEntry
        MAX-ACCESS    not-accessible
        STATUS        current
        DESCRIPTION   "Configuration backup files table"
        ::= { hpicfConfigFilesObjects 1 }
   
   hpicfConfigFilesEntry OBJECT-TYPE
        SYNTAX        HpicfConfigFilesEntry
        MAX-ACCESS    not-accessible
        STATUS        current
        DESCRIPTION   "An entry in this table specifies the list of 
                      configuration files in the flash. "
        INDEX         { hpicfConfigFilePos }
        ::= { hpicfConfigFilesTable 1 } 

   HpicfConfigFilesEntry ::= SEQUENCE     
   {
        hpicfConfigFilePos          Unsigned32,
        hpicfConfigFileName         OCTET STRING,
        hpicfConfigTimestamp        DateAndTime
   }
 
   hpicfConfigFilePos OBJECT-TYPE
        SYNTAX        Unsigned32
        MAX-ACCESS    not-accessible
        STATUS        current
        DESCRIPTION   "Backup file sequence number."  
        ::= { hpicfConfigFilesEntry 1 }
   
   hpicfConfigFileName OBJECT-TYPE
        SYNTAX        OCTET STRING (SIZE (0..128))
        MAX-ACCESS    read-only
        STATUS        current
        DESCRIPTION   "Configuration file name."
        ::= { hpicfConfigFilesEntry 2 } 

   hpicfConfigTimestamp OBJECT-TYPE
        SYNTAX        DateAndTime
        MAX-ACCESS    read-only
        STATUS        current
        DESCRIPTION   "Backup file creation time."
        ::= { hpicfConfigFilesEntry 3 }

-------------------------------------------------------------------------------
-- "hpicfConfigConformance" is the 3rd node of "hpicfConfig"
--  and has two child nodes.
-- 1 for Group Declarations
-- 2 for Compliance Statements
-------------------------------------------------------------------------------

   hpicfConfigGroups               OBJECT IDENTIFIER ::= {hpicfConfigConformance 1}
   hpicfConfigMIBCompliances       OBJECT IDENTIFIER ::= {hpicfConfigConformance 2}
   
-------------------------------------------------------------------------------
--  Compliance Statements
-------------------------------------------------------------------------------
   hpicfConfigMIBCompliance MODULE-COMPLIANCE
        STATUS            current
        DESCRIPTION       "The compliance statement Config Restore."
        MODULE            -- this module
        MANDATORY-GROUPS 
        {
           hpicfConfigScalarsGroup,
           hpicfConfigFilesGroup
        }
        ::= {hpicfConfigMIBCompliances 1}
------------------------------------------------------------------------------
-- MIB Groupings
------------------------------------------------------------------------------
    
   hpicfConfigScalarsGroup OBJECT-GROUP
   OBJECTS    
   {
      hpicfConfigRestoreFileName,
      hpicfConfigRunningConfigSHA,
      hpicfConfigStartupConfigSHA,
      hpicfConfigRestoreStatus,
      hpicfConfigRecoveryMode
   }
   STATUS             current
   DESCRIPTION        "A collection of HPE proprietary objects to support
                      Configuration restore"
   ::= { hpicfConfigGroups 1 }

   hpicfConfigFilesGroup OBJECT-GROUP
   OBJECTS    
   {
      hpicfConfigFileName,
      hpicfConfigTimestamp
   }
   STATUS             current
   DESCRIPTION        "A collection of HPE proprietary objects to support
                      Configuration restore"
   ::= { hpicfConfigGroups 2 }

------------------------------------------------------------------------------ 
END
