static bool TestStats(IList<string> unparsed) { string appname = unparsed[0]; IVcapClient vc = new VcapClient(); Application app = vc.GetApplication(appname); IEnumerable<StatInfo> result = vc.GetStats(app); Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented)); return true; }
static bool TestStats(IList <string> unparsed) { string appname = unparsed[0]; IVcapClient vc = new VcapClient(); Application app = vc.GetApplication(appname); IEnumerable <StatInfo> result = vc.GetStats(app); Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented)); return(true); }
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 ProviderResponse <Application> GetApplication(Application app, Cloud cloud) { var response = new ProviderResponse <Application>(); try { IVcapClient client = new VcapClient(cloud); response.Response = client.GetApplication(app.Name); var instancesResponse = this.GetInstances(cloud, app); if (instancesResponse.Response != null) { response.Response.InstanceCollection.Synchronize(new SafeObservableCollection <Instance>(instancesResponse.Response), new InstanceEqualityComparer()); } } catch (Exception ex) { response.Message = ex.Message; } return(response); }
public ProviderResponse<Application> GetApplication(Application app, Cloud cloud) { var response = new ProviderResponse<Application>(); try { IVcapClient client = new VcapClient(cloud); response.Response = client.GetApplication(app.Name); var instancesResponse = this.GetInstances(cloud, app); if (instancesResponse.Response != null) response.Response.InstanceCollection.Synchronize(new SafeObservableCollection<Instance>(instancesResponse.Response),new InstanceEqualityComparer()); } catch (Exception ex) { response.Message = ex.Message; } return response; }