-- iVN License MIB (Draft)

IVN-LICENSE-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, Unsigned32, TimeTicks
        FROM SNMPv2-SMI                 -- [RFC2578]
    DateAndTime, TruthValue
        FROM SNMPv2-TC                  -- [RFC2579]
    SnmpAdminString
        FROM SNMP-FRAMEWORK-MIB         -- [RFC3411]
    MODULE-COMPLIANCE, OBJECT-GROUP
        FROM SNMPv2-CONF                -- [RFC2580]
    iPhoiVNManagement
        FROM IPHOTONIX-SMI-MIB;

licenseMIB MODULE-IDENTITY
    LAST-UPDATED "201810090000Z"  -- October 9, 2018
    ORGANIZATION "iPhotonix"
    CONTACT-INFO
          "support@iphotonix.com"
    DESCRIPTION
        "The License module provides SNMP access to passively
         view properties of existing iVN licenses,"
    REVISION    "201810090000Z"  -- October 9, 2018
    DESCRIPTION
        "Initial version."
    ::= { iPhoiVNManagement 5 }

licenseObjects OBJECT IDENTIFIER ::= { licenseMIB 1 }

licenses  OBJECT IDENTIFIER ::= { licenseObjects 1 }

-- License Table --

licenseTableLastChanged  OBJECT-TYPE
   SYNTAX      TimeTicks
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
      "The value of sysUpTime at the time the table was last updated."
   ::= { licenses 1 }

licenseTable OBJECT-TYPE
   SYNTAX      SEQUENCE OF LicenseEntry
   MAX-ACCESS  not-accessible
   STATUS      current
   DESCRIPTION
       "A table of License entries"
   ::= { licenses 2 }

licenseEntry OBJECT-TYPE
   SYNTAX      LicenseEntry
   MAX-ACCESS  not-accessible
   STATUS      current
   DESCRIPTION
       "Properties of existing licenses."
   INDEX       { licenseIndex }
   ::= { licenseTable 1 }

LicenseEntry ::= SEQUENCE {
   licenseIndex                 Unsigned32,
   licenseName                  SnmpAdminString,
   licenseDomainName            SnmpAdminString,
   licenseMACAddress            SnmpAdminString,
   licenseStartDateAndTime      DateAndTime,
   licenseEndDateAndTime        DateAndTime,
   licensePortLimit             Unsigned32,
   licensePortUse               Unsigned32,
   licensePortLimitReached      TruthValue,
   licenseTenantCount           Unsigned32,
   licenseMissing               TruthValue,
   licenseExpired               TruthValue,
   licenseValid                 TruthValue,
   licenseValidHardware         TruthValue,
   licenseDigest                SnmpAdminString
}

licenseIndex OBJECT-TYPE
   SYNTAX     Unsigned32 (1..4294967295)
   MAX-ACCESS not-accessible
   STATUS     current
   DESCRIPTION
       "A strictly monotonically increasing integer which
       acts as the index of entries within the license
       list.  It wraps back to 1 after it reaches its
       maximum value."
   ::= { licenseEntry 1 }

licenseName    OBJECT-TYPE
   SYNTAX      SnmpAdminString
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
      "License name."
   ::= { licenseEntry 2 }

licenseDomainName    OBJECT-TYPE
   SYNTAX      SnmpAdminString
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
      "License fully-qualified domain name."
   ::= { licenseEntry 3 }

licenseMACAddress    OBJECT-TYPE
   SYNTAX      SnmpAdminString
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
       "License MAC Address.

        This license is only valid on host with an interface with
        the specified IEEE MAC address."
    ::= { licenseEntry 4 }

licenseStartDateAndTime OBJECT-TYPE
   SYNTAX      DateAndTime
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
       "License start date and time.  The license is not valid
        if the current date and time is prior to the license
        start date and time.

       Implementations MUST include the offset from UTC,
       if available.  Implementation in environments in which
       the UTC offset is not available is NOT RECOMMENDED."
   ::= { licenseEntry 5 }

licenseEndDateAndTime OBJECT-TYPE
   SYNTAX      DateAndTime
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
       "License end date and time.  The license is not valid
        if the current date and time is after the license
        end date and time.

       Implementations MUST include the offset from UTC,
       if available.  Implementation in environments in which
       the UTC offset is not available is NOT RECOMMENDED."
   ::= { licenseEntry 6 }

licensePortLimit  OBJECT-TYPE
   SYNTAX     Unsigned32 (0..4294967295)
   MAX-ACCESS read-only
   STATUS     current
   DESCRIPTION
       "Licenced number of ports."
   ::= { licenseEntry 7 }

licensePortUse  OBJECT-TYPE
   SYNTAX     Unsigned32 (0..4294967295)
   MAX-ACCESS read-only
   STATUS     current
   DESCRIPTION
       "Licenced ports used."
   ::= { licenseEntry 8 }

licensePortLimitReached  OBJECT-TYPE
   SYNTAX      TruthValue
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
       "Licensed port limit has been reached."
   ::= { licenseEntry 9 }

licenseTenantCount  OBJECT-TYPE
   SYNTAX     Unsigned32 (0..4294967295)
   MAX-ACCESS read-only
   STATUS     current
   DESCRIPTION
       "Licence tenant count."
   ::= { licenseEntry 10 }

licenseMissing  OBJECT-TYPE
   SYNTAX      TruthValue
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
       "License is missing."
   ::= { licenseEntry 11 }

licenseExpired  OBJECT-TYPE
   SYNTAX      TruthValue
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
       "License is expired."
   ::= { licenseEntry 12 }

licenseValid  OBJECT-TYPE
   SYNTAX      TruthValue
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
       "License is properly formed and issuer is valid."
   ::= { licenseEntry 13 }

licenseValidHardware  OBJECT-TYPE
   SYNTAX      TruthValue
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
       "License passed hardware validity tests,"
   ::= { licenseEntry 14 }

licenseDigest    OBJECT-TYPE
   SYNTAX      SnmpAdminString
   MAX-ACCESS  read-only
   STATUS      current
   DESCRIPTION
      "License verification digest."
   ::= { licenseEntry 15 }


-- Conformance

licenseConformance OBJECT IDENTIFIER ::= { licenseMIB 2 }

licenseCompliances OBJECT IDENTIFIER ::= { licenseConformance 1 }

licenseCompliance MODULE-COMPLIANCE
      STATUS  current
      DESCRIPTION
          "The compliance statement for systems supporting
          the iVN License MIB."
      MODULE -- this module
      MANDATORY-GROUPS {
      licenseObjectGroup
      }
      ::= { licenseCompliances 1 }

licenseGroups OBJECT IDENTIFIER ::= { licenseConformance 2 }

licenseObjectGroup OBJECT-GROUP
    OBJECTS {
    licenseTableLastChanged,
    licenseName,
    licenseDomainName,
    licenseMACAddress,
    licenseStartDateAndTime,
    licenseEndDateAndTime,
    licensePortLimit,
    licensePortUse,
    licensePortLimitReached,
    licenseTenantCount,
    licenseMissing,
    licenseExpired,
    licenseValid,
    licenseValidHardware,
    licenseDigest
    }
    STATUS   current
    DESCRIPTION
        "License list object group."
    ::= { licenseGroups 1}

END
