示例#1
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;
         }
     }
 }
示例#2
0
        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;
            }
        }
示例#3
0
        public NcDescribeApplicationsResponse DescribeApplications(NcDescribeApplicationsRequest request)
        {
            Log.Info(this, "DescribeApplications()");

            try
            {
                Authenticate(request);
                var handler = NodeCartridgeFactory.GetHandler(request.ApplicationType);
                return(handler.DescribeApplications(request));
            }
            catch (Exception e)
            {
                Log.Error(this, e);
                throw e;
            }
        }
示例#4
0
 public NcDescribeApplicationsResponse DescribeApplications(NcDescribeApplicationsRequest request)
 {
     throw new NotImplementedException();
 }