Skip to content

Commit

Permalink
Merge pull request GoogleCloudPlatform#2390 from gemmahou/compute-mock
Browse files Browse the repository at this point in the history
fix: Update compute mocks
  • Loading branch information
google-oss-prow[bot] authored Aug 1, 2024
2 parents 24977c8 + 7b2de48 commit fd40b47
Show file tree
Hide file tree
Showing 86 changed files with 1,493 additions and 1,236 deletions.
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/disksv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (s *DisksV1) Insert(ctx context.Context, req *pb.InsertDiskRequest) (*pb.Op
id := s.generateID()

obj := proto.Clone(req.GetDiskResource()).(*pb.Disk)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#disk")
Expand Down
5 changes: 3 additions & 2 deletions mockgcp/mockcompute/globaladdress.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ func (s *GlobalAddressesV1) Insert(ctx context.Context, req *pb.InsertGlobalAddr
id := s.generateID()

obj := proto.Clone(req.GetAddressResource()).(*pb.Address)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#address")
obj.Address = PtrTo("8.8.8.8")
obj.LabelFingerprint = PtrTo("abcdef0123A=")

if err := s.storage.Create(ctx, fqn, obj); err != nil {
return nil, err
Expand Down Expand Up @@ -119,7 +120,7 @@ type globalAddressName struct {
}

func (n *globalAddressName) String() string {
return "projects/" + n.Project.ID + "/global" + "/networks/" + n.Name
return "projects/" + n.Project.ID + "/global" + "/addresses/" + n.Name
}

// parseGlobalAddressName parses a string into a globalAddressName.
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/globalbackendservicesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *GlobalBackendServicesV1) Insert(ctx context.Context, req *pb.InsertBack
id := s.generateID()

obj := proto.Clone(req.GetBackendServiceResource()).(*pb.BackendService)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#backendService")
Expand Down
3 changes: 2 additions & 1 deletion mockgcp/mockcompute/globalforwardingrulesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ func (s *GlobalForwardingRulesV1) Insert(ctx context.Context, req *pb.InsertGlob
id := s.generateID()

obj := proto.Clone(req.GetForwardingRuleResource()).(*pb.ForwardingRule)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#forwardingRule")
obj.LabelFingerprint = PtrTo("abcdef0123A=")

if err := s.storage.Create(ctx, fqn, obj); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/globalhealthcheckv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (s *GlobalHealthCheckV1) Insert(ctx context.Context, req *pb.InsertHealthCh
id := s.generateID()

obj := proto.Clone(req.GetHealthCheckResource()).(*pb.HealthCheck)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#healthCheck")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/globalsslcertificatesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (s *GlobalSSLCertificatesV1) Insert(ctx context.Context, req *pb.InsertSslC
id := s.generateID()

obj := proto.Clone(req.GetSslCertificateResource()).(*pb.SslCertificate)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#sslCertificate")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/globaltargethttpproxiesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *GlobalTargetHTTPProxiesV1) Insert(ctx context.Context, req *pb.InsertTa
id := s.generateID()

obj := proto.Clone(req.GetTargetHttpProxyResource()).(*pb.TargetHttpProxy)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#targetHttpProxy")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/globalurlmapsv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *GlobalURLMapsV1) Insert(ctx context.Context, req *pb.InsertUrlMapReques
id := s.generateID()

obj := proto.Clone(req.GetUrlMapResource()).(*pb.UrlMap)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#urlMap")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/imagesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (s *ImagesV1) Insert(ctx context.Context, req *pb.InsertImageRequest) (*pb.
id := s.generateID()

obj := proto.Clone(req.GetImageResource()).(*pb.Image)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#image")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/instancesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (s *InstancesV1) Insert(ctx context.Context, req *pb.InsertInstanceRequest)
id := s.generateID()

obj := proto.Clone(req.GetInstanceResource()).(*pb.Instance)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#instance")
Expand Down
4 changes: 2 additions & 2 deletions mockgcp/mockcompute/networksv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func (s *NetworksV1) Insert(ctx context.Context, req *pb.InsertNetworkRequest) (
obj := proto.Clone(req.GetNetworkResource()).(*pb.Network)
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/beta/" + name.String())
obj.SelfLinkWithId = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/beta/projects/%s/global/networks/%d", name.Project.ID, id))
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.SelfLinkWithId = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/v1/projects/%s/global/networks/%d", name.Project.ID, id))
obj.Kind = PtrTo("compute#network")

if err := s.storage.Create(ctx, fqn, obj); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/nodegroupsv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (s *NodeGroupsV1) Insert(ctx context.Context, req *pb.InsertNodeGroupReques
id := s.generateID()

obj := proto.Clone(req.GetNodeGroupResource()).(*pb.NodeGroup)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#nodegroup")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/nodetemplatesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (s *NodeTemplatesV1) Insert(ctx context.Context, req *pb.InsertNodeTemplate
id := s.generateID()

obj := proto.Clone(req.GetNodeTemplateResource()).(*pb.NodeTemplate)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#nodetemplate")
Expand Down
6 changes: 3 additions & 3 deletions mockgcp/mockcompute/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (s *computeOperations) newLRO(ctx context.Context, projectID string) (*pb.O
op.Name = PtrTo(name)
op.Kind = PtrTo("compute#operation")
fqn := s.globalOperationFQN(projectID, name)
op.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + fqn)
op.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + fqn)

op.Status = PtrTo(pb.Operation_DONE)

Expand Down Expand Up @@ -94,7 +94,7 @@ func (s *computeOperations) startLRO0(ctx context.Context, op *pb.Operation, fqn
op.Progress = PtrTo(int32(0))

op.Kind = PtrTo("compute#operation")
op.SelfLink = PtrTo("https://www.googleapis.com/compute/beta/" + fqn)
op.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + fqn)

op.Status = PtrTo(pb.Operation_RUNNING)

Expand Down Expand Up @@ -138,7 +138,7 @@ func (s *computeOperations) startRegionalLRO(ctx context.Context, projectID stri
fqn := s.regionalOperationFQN(projectID, region, name)

op.Name = PtrTo(name)
op.Region = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/beta/projects/%s/regions/%s", projectID, region))
op.Region = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/v1/projects/%s/regions/%s", projectID, region))
return s.startLRO0(ctx, op, fqn, callback)
}

Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/regionaladdress.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (s *RegionalAddressesV1) Insert(ctx context.Context, req *pb.InsertAddressR
id := s.generateID()

obj := proto.Clone(req.GetAddressResource()).(*pb.Address)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#address")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/regionalbackendservicev1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *RegionalBackendServicesV1) Insert(ctx context.Context, req *pb.InsertRe
id := s.generateID()

obj := proto.Clone(req.GetBackendServiceResource()).(*pb.BackendService)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#backendService")
Expand Down
3 changes: 2 additions & 1 deletion mockgcp/mockcompute/regionalforwardingrulev1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ func (s *RegionalForwardingRulesV1) Insert(ctx context.Context, req *pb.InsertFo
id := s.generateID()

obj := proto.Clone(req.GetForwardingRuleResource()).(*pb.ForwardingRule)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#forwardingRule")
obj.LabelFingerprint = PtrTo("abcdef0123A=")

if err := s.storage.Create(ctx, fqn, obj); err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/regionalhealthcheckv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (s *RegionalHealthCheckV1) Insert(ctx context.Context, req *pb.InsertRegion
id := s.generateID()

obj := proto.Clone(req.GetHealthCheckResource()).(*pb.HealthCheck)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#healthCheck")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/regionaltargethttpproxiesv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *RegionalTargetHTTPProxiesV1) Insert(ctx context.Context, req *pb.Insert
id := s.generateID()

obj := proto.Clone(req.GetTargetHttpProxyResource()).(*pb.TargetHttpProxy)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#targetHttpProxy")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/regionalurlmapsv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *RegionalURLMapsV1) Insert(ctx context.Context, req *pb.InsertRegionUrlM
id := s.generateID()

obj := proto.Clone(req.GetUrlMapResource()).(*pb.UrlMap)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#urlMap")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/regiondisksv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (s *RegionalDisksV1) Insert(ctx context.Context, req *pb.InsertRegionDiskRe
id := s.generateID()

obj := proto.Clone(req.GetDiskResource()).(*pb.Disk)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#disk")
Expand Down
6 changes: 3 additions & 3 deletions mockgcp/mockcompute/subnetsv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s *SubnetsV1) Insert(ctx context.Context, req *pb.InsertSubnetworkRequest)
id := s.generateID()

obj := proto.Clone(req.GetSubnetworkResource()).(*pb.Subnetwork)
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/beta/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#subnetwork")
Expand All @@ -78,15 +78,15 @@ func (s *SubnetsV1) Insert(ctx context.Context, req *pb.InsertSubnetworkRequest)
if obj.Purpose == nil {
obj.Purpose = PtrTo("PRIVATE")
}
obj.Region = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/beta/projects/%s/regions/%s", name.Project.ID, name.Region))
obj.Region = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/v1/projects/%s/regions/%s", name.Project.ID, name.Region))
if obj.StackType == nil {
obj.StackType = PtrTo("IPV4_ONLY")
}
networkName, err := s.parseNetworkName(obj.GetNetwork())
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "network %q is not valid", obj.GetNetwork())
}
obj.Network = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/beta/projects/%s/global/networks/%s", networkName.Project.ID, networkName.Name))
obj.Network = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/v1/projects/%s/global/networks/%s", networkName.Project.ID, networkName.Name))

obj.GatewayAddress = PtrTo("10.2.0.1")
// obj.AllowSubnetCidrRoutesOverlap = PtrTo(false)
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/targetvpngatewayv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *TargetVpnGatewaysV1) Insert(ctx context.Context, req *pb.InsertTargetVp
id := s.generateID()

obj := proto.Clone(req.GetTargetVpnGatewayResource()).(*pb.TargetVpnGateway)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#targetVpnGateway")
Expand Down
2 changes: 1 addition & 1 deletion mockgcp/mockcompute/vpngatewayv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *VPNGatewaysV1) Insert(ctx context.Context, req *pb.InsertVpnGatewayRequ
id := s.generateID()

obj := proto.Clone(req.GetVpnGatewayResource()).(*pb.VpnGateway)
obj.SelfLink = PtrTo("https://compute.googleapis.com/compute/v1/" + name.String())
obj.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + name.String())
obj.CreationTimestamp = PtrTo(s.nowString())
obj.Id = &id
obj.Kind = PtrTo("compute#vpnGateway")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager

Expand All @@ -19,13 +19,13 @@ X-Xss-Protection: 0
"id": "000000000000000000000",
"kind": "compute#network",
"name": "${networkID}",
"selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}",
"selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}"
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}",
"selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}"
}

---

PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?alt=json
PATCH https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager

Expand All @@ -51,17 +51,17 @@ X-Xss-Protection: 0
"name": "${operationID}",
"operationType": "compute.networks.patch",
"progress": 0,
"selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}",
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}",
"startTime": "2024-04-01T12:34:56.123456Z",
"status": "RUNNING",
"targetId": "${networkID}",
"targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}",
"targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}",
"user": "[email protected]"
}

---

GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager

Expand All @@ -82,13 +82,13 @@ X-Xss-Protection: 0
"id": "000000000000000000000",
"kind": "compute#network",
"name": "${networkID}",
"selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}",
"selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}"
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}",
"selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}"
}

---

PATCH https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?alt=json
PATCH https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager

Expand All @@ -114,17 +114,17 @@ X-Xss-Protection: 0
"name": "${operationID}",
"operationType": "compute.networks.patch",
"progress": 0,
"selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/operations/${operationID}",
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}",
"startTime": "2024-04-01T12:34:56.123456Z",
"status": "RUNNING",
"targetId": "${networkID}",
"targetLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}",
"targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}",
"user": "[email protected]"
}

---

GET https://compute.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}?alt=json
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/kcc/controller-manager

Expand All @@ -145,8 +145,8 @@ X-Xss-Protection: 0
"id": "000000000000000000000",
"kind": "compute#network",
"name": "${networkID}",
"selfLink": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}",
"selfLinkWithId": "https://www.googleapis.com/compute/beta/projects/${projectId}/global/networks/${networkID}"
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}",
"selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/networks/${networkID}"
}

---
Expand Down
Loading

0 comments on commit fd40b47

Please sign in to comment.