aeolus-incubator/image-management-engine — pull request #13 by mtaylor (2012-09-06 16:49:46+00:00)
Title: Added Factory Callback Support

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 = ""

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