Skip to content

Commit

Permalink
move everything to setup.go, delete redundant clinet methods, add cr.…
Browse files Browse the repository at this point in the history
…Status.AtProvider.LastProvisioningParameters
  • Loading branch information
Kirill Sushkov (teeverr) committed Sep 28, 2023
1 parent b107c01 commit 01ef21e
Show file tree
Hide file tree
Showing 8 changed files with 285 additions and 332 deletions.
4 changes: 4 additions & 0 deletions apis/servicecatalog/generator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ resources:
from:
operation: DescribeProvisionedProduct
path: ProvisionedProductDetail.ProvisioningArtifactId
LastProvisioningParameters:
is_read_only: true
custom_field:
list_of: ProvisioningParameter
LaunchRoleArn:
is_read_only: true
from:
Expand Down
11 changes: 11 additions & 0 deletions apis/servicecatalog/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apis/servicecatalog/v1alpha1/zz_provisioned_product.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,15 @@ spec:
description: The identifier of the provisioning artifact. For
example, pa-4abcdjnxjj6ne.
type: string
lastProvisioningParameters:
items:
properties:
key:
type: string
value:
type: string
type: object
type: array
lastProvisioningRecordID:
description: "The record identifier of the last request performed
on this provisioned product of the following types: \n * ProvisionedProduct
Expand Down
14 changes: 0 additions & 14 deletions pkg/clients/servicecatalog/servicecatalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (

cfsdkv2 "github.com/aws/aws-sdk-go-v2/service/cloudformation"
cfsdkv2types "github.com/aws/aws-sdk-go-v2/service/cloudformation/types"
"github.com/aws/aws-sdk-go/aws/request"
svcsdk "github.com/aws/aws-sdk-go/service/servicecatalog"
svcsdkapi "github.com/aws/aws-sdk-go/service/servicecatalog/servicecatalogiface"
)
Expand All @@ -38,8 +37,6 @@ type Client interface {
GetProvisionedProductOutputs(*svcsdk.GetProvisionedProductOutputsInput) (*svcsdk.GetProvisionedProductOutputsOutput, error)
DescribeRecord(*svcsdk.DescribeRecordInput) (*svcsdk.DescribeRecordOutput, error)
DescribeProduct(*svcsdk.DescribeProductInput) (*svcsdk.DescribeProductOutput, error)
DescribeProvisioningArtifact(*svcsdk.DescribeProvisioningArtifactInput) (*svcsdk.DescribeProvisioningArtifactOutput, error)
UpdateProvisionedProductWithContext(context.Context, *svcsdk.UpdateProvisionedProductInput, ...request.Option) (*svcsdk.UpdateProvisionedProductOutput, error)
}

// CustomServiceCatalogClient is the implementation of a Client
Expand Down Expand Up @@ -79,17 +76,6 @@ func (c *CustomServiceCatalogClient) DescribeRecord(describeRecordInput *svcsdk.
return describeRecordOutput, err
}

// DescribeProvisioningArtifact is wrapped (*ServiceCatalog) DescribeProvisioningArtifact from github.com/aws/aws-sdk-go/service/servicecatalog
func (c *CustomServiceCatalogClient) DescribeProvisioningArtifact(input *svcsdk.DescribeProvisioningArtifactInput) (*svcsdk.DescribeProvisioningArtifactOutput, error) {
output, err := c.Client.DescribeProvisioningArtifact(input)
return output, err
}

// UpdateProvisionedProductWithContext is wrapped (*ServiceCatalog) UpdateProvisionedProductWithContext from github.com/aws/aws-sdk-go/service/servicecatalog
func (c *CustomServiceCatalogClient) UpdateProvisionedProductWithContext(ctx context.Context, in *svcsdk.UpdateProvisionedProductInput, opts ...request.Option) (*svcsdk.UpdateProvisionedProductOutput, error) {
return c.Client.UpdateProvisionedProductWithContext(ctx, in, opts...)
}

// DescribeProduct is wrapped (*ServiceCatalog) DescribeProduct from github.com/aws/aws-sdk-go/service/servicecatalog
func (c *CustomServiceCatalogClient) DescribeProduct(input *svcsdk.DescribeProductInput) (*svcsdk.DescribeProductOutput, error) {
return c.Client.DescribeProduct(input)
Expand Down
179 changes: 0 additions & 179 deletions pkg/controller/servicecatalog/provisionedproduct/lifecycle.go

This file was deleted.

Loading

0 comments on commit 01ef21e

Please sign in to comment.