This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Flavor(APIResourceWrapper): | |
_attrs = ['id', 'name', 'memory', 'vcpu', 'disk', 'ephemeral', 'swap'] | |
@classmethod | |
def create(cls, request, name, memory, vcpu, disk, ephemeral=0, swap=0, | |
metadata=None): | |
flavor = cls(novaclient(request).flavors.create(name, memory, vcpu, | |
disk, ephemeral=ephemeral, | |
swap=swap)) | |
if (metadata): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/app/models/provider.rb b/src/app/models/provider.rb | |
index eb99c8d..ad1c418 100644 | |
--- a/src/app/models/provider.rb | |
+++ b/src/app/models/provider.rb | |
@@ -304,10 +304,14 @@ class Provider < ActiveRecord::Base | |
def valid_framework? | |
begin | |
!! connect! | |
+ rescue DeltaCloud::HTTPError::Unauthorized | |
+ # Some providers will return a 401 - Unauthorized, which is okay at this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jan 8 05:28:19 hp-dl320egen8-01 deltacloudd[32427]: Unable to connect to 10.16.17.7 | |
Jan 8 05:28:19 hp-dl320egen8-01 deltacloudd[32427]: /usr/share/gems/gems/openstack-1.0.6/lib/openstack/connection.rb:216:in `rescue in start_http' | |
Jan 8 05:28:19 hp-dl320egen8-01 deltacloudd[32427]: /usr/share/gems/gems/openstack-1.0.6/lib/openstack/connection.rb:208:in `start_http' | |
Jan 8 05:28:19 hp-dl320egen8-01 deltacloudd[32427]: /usr/share/gems/gems/openstack-1.0.6/lib/openstack/connection.rb:142:in `csreq' | |
Jan 8 05:28:19 hp-dl320egen8-01 deltacloudd[32427]: /usr/share/gems/gems/openstack-1.0.6/lib/openstack/compute/connection.rb:210:in `limits' | |
Jan 8 05:28:19 hp-dl320egen8-01 deltacloudd[32427]: /usr/share/deltacloud-core/lib/deltacloud/drivers/openstack/openstack_driver.rb:124:in `block in realms' | |
Jan 8 05:28:19 hp-dl320egen8-01 deltacloudd[32427]: /usr/share/deltacloud-core/lib/deltacloud/drivers/exceptions.rb:212:in `call' | |
Jan 8 05:28:19 hp-dl320egen8-01 deltacloudd[32427]: 127.0.0.1 - - [08/Jan/2013 05:28:19] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jprovazn@f17 src]$ curl -X GET --user admin:password --header "Accept: application/xml" --header "Content-Type: application/xml" -k http://localhost:3000/api | |
<api href='http://localhost:3000/api'> | |
<catalogs href='http://localhost:3000/api/catalogs'></catalogs> | |
<deployments href='http://localhost:3000/api/deployments'></deployments> | |
<pools href='http://localhost:3000/api/pools'></pools> | |
<pool_families href='http://localhost:3000/api/pool_families'></pool_families> | |
<providers href='http://localhost:3000/api/providers'></providers> | |
<provider_accounts href='http://localhost:3000/api/provider_accounts'></provider_accounts> | |
<provider_realms href='http://localhost:3000/api/provider_realms'></provider_realms> | |
<tim href='http://localhost:3000/api/tim'></tim> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rescue Exception => ex | |
flash[:error] = t('hardware_profiles.flash.error.failed_to_update_cost %message', :message => ex.message) | |
set_edit_cost_variables | |
render :action => 'edit_cost_billing' | |
tady to jeste zalogujes s backtracem | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jprovazn@f17 src]$ curl https://github.com/aeolusproject/conductor/pull/200.patch | git am | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 63913 100 63913 0 0 33018 0 0:00:01 0:00:01 --:--:-- 35311 | |
Applying: costs for conductor | |
/home/jprovazn/devel/conductor/.git/rebase-apply/patch:248: trailing whitespace. | |
validates_numericality_of :price, | |
/home/jprovazn/devel/conductor/.git/rebase-apply/patch:771: trailing whitespace. | |
t.string :billing_model, :limit=>30 | |
/home/jprovazn/devel/conductor/.git/rebase-apply/patch:917: trailing whitespace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/spec/models/template_spec.rb b/spec/models/template_spec.rb | |
index 6897a9f..38d2461 100644 | |
--- a/spec/models/template_spec.rb | |
+++ b/spec/models/template_spec.rb | |
@@ -12,5 +12,14 @@ module Tim | |
Template.find(template).base_images.size.should == 2 | |
end | |
end | |
+ | |
+ describe "XML helper methods" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/models/tim/template.rb b/app/models/tim/template.rb | |
index 1aed281..49d1d7b 100644 | |
--- a/app/models/tim/template.rb | |
+++ b/app/models/tim/template.rb | |
@@ -10,10 +10,25 @@ module Tim | |
attr_accessible :xml | |
attr_protected :id | |
+ OS = Struct.new(:name, :version, :arch) | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
first run | |
[stack@host03-rack02 ~]$ python test_resources.py | |
xxxx0 77.9745030403 | |
xxxx0-events 78.5971889496 | |
xxxx0-events 79.2853188515 | |
xxxx0-events 79.7970600128 | |
xxxx0-events 80.1811249256 | |
xxxx0-events 80.6371958256 | |
xxxx0-events 80.9747948647 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find_all_files_in_tpldir.each do |fname| | |
content = fname.readlines | |
path = fname.basedir | |
content.gsub(/get_file: (.*)/, "get_file: basedir/$1") | |
files[basedir/$1] = content | |
end |
NewerOlder