public void Restart(Application app) { checkLoginStatus(); var hlpr = new AppsHelper(credMgr); hlpr.Restart(app); }
public VcapClientResult UnbindService(string argProvisionedServiceName, string argAppName) { var apps = new AppsHelper(credMgr); string appJson = apps.GetApplicationJson(argAppName); var appParsed = JObject.Parse(appJson); var services = (JArray)appParsed["services"]; appParsed["services"] = new JArray(services.Where(s => ((string)s) != argProvisionedServiceName)); var r = new VcapJsonRequest(credMgr, Method.PUT, Constants.APPS_PATH, argAppName); r.AddBody(appParsed); RestResponse response = r.Execute(); apps = new AppsHelper(credMgr); apps.Restart(argAppName); return(new VcapClientResult()); }
public VcapClientResult BindService(string argProvisionedServiceName, string argAppName) { var apps = new AppsHelper(credMgr); Application app = apps.GetApplication(argAppName); app.Services.Add(argProvisionedServiceName); var request = new VcapJsonRequest(credMgr, Method.PUT, Constants.APPS_PATH, app.Name); request.AddBody(app); RestResponse response = request.Execute(); // Ruby code re-gets info app = apps.GetApplication(argAppName); if (app.IsStarted) { apps.Restart(app); } return new VcapClientResult(); }
public VcapClientResult BindService(string argProvisionedServiceName, string argAppName) { var apps = new AppsHelper(credMgr); Application app = apps.GetApplication(argAppName); app.Services.Add(argProvisionedServiceName); var request = new VcapJsonRequest(credMgr, Method.PUT, Constants.APPS_PATH, app.Name); request.AddBody(app); RestResponse response = request.Execute(); // Ruby code re-gets info app = apps.GetApplication(argAppName); if (app.IsStarted) { apps.Restart(app); } return(new VcapClientResult()); }
public VcapClientResult UnbindService(string argProvisionedServiceName, string argAppName) { var apps = new AppsHelper(credMgr); string appJson = apps.GetApplicationJson(argAppName); var appParsed = JObject.Parse(appJson); var services = (JArray)appParsed["services"]; appParsed["services"] = new JArray(services.Where(s => ((string)s) != argProvisionedServiceName)); var r = new VcapJsonRequest(credMgr, Method.PUT, Constants.APPS_PATH, argAppName); r.AddBody(appParsed); RestResponse response = r.Execute(); apps = new AppsHelper(credMgr); apps.Restart(argAppName); return new VcapClientResult(); }
public void Restart(Application app) { checkLoginStatus(); var hlpr = new AppsHelper(credMgr); hlpr.Restart(app); }