Skip to content

Commit f54faaa

Browse files
ishaanmarwahIshaan Marwah
andauthored
Elastic SAN extra changes (#145)
* elastic san extra changes * updates in deck --------- Co-authored-by: Ishaan Marwah <[email protected]>
1 parent b7be691 commit f54faaa

File tree

7 files changed

+739
-691
lines changed

7 files changed

+739
-691
lines changed

src/AVS_Migration.pbit

9.81 KB
Binary file not shown.

src/Assessment/Parser/AVSAssessmentParser.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,43 @@ private void UpdateAVSPropertiesDataset(AVSAssessmentPropertiesJSON avsPropertie
292292
totalMonthlyCost += totalMonthlyCostDetail ?? 0.00;
293293
}
294294
}
295+
var costComponentsWithTotalMonthlyAvsNodeCost = new List<CostComponent>(avsSummariesObj?.Values[0]?.Properties?.CostComponents?.FindAll(x => x.CostDetail.Exists(y => y.Name == "MonthlyAvsNodeCost")) ?? new List<CostComponent>());
296+
// in each of the cost components, get the cost detail with name "TotalMonthlyCost" and get its value and add them up
297+
double? totalMonthlyAvsNodeCost = 0.00;
298+
foreach (var costComponent in costComponentsWithTotalMonthlyAvsNodeCost)
299+
{
300+
var totalMonthlyCostDetail = costComponent.CostDetail?.Find(x => x.Name == "MonthlyAvsNodeCost")?.Value;
301+
if (totalMonthlyCostDetail != null)
302+
{
303+
totalMonthlyAvsNodeCost += totalMonthlyCostDetail ?? 0.00;
304+
}
305+
}
306+
var costComponentsWithTotalMonthlyExternalStorageCost = new List<CostComponent>(avsSummariesObj?.Values[0]?.Properties?.CostComponents?.FindAll(x => x.CostDetail.Exists(y => y.Name == "MonthlyAvsExternalStorageCost")) ?? new List<CostComponent>());
307+
// in each of the cost components, get the cost detail with name "TotalMonthlyCost" and get its value and add them up
308+
double? totalMonthlyExternalStorageCost = 0.00;
309+
foreach (var costComponent in costComponentsWithTotalMonthlyExternalStorageCost)
310+
{
311+
var totalMonthlyCostDetail = costComponent.CostDetail?.Find(x => x.Name == "MonthlyAvsExternalStorageCost")?.Value;
312+
if (totalMonthlyCostDetail != null)
313+
{
314+
totalMonthlyExternalStorageCost += totalMonthlyCostDetail ?? 0.00;
315+
}
316+
}
317+
var costComponentsWithTotalMonthlyExternalNetworkCost = new List<CostComponent>(avsSummariesObj?.Values[0]?.Properties?.CostComponents?.FindAll(x => x.CostDetail.Exists(y => y.Name == "MonthlyAvsNetworkCost")) ?? new List<CostComponent>());
318+
// in each of the cost components, get the cost detail with name "TotalMonthlyCost" and get its value and add them up
319+
double? totalMonthlyExternalNetworkCost = 0.00;
320+
foreach (var costComponent in costComponentsWithTotalMonthlyExternalNetworkCost)
321+
{
322+
var totalMonthlyCostDetail = costComponent.CostDetail?.Find(x => x.Name == "MonthlyAvsNetworkCost")?.Value;
323+
if (totalMonthlyCostDetail != null)
324+
{
325+
totalMonthlyExternalNetworkCost += totalMonthlyCostDetail ?? 0.00;
326+
}
327+
}
295328
AVSAssessmentsData[assessmentInfo].TotalMonthlyCostEstimate = totalMonthlyCost ?? 0.00;
329+
AVSAssessmentsData[assessmentInfo].TotalExternalStorageCost = totalMonthlyExternalStorageCost ?? 0.00;
330+
AVSAssessmentsData[assessmentInfo].TotalNodeCost = totalMonthlyAvsNodeCost ?? 0.00;
331+
AVSAssessmentsData[assessmentInfo].TotalExternalNetworkCost = totalMonthlyExternalNetworkCost ?? 0.00;
296332
AVSAssessmentsData[assessmentInfo].PredictedCpuUtilizationPercentage = avsSummariesObj?.Values[0]?.Properties?.CpuUtilization ?? 0.00;
297333
AVSAssessmentsData[assessmentInfo].PredictedMemoryUtilizationPercentage = avsSummariesObj?.Values[0]?.Properties?.RamUtilization ?? 0.00;
298334
AVSAssessmentsData[assessmentInfo].PredictedStorageUtilizationPercentage = avsSummariesObj?.Values[0]?.Properties?.StorageUtilization ?? 0.00;

src/Assessment/Processor/ProcessDatasets.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,9 @@ private bool Create_AVS_Summary_Model(List<AVS_Summary> AVS_Summary_List)
438438
obj.RecommendedFttRaidLevels = avsAssessmentData.Value.RecommendedFttRaidLevels;
439439
obj.RecommendedExternalStorage = avsAssessmentData.Value.RecommendedExternalStorage;
440440
obj.MonthlyTotalCostEstimate = avsAssessmentData.Value.TotalMonthlyCostEstimate;
441+
obj.MonthlyAvsExternalStorageCost = avsAssessmentData.Value.TotalExternalStorageCost;
442+
obj.MonthlyAvsNodeCost = avsAssessmentData.Value.TotalNodeCost;
443+
obj.MonthlyAvsExternalNetworkCost = avsAssessmentData.Value.TotalExternalNetworkCost;
441444
obj.PredictedCpuUtilizationPercentage = avsAssessmentData.Value.PredictedCpuUtilizationPercentage;
442445
obj.PredictedMemoryUtilizationPercentage = avsAssessmentData.Value.PredictedMemoryUtilizationPercentage;
443446
obj.PredictedStorageUtilizationPercentage = avsAssessmentData.Value.PredictedStorageUtilizationPercentage;

0 commit comments

Comments
 (0)