Skip to content

Commit 4b853a5

Browse files
author
lovelace-coder-bot
committed
Fix ComputeDisk identity resolution and regenerate golden files
- Passed &ComputeDisk{} to refs.Register() to register ComputeDisk type in kccscheme. - Generated deepcopy methods for ComputeDiskResourcePolicyAttachmentRef. - Updated outdated zone/region fields in ComputeDisk test fixture dependencies to canonical location fields. - Regenerated golden identities YAML files for CAIS.
1 parent ef633f3 commit 4b853a5

20 files changed

Lines changed: 39 additions & 23 deletions

File tree

apis/compute/v1alpha1/zz_generated.deepcopy.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/compute/v1beta1/computedisk_reference.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type ComputeDiskRef struct {
4343
}
4444

4545
func init() {
46-
refs.Register(&ComputeDiskRef{})
46+
refs.Register(&ComputeDiskRef{}, &ComputeDisk{})
4747
}
4848

4949
func (r *ComputeDiskRef) GetGVK() schema.GroupVersionKind {

pkg/test/resourcefixture/testdata/basic/compute/v1alpha1/computediskresourcepolicyattachment/diskresourcepolicyattachmentautogen/dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ spec:
4040
resourceID: computedisk${uniqueId}
4141
size: 50
4242
type: pd-ssd
43-
zone: us-central1-a
43+
location: us-central1-a

pkg/test/resourcefixture/testdata/basic/compute/v1alpha1/computeregiondiskresourcepolicyattachment/regiondiskresourcepolicyattachmentautogen/_identities.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
name: computeresourcepolicy-${uniqueId}
77
namespace: ${uniqueId}
88
version: v1beta1
9-
- caisURL: unknown
9+
- caisURL: //compute.googleapis.com/projects/${projectId}/zones/us-central1-a/disks/computedisk${uniqueId}
1010
group: compute.cnrm.cloud.google.com
1111
kind: ComputeDisk
1212
name: computedisk-${uniqueId}
@@ -18,7 +18,7 @@
1818
name: computesnapshot-${uniqueId}
1919
namespace: ${uniqueId}
2020
version: v1beta1
21-
- caisURL: unknown
21+
- caisURL: //compute.googleapis.com/projects/${projectId}/regions/us-central1/disks/computedisk${uniqueId}
2222
group: compute.cnrm.cloud.google.com
2323
kind: ComputeDisk
2424
name: computedisk-${uniqueId}

pkg/test/resourcefixture/testdata/basic/compute/v1alpha1/computeregiondiskresourcepolicyattachment/regiondiskresourcepolicyattachmentautogen/dependencies.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
resourceID: computedisk${uniqueId}
4141
size: 50
4242
type: pd-ssd
43-
zone: us-central1-a
43+
location: us-central1-a
4444
---
4545
apiVersion: compute.cnrm.cloud.google.com/v1beta1
4646
kind: ComputeSnapshot
@@ -63,7 +63,7 @@ metadata:
6363
spec:
6464
projectRef:
6565
external: ${projectId}
66-
region: us-central1
66+
location: us-central1
6767
replicaZones:
6868
- us-central1-a
6969
- us-central1-f

pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/computediskfromsourcedisk/_identities.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
- caisURL: unknown
1+
- caisURL: //compute.googleapis.com/projects/${projectId}/zones/us-central1-a/disks/computedisk-2-${uniqueId}
22
group: compute.cnrm.cloud.google.com
33
kind: ComputeDisk
44
name: computedisk-2-${uniqueId}
55
namespace: ${uniqueId}
66
version: v1beta1
7-
- caisURL: unknown
7+
- caisURL: //compute.googleapis.com/projects/${projectId}/zones/us-central1-a/disks/computedisk-1-${uniqueId}
88
group: compute.cnrm.cloud.google.com
99
kind: ComputeDisk
1010
name: computedisk-1-${uniqueId}

pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/regionalcomputedisk/_identities.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- caisURL: unknown
1+
- caisURL: //compute.googleapis.com/projects/${projectId}/regions/us-central1/disks/computedisk-${uniqueId}
22
group: compute.cnrm.cloud.google.com
33
kind: ComputeDisk
44
name: computedisk-${uniqueId}

pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computedisk/zonalcomputedisk/_identities.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- caisURL: unknown
1+
- caisURL: //compute.googleapis.com/projects/${projectId}/zones/us-central1-a/disks/computedisk-${uniqueId}
22
group: compute.cnrm.cloud.google.com
33
kind: ComputeDisk
44
name: computedisk-${uniqueId}

pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeimage/computeimage-direct/_identities.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- caisURL: unknown
1+
- caisURL: //compute.googleapis.com/projects/${projectId}/zones/us-central1-a/disks/computedisk-${uniqueId}
22
group: compute.cnrm.cloud.google.com
33
kind: ComputeDisk
44
name: computedisk-${uniqueId}

pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeimage/computeimage/_identities.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- caisURL: unknown
1+
- caisURL: //compute.googleapis.com/projects/${projectId}/zones/us-central1-a/disks/computedisk-${uniqueId}
22
group: compute.cnrm.cloud.google.com
33
kind: ComputeDisk
44
name: computedisk-${uniqueId}

0 commit comments

Comments
 (0)