Beispiel #1
0
        public void Restart(Application app)
        {
            checkLoginStatus();
            var hlpr = new AppsHelper(credMgr);

            hlpr.Restart(app);
        }
        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.APPS_PATH, 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.Services.Add(provisionedServiceName);

            var request = BuildVcapJsonRequest(Method.PUT, Constants.APPS_PATH, app.Name);
            request.AddBody(app);
            request.Execute();

            // Ruby code re-gets info
            app = apps.GetApplication(appName);
            if (app.IsStarted)
            {
                apps.Restart(app);
            }
        }
        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 BindService(string provisionedServiceName, string appName)
        {
            var apps = new AppsHelper(ProxyUser, CredentialManager);

            Application app = apps.GetApplication(appName);

            app.Services.Add(provisionedServiceName);

            var request = BuildVcapJsonRequest(Method.PUT, Constants.APPS_PATH, app.Name);

            request.AddBody(app);
            request.Execute();

            // Ruby code re-gets info
            app = apps.GetApplication(appName);
            if (app.IsStarted)
            {
                apps.Restart(app);
            }
        }
        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());
        }
Beispiel #8
0
 public VcapClientResult Restart(Application app)
 {
     CheckLoginStatus();
     var hlpr = new AppsHelper(proxyUser, credMgr);
     return hlpr.Restart(app);
 }
Beispiel #9
0
 public VcapClientResult Restart(string appName)
 {
     CheckLoginStatus();
     var hlpr = new AppsHelper(proxyUser, credMgr);
     return hlpr.Restart(appName);
 }
Beispiel #10
0
 public void Restart(Application app)
 {
     checkLoginStatus();
     var hlpr = new AppsHelper(credMgr);
     hlpr.Restart(app);
 }
Beispiel #11
0
        public void Restart(Application app)
        {
            var helper = new AppsHelper(proxyUser, credMgr);

            helper.Restart(app);
        }
Beispiel #12
0
        public void Restart(string appName)
        {
            var helper = new AppsHelper(proxyUser, credMgr);

            helper.Restart(appName);
        }
Beispiel #13
0
 public void Restart(Application app)
 {
     var helper = new AppsHelper(proxyUser, credMgr);
     helper.Restart(app);
 }
Beispiel #14
0
 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.APPS_PATH, appName);
            r.AddBody(appParsed);
            r.Execute();

            apps = new AppsHelper(ProxyUser, CredentialManager);
            apps.Restart(appName);
        }
Beispiel #16
0
        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();
        }