|
|
@@ -735,6 +735,10 @@ func (gcp *GCP) parsePage(r io.Reader, inputKeys map[string]models.Key, pvKeys m
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (instanceType == "ram" || instanceType == "cpu") && strings.Contains(strings.ToUpper(product.Description), "N4 INSTANCE") {
|
|
|
+ instanceType = "n4standard"
|
|
|
+ }
|
|
|
+
|
|
|
if (instanceType == "ram" || instanceType == "cpu") && strings.Contains(strings.ToUpper(product.Description), "A2 INSTANCE") {
|
|
|
instanceType = "a2"
|
|
|
}
|
|
|
@@ -1501,6 +1505,8 @@ func parseGCPInstanceTypeLabel(it string) string {
|
|
|
instanceType = "n1standard" // These are priced the same. TODO: support n1ultrahighmem
|
|
|
} else if instanceType == "n2highmem" || instanceType == "n2highcpu" {
|
|
|
instanceType = "n2standard"
|
|
|
+ } else if instanceType == "n4highmem" || instanceType == "n4highcpu" {
|
|
|
+ instanceType = "n4standard" // N4 variants are priced the same per vCPU and RAM
|
|
|
} else if instanceType == "e2highmem" || instanceType == "e2highcpu" {
|
|
|
instanceType = "e2standard"
|
|
|
} else if instanceType == "n2dhighmem" || instanceType == "n2dhighcpu" {
|
|
|
@@ -1642,7 +1648,7 @@ func sustainedUseDiscount(class string, defaultDiscount float64, isPreemptible b
|
|
|
}
|
|
|
discount := defaultDiscount
|
|
|
switch class {
|
|
|
- case "e2", "f1", "g1":
|
|
|
+ case "e2", "f1", "g1", "n4":
|
|
|
discount = 0.0
|
|
|
case "n2", "n2d":
|
|
|
discount = 0.2
|