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 /test/dummy
rake db:migrate; rails s

== Run commands from Rails Console

Open up a rails console;

cd /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 = "mockRHELMock1x86_64http://mockhost/RHELMock1-x86_64-DVD.isopasswordMock 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 view, comment on, or merge it at:

  https://github.com/aeolus-incubator/image-management-engine/pull/13

Commit Summary

File Changes

Patch Links


Reply to this email directly or view it on GitHub.