amazon-pricing 0.1.68 → 0.1.69

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWIyZjg3NWM2MzQ2OTE1MmM0ZGI2YzYzNTg5ZmI1OWZmODE4NTZkNw==
4
+ ZjM4OTQ2NjUzYzQ4N2RhN2I1YTk0Y2JmN2M2NDFhMWI0YzJjM2Y3MQ==
5
5
  data.tar.gz: !binary |-
6
- NjAzM2YyM2VkY2RiODU3MDgxZTk1MTJmMDBiMjZiMTA2ZDEzZWE2NQ==
6
+ Yzc3MWZhZTU5NTAxYTVmNWM3MjMwYjQ5ODlhNGEzNmYxN2RhZGMyNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjY3YTQ1YTMzNTIwY2FiZWYxMTkzM2VlMDc4MzFjMjczYTQ4ZmQ4MWRiMjIy
10
- MGViMGY1NTFhNWM0Y2E4NWZiYjQzZGI5N2MyMzlkYzRjMTk1NjM0ZjNhNzll
11
- ZjZhMTUyMzNlMTVhZjkyYjM5MmQ4Y2UyNDRkNGRhNDc2YmZiZjI=
9
+ MmI2ZTY2NWJhZGIzNDI4Yjg4YWVhYWZjNDI4MWI2Mzc0ZWNmN2UxMWE0ZGZm
10
+ NjA2OWI0Njk5ZDAwMDAyZTRlMjBlMjZjZDc1ODBlYzlhNWUyMTcxNWEzOTQx
11
+ YjVmNmVlODI0MzllY2I1YTA3YjlmYmQ4MTBhZTNlZGQ0Njk2OTQ=
12
12
  data.tar.gz: !binary |-
13
- MmYxNjdlMjIzN2Q3YTY0YzgyYjI4MjUxNGVmOTlmODRkOGRkM2ZkMjM3NzMx
14
- MDI4YmUwNjI0YjUwY2Q2OTczOWFjN2YzMDNhZGFlY2JjOThmOTg0MGEwNGUz
15
- ZmFlOTQ3OThiMmM1ZGIxYzY5YzRhMjE2MzcxMmVmYzZiNjdmNTQ=
13
+ ODdkMjI1MmVlY2JkM2Y3YWEyZWM5ZTRlM2ZjODJjNzllYjI3M2QxZDFlM2Ew
14
+ NDAwNDlhNzg0ODY5MmFlZTU3MDc4MmIxNWYzMTA1MzNlNWM1MGE1Yjc1OTQ4
15
+ OGU0NmU1Y2YzNmZkMTA1ZWNkZDU5YmJjYjI5YzY0YjNiYzNkZTM=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- amazon-pricing (0.1.68)
4
+ amazon-pricing (0.1.69)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -36,8 +36,8 @@ module AwsPricing
36
36
  'sqlserver_ee_multiaz' => 'Microsoft SQL Server Enterprise Edition (Multi-AZ)',
37
37
  'sqlserver_ee_byol' => 'Microsoft SQL Server Enterprise Edition (BYOL)',
38
38
  'sqlserver_ee_byol_multiaz' => 'Microsoft SQL Server Enterprise Edition (BYOL Multi-AZ)',
39
- 'aurora_multiaz' => 'Amazon Aurora (Multi-AZ)',
40
- 'mariadb_standard' => 'MariaDB Standard',
39
+ 'aurora_standard' => 'Amazon Aurora',
40
+ 'mariadb_standard' => 'MariaDB',
41
41
  'mariadb_multiaz' => 'MariaDB (Multi-AZ)',
42
42
  }
43
43
 
@@ -68,6 +68,9 @@ module AwsPricing
68
68
  'sqlserver-se(li)' => 'sqlserver_se_standard',
69
69
  'sqlserver-se(li)_multiaz' => 'sqlserver_se_multiaz',
70
70
  'sqlserver-web(li)' => 'sqlserver_web',
71
+ 'aurora' => 'aurora_standard',
72
+ 'mariadb' => 'mariadb_standard',
73
+ 'mariadb_multiaz' => 'mariadb_multiaz',
71
74
  }
72
75
 
73
76
  @@DB_Deploy_Types = {
@@ -78,7 +81,7 @@ module AwsPricing
78
81
  :oracle_ee => [:byol, :byol_multiaz],
79
82
  :sqlserver_se => [:standard, :multiaz, :byol, :byol_multiaz],
80
83
  :sqlserver_ee => [:byol, :byol_multiaz, :standard, :multiaz],
81
- :aurora => [:multiaz],
84
+ :aurora => [:standard],
82
85
  :mariadb => [:standard, :multiaz],
83
86
  }
84
87
 
@@ -80,7 +80,9 @@ module AwsPricing
80
80
  #
81
81
  # to find out the byol type
82
82
  is_byol = is_byol? dp_type
83
- is_multi_az = dp_type.upcase.include?("MULTIAZ")
83
+ # We believe Amazon made a mistake by hosting aurora's prices on a url that follows the multi-az pattern.
84
+ # Therefore we'll construct the URL as multi-az, but still treat the prices as for single-az.
85
+ is_multi_az = dp_type.upcase.include?("MULTIAZ") && db != :aurora
84
86
  dp_type = dp_type.gsub('-multiAZ', '') if db == :sqlserver
85
87
 
86
88
  if [:mysql, :postgresql, :oracle, :aurora, :mariadb].include? db
@@ -114,7 +116,9 @@ module AwsPricing
114
116
  @@RESERVED_DB_DEPLOY_TYPE2[db_name].each do |db, deploy_types|
115
117
  deploy_types.each do |deploy_type|
116
118
  is_byol = is_byol? deploy_type
117
- is_multi_az = deploy_type.upcase.include?("MULTIAZ")
119
+ # We believe Amazon made a mistake by hosting aurora's prices on a url that follows the multi-az pattern.
120
+ # Therefore we'll construct the URL as multi-az, but still treat the prices as for single-az.
121
+ is_multi_az = deploy_type.upcase.include?("MULTIAZ") && db != :aurora
118
122
  db_str = db == :sqlserver_se ? 'sql-server-se' : db.to_s.gsub(/_/, '-')
119
123
  dbs_with_same_pricing = @@RESERVED_DB_WITH_SAME_PRICING2[db]
120
124
  fetch_reserved_rds_instance_pricing2(RDS_BASE_URL+"reserved-instances/#{db_str}-#{deploy_type}.min.js", dbs_with_same_pricing, is_multi_az, is_byol)
@@ -8,5 +8,5 @@
8
8
  # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
- VERSION = '0.1.68'
11
+ VERSION = '0.1.69'
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon-pricing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.68
4
+ version: 0.1.69
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Kinsella