Closed AlexAxthelm closed 4 years ago
@laszewsk This is my Submission PR. If you have any questions, please contact me on slack.
please ony submit a pull request for the AwsFlavor.py file.
The Provider.py integration is done wrong, also as other providers do not need and do not have a query interface the test will also not work. You may need to add a special test_aws_flavor_query.py into tests/aws
A comment on top of the AwsFlavor should be provided on how you suggest the integration so we can assign it to a future student to provide a portable way for it.
Thanks
@laszewsk , I've added the note, and removed the external effects of my changes. The one line that is changed in Provider.py
is absolutely critical for the changes to work, because the provider needs to pass the boto3
session to the AwsFlavors
class, in order for boto3
to authenticate and use the pricing API. Because this is restricted inside the flavors
command, there shouldn't be any effects on other commands in the provider.
Updated aws
flavor
(andflavor --refresh
) command to accept queries, and limit overall number of results returned, for quicker testing.All tests pass, and the new test suite takes ~15 seconds, rather than ~1000 seconds for the old suite.