Exemplo n.º 1
0
        public void TerminateInstance(ApTerminateInstanceRequest request)
        {
            Log.Debug(this, "TerminateInstance()");

            try
            {
                Authenticate(request);
                IaasClient.TerminateInstance(request.InstanceId);
            }
            catch (Exception e)
            {
                Log.Error(this, e);
                throw e;
            }
        }
Exemplo n.º 2
0
 //
 // GET: /applicationgrid/terminateinstance/{instanceId}
 public ActionResult TerminateInstance(string instanceId)
 {
     try
     {
         ApTerminateInstanceRequest request = new ApTerminateInstanceRequest(Credentials);
         request.InstanceId = instanceId;
         EndPoints.ApDashboardService.TerminateInstance(request);
         return RedirectToAction("Instances");
     }
     catch (Exception e)
     {
         return ShowError(e);
     }
 }