Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/operator/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func init() {
}

const (
defaultPreemptibleShapes = "VM.Standard1,VM.Standard.B1,VM.Standard2,VM.Standard3.Flex,VM.Standard.E2,VM.Standard.E3.Flex,VM.Standard.E4.Flex,VM.Standard.E5.Flex,VM.Standard.E6.Flex,VM.Standard.A1.Flex,VM.DenseIO1,VM.DenseIO2,VM.GPU2,VM.GPU3,VM.Optimized3.Flex"
defaultPreemptibleShapes = "VM.Standard1,VM.Standard.B1,VM.Standard2,VM.Standard3.Flex,VM.Standard.E2,VM.Standard.E3.Flex,VM.Standard.E4.Flex,VM.Standard.E5.Flex,VM.Standard.E6.Flex,VM.Standard.A1.Flex,VM.Standard.A4.Flex,VM.DenseIO1,VM.DenseIO2,VM.GPU2,VM.GPU3,VM.Optimized3.Flex"
defaultPreemptibleExcludeShapes = "VM.Standard.E2.1.Micro"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/instancetype/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (
)

// https://docs.oracle.com/en-us/iaas/Content/Compute/References/arm.htm
var ArmShapes = []string{"BM.Standard.A1.160", "VM.Standard.A1.Flex", "VM.Standard.A2.Flex"}
var ArmShapes = []string{"BM.Standard.A1.160", "VM.Standard.A1.Flex", "VM.Standard.A2.Flex", "BM.Standard.A4.48", "VM.Standard.A4.Flex"}

// TaxBrackets implements a simple bracketed tax structure.
type TaxBrackets []struct {
Expand Down
18 changes: 15 additions & 3 deletions pkg/providers/pricing/calculator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func TestPrice(t *testing.T) {
var a2_CpuNum float32 = 1
var a2_Mem float32 = 6

a4 := "VM.Standard.A4.Flex"
var a4_CpuNum float32 = 1
var a4_Mem float32 = 6

standard3 := "VM.Standard3.Flex"
var standard3_CpuNum float32 = 1
var standard3_Mem float32 = 8
Expand Down Expand Up @@ -142,6 +146,14 @@ func TestPrice(t *testing.T) {
},
Price: 0.026,
},
{
Shape: &core.Shape{
Shape: &a4,
Ocpus: &a4_CpuNum,
MemoryInGBs: &a4_Mem,
},
Price: 0.030,
},
{
Shape: &core.Shape{
Shape: &standard3,
Expand All @@ -161,10 +173,10 @@ func TestPrice(t *testing.T) {
},
}

endpint := "https://apexapps.oracle.com/pls/apex/cetools/api/v1/products/"
//endpint := "http://localhost:8888/price.json"
endpoint := "https://apexapps.oracle.com/pls/apex/cetools/api/v1/products/"
//endpoint := "http://localhost:8888/price.json"

syncer := NewDefaultProvider(context.Background(), endpint)
syncer := NewDefaultProvider(context.Background(), endpoint)

time.Sleep(18 * time.Second)

Expand Down
34 changes: 34 additions & 0 deletions pkg/providers/pricing/default_price.go
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,40 @@ var defaultPrice = `
}
]
},
{
"partNumber": "B112145",
"displayName": "OCI - Compute - Standard - A4 - OCPU",
"metricName": "OCPU Per Hour",
"serviceCategory": "Compute - Virtual Machine",
"currencyCodeLocalizations": [
{
"currencyCode": "USD",
"prices": [
{
"model": "PAY_AS_YOU_GO",
"value": 0.0138
}
]
}
]
},
{
"partNumber": "B112146",
"displayName": "OCI - Compute - Standard - A4 - Memory",
"metricName": "Gigabyte Per Hour",
"serviceCategory": "Compute - Virtual Machine",
"currencyCodeLocalizations": [
{
"currencyCode": "USD",
"prices": [
{
"model": "PAY_AS_YOU_GO",
"value": 0.0027
}
]
}
]
},
{
"partNumber": "B109545",
"displayName": "Oracle Blockchain Platform Enterprise Edition for OCI",
Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/pricing/price_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func TestPriceListSyncer_Start(t *testing.T) {
"BM.GPU.A10.4",
"VM.GPU3.2",
"BM.Standard.A1.160",
"BM.Standard.A4.48",
"VM.Standard.B1.4",
"VM.Standard.B1.8",
"VM.GPU.A10.2",
Expand Down Expand Up @@ -106,6 +107,7 @@ func TestPriceListSyncer_Start(t *testing.T) {
{"BM.GPU.A10.4", true},
{"VM.GPU3.2", true},
{"BM.Standard.A1.,160", true},
{"BM.Standard.A4.,48", true},
{"VM.Standard.B1.4", true},
{"VM.Standard.B1.8", true},
{"VM.GPU.A10.2", true},
Expand Down
2 changes: 1 addition & 1 deletion test/suites/nodeclaim/nodeclaim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var _ = Describe("StandaloneNodeClaim", func() {
NodeSelectorRequirement: corev1.NodeSelectorRequirement{
Key: v1alpha1.LabelInstanceShapeName,
Operator: corev1.NodeSelectorOpNotIn,
Values: []string{"BM.Standard.A1.160", "VM.Standard.A1.Flex", "VM.Standard.A2.Flex"},
Values: []string{"BM.Standard.A1.160", "VM.Standard.A1.Flex", "VM.Standard.A2.Flex", "BM.Standard.A4.48", "VM.Standard.A4.Flex"},
},
},
},
Expand Down
Loading