From 4433f53f72c6be11ee0a3453ceec403b5de567fa Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 13 Apr 2010 20:14:56 +0100 Subject: [PATCH 1/3] Drop unused Alert() method from ISnmpModule --- OpenSim/Region/Framework/Interfaces/ISnmpModule.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs index 6fd6ba7224..d37a01bd21 100644 --- a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs @@ -6,7 +6,6 @@ // Mod 2 public interface ISnmpModule { - void Alert(string message); - void Trap(int code,string simname,string Message); + void Trap(int code,string simname,string Message); void ColdStart(int step , string simname); } From fac55bc78b70a1f8a3a53b222d9df515e32e82ae Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 14 Apr 2010 01:17:27 +0100 Subject: [PATCH 2/3] Change ISnmpModule to use scene references --- OpenSim/Region/Framework/Interfaces/ISnmpModule.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs index d37a01bd21..5143b21a81 100644 --- a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs @@ -4,8 +4,15 @@ // // This file is not open source. All rights reserved // Mod 2 + +using OpenSim.Region.Framework.Scenes; + public interface ISnmpModule { - void Trap(int code,string simname,string Message); - void ColdStart(int step , string simname); + void Trap(int code, string Message, Scene scene); + void Critcal(string Message, Scene scene); + void Warning(string Message, Scene scene); + void Major(string Message, Scene scene); + void ColdStart(int step , Scene scene); + void Shutdown(int step , Scene scene); } From 1636f535ba1915732927054be36b909b67a6de6c Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 14 Apr 2010 10:42:14 +0100 Subject: [PATCH 3/3] Committing sacha's partial work (from orpheus). The GridBrat needs to learn a bit of git --- OpenSim/Region/Application/OpenSimBase.cs | 45 +++++++++++++++++++ .../Framework/Interfaces/ISnmpModule.cs | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index cf2ab65b22..f3aaa76f56 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -346,10 +346,28 @@ namespace OpenSim else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); scene.SetModuleInterfaces(); +// First Step of bootreport sequence + if (scene.SnmpService != null) + { + scene.SnmpService.ColdStart(1,scene); + } + +// it should be a LinkDown event +// Maped inside opennms +// bad... + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Loading prins", scene); + } // Prims have to be loaded after module configuration since some modules may be invoked during the load scene.LoadPrimsFromStorage(regionInfo.originRegionID); + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Creating region texture", scene); + } + // moved these here as the terrain texture has to be created after the modules are initialized // and has to happen before the region is registered with the grid. scene.CreateTerrainTexture(false); @@ -357,6 +375,10 @@ namespace OpenSim // TODO : Try setting resource for region xstats here on scene MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Grid Registration in progress", scene); + } try { scene.RegisterRegionWithGrid(); @@ -365,11 +387,20 @@ namespace OpenSim { m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e.StackTrace); + if (scene.SnmpService != null) + { + scene.SnmpService.Critical("Grid registration failed. Startup aborted.", scene); + } // Carrying on now causes a lot of confusion down the // line - we need to get the user's attention Environment.Exit(1); } + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Grid Registration done", scene); + } + // We need to do this after we've initialized the // scripting engines. scene.CreateScriptInstances(); @@ -377,6 +408,11 @@ namespace OpenSim scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); scene.EventManager.TriggerParcelPrimCountUpdate(); + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("ScriptEngine started", scene); + } + m_sceneManager.Add(scene); if (m_autoCreateClientStack) @@ -385,6 +421,10 @@ namespace OpenSim clientServer.Start(); } + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("Initializing region modules", scene); + } if (do_post_init) { foreach (IRegionModule module in modules) @@ -396,6 +436,11 @@ namespace OpenSim mscene = scene; + if (scene.SnmpService != null) + { + scene.SnmpService.Warning("The region is operational", scene); + } + scene.StartTimer(); return clientServer; diff --git a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs index 5143b21a81..8a83fe986a 100644 --- a/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ISnmpModule.cs @@ -10,7 +10,7 @@ using OpenSim.Region.Framework.Scenes; public interface ISnmpModule { void Trap(int code, string Message, Scene scene); - void Critcal(string Message, Scene scene); + void Critical(string Message, Scene scene); void Warning(string Message, Scene scene); void Major(string Message, Scene scene); void ColdStart(int step , Scene scene);