Previously, security groups in jclouds could only be set by downcasting to the cloud-specific implementation of TemplateOptions and setting security groups there. This is what JcloudsLocation does. However jclouds recently added setting security groups in the base TemplateOptions (with the caveat that not all clouds will understand it.)
JcloudsLocation should be modified to do this.
A previous implementation was attempted in PR #1373 but is not suitable for merging at the moment; due to a bug in CloudStack's implementation in jclouds, it would end up ignoring the security group. Once that issue is fixed in jclouds, then that PR could be re-opened and merged.
Previously, security groups in jclouds could only be set by downcasting to the cloud-specific implementation of TemplateOptions and setting security groups there. This is what JcloudsLocation does. However jclouds recently added setting security groups in the base TemplateOptions (with the caveat that not all clouds will understand it.)
JcloudsLocation should be modified to do this.
A previous implementation was attempted in PR #1373 but is not suitable for merging at the moment; due to a bug in CloudStack's implementation in jclouds, it would end up ignoring the security group. Once that issue is fixed in jclouds, then that PR could be re-opened and merged.