-
Notifications
You must be signed in to change notification settings - Fork 0
Codeloom 4 bedrock #1
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
base: main
Are you sure you want to change the base?
Conversation
- Complete Inspector service wrapper with enable, status, findings, coverage, and disable operations - Hello example demonstrating account status checking - Interactive scenario showcasing Inspector workflow - Comprehensive test infrastructure with stubbing support - Metadata file for documentation generation
| @@ -0,0 +1,128 @@ | |||
| inspector_Enable: | |||
| title: Enable &Inspector; scanning | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem as previous versions, it is not using a valid entity name. Also, it appears to be missing the hello example.
| excerpts: | ||
| - description: Enable Inspector scanning for specified resource types. | ||
| snippet_tags: | ||
| - python.example_code.inspector.Enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Kiro version correctly put 3 snippets here: class, decl, and the action code. This one is missing the extra snippets.
| services: | ||
| inspector: {Disable} | ||
| inspector_Hello: | ||
| title: Hello &Inspector; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, here is the hello example. It should have been at the top.
|
|
||
| try: | ||
| # Create Inspector wrapper | ||
| inspector_wrapper = InspectorWrapper.from_client() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the Kiro example, it shouldn't use the wrapper for the hello example, instead it should stand alone.
| if max_results: | ||
| params["maxResults"] = max_results | ||
|
|
||
| response = self.inspector_client.list_coverage(**params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a paginated operation, it should use the paginator here.
|
|
||
| def usage_demo(): | ||
| """ | ||
| Shows how to use the InspectorWrapper class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer the scenario to be in a separate file, to be consistent with the rest of the library. Here it is included in the wrapper file.
| wrapper = InspectorWrapper.from_client() | ||
|
|
||
| try: | ||
| # Get account status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scenario doesn't include all of the steps given in the spec.
| Stub functions that are used by the Amazon Inspector unit tests. | ||
| """ | ||
|
|
||
| from test_tools.example_stubber import ExampleStubber |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It creates the stubber file, but does not add it to the stubber list in stubber_factory.py. It also didn't write any tests (but maybe that wasn't requested).
| @@ -0,0 +1,73 @@ | |||
| # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A README should have been created in the new service folder.
This pull request...
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.