[image-management-engine] Added Factory Callback Support (#13)
mtaylor
notifications at github.com
Thu Sep 6 16:49:47 UTC 2012
Adds in Factory Callback Support:
= Testing Instructions
== Checkout and Build ImageFactory and plugins
make rpm
cd imagefactory-plugins/; make rpm
Openstack plugin has a dep not in fedora so will break install; just skip it.
yum install ~/rpmbuld/RPMS/imagefactory-* --skip-broken
== Run factory
sudo /usr/bin/imagefactoryd --debug --no_ssl --no_oauth --foreground
== Start up the test/dummy app
cd <rootdir of IME>/test/dummy
rake db:migrate; rails s
== Run commands from Rails Console
Open up a rails console;
cd <rootdir of IME>/test/dummy
.rake db:migrate; rails c
You can create images using the commands below. Check the test/dummy server log when creating Target and Provider Images for PUT requests. Then check to see if the model was updated properly.
== Commands
template_xml = "<template><name>mock</name><os><name>RHELMock</name><version>1</version><arch>x86_64</arch><install type=\"iso\"><iso>http://mockhost/RHELMock1-x86_64-DVD.iso</iso></install><rootpw>password</rootpw></os><description>Mock Template</description></template>"
template = ImageManagement::Template.create(:xml => template_xml)
base_image = ImageManagement::BaseImage.new
base_image.template = template
base_image.save
image_version = ImageManagement::ImageVersion.new
image_version.base_image = base_image
image_version.save
target_image = ImageManagement::TargetImage.new(:target => "MockSphere")
target_image.image_version = image_version
target_image.save
provider_image = ImageManagement::ProviderImage.new(:provider => "MockSphere", :credentials => "")
provider_image.target_image = target_image
provider_image.save
You can merge this Pull Request by running:
git pull https://github.com/mtaylor/image-management-engine factory_callbacks
Or you can view, comment on it, or merge it online at:
https://github.com/aeolus-incubator/image-management-engine/pull/13
-- Commit Summary --
* Added Factory Callback Support
-- File Changes --
M app/controllers/image_management/provider_images_controller.rb (14)
M app/controllers/image_management/target_images_controller.rb (14)
M app/models/image_management/provider_image.rb (28)
M app/models/image_management/target_image.rb (16)
M lib/generators/image_management/templates/intializers/image_management_engine.rb (4)
M lib/image_factory/model/base.rb (11)
M spec/controllers/provider_images_controller_spec.rb (20)
M spec/controllers/target_images_controller_spec.rb (18)
M spec/spec_helper.rb (4)
M test/dummy/config/initializers/image_management_engine.rb (4)
-- Patch Links --
https://github.com/aeolus-incubator/image-management-engine/pull/13.patch
https://github.com/aeolus-incubator/image-management-engine/pull/13.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/aeolus-incubator/image-management-engine/pull/13
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/aeolus-devel/attachments/20120906/d5ed4cfb/attachment.html>
More information about the aeolus-devel
mailing list