public void UnbindService(string provisionedServiceName, string appName) { var apps = new AppsHelper(ProxyUser, CredentialManager); string appJson = apps.GetApplicationJson(appName); var appParsed = JObject.Parse(appJson); var services = (JArray)appParsed["services"]; appParsed["services"] = new JArray(services.Where(s => ((string)s) != provisionedServiceName)); var r = BuildVcapJsonRequest(Method.PUT, Constants.AppsResource, appName); r.AddBody(appParsed); r.Execute(); apps = new AppsHelper(ProxyUser, CredentialManager); apps.Restart(appName); }
public void BindService(string provisionedServiceName, string appName) { var apps = new AppsHelper(ProxyUser, CredentialManager); Application app = apps.GetApplication(appName); app.AddService(provisionedServiceName); var request = BuildVcapJsonRequest(Method.PUT, Constants.AppsResource, app.Name); request.AddBody(app); request.Execute(); // Ruby code re-gets info app = apps.GetApplication(appName); if (app.IsStarted) { apps.Restart(app); } }
public void BindService(string provisionedServiceName, string appName) { var apps = new AppsHelper(ProxyUser, CredentialManager); Application app = apps.GetApplication(appName); app.AddService(provisionedServiceName); var request = BuildVcapJsonRequest(Method.PUT, Constants.AppsResource, app.Name); request.AddBody(app); request.Execute(); // Ruby code re-gets info app = apps.GetApplication(appName); if (app.IsStarted) { apps.Restart(app); } }
public void Restart(Application app) { var helper = new AppsHelper(_proxyUser, _credMgr); helper.Restart(app); }
public void Restart(string appName) { var helper = new AppsHelper(_proxyUser, _credMgr); helper.Restart(appName); }
public void Restart(Application app) { var helper = new AppsHelper(proxyUser, credMgr); helper.Restart(app); }
public void Restart(string appName) { var helper = new AppsHelper(proxyUser, credMgr); helper.Restart(appName); }
public void UnbindService(string provisionedServiceName, string appName) { var apps = new AppsHelper(ProxyUser, CredentialManager); string appJson = apps.GetApplicationJson(appName); var appParsed = JObject.Parse(appJson); var services = (JArray)appParsed["services"]; appParsed["services"] = new JArray(services.Where(s => ((string)s) != provisionedServiceName)); var r = BuildVcapJsonRequest(Method.PUT, Constants.AppsResource, appName); r.AddBody(appParsed); r.Execute(); apps = new AppsHelper(ProxyUser, CredentialManager); apps.Restart(appName); }