USE tango;

-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

--                            Device DataBase 

-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-- 

INSERT INTO device SET
 	name	= "archiving/hdb/hdbarchiver.01",
 	domain	= "archiving",
 	family	= "hdb",
 	member	= "hdbarchiver.01",
 	exported	= 0,
 	ior	= "tbd@rt", -- À VÉRIFIER
 	host	= "tbd@rt", -- À VÉRIFIER
 	server	= "HdbArchiver/01",
 	pid	= 0,
 	class 	= "HdbArchiver",
 	version	= 0,
 	started	= NULL,
 	stopped	= NULL;

INSERT INTO device SET
 	name	= "archiving/hdb/hdbextractor.01",
 	domain	= "archiving",
 	family	= "hdb",
 	member	= "hdbextractor.01",
 	exported	= 0,
 	ior	= "tbd@rt", -- À VÉRIFIER
 	host	= "tbd@rt", -- À VÉRIFIER
 	server	= "HdbExtractor/01",
 	pid	= 0,
 	class 	= "HdbExtractor",
 	version	= 0,
 	started	= NULL,
 	stopped	= NULL;

-- installation à revoir
INSERT INTO device SET
 	name	= "archiving/hdb/hdbarchivingwatcher.01",
 	domain	= "archiving",
 	family	= "hdb",
 	member	= "hdbarchivingwatcher.01",
 	exported	= 0,
 	ior	= "tbd@rt", -- À VÉRIFIER
 	host	= "tbd@rt", -- À VÉRIFIER
 	server	= "HDBTDBArchivingWatcher/HDB",
 	pid	= 0,
 	class 	= "HDBTDBArchivingWatcher",
 	version	= 0,
 	started	= NULL,
 	stopped	= NULL;

INSERT INTO device SET
 	name	= "dserver/HdbArchiver/01",
 	domain	= "dserver",
 	family	= "HdbArchiver",
 	member	= "01",
 	exported	= 0,
 	ior	= "tbd@rt", -- À VÉRIFIER
 	host	= "tbd@rt", -- À VÉRIFIER
 	server	= "HdbArchiver/01",
 	pid	= 0,
 	class 	= "DServer",
 	version	= 0,
 	started	= NULL,
 	stopped	= NULL;

INSERT INTO device SET
 	name	= "dserver/HdbExtractor/01",
 	domain	= "dserver",
 	family	= "HdbExtractor",
 	member	= "01",
 	exported	= 0,
 	ior	= "tbd@rt", -- À VÉRIFIER
 	host	= "tbd@rt", -- À VÉRIFIER
 	server	= "HdbExtractor/01",
 	pid	= 0,
 	class 	= "DServer",
 	version	= 0,
 	started	= NULL,
 	stopped	= NULL;


INSERT INTO device SET
 	name	= "dserver/HDBTDBArchivingWatcher/HDB",
 	domain	= "dserver",
 	family	= "HDBTDBArchivingWatcher",
 	member	= "01",
 	exported	= 0,
 	ior	= "tbd@rt", -- À VÉRIFIER
 	host	= "tbd@rt", -- À VÉRIFIER
 	server	= "HDBTDBArchivingWatcher/HDB",
 	pid	= 0,
 	class 	= "DServer",
 	version	= 0,
 	started	= NULL,
 	stopped	= NULL;

-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

--                            Devices Properties 

-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
INSERT INTO property_device (device, name, count, value, updated, accessed, comment) VALUES
--	('archiving/hdb/hdbarchiver.01','DbPassword','1','hdbarchiver',NULL,NULL,NULL),
--	('archiving/hdb/hdbarchiver.01','DbUser','1','hdbarchiver',NULL,NULL,NULL),
	('archiving/hdb/hdbarchiver.01','HasThreadedStartup','1','true',NULL,NULL,NULL),
	('archiving/hdb/hdbarchiver.01','isDedicated','1','false',NULL,NULL,NULL),
	('archiving/hdb/hdbarchiver.01','reservedAttributes','1','',NULL,NULL,NULL),
	('archiving/hdb/hdbarchiver.01','hasDiary','1','true',NULL,NULL,NULL),
	('archiving/hdb/hdbarchiver.01','diaryLogLevel','1','INFO',NULL,NULL,NULL),
	('archiving/hdb/hdbarchiver.01','diaryPath','1','/var/archivage/hdb/01',NULL,NULL,NULL),
	('archiving/hdb/hdbarchiver.01','safetyPeriod','1','absolute/minutes/15',NULL,NULL,NULL),

	('archiving/hdb/hdbextractor.01', 'DbUser', 1, 'hdbbrowser', NULL, NULL, NULL),
--	('archiving/hdb/hdbextractor.01', 'DbUser', 1, 'hdbarchiver', NULL, NULL, NULL),
	('archiving/hdb/hdbextractor.01', 'DbPassword', 1, 'hdbbrowser', NULL, NULL, NULL),
--	('archiving/hdb/hdbextractor.01', 'DbPassword', 1, 'hdbarchiver', NULL, NULL, NULL),

	('archiving/hdb/hdbarchivingwatcher.01','archiverClass','1','HdbArchiver',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','checkLastValidDate','1','false',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','cyclePause','1','1200000',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','dbPwd','1','hdbmanager',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','dbUser','1','hdbmanager',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','doArchiverDiagnosis','1','true',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','doDiagnosis','1','true',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','doDiffReport','1','false',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','doRetry','1','true',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','exludeList','1',' ',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','GapDuration','1','900000',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','notificationContact','1',' ',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','notificationThreshold','1','340',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','onlyIncludeList','1',' ',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','periodicReport','1','7 days',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','realCheck','1','true',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','safetyPeriod','1','15 minutes',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','textTalkerLanguage','1','en',NULL,NULL,NULL),
	('archiving/hdb/hdbarchivingwatcher.01','unitaryPause','1','500',NULL,NULL,NULL);

-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

--                            Class Properties 

-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
INSERT INTO property_class (class, name, count, value, updated, accessed, comment) VALUES
	('HdbArchiver','Description','1','Device description',NULL,NULL,NULL),
	('HdbArchiver','ProjectTitle','1','Project description',NULL,NULL,NULL),
	('HdbArchiver','DbHost','1','localhost',NULL,NULL,NULL),
	('HdbArchiver','DbName','1','hdb',NULL,NULL,NULL),
	('HdbArchiver','DbSchema','1','hdb',NULL,NULL,NULL),
	('HdbArchiver','Facility','1','false',NULL,NULL,NULL),
	('HdbArchiver','DbUser','1','hdbbrowser',NULL,NULL,NULL),	-- À VÉRIFIER
	('HdbArchiver','DbPassword','1','hdbbrowser',NULL,NULL,NULL),	-- À VÉRIFIER
	('HdbArchiver','DbType','1','MySQL',NULL,NULL,NULL),	-- À VÉRIFIER

	('HdbExtractor','Description','1','Device description',NULL,NULL,NULL),	-- À VÉRIFIER
	('HdbExtractor','ProjectTitle','1','Project description',NULL,NULL,NULL);	-- À VÉRIFIER
--	('HdbExtractor','DbConfig','1','hdbmanager:hdbmanager@localhost',NULL,NULL,NULL);	-- À VÉRIFIER
