summaryrefslogtreecommitdiff
path: root/pysnmp/proto/acmod/void.py
blob: 677103b9d5e3bd24d757b61d145a55827b010520 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pysnmp/license.html
#
from pysnmp.proto import errind, error
from pysnmp import debug


# rfc3415 3.2
# noinspection PyUnusedLocal
class Vacm(object):
    """Void Access Control Model"""
    ACCESS_MODEL_ID = 0

    def isAccessAllowed(self,
                        snmpEngine,
                        securityModel,
                        securityName,
                        securityLevel,
                        viewType,
                        contextName,
                        variableName):
        debug.logger & debug.FLAG_ACL and debug.logger(
            'isAccessAllowed: viewType %s for variableName %s - OK' % (viewType, variableName)
        )

        # rfc3415 3.2.5c
        return error.StatusInformation(errorIndication=errind.accessAllowed)