Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot Resource changes for Ack #14

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2022-04-06T19:12:56Z"
build_date: "2022-04-06T21:44:24Z"
build_hash: fc5620cf5fde243ee5124324d26bb7e952049bf2
go_version: go1.17.6
version: v0.18.3
api_directory_checksum: c2f6d6769a7f620358ba97b8b9c3ef8c80934448
version: v0.18.3-dirty
api_directory_checksum: f7e376daef64d0c299eb1338df3bd097290b334a
api_version: v1alpha1
aws_sdk_go_version: v1.42.29
generator_config_info:
file_checksum: 2a0a05a38b0ccfb3d749097e815c4533ba9ec868
file_checksum: 7ce497a1a103652e30a5d7c843463da1c834fd3d
original_file_name: generator.yaml
last_modification:
reason: API generation
49 changes: 47 additions & 2 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ignore:
resource_names:
- Snapshot
field_paths:
- DescribeSnapshotsInput.ClusterName
- DescribeSnapshotsInput.Source
resources:
Cluster:
exceptions:
Expand Down Expand Up @@ -182,6 +183,50 @@ resources:
- path: Status.Status
in:
- active
Snapshot:
exceptions:
errors:
404:
code: SnapshotNotFoundFault
terminal_codes:
- InvalidParameterCombinationException
- SnapshotAlreadyExistsFault
- SnapshotQuotaExceededFault
- TagQuotaPerResourceExceeded
- InvalidParameterValueException
- InvalidParameter
fields:
SourceSnapshotName:
from:
operation: CopySnapshot
path: SourceSnapshotName
ClusterName:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this field not automatically generated? Why do we have to add it to the list of fields?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is part of different API (copy-snapshot) so we would need to add it

is_primary_key: false
from:
operation: CreateSnapshot
path: ClusterName
hooks:
sdk_create_pre_build_request:
template_path: hooks/snapshot/sdk_create_pre_build_request.go.tpl
sdk_create_post_set_output:
template_path: hooks/snapshot/sdk_create_post_set_output.go.tpl
sdk_read_many_post_set_output:
template_path: hooks/snapshot/sdk_read_many_post_set_output.go.tpl
sdk_delete_pre_build_request:
template_path: hooks/snapshot/sdk_delete_pre_build_request.go.tpl
sdk_delete_post_request:
template_path: hooks/snapshot/sdk_delete_post_request.go.tpl
renames:
operations:
CreateSnapshot:
input_fields:
SnapshotName: Name
DeleteSnapshot:
input_fields:
SnapshotName: Name
DescribeSnapshots:
input_fields:
SnapshotName: Name
ParameterGroup:
exceptions:
errors:
Expand Down
88 changes: 88 additions & 0 deletions apis/v1alpha1/snapshot.go

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

50 changes: 28 additions & 22 deletions apis/v1alpha1/types.go

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

Loading