
--
-- Copyright 2014 Red Hat Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
--     http://www.apache.org/licenses/LICENSE-2.0
--
--     Unless required by applicable law or agreed to in writing, software
--     distributed under the License is distributed on an "AS IS" BASIS,
--     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--     See the License for the specific language governing permissions and
--     limitations under the License.
--

OVIRT-MIB DEFINITIONS ::= BEGIN

IMPORTS
    Integer32,
    MODULE-IDENTITY,
    NOTIFICATION-TYPE,
    OBJECT-TYPE         FROM SNMPv2-SMI
    NOTIFICATION-GROUP,
    MODULE-COMPLIANCE,
    OBJECT-GROUP        FROM SNMPv2-CONF
    redhat              FROM REDHAT-MIB
;

ovirt MODULE-IDENTITY
    LAST-UPDATED "201409140000Z"
    ORGANIZATION "www.ovirt.org"
    CONTACT-INFO "TBD"
    DESCRIPTION  "TBD"
    REVISION     "201409140000Z"
    DESCRIPTION
        "First draft"
    ::= { redhat 13}

--
-- top level structure
--
ovirtEngine                          OBJECT IDENTIFIER ::= { ovirt 1 }
ovirtEngineNotifier                  OBJECT IDENTIFIER ::= { ovirtEngine 1 }

ovirtEngineNotifierNotifications     OBJECT IDENTIFIER ::= { ovirtEngineNotifier 0 }

ovirtEngineNotifierObjects           OBJECT IDENTIFIER ::= { ovirtEngineNotifier 2 }
ovirtEngineNotifierObjectsAudit      OBJECT IDENTIFIER ::= { ovirtEngineNotifierObjects 1 }

ovirtEngineNotifierGroups                    OBJECT IDENTIFIER ::= { ovirtEngineNotifier 3 }

ovirtEngineNotifierCompliances               OBJECT IDENTIFIER ::= { ovirtEngineNotifier 4 }

--
-- Compliance
--

ovirtEngineNotifierCompliance MODULE-COMPLIANCE
    STATUS     current
    DESCRIPTION
           "MANDATORY-GROUPS must be implemented to comply with this module."
    MODULE  -- this module
        MANDATORY-GROUPS { ovirtEngineNotificationsGroup, ovirtEngineObjectAuditGroup }
    ::= { ovirtEngineNotifierCompliances 2 }

--
-- Trap definition
--

ovirtEngineNotificationsGroup NOTIFICATION-GROUP
    NOTIFICATIONS  { ovirtEngineNotifierNotificationsAudit }
    STATUS         current
    DESCRIPTION    "notifications defined in SMIv2 modules are required to be listed in a group"
::= {  ovirtEngineNotifierGroups 1  }

ovirtEngineNotifierNotificationsAudit NOTIFICATION-TYPE
    OBJECTS     {
                  ovirtEngineNotifierInstanceId,
                  ovirtEngineNotifierName,
                  ovirtEngineNotifierId,
                  ovirtEngineNotifierSeverity,
                  ovirtEngineNotifierMessage,
                  ovirtEngineNotifierStatus,
                  ovirtEngineNotifierDatetime
                }
    STATUS      current
    DESCRIPTION
        "Defines an audit log event sent by ovirt-engine-notifier."
::= { ovirtEngineNotifierNotifications 1 }

--
-- Objects
--
ovirtEngineObjectAuditGroup OBJECT-GROUP
    OBJECTS      {
                   ovirtEngineNotifierInstanceId,
                   ovirtEngineNotifierName,
                   ovirtEngineNotifierId,
                   ovirtEngineNotifierSeverity,
                   ovirtEngineNotifierMessage,
                   ovirtEngineNotifierStatus,
                   ovirtEngineNotifierDatetime,
                   ovirtEngineNotifierUsername,
                   ovirtEngineNotifierUserId,
                   ovirtEngineNotifierVmName,
                   ovirtEngineNotifierVmId,
                   ovirtEngineNotifierHostName,
                   ovirtEngineNotifierHostId,
                   ovirtEngineNotifierTemplateName,
                   ovirtEngineNotifierTemplateId,
                   ovirtEngineNotifierStoragePoolName,
                   ovirtEngineNotifierStoragePoolId,
                   ovirtEngineNotifierStorageDomainName,
                   ovirtEngineNotifierStorageDomainId
                 }
    STATUS       current
    DESCRIPTION  "A group for all mandatory and optional objects sent in
                  ovirtEngineNotifierNotificationsAudit notifications.
                  defined since every defined in an SMIv2 module is required to be
                  listed in at least one group in order to be conformant "
::= { ovirtEngineNotifierGroups 2 }

ovirtEngineNotifierInstanceId OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The id of the audit event at ovirt-engine, e,g 83."
::= { ovirtEngineNotifierObjectsAudit 1 }


ovirtEngineNotifierName OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The name of the audit event type, e,g VDC_STOP.
         See AuditLogMessages.properties."
::= { ovirtEngineNotifierObjectsAudit 2 }

ovirtEngineNotifierId OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The id of the audit event type, e,g 2 (2 is the id of VDC_STOP)."
::= { ovirtEngineNotifierObjectsAudit 3 }

ovirtEngineNotifierSeverity OBJECT-TYPE
    SYNTAX      INTEGER {
                          normal (0),
                          warning (1),
                          error (2),
                          alert (10)
                        }
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The severity of the audit event."
::= { ovirtEngineNotifierObjectsAudit 4 }

ovirtEngineNotifierMessage OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The text message associated with the audit event."
::= { ovirtEngineNotifierObjectsAudit 5 }

ovirtEngineNotifierStatus OBJECT-TYPE
    SYNTAX      INTEGER {
                          resolveMessage (0),
                          alertMessage (1)
                        }
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The lifecycle status of this audit log event."
::= { ovirtEngineNotifierObjectsAudit 6 }

ovirtEngineNotifierDatetime OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The Datetime of the audit event occurred as ISO 8601 (yyyy-MM-dd'T'HH:mm'Z')."
::= { ovirtEngineNotifierObjectsAudit 7 }

-- optional pdu:

ovirtEngineNotifierUsername OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The Username associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 100 }

ovirtEngineNotifierUserId OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The uuid associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 101 }

ovirtEngineNotifierVmName OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The name of the vm associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 102 }

ovirtEngineNotifierVmId OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The uuid of the vm associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 103 }

ovirtEngineNotifierHostName OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The name of the host associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 104 }

ovirtEngineNotifierHostId OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The uuid of the host associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 105 }

ovirtEngineNotifierTemplateName OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The name of the template associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 106 }

ovirtEngineNotifierTemplateId OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The uuid of the template associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 107 }

ovirtEngineNotifierStoragePoolName OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The name of the storage pool associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 108 }

ovirtEngineNotifierStoragePoolId OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The uuid of the storage pool associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 109 }

ovirtEngineNotifierStorageDomainName OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The name of the storage domain associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 110 }

ovirtEngineNotifierStorageDomainId OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "The uuid of the storage domain associated with the audit event(optional)."
::= { ovirtEngineNotifierObjectsAudit 111 }

END
