public MachineWorkloadStatsTuple(string dc, IonosMachine machine, Workload workload, List <Meeting> stats) { DataCenter = dc; Machine = machine; Workload = workload; Stats = stats; }
public async Task <IonosMachine> GetMachineDetails(string machineId, string dataCenterId) { if (string.IsNullOrEmpty(machineId)) { throw new ArgumentException(MESSAGE, nameof(machineId)); } if (string.IsNullOrEmpty(dataCenterId)) { throw new ArgumentException(MESSAGE, nameof(dataCenterId)); } HttpClient client = SetupHttpClient(); Uri uri = new Uri(string.Format(CultureInfo.InvariantCulture, MACHINE_GET_URL + "?depth=2", dataCenterId, machineId)); try { var result = await client.GetAsync(uri).ConfigureAwait(false); if ((int)result.StatusCode == 429) { result = await RetryGetAsync(client, uri).ConfigureAwait(false); } string json = await result.Content.ReadAsStringAsync().ConfigureAwait(false); IonosMachine machine = JsonConvert.DeserializeObject <IonosMachine>(json); return(machine); } catch (Exception e) { log.LogError(e, "Uri: {0}", uri); throw; } }
public MachineWorkloadStatsTuple(IonosMachine machine, Workload workload, List <Meeting> stats) { Machine = machine; Workload = workload; Stats = stats; }
public WorkloadMachineTuple(IonosMachine m, Workload w) { Machine = m; Workload = w; }
public WorkloadMachineTuple(string dc, IonosMachine m, Workload w) { DataCenter = dc; Machine = m; Workload = w; }
public MachineDataCenterTuple(string dc, IonosMachine m) { DataCenter = dc; Machine = m; }