예제 #1
0
        public Application GetApplication(string name)
        {
            checkLoginStatus();
            var         hlpr = new AppsHelper(credMgr);
            Application rv   = hlpr.GetApplication(name);

            rv.Parent = cloud; // TODO not thrilled about this
            return(rv);
        }
예제 #2
0
        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();
        }
예제 #3
0
        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());
        }
예제 #4
0
 public Application GetApplication(string name)
 {
     checkLoginStatus();
     var hlpr = new AppsHelper(credMgr);
     Application rv =  hlpr.GetApplication(name);
     rv.Parent = cloud; // TODO not thrilled about this
     return rv;
 }