Skip to content

Commit

Permalink
handle gbps case for network perfomance in db types
Browse files Browse the repository at this point in the history
  • Loading branch information
nasark committed Oct 28, 2024
1 parent 63f4003 commit a3bb6a7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/tasks_private/database_types.rake
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ namespace 'aws:extract' do
end

results = instances.map do |instance|
network_performance = if instance["networkPerformance"].nil?
nil
elsif instance["networkPerformance"].match?(/(\d+ Gigabit)/)
:very_high
else
instance["networkPerformance"].downcase.tr(' ', '_').to_sym
end
network_performance = instance["networkPerformance"]

network_performance = network_performance.match?(/(\d+ [Gg]igabit)|(\d+ Gbps)|(\d+ Mbps)/) ? :very_high : network_performance.downcase.tr(' ', '_').to_sym if network_performance

result = {
:name => instance["instanceType"],
Expand Down

0 comments on commit a3bb6a7

Please sign in to comment.