コード例 #1
0
ファイル: MonoCartridge.cs プロジェクト: virajs/monoscape
        public NcDescribeApplicationsResponse DescribeApplications(NcDescribeApplicationsRequest request)
        {
            Log.Info (this, "DescribeApplications()");

            try {
                NcDescribeApplicationsResponse response = new NcDescribeApplicationsResponse ();
                response.Applications = Database.Applications;
                return response;
            }
            catch (Exception e) {
                Log.Error (this, e);
                throw e;
            }
        }
コード例 #2
0
 private void UpdateApplications(List<Node> nodes)
 {
     foreach (Node node in nodes)
     {
         try
         {
             NcDescribeApplicationsRequest request = new NcDescribeApplicationsRequest(Settings.Credentials);
             var channel = EndPoints.GetNcApplicationGridService(node);
             NcDescribeApplicationsResponse response = channel.DescribeApplications(request);
             node.Applications = response.Applications;
             foreach(Application application in node.Applications)
             {
                 LbGetApplicationInstancesRequest request1 = new LbGetApplicationInstancesRequest(Settings.Credentials);
                 request1.NodeId = node.Id;
                 request1.ApplicationId = application.Id;
                 LbGetApplicationInstancesResponse response1 = EndPoints.GetLbApplicationGridService().GetApplicationInstances(request1);
                 application.ApplicationInstances = response1.ApplicationInstances;
             }
             Log.Debug(this, "Updated applications of node " + node.ToString());
         }
         catch(Exception e)
         {
             Log.Error(this, "Could not update applications of node " + node.ToString());
             throw e;
         }
     }
 }
コード例 #3
0
 public NcDescribeApplicationsResponse DescribeApplications(NcDescribeApplicationsRequest request)
 {
     throw new NotImplementedException();
 }