From 3e71c71cbffb0de454759e2bbd0ff840dfa480bc Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 3 Oct 2012 16:07:11 -0400 Subject: Add modular configuration for Robust connectors We can provide modular ini for connectors... look for our configuration in the following places... 1) in the default ini/-inifile 2) in the named file (ConfigName) located in the configured directory (see Robust[.HG].ini [Start] section for ConfigDirectory) 3) in the repository named in the connector (ConfigURL) In this case, the file will be written into the configured directory with the specified See example connector/service @ https://github.com/BlueWall/SlipStream for testing. --- OpenSim/Server/Handlers/Base/ServerConnector.cs | 61 +++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Base/ServerConnector.cs b/OpenSim/Server/Handlers/Base/ServerConnector.cs index 71876da..951cd89 100644 --- a/OpenSim/Server/Handlers/Base/ServerConnector.cs +++ b/OpenSim/Server/Handlers/Base/ServerConnector.cs @@ -39,8 +39,69 @@ namespace OpenSim.Server.Handlers.Base public class ServiceConnector : IServiceConnector { + public virtual string ConfigURL + { + get; + protected set; + } + + public virtual string ConfigName + { + get; + protected set; + } + + public virtual string ConfigFile + { + get; + protected set; + } + + public virtual IConfigSource Config + { + get; + protected set; + } + public ServiceConnector(IConfigSource config, IHttpServer server, string configName) { } + + // We call this from our plugin module to get our configuration + public IConfig GetConfig() + { + IConfig config = null; + config = ServerUtils.GetConfig(ConfigFile, ConfigName); + + // Our file is not here? We can get one to bootstrap our plugin module + if ( config == null ) + { + IConfigSource remotesource = GetConfigSource(); + + if (remotesource != null) + { + IniConfigSource initialconfig = new IniConfigSource(); + initialconfig.Merge (remotesource); + initialconfig.Save(ConfigFile); + } + + config = remotesource.Configs[ConfigName]; + } + + return config; + } + + // We get our remote initial configuration for bootstrapping + private IConfigSource GetConfigSource() + { + IConfigSource source = null; + + source = ServerUtils.LoadInitialConfig(ConfigURL); + + if (source == null) + System.Console.WriteLine(String.Format ("Config Url: {0} Not found!", ConfigURL)); + + return source; + } } } -- cgit v1.1 From 440726250cc2a523463f575b682a6ddb6242408c Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 6 Oct 2012 11:48:21 -0400 Subject: Added parts to manage repositories and plugin management This is working - more testing to follow, then soem documentation --- OpenSim/Server/Handlers/Base/ServerConnector.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Base/ServerConnector.cs b/OpenSim/Server/Handlers/Base/ServerConnector.cs index 951cd89..067fd2a 100644 --- a/OpenSim/Server/Handlers/Base/ServerConnector.cs +++ b/OpenSim/Server/Handlers/Base/ServerConnector.cs @@ -63,6 +63,10 @@ namespace OpenSim.Server.Handlers.Base protected set; } + public ServiceConnector() + { + } + public ServiceConnector(IConfigSource config, IHttpServer server, string configName) { } -- cgit v1.1 From 99bb6c930479fedee4e55a662fa715702f6110b7 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 19 Oct 2012 07:38:36 -0400 Subject: Move PluginManager Move PluginManager out to OpenSimFramework for general use --- OpenSim/Server/Handlers/Base/ServerConnector.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Base/ServerConnector.cs b/OpenSim/Server/Handlers/Base/ServerConnector.cs index 067fd2a..72014db 100644 --- a/OpenSim/Server/Handlers/Base/ServerConnector.cs +++ b/OpenSim/Server/Handlers/Base/ServerConnector.cs @@ -41,8 +41,7 @@ namespace OpenSim.Server.Handlers.Base { public virtual string ConfigURL { - get; - protected set; + get { return String.Empty; } } public virtual string ConfigName @@ -95,7 +94,10 @@ namespace OpenSim.Server.Handlers.Base return config; } - // We get our remote initial configuration for bootstrapping + // We get our remote initial configuration for bootstrapping in case + // we have no configuration in our main file or in an existing + // modular config file. This is the last resort to bootstrap the + // configuration, likely a new plugin loading for the first time. private IConfigSource GetConfigSource() { IConfigSource source = null; -- cgit v1.1 From 1f1da230976451d30d920c237d53c699ba96b9d9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 5 Feb 2013 00:23:17 +0000 Subject: Bump version and assembly version numbers from 0.7.5 to 0.7.6 This is mostly Bluewall's work but I am also bumping the general version number OpenSimulator 0.7.5 remains in the release candidate stage. I'm doing this because master is significantly adding things that will not be in 0.7.5 This update should not cause issues with existing external binary DLLs because our DLLs do not have strong names and so the exact version match requirement is not in force. --- OpenSim/Server/Handlers/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs index 53e9737..d72d36a 100644 --- a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs +++ b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] -- cgit v1.1 From 4779f7d7d5ce0e284d9ed15104389f8479b11545 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 19 Feb 2013 17:14:55 -0800 Subject: Deleted all AssemblyFileVersion directives --- OpenSim/Server/Handlers/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs index d72d36a..3295ffd 100644 --- a/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs +++ b/OpenSim/Server/Handlers/Properties/AssemblyInfo.cs @@ -30,4 +30,4 @@ using System.Runtime.InteropServices; // Revision // [assembly: AssemblyVersion("0.7.6.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] + -- cgit v1.1 From e515cdddec435e97e9ed4722de08ee410e94a7e6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 21 Feb 2013 17:26:19 -0800 Subject: Simplification of HG configs: HomeURI and GatekeeperURI now are defined as default under [Startup]. They can then be overwritten in the other sections (but probably shouldn't). I kept the existing code for backwards compatibility, so this should not cause any breaks from people's current configurations. But people should move to have these 2 vars under [Startup] -- see OpenSim.ini.example and Robust.HG.ini.example. And yes, both names now end with "URI" for consistency. --- OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs index 965a54e..35f86c5 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs @@ -170,14 +170,6 @@ namespace OpenSim.Server.Handlers.Grid public string JsonGetGridInfoMethod(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { - string HomeURI = String.Empty; - IConfig cfg = m_Config.Configs["LoginService"]; - - if (null != cfg) - { - HomeURI = cfg.GetString("SRV_HomeURI", HomeURI); - } - OSDMap map = new OSDMap(); foreach (string k in _info.Keys) @@ -185,9 +177,19 @@ namespace OpenSim.Server.Handlers.Grid map[k] = OSD.FromString(_info[k].ToString()); } + string HomeURI = Util.GetConfigVarWithDefaultSection(m_Config, "HomeURI", string.Empty); + if (!String.IsNullOrEmpty(HomeURI)) + map["home"] = OSD.FromString(HomeURI); + else // Legacy. Remove soon! { - map["home"] = OSD.FromString(HomeURI); + IConfig cfg = m_Config.Configs["LoginService"]; + + if (null != cfg) + HomeURI = cfg.GetString("SRV_HomeURI", HomeURI); + + if (!String.IsNullOrEmpty(HomeURI)) + map["home"] = OSD.FromString(HomeURI); } return OSDParser.SerializeJsonString(map).ToString(); -- cgit v1.1 From 0e8289cd002b1947e172d1bfc77fdd0b16d92ffb Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 22 Feb 2013 15:57:33 -0800 Subject: Added new Util function for reading config vars that's more generic than the one I added yesterday -- this is for helping move config vars out of [Startup] --- OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs index 35f86c5..d85aab0 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs @@ -177,7 +177,7 @@ namespace OpenSim.Server.Handlers.Grid map[k] = OSD.FromString(_info[k].ToString()); } - string HomeURI = Util.GetConfigVarWithDefaultSection(m_Config, "HomeURI", string.Empty); + string HomeURI = Util.GetConfigVarFromSections(m_Config, "HomeURI", new string[] {"Startup"}); if (!String.IsNullOrEmpty(HomeURI)) map["home"] = OSD.FromString(HomeURI); -- cgit v1.1 From f1010d7b152b68e2961b40482006221e28e976af Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 27 Feb 2013 20:49:41 -0800 Subject: Moved the HG default variables out of [Startup] and into their own section [Hypergrid] in *Common.ini.example. Backwards compatible for now. --- OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs index d85aab0..bfcdc4b 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs @@ -177,7 +177,7 @@ namespace OpenSim.Server.Handlers.Grid map[k] = OSD.FromString(_info[k].ToString()); } - string HomeURI = Util.GetConfigVarFromSections(m_Config, "HomeURI", new string[] {"Startup"}); + string HomeURI = Util.GetConfigVarFromSections(m_Config, "HomeURI", new string[] { "Startup", "Hypergrid" }); if (!String.IsNullOrEmpty(HomeURI)) map["home"] = OSD.FromString(HomeURI); -- cgit v1.1 From bb447581795cb622e88a071d3050370c64ace946 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 27 Feb 2013 20:59:16 -0800 Subject: Switched to using the other Util function with a default value. --- OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs index bfcdc4b..346af32 100644 --- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs +++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs @@ -177,7 +177,8 @@ namespace OpenSim.Server.Handlers.Grid map[k] = OSD.FromString(_info[k].ToString()); } - string HomeURI = Util.GetConfigVarFromSections(m_Config, "HomeURI", new string[] { "Startup", "Hypergrid" }); + string HomeURI = Util.GetConfigVarFromSections(m_Config, "HomeURI", + new string[] { "Startup", "Hypergrid" }, String.Empty); if (!String.IsNullOrEmpty(HomeURI)) map["home"] = OSD.FromString(HomeURI); -- cgit v1.1