Relevant documentation:
https://github.com/eucalyptus/eucalyptus/wiki/Fog
https://github.com/fog/fog
I was able to hack some of the functionality into my existing foreman implementation by applying the following patch:
@
:~$ diff app/models/compute_resources/foreman/model/ec2.rb app/models/compute_resources/foreman/model/ec2.rb.back
107c107
< @client ||= ::Fog::Compute.new(:endpoint => "http://MYIP:8773/services/compute", :version => "2010-08-31", :provider => "AWS", :aws_access_key_id => user, :aws_secret_access_key => password, :region => region)
---
client ||= ::Fog::Compute.new(:provider => "AWS", :aws_access_key_id => user, :aws_secret_access_key => password, :region => region)
This allowed theforeman to contact my euca controller and get a list of regions, which consisted off "eucalyptus".
After that pressing the "Test Connection" button appeared to do nothing.
Finally clicking "Submit" caused the following error:
ArgumentError
Unknown region: "eucalyptus"
app/models/compute_resources/foreman/model/ec2.rb:107:in `client'
app/models/compute_resources/foreman/model/ec2.rb:113:in `setup_key_pair'
app/controllers/compute_resources_controller.rb:27:in `create'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'