Hwp related XML templates

Signed-off-by: Jason Guiditta <jguiditt@redhat.com>
Hwp controller extended to return XML

Signed-off-by: Jason Guiditta <jguiditt@redhat.com>
Map api/hardware_profiles to hardware_profiles

Signed-off-by: Jason Guiditta <jguiditt@redhat.com>
Rspec tests for hwp api

Signed-off-by: Jason Guiditta <jguiditt@redhat.com>
fix permissions tab select
Display a better error if Image Factory is unreachable.

Previously, we would display an error suggesting that there was a
problem and you should check the Factory log. This was misleading
if Factory couldn't be reached, since there would be nothing
in the log.

This still isn't perfect; if Factory is entirely down, it seems
that aeolus-image-rubygem reports a bogus error. But this change
keeps Conductor from introducing any lies of its own about the cause
of the error.
Bump aeolus-image dep, old version had bad dependencies.
Strip whitespace from image id when importing images.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=819059

Signed-off-by: Matt Wagner <matt.wagner@redhat.com>
Use mock_model instead of plain mock.

Signed-off-by: Matt Wagner <matt.wagner@redhat.com>
BZ 843079 - set deployment's state to stopped when all instances are stopped
RM 3628 - ensure that all params in a deployable can be resolved

Adds validation for cyclic and not existing references in deployable XML.
Ii also resolves https://bugzilla.redhat.com/show_bug.cgi?id=841028
Merge pull request #4 from n1zyy/factory-errors

Display a better error if Image Factory is unreachable.
redmine #3451: few small additions enforcing Privilege::PERM_VIEW in application_controller
redmine #3451: replace constantize with slightly more restrictive method to load activerecord model from metadata_object
redmine #3452: verify value of template to render in realms and provider_realms controller
BZ 843671 fix potentially ambiguous name column

Signed-off-by: Jason Guiditta <jguiditt@redhat.com>
Adds an additional check in instance_errors to avoid obscure bug

In certain cases, we somehow manage to end up with an instance variable
that responds to .errors, but doesn't return an array as expected, so
calling .errors.size on it raises an exception. This patch ensures that
the errors respond to a .size method before we call it, since raising an
exception from within code to handle exceptions is not a good thing.
This patch does not address the root cause of this problem.
Fix MetadataObject.lookup to handle lazy-loaded classes (BZ#847373)

https://bugzilla.redhat.com/show_bug.cgi?id=847373

Under the circumstances in the above bug (running rake
dc:create_user), the Pool class (and others) have not been loaded yet
when running MetadataObject.lookup.  Because of this, Pool is not
listed in ActiveRecord::Base.subclasses, and 'klass' ends up being
nil.  When using const_get instead to obtain a handle to the desired
object class, the const_missing code paths run and Pool gets lazy
loaded.
BZ843074 graph fix for case when deployment/instance goes from pending to stopped
Merge pull request #6 from jeckersb/bz847373

Fix MetadataObject.lookup to handle lazy-loaded classes (BZ#847373)
In my testing this fixes https://bugzilla.redhat.com/show_bug.cgi?id=847373