-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Feature: ServiceCatalog #6672
base: master
Are you sure you want to change the base?
Feature: ServiceCatalog #6672
Conversation
Started core endpoints including CloudFormation integration for creating a stack with ProvisionProduct.
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.
Hi @davidconnor-ont, welcome to Moto!
This all looks good to me so far. It all follows the same approach/setup as our other services, which is quite important to keep things readable.
Same goes for the tests - they only test a single operation, making them very readable, so I'm happy with that.
One possible suggestion:
There seem to be a lot of tests that share the same setup
. Is it worth converting them to separate TestClass
-es, so that there is less deduplication?
Example: https://github.com/getmoto/moto/blob/master/tests/test_autoscaling/test_autoscaling_groups.py
Don't worry about the size of the PR.
it's indeed ballooning, but because it's mostly session state management, its all easy to review.
Thanks for the feedback.
Definitely. I hadn't had the chance to refactor the tests into a more clean setup - it was repetitive out of laziness/convenience to get the functions semi-working. I'll take a look at that example when I'm updating them. |
@bblommers Service catalog seems to implement filters mostly the same as EC2 and other filters that have the pattern:
The docs indicate that "SearchQuery" is the only key, so really the values in SearchQuery map to the EC2 way of filtering under-the-hood. I've added a commit where I map the input to match the excepted input of Before I go any further:
|
Hi @davidconnor-ont, There is no standard way to filter things - it's all a bit disjointed unfortunately It sounds like the best solution to use Importing EC2 does come at a price - it will add another 2/300 ms to the import time, because it automatically generates all kinds of default objects (AMI's, VPC's, etc.). So later on I will just refactor the filter-methods into a separate service-agnostic utilities-file to remedy this. |
Hello, I'm still working on this. I'm testing it with our real world usage of service catalog so it's being adjusted as I add the unit testing to our service catalog calls. The main area I need to address is the provisioning a product when a passed in path_id is used - those are the artificially failing test placeholders in the last test run. |
@davidconnor-ont We've just released Moto v5 with quite a few breaking changes. Let me know if you need any help bringing this PR up-to-date, I'd be happy to help out. |
This is an early draft of the service catalog API endpoint.
These endpoints should provide enough coverage to run the core provisioning tasks of creating portfolios, products, linking them and provisioning a stack through the moto cloudformation module.
I'm providing this draft PR as it's already ballooned into quite a large PR even without the full unit test coverage needed for testing exception responses. I wanted to get any early feedback that might be needed before going down too many wrong paths. So far the code is not particularly complex as it's mostly managed the session state of the created resources.
Initial implementation covering:
The aim of the initial version is to be able to run some of the simpler tutorials like this one from AWS:
https://www.youtube.com/watch?v=egZroVhDF4M
This terraform script should run completely and create all resources correctly including provisioning from the cloudformation template provided (EDIT: the provison_product step fails at the moment which is the part I'm currently working on.)
cloudformation template: