public static string GetInstanceCount(Application application) { var instanceCount = "0"; if (application.RunningInstances != null) { instanceCount = application.RunningInstances.ToString(); } return instanceCount; }
public void with_a_standard_default_application() { cloudActive = new VcapClient(TestAccountInformation.GoodUri.ToString()); cloudActive.Login( TestAccountInformation.Username, TestAccountInformation.Password); var currentDirectory = Directory.GetCurrentDirectory(); var pathToTestApp = new DirectoryInfo(currentDirectory + TestAccountInformation.TestAppToPush); cloudActive.Push(TestAccountInformation.TestApplicationName, TestAccountInformation.HttpIntegrationTestApiIronfoundryMe, 1, pathToTestApp, 64, null); testApplication = cloudActive.GetApplication(TestAccountInformation.TestApplicationName); }
public static FoundryApplication FoundryApplicationMap(FoundryTarget target, Application cloudApplication) { var foundryApplication = new FoundryApplication { Name = cloudApplication.Name, Target = target }; var rootUri = cloudApplication.Uris[0]; if (!string.IsNullOrWhiteSpace(rootUri)) { if (!rootUri.StartsWith("http://")) { rootUri = "http://" + rootUri; foundryApplication.Path = new Uri(rootUri); } } return foundryApplication; }
public void UpdateApplication(Application application) { VcapJsonRequest r = BuildVcapJsonRequest(Method.PUT, Constants.AppsResource, application.Name); r.AddBody(application); var response = r.Execute<VcapResponse>(); if (response != null && !string.IsNullOrEmpty(response.Description)) { throw new VcapException(response.Description); } }
public void Stop(Application application) { application.Stop(); UpdateApplication(application); }
public void Start(Application application) { application.Start(); UpdateApplication(application); if (!IsStarted(application.Name)) { throw new VcapException("Failed to start application."); } }
public void Restart(Application applicationName) { Stop(applicationName); Start(applicationName); }
public void UpdateApplication(Application app) { var helper = new AppsHelper(_proxyUser, _credMgr); helper.UpdateApplication(app); }
public void Stop(Application app) { var helper = new AppsHelper(_proxyUser, _credMgr); helper.Stop(app); }
public void Start(Application app) { var helper = new AppsHelper(proxyUser, credMgr); helper.Start(app); }
public IEnumerable<StatInfo> GetStats(Application app) { var info = new InfoHelper(_proxyUser, _credMgr); return info.GetStats(app); }
public string GetLogs(Application app, ushort instanceNumber) { var info = new InfoHelper(_proxyUser, _credMgr); return info.GetLogs(app, instanceNumber); }
public IEnumerable<ExternalInstance> GetInstances(Application app) { var info = new InfoHelper(_proxyUser, _credMgr); return info.GetInstances(app); }
public IEnumerable<Crash> GetAppCrash(Application app) { var helper = new AppsHelper(_proxyUser, _credMgr); return helper.GetAppCrash(app); }
public void Delete(Application app) { var helper = new AppsHelper(_proxyUser, _credMgr); helper.Delete(app); }
public void Delete(Application application) { VcapJsonRequest r = BuildVcapJsonRequest(Method.DELETE, Constants.AppsResource, application.Name); r.Execute(); }
public IEnumerable<Crash> GetAppCrash(Application app) { VcapRequest r = base.BuildVcapRequest(Constants.AppsResource, app.Name, "crashes"); return r.Execute<Crash[]>(); }
public void Restart(Application app) { var helper = new AppsHelper(_proxyUser, _credMgr); helper.Restart(app); }