From f95b6081cba084d1b067acea99c0effa2b3bf42c Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 24 May 2007 12:35:32 +0000 Subject: Renamed the new Directories. (removed the "-Source" from the end of them) --- .../GridManagementAgent.cs | 71 -------------- .../GridServerManager.cs | 50 ---------- .../OpenGrid.Framework.Manager.csproj | 105 --------------------- .../OpenGrid.Framework.Manager.csproj.user | 12 --- .../OpenGrid.Framework.Manager.dll.build | 44 --------- 5 files changed, 282 deletions(-) delete mode 100644 OpenGridServices-Source/OpenGrid.Framework.Manager/GridManagementAgent.cs delete mode 100644 OpenGridServices-Source/OpenGrid.Framework.Manager/GridServerManager.cs delete mode 100644 OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj delete mode 100644 OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj.user delete mode 100644 OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build (limited to 'OpenGridServices-Source/OpenGrid.Framework.Manager') diff --git a/OpenGridServices-Source/OpenGrid.Framework.Manager/GridManagementAgent.cs b/OpenGridServices-Source/OpenGrid.Framework.Manager/GridManagementAgent.cs deleted file mode 100644 index e43ce87..0000000 --- a/OpenGridServices-Source/OpenGrid.Framework.Manager/GridManagementAgent.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Nwc.XmlRpc; -using OpenSim.Framework; -using OpenSim.Servers; -using System.Collections; -using System.Collections.Generic; -using libsecondlife; - -namespace OpenGrid.Framework.Manager { - - public delegate void GridManagerCallback(string param); - - public class GridManagementAgent { - - private GridManagerCallback thecallback; - private string sendkey; - private string recvkey; - private string component_type; - - private static ArrayList Sessions; - - public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback) - { - this.sendkey=sendkey; - this.recvkey=recvkey; - this.component_type=component_type; - this.thecallback=thecallback; - Sessions = new ArrayList(); - - app_httpd.AddXmlRPCHandler("manager_login",XmlRpcLoginMethod); - - switch(component_type) - { - case "gridserver": - GridServerManager.sendkey=this.sendkey; - GridServerManager.recvkey=this.recvkey; - GridServerManager.thecallback=thecallback; - app_httpd.AddXmlRPCHandler("shutdown", GridServerManager.XmlRpcShutdownMethod); - break; - } - } - - public static bool SessionExists(LLUUID sessionID) - { - return Sessions.Contains(sessionID); - } - - public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable requestData = (Hashtable)request.Params[0]; - Hashtable responseData = new Hashtable(); - - // TODO: Switch this over to using OpenGrid.Framework.Data - if( requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret")) { - response.IsFault=false; - LLUUID new_session=LLUUID.Random(); - Sessions.Add(new_session); - responseData["session_id"]=new_session.ToString(); - responseData["msg"]="Login OK"; - } else { - response.IsFault=true; - responseData["error"]="Invalid username or password"; - } - - response.Value = responseData; - return response; - - } - - } -} diff --git a/OpenGridServices-Source/OpenGrid.Framework.Manager/GridServerManager.cs b/OpenGridServices-Source/OpenGrid.Framework.Manager/GridServerManager.cs deleted file mode 100644 index 7ebf66a..0000000 --- a/OpenGridServices-Source/OpenGrid.Framework.Manager/GridServerManager.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using Nwc.XmlRpc; -using System.Threading; -using libsecondlife; - -namespace OpenGrid.Framework.Manager { - - public class GridServerManager - { - public static GridManagerCallback thecallback; - - public static string sendkey; - public static string recvkey; - - public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) - { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable requestData = (Hashtable)request.Params[0]; - Hashtable responseData = new Hashtable(); - - if(requestData.ContainsKey("session_id")) { - if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) { - responseData["msg"]="Shutdown command accepted"; - (new Thread(new ThreadStart(ZOMGServerIsNowTerminallyIll))).Start(); - } else { - response.IsFault=true; - responseData["error"]="bad session ID"; - } - } else { - response.IsFault=true; - responseData["error"]="no session ID"; - } - - response.Value = responseData; - return response; - } - - // Brought to by late-night coding - public static void ZOMGServerIsNowTerminallyIll() - { - Console.WriteLine("ZOMG! THIS SERVER IS TERMINALLY ILL - WE GOT A SHUTDOWN REQUEST FROM A GRID MANAGER!!!!"); - Console.WriteLine("We have 3 seconds to live..."); - Thread.Sleep(3000); - thecallback("shutdown"); - } - } -} - diff --git a/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj b/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj deleted file mode 100644 index 3122633..0000000 --- a/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj +++ /dev/null @@ -1,105 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {7924FD35-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenGrid.Framework.Manager - JScript - Grid - IE50 - false - Library - - OpenGrid.Framework.Manager - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ..\bin\ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ..\bin\ - False - False - False - 4 - - - - - System.dll - False - - - ..\bin\libsecondlife.dll - False - - - - - OpenSim.Framework - {8ACA2445-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - OpenSim.Servers - {8BB20F0A-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - XMLRPC - {8E81D43C-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - - - Code - - - Code - - - - - - - - - - diff --git a/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj.user b/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj.user deleted file mode 100644 index d47d65d..0000000 --- a/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj.user +++ /dev/null @@ -1,12 +0,0 @@ - - - Debug - AnyCPU - C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-07\bin\ - 8.0.50727 - ProjectFiles - 0 - - - - diff --git a/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build b/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build deleted file mode 100644 index daee3bf..0000000 --- a/OpenGridServices-Source/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.1