Added OID to type translation table
authorVictor Kirhenshtein <victor@netxms.org>
Tue, 12 Oct 2004 07:12:06 +0000 (07:12 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Tue, 12 Oct 2004 07:12:06 +0000 (07:12 +0000)
.gitattributes
include/netxmsdb.h
include/nxnt.h [copied from include/netxmsdb.h with 86% similarity]
sql/Makefile.am
sql/Makefile.w32
sql/dbinit.in
sql/schema.in
sql/setup.in

index df36c7a..53600e9 100644 (file)
@@ -53,6 +53,7 @@ include/nxclapi.h -text
 include/nxcscpapi.h -text
 include/nxevent.h -text
 include/nximage.h -text
+include/nxnt.h -text
 include/nxqueue.h -text
 include/unicode.h -text
 m4/Makefile.am -text
index e088596..8d95f99 100644 (file)
@@ -23,6 +23,6 @@
 #ifndef _netxms_db_h
 #define _netxms_db_h
 
-#define DB_FORMAT_VERSION      11
+#define DB_FORMAT_VERSION      12
 
 #endif
similarity index 86%
copy from include/netxmsdb.h
copy to include/nxnt.h
index e088596..1cdca02 100644 (file)
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 **
-** $module: netxmsdb.h
+** $module: nxnt.h
 **
 **/
 
-#ifndef _netxms_db_h
-#define _netxms_db_h
+#ifndef _nxnt_h
+#define _nxnt_h
 
-#define DB_FORMAT_VERSION      11
+#define NODE_TYPE_GENERIC           0
+#define NODE_TYPE_NORTEL_ACCELAR    1
 
 #endif
index 1d903d2..217dd31 100644 (file)
@@ -7,7 +7,7 @@ sqldir=$(pkgdatadir)/sql
 sql_SCRIPTS = dbinit_mysql.sql dbinit_pgsql.sql dbinit_mssql.sql
 
 ROOT_FILE = dbinit.in
-SOURCE = $(ROOT_FILE) schema.in setup.in events.in images.in
+SOURCE = $(ROOT_FILE) schema.in setup.in events.in images.in policy.in
 HEADER_FILES = ../include/netxmsdb.h ../include/nxevent.h ../include/nximage.h ../src/server/core/nms_locks.h
 COMMAND = $(CPP) -x c -P -Wundef -D_NETXMS_DB_SCHEMA_ -I@top_srcdir@/include -I@top_srcdir@/src/server/include -I@top_srcdir@/src/server/core
 SQUEEZE = perl -e "while (<>) { if (! /^[\s\t\n]*$$/) { print; } }"
index 1e08bf1..a0470d5 100644 (file)
@@ -7,7 +7,7 @@ CPP = cpp
 sql_SCRIPTS = dbinit_mysql.sql dbinit_pgsql.sql dbinit_mssql.sql
 
 ROOT_FILE = dbinit.in
-SOURCE = $(ROOT_FILE) schema.in setup.in events.in images.in
+SOURCE = $(ROOT_FILE) schema.in setup.in events.in images.in policy.in
 HEADERS = ../include/netxmsdb.h ../include/nxevent.h ../include/nximage.h ../src/server/core/nms_locks.h
 COMMAND = $(CPP) -P -Wundef -D_NETXMS_DB_SCHEMA_ -I../include -I../src/server/include -I../src/server/core
 SQUEEZE = perl -e "while (<>) { if (! /^[\s\t\n]*$$/) { print; } }"
index e6af1b1..6a3dd09 100644 (file)
@@ -15,6 +15,7 @@
 #include <nms_locks.h>
 #include <nximage.h>
 #include <netxmsdb.h>
+#include <nxnt.h>
 
 // Define common macros for uncommon data types
 // and database syntax type
index 5c8ae36..73c9627 100644 (file)
@@ -112,6 +112,7 @@ CREATE TABLE nodes
        inherit_access_rights integer,
        image_id integer,
        description TEXT,
+       node_type integer,
        PRIMARY KEY(id)
 );
 
@@ -513,5 +514,6 @@ CREATE TABLE oid_to_type
        pair_id integer not null,
        snmp_oid varchar(255) not null,
        node_type integer not null,
+       node_flags integer not null,
        PRIMARY KEY(pair_id)
 );
index 2f7a9c2..21ac424 100644 (file)
@@ -120,3 +120,11 @@ INSERT INTO container_categories (category,name,image_id,description)
    VALUES (2,'Location',0,'Geografic location');
 INSERT INTO container_categories (category,name,image_id,description)
    VALUES (3,'Service',0,'Logical service');
+
+
+/*
+** SNMP OID to node type mappings
+*/
+
+INSERT INTO oid_to_type (pair_id,snmp_oid,node_type,node_flags)
+   VALUES (0,'.1.3.6.1.4.1.2272.*',NODE_TYPE_NORTEL_ACCELAR,0);