[PATCH conductor] Temporary Bugfix for adding providers.
by Jason Guiditta
This needs to be addressed better later on, but for some reason, the
previously commited code is not working as expected for checking if a
provider has the correct name entered in conductor. For Ec2 example,
this would verify that, say, 'us-east-1' is valid. Currently, this
returns a 500 saying 'aws requires authorization for this request'.
Yet when I run the same command directly against the dc client in a
rails console, it works as expected. This is just a validation, so
I propose just disabling it for now, in the interest of being able to
have an end-of-sprint minor release. This can be revisited in the
near future.
---
src/app/models/provider.rb | 4 ++--
src/spec/models/provider_spec.rb | 8 --------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/app/models/provider.rb b/src/app/models/provider.rb
index fc3040e..09a9ca0 100644
--- a/src/app/models/provider.rb
+++ b/src/app/models/provider.rb
@@ -252,7 +252,7 @@ class Provider < ActiveRecord::Base
def validate_provider
if !nil_or_empty(url)
errors.add("url", I18n.t("activerecord.errors.provider.url")) unless valid_framework?
- errors.add("deltacloud_provider", I18n.t("activerecord.errors.provider.deltacloud_provider")) unless valid_provider?
+ #errors.add("deltacloud_provider", I18n.t("activerecord.errors.provider.deltacloud_provider")) unless valid_provider?
end
end
@@ -266,7 +266,7 @@ class Provider < ActiveRecord::Base
if !nil_or_empty(deltacloud_provider)
client = connect
return false if client.nil?
- return false unless client.valid_provider? deltacloud_provider
+ return false unless client.driver(provider_type.deltacloud_driver).valid_provider? deltacloud_provider
end
true
end
diff --git a/src/spec/models/provider_spec.rb b/src/spec/models/provider_spec.rb
index 4d07f9d..d4b9894 100644
--- a/src/spec/models/provider_spec.rb
+++ b/src/spec/models/provider_spec.rb
@@ -65,14 +65,6 @@ describe Provider do
@provider.should_not be_valid
end
- it "should set error if unable to connect to specified deltacloud_provider" do
- @provider.stub(:valid_provider?).and_return(false)
- @provider.stub(:valid_framework?).and_return(true)
- @provider.should have(1).error_on(:deltacloud_provider)
- @provider.errors[:deltacloud_provider].first.should eql(I18n.t("activerecord.errors.provider.deltacloud_provider"))
- @provider.should_not be_valid
- end
-
it "should require unique name" do
@provider.save!
provider2 = Factory.build :mock_provider
--
1.7.7.6
11 years, 11 months
[PATCH aeolus-configure] RM3172 Allow standalone imagefactory/iwhd installation
by steve linabery
Removed implicit aeolus-conductor dependency in image-factory.pp manifest.
Tested like:
1) install aeolus-all package
2) remove aeolus-conductor package
3) ensure presence of valid file /etc/aeolus-conductor/oauth.json
4) `aeolus-configure -p iwhd` and `aeolus-configure -p imagefactory`, repeatedly
Thanks,
Steve|eggs
11 years, 11 months
[PATCH 0/2] Bundler usage changes
by Jason Guiditta
This patchset implements Redmine feature #3162: 'As a developer, I would
like to be able to easily work using rubygem or rpm, and to be able to
swap back and forth, so that I can more easily test/develop against
different platforms'. Note that there seems to be a lingering issues with
what bundler see on an install where USE_BUNDLER=yes. In my testing, something
on the path was looking for rack ~> 1.2.1, but I cannot for the ife of me
figure out what. This does not keep the distro/rpm version from working, and I
believe it is a bug outside these patches' scope, so I just want to mention
that seems to be the only remaining blocker for upstream.
Testing of this set for standard rpm-only development is as usual:
* make sure you can run tests from src
* install rpm and verify things work
* make sure you can run a dev-mode server as expected
None of the above should show any calls to bunlder or 'bundle exec'. If they do,
there is a bug in these patches.
To test upstream, you need a clean env (perhaps via rvm and a gemset). You then set
the following env var:
* USE_BUNDLER=yes
Then run:
(you need to cp Gemfile.in -> Gemfile first for this step, and do this from src dir,
or specify full path)
* BUNDLE_GEMFILE=Gemfile bundle install
This should install the the versions in our Gemfile.lock. Try to run tests:
* BUNDLE_GEMFILE=Gemfile rake spec
This is where I hit the bad dep. Any assistance figuring out why is appreciated.
-j
11 years, 11 months
[PATCH aeolus-configure] Allow standalone imagefactory/iwhd installation
by steve linabery
This is a first step in distributed installs using aeolus-configure.
It requires some manual user intervention, but successfully installs imagefactory and/or iwhd.
To test/use:
1) apply patch, `rake rpms`, install resulting rpm (no need to install aeolus-all)
2) copy, from a host on which the default aeolus-configure has been run, the file /etc/aeolus-conductor/oauth.json to the local path of same name.
3) run `aeolus-configure -p iwhd` and/or `aeolus-configure -p imagefactory`
The /etc/aeolus-conductor/oauth.json file is required.
Thanks,
Steve|eggs|eggmaster
11 years, 11 months