(self, mib, mib_json_node)
Creates an oid node from a mib and a mib json node

        Example of mib json node:
        ```json
        {
            "name": "mIBMinorVersionNumber",
            "oid": "1.3.6.1.4.1.674.10892.1.1.2",
            "nodetype": "scalar",
            "class": "objecttype",
            "syntax": {
              "type": "DellUnsigned8BitRange",
              "class": "type"
            },
            "maxaccess": "read-only",
            "status": "mandatory",
            "description":
            "0001.0002 This attribute defines the minor version number of the Dell Enterprise Server Group MIB ."
        }
        ```
Creates an oid node from a mib and a mib json node
Creates an oid node from a mib and a mib json node
def __init__(self, mib, mib_json_node):
        """
        Creates an oid node from a mib and a mib json node

        Example of mib json node:
        ```json
        {
            "name": "mIBMinorVersionNumber",
            "oid": "1.3.6.1.4.1.674.10892.1.1.2",
            "nodetype": "scalar",
            "class": "objecttype",
            "syntax": {
              "type": "DellUnsigned8BitRange",
              "class": "type"
            },
            "maxaccess": "read-only",
            "status": "mandatory",
            "description":
            "0001.0002 This attribute defines the minor version number of the Dell Enterprise Server Group MIB ."
        }
        ```
        """
        expected_json_node_props = [JSON_NODE_PROP_OID, JSON_NODE_PROP_NAME, JSON_NODE_PROP_CLASS]
        if not all(json_prop in mib_json_node for json_prop in expected_json_node_props):
            raise OidNodeInvalid

        self.mib_class = mib_json_node[JSON_NODE_PROP_CLASS]

        # The OBJECT-TYPE is defined by SNMP v1 and is used as a container for
        # storing information about the managed device, or some measured value on the device.
        # More details:
        # https://www.ibm.com/support/knowledgecenter/en/SSSHTQ_8.1.0/com.ibm.netcool_OMNIbus.doc_8.1.0/omnibus/wip/ua_mibmgr/reference/omn_ref_mib_mibobjects.html
        if not self.is_object:
            return

        self.name = mib_json_node[JSON_NODE_PROP_NAME]
        self.oid = mib_json_node[JSON_NODE_PROP_OID]
        self.mib = mib

        self.max_access = None
        if JSON_NODE_PROP_MAX_ACCESS in mib_json_node:
            self.max_access = mib_json_node[JSON_NODE_PROP_MAX_ACCESS]

        self.node_type = None
        if JSON_NODE_PROP_NODE_TYPE in mib_json_node:
            self.node_type = mib_json_node[JSON_NODE_PROP_NODE_TYPE]

        self.description = None
        if JSON_NODE_PROP_DESCRIPTION in mib_json_node:
            self.description = mib_json_node[JSON_NODE_PROP_DESCRIPTION]

        self.indices = None
        if JSON_NODE_PROP_INDICES in mib_json_node:
            indices = mib_json_node[JSON_NODE_PROP_INDICES]
            self.indices = []
            for item in indices:
                module = item[JSON_NODE_INDEX_NODE_PROP_MODULE]
                obj = item[JSON_NODE_INDEX_NODE_PROP_OBJECT]
                self.indices.append(OidTableIndex(index_module=module, index_name=obj))
def __init__ ( self , mib , mib_json_node ) : expected_json_node_props = [ JSON_NODE_PROP_OID , JSON_NODE_PROP_NAME , JSON_NODE_PROP_CLASS ] if not all ( json_prop in mib_json_node for json_prop in expected_json_node_props ) : raise OidNodeInvalid self . mib_class = mib_json_node [ JSON_NODE_PROP_CLASS ] # The OBJECT-TYPE is defined by SNMP v1 and is used as a container for # storing information about the managed device, or some measured value on the device. # More details: # https://www.ibm.com/support/knowledgecenter/en/SSSHTQ_8.1.0/com.ibm.netcool_OMNIbus.doc_8.1.0/omnibus/wip/ua_mibmgr/reference/omn_ref_mib_mibobjects.html if not self . is_object : return self . name = mib_json_node [ JSON_NODE_PROP_NAME ] self . oid = mib_json_node [ JSON_NODE_PROP_OID ] self . mib = mib self . max_access = None if JSON_NODE_PROP_MAX_ACCESS in mib_json_node : self . max_access = mib_json_node [ JSON_NODE_PROP_MAX_ACCESS ] self . node_type = None if JSON_NODE_PROP_NODE_TYPE in mib_json_node : self . node_type = mib_json_node [ JSON_NODE_PROP_NODE_TYPE ] self . description = None if JSON_NODE_PROP_DESCRIPTION in mib_json_node : self . description = mib_json_node [ JSON_NODE_PROP_DESCRIPTION ] self . indices = None if JSON_NODE_PROP_INDICES in mib_json_node : indices = mib_json_node [ JSON_NODE_PROP_INDICES ] self . indices = [ ] for item in indices : module = item [ JSON_NODE_INDEX_NODE_PROP_MODULE ] obj = item [ JSON_NODE_INDEX_NODE_PROP_OBJECT ] self . indices . append ( OidTableIndex ( index_module = module , index_name = obj ) )