-
Notifications
You must be signed in to change notification settings - Fork 931
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
ec2 driver does not support strings for size and image parameters #1419
Comments
Thanks for reporting this. This works as designed / intended. Base compute API declares those arguments to be of a type of NodeImage and NodeSize. If any of the drivers supports string notation, that's because they don't comply with the base compute API. In the past, we didn't have a good automated way to enforce compliance with the base API so some things like that have slipped through, but going forward, some of that will be easier with the MyPy support. In short, in scenarios like that, you need to instantiate |
The biggest issue I see with this is that GCP does not present all of the images as part of list_images (current count is 80 images, and this clearly doesn't include images that are available in the marketplace and the like). If drivers don't present these instances, and it isn't defined HOW to instantiate a NodeImage or NodeSize class, then saying you must use an instance isn't helpful. Also, GCP does not implement get_image:
So, there is no way to create a NodeImage other than the 80 that GCP provide, and that is problematic. In fact, the docs for NodeImage pretty much tell you NOT to create your own (from https://libcloud.apache.org/apidocs/0.4.2/libcloud.base.NodeImage.html):
I'll also note that these docs only say that a NodeImage SHOULD be given instead of MUST be given. |
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue. |
Summary
Both the GCP and the Dummy drivers for compute allow passing the imaged id, and size id as a string, and both drivers will do a lookup to find them.
The EC2 driver requires that the image and size be objects that have the name as an id attribute.
Detailed Information
The commit newcontext-oss/openc2-aws-actuator@f67cbee fixes the issue for that code. GCP works w/ the previous commit.
This is on MacOSX 10.14.6.
The text was updated successfully, but these errors were encountered: