diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bb912a3..6342f339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. - When creating a VSI Deployment, users can select a new toggle `Include Name Variables`. When this value is set to true, VSI names will be populated as variables in Terrafrom. This allows for users to have full control over VSI names without needing to directly modify Terraform scripts - Power VS Virtual Server and FalconStor VTL system types are now retrieved dynamically using the Power VS API based on the zone - Power Edge Router is now supported for `syd05` +- CRAIG now supports the Power VS region `osa21` - When updating a VPC's Public Gateways, invalid gateways will automatically be removed from subnets where they are enabled ### Fixes diff --git a/client/src/components/pages/projects/Wizard.js b/client/src/components/pages/projects/Wizard.js index 8f83328e..1e4ec25a 100644 --- a/client/src/components/pages/projects/Wizard.js +++ b/client/src/components/pages/projects/Wizard.js @@ -416,6 +416,7 @@ class Wizard extends React.Component { "jp-tok": ["tok04"], "br-sao": ["sao01", "sao04"], "ca-tor": ["tor01"], + "jp-osa": ["osa21"], }[this.state.region] } itemToString={(item) => (item ? item : "")} @@ -431,6 +432,7 @@ class Wizard extends React.Component { "br-sao", "jp-tok", "ca-tor", + "jp-osa", ], this.state.region ) || isEmpty(this.state.power_vs_zones) @@ -447,6 +449,7 @@ class Wizard extends React.Component { "br-sao", "jp-tok", "ca-tor", + "jp-osa", ], this.state.region ) diff --git a/client/src/lib/constants.js b/client/src/lib/constants.js index b782c80a..10a4252e 100644 --- a/client/src/lib/constants.js +++ b/client/src/lib/constants.js @@ -840,6 +840,7 @@ module.exports = { ], tor01: ["Tier3-Flash-2", "Tier3-Flash-1", "Tier1-Flash-2", "Tier1-Flash-1"], wdc07: ["Tier3-Flash-2", "Tier3-Flash-1", "Tier1-Flash-2", "Tier1-Flash-1"], + osa21: [], }, replicationEnabledStoragePoolMap: { "us-east": ["Tier1-Flash-8", "General-Flash-185", "General-Flash-182"], @@ -1121,5 +1122,6 @@ module.exports = { "sao01", "tor01", "wdc07", + "osa21", ].sort(azsort), }; diff --git a/client/src/lib/docs/release-notes.json b/client/src/lib/docs/release-notes.json index 458ad036..500b019c 100644 --- a/client/src/lib/docs/release-notes.json +++ b/client/src/lib/docs/release-notes.json @@ -8,6 +8,7 @@ "When creating a VSI Deployment, users can select a new toggle `Include Name Variables`. When this value is set to true, VSI names will be populated as variables in Terrafrom. This allows for users to have full control over VSI names without needing to directly modify Terraform scripts", "Power VS Virtual Server and FalconStor VTL system types are now retrieved dynamically using the Power VS API based on the zone", "Power Edge Router is now supported for `syd05`", + "CRAIG now supports the Power VS region `osa21`", "When updating a VPC's Public Gateways, invalid gateways will automatically be removed from subnets where they are enabled" ], "fixes": [ diff --git a/client/src/lib/json-to-iac/power-vs-volumes.js b/client/src/lib/json-to-iac/power-vs-volumes.js index d2f37542..840111c2 100644 --- a/client/src/lib/json-to-iac/power-vs-volumes.js +++ b/client/src/lib/json-to-iac/power-vs-volumes.js @@ -55,7 +55,7 @@ function formatPowerVsVolume(volume, config) { )}.volume_id}`; } } else { - data.pi_storage_pool = volume.pi_volume_pool?.replace( + data.pi_volume_pool = volume.pi_volume_pool?.replace( " (Replication Enabled)", "" ); diff --git a/client/src/lib/json-to-iac/provider.js b/client/src/lib/json-to-iac/provider.js index 6dd4f430..62522bf5 100644 --- a/client/src/lib/json-to-iac/provider.js +++ b/client/src/lib/json-to-iac/provider.js @@ -39,7 +39,16 @@ function ibmCloudProvider(config) { region: zone.match( new RegexButWithWords() .group((exp) => { - exp.literal("lon").or().literal("syd").or().literal("tok"); + exp + .literal("lon") + .or() + .literal("syd") + .or() + .literal("tok") + .or() + .literal("osa") + .or() + .literal("sao"); }) .digit() .oneOrMore() @@ -53,8 +62,6 @@ function ibmCloudProvider(config) { ? "us-south" : contains(["mad02", "mad04"], zone) ? "mad" - : contains(["sao01", "sao04"], zone) - ? "sao" : "${var.region}", zone: zone, ibmcloud_timeout: 60, diff --git a/client/src/lib/state/options.js b/client/src/lib/state/options.js index 610704f8..4c2ddd30 100644 --- a/client/src/lib/state/options.js +++ b/client/src/lib/state/options.js @@ -31,6 +31,7 @@ const powerVsZones = [ "br-sao", "jp-tok", "ca-tor", + "jp-osa", ]; const powerHaMap = { @@ -385,6 +386,7 @@ function initOptions(store) { "jp-tok": ["tok04"], "br-sao": ["sao01", "sao04"], "ca-tor": ["tor01"], + "jp-osa": ["osa21"], }[stateData.region]; }, }, diff --git a/express-controllers/power-api.js b/express-controllers/power-api.js index 88d58369..79e60901 100644 --- a/express-controllers/power-api.js +++ b/express-controllers/power-api.js @@ -19,6 +19,7 @@ function getRegionFromZone(zone) { ["tor", ["tor01"]], ["syd", ["syd04", "syd05"]], ["tok", ["tok04"]], + ["osa", ["osa21"]], ["sao", ["sao01", "sao04"]], ]); diff --git a/server.js b/server.js index b82f811a..91cf92a3 100644 --- a/server.js +++ b/server.js @@ -26,6 +26,7 @@ const defaultZones = [ "syd05", "tok04", "sao01", + "osa21", // "sao04", ]; diff --git a/unit-tests/json-to-iac/power-vs-volumes.test.js b/unit-tests/json-to-iac/power-vs-volumes.test.js index 3b8f5e1f..a827859d 100644 --- a/unit-tests/json-to-iac/power-vs-volumes.test.js +++ b/unit-tests/json-to-iac/power-vs-volumes.test.js @@ -399,7 +399,7 @@ resource "ibm_pi_volume" "oracle_template_volume_oracle_1_db_1" { pi_volume_name = "\${var.prefix}-oracle-template-oracle-1-db-1" pi_volume_shareable = true pi_replication_enabled = false - pi_storage_pool = "Tier1-Flash-4" + pi_volume_pool = "Tier1-Flash-4" pi_volume_type = null } `; diff --git a/unit-tests/json-to-iac/provider.test.js b/unit-tests/json-to-iac/provider.test.js index 0b92bd5c..a2d0cc3f 100644 --- a/unit-tests/json-to-iac/provider.test.js +++ b/unit-tests/json-to-iac/provider.test.js @@ -230,7 +230,7 @@ provider "ibm" { dynamic_subnets: true, enable_power_vs: true, craig_version: "1.6.0", - power_vs_zones: ["sao01"], + power_vs_zones: ["sao01", "sao04"], power_vs_high_availability: true, }, }); @@ -259,6 +259,14 @@ provider "ibm" { ibmcloud_timeout = 60 } +provider "ibm" { + alias = "power_vs_sao04" + ibmcloud_api_key = var.ibmcloud_api_key + region = "sao" + zone = "sao04" + ibmcloud_timeout = 60 +} + ############################################################################## `; assert.deepEqual(actualData, expectedData, "it should return correct data"); diff --git a/unit-tests/state/schema.test.js b/unit-tests/state/schema.test.js index 4da698d4..f2c1d18b 100644 --- a/unit-tests/state/schema.test.js +++ b/unit-tests/state/schema.test.js @@ -589,6 +589,7 @@ describe("automate schema generation", () => { "eu-de-2", "lon04", "lon06", + "osa21", "sao01", "syd04", "syd05", @@ -634,6 +635,7 @@ describe("automate schema generation", () => { "eu-de-2", "lon04", "lon06", + "osa21", "sao01", "syd04", "syd05", @@ -737,6 +739,7 @@ describe("automate schema generation", () => { "eu-de-2", "lon04", "lon06", + "osa21", "sao01", "syd04", "syd05", @@ -769,6 +772,7 @@ describe("automate schema generation", () => { "eu-de-2", "lon04", "lon06", + "osa21", "sao01", "syd04", "syd05",