Skip to content

Commit

Permalink
fix: pgw (#1775)
Browse files Browse the repository at this point in the history
* fix: pgw

* prune

* prune

* fix: rg

* fix: rg invalid

* prettier

* prune

* prune

* prune

* prune

* mv: vpc acls test

* prune

* prune

* prune

* prune

* prune

* prune

* prune

* prune

* prune

* prune

* prune
  • Loading branch information
jvallexm authored and GitHub Enterprise committed Mar 29, 2024
1 parent 4cbcf5b commit 36a6db2
Show file tree
Hide file tree
Showing 24 changed files with 2,601 additions and 5,168 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ 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`
- When updating a VPC's Public Gateways, invalid gateways will automatically be removed from subnets where they are enabled

### Fixes

- Fixed an issue causing Power VS API endpoints for Sao Palo availability zones to fail
- Fixed an issue causing VPC subnets to incorrectly have `public_gateway` set to true when no public gateway is created in the corresponding zone
- Fixed an issue causing the Resource Group field for Key Management services to not be rendered when using a resource from data

## 1.13.1

Expand Down
6 changes: 4 additions & 2 deletions client/src/lib/docs/release-notes.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
"Users can now provision VPC VSI deployments using an existing volume snapshot by using the `Create VSI From Snapshot` toggle. A list of snapshots will be dynamically retrieved using the IBM Cloud API based on the region selected in your project",
"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`"
"Power Edge Router is now supported for `syd05`",
"When updating a VPC's Public Gateways, invalid gateways will automatically be removed from subnets where they are enabled"
],
"fixes": [
"Fixed an issue causing Power VS API endpoints for Sao Palo availability zones to fail",
"Fixed an issue causing VPC subnets to incorrectly have `public_gateway` set to true when no public gateway is created in the corresponding zone"
"Fixed an issue causing VPC subnets to incorrectly have `public_gateway` set to true when no public gateway is created in the corresponding zone",
"Fixed an issue causing the Resource Group field for Key Management services to not be rendered when using a resource from data"
],
"upgrade_notes": []
},
Expand Down
4 changes: 3 additions & 1 deletion client/src/lib/state/key-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ function initKeyManagement(store) {
},
},
name: nameField("key_management"),
resource_group: resourceGroupsField(),
resource_group: resourceGroupsField(false, {
noHideWhen: true,
}),
authorize_vpc_reader_role: {
type: "toggle",
default: true,
Expand Down
6 changes: 4 additions & 2 deletions client/src/lib/state/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,15 +429,17 @@ function isIpStringInvalid(value) {
function resourceGroupsField(small, options) {
return {
default: "",
invalid: options?.invalid
invalid: options?.noHideWhen
? fieldIsNullOrEmptyString("resource_group", true)
: options?.invalid
? options.invalid
: fieldIsNullOrEmptyString("resource_group"),
invalidText: selectInvalidText("resource group"),
type: "select",
groups: function (stateData, componentProps) {
return splat(componentProps.craig.store.json.resource_groups, "name");
},
hideWhen: hideWhenUseData,
hideWhen: options?.noHideWhen ? undefined : hideWhenUseData,
size: small ? "small" : undefined,
labelText: options?.labelText || undefined,
};
Expand Down
4 changes: 4 additions & 0 deletions client/src/lib/state/vpc/vpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ function vpcOnStoreUpdate(config) {
) {
subnet.network_acl = null;
}

if (!contains(network.publicGateways || [], subnet.zone)) {
subnet.public_gateway = false;
}
});
network.acls.forEach((acl) => {
if (isNullOrEmptyString(acl.use_data, true)) {
Expand Down
5 changes: 4 additions & 1 deletion unit-tests/forms/disable-save.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@ describe("disableSave", () => {
it("should not force a vpn gateway form open when a connection has a valid peer address", () => {
assert.isFalse(
forceShowForm(
{},
{
resource_group: "yes",
},
{
submissionFieldName: "vpn_gateways",
innerFormProps: {
data: {
name: "vpn-gw",
resource_group: "frog",
connections: [
{
name: "hi",
Expand Down
1 change: 1 addition & 0 deletions unit-tests/forms/disable-save/power.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ describe("power", () => {
],
imageNames: ["7200-05-05"],
zone: "dal12",
resource_group: "hello",
},
{
arrayParentName: "workspace",
Expand Down
Loading

0 comments on commit 36a6db2

Please sign in to comment.