deltacloud-core 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +63 -7
- data/bin/deltacloudd +29 -17
- data/config.ru +5 -3
- data/config/drivers/ec2.yaml +9 -0
- data/config/drivers/google.yaml +3 -0
- data/config/drivers/openstack.yaml +3 -0
- data/deltacloud-core.gemspec +1 -1
- data/lib/cimi/dependencies.rb +62 -0
- data/lib/cimi/helpers/cimi_helper.rb +50 -0
- data/lib/cimi/model.rb +52 -0
- data/lib/cimi/model/action.rb +24 -0
- data/lib/cimi/model/base.rb +249 -0
- data/lib/cimi/model/cloud_entry_point.rb +48 -0
- data/lib/cimi/model/entity_metadata.rb +83 -0
- data/lib/cimi/model/entity_metadata_collection.rb +31 -0
- data/lib/cimi/model/errors.rb +40 -0
- data/lib/cimi/model/machine.rb +227 -0
- data/lib/cimi/model/machine_admin.rb +59 -0
- data/lib/cimi/model/machine_admin_collection.rb +34 -0
- data/lib/cimi/model/machine_collection.rb +34 -0
- data/lib/cimi/model/machine_configuration.rb +67 -0
- data/lib/cimi/model/machine_configuration_collection.rb +34 -0
- data/lib/cimi/model/machine_image.rb +46 -0
- data/lib/cimi/model/machine_image_collection.rb +34 -0
- data/lib/cimi/model/machine_template.rb +41 -0
- data/lib/cimi/model/machine_template_collection.rb +34 -0
- data/lib/cimi/model/network.rb +69 -0
- data/lib/cimi/model/network_collection.rb +34 -0
- data/lib/cimi/model/network_configuration.rb +50 -0
- data/lib/cimi/model/network_configuration_collection.rb +34 -0
- data/lib/cimi/model/network_template.rb +26 -0
- data/lib/cimi/model/schema.rb +277 -0
- data/lib/cimi/model/volume.rb +103 -0
- data/lib/cimi/model/volume_collection.rb +34 -0
- data/lib/cimi/model/volume_configuration.rb +60 -0
- data/lib/cimi/model/volume_configuration_collection.rb +34 -0
- data/lib/cimi/model/volume_image.rb +49 -0
- data/lib/cimi/model/volume_image_collection.rb +34 -0
- data/lib/cimi/model/volume_template.rb +23 -0
- data/lib/cimi/model/volume_template_collection.rb +34 -0
- data/lib/cimi/server.rb +575 -0
- data/lib/deltacloud/base_driver/base_driver.rb +11 -1
- data/lib/deltacloud/core_ext.rb +2 -0
- data/lib/deltacloud/core_ext/array.rb +25 -0
- data/lib/deltacloud/core_ext/hash.rb +7 -0
- data/lib/deltacloud/core_ext/proc.rb +31 -0
- data/lib/deltacloud/core_ext/string.rb +15 -0
- data/lib/deltacloud/drivers/condor/condor_driver.rb +2 -1
- data/lib/deltacloud/drivers/ec2/ec2_driver.rb +32 -10
- data/lib/deltacloud/drivers/eucalyptus/eucalyptus_driver.rb +1 -1
- data/lib/deltacloud/drivers/gogrid/gogrid_driver.rb +1 -1
- data/lib/deltacloud/drivers/google/google_driver.rb +233 -0
- data/lib/deltacloud/drivers/mock/data/instances/inst0.yml +7 -2
- data/lib/deltacloud/drivers/mock/data/instances/inst1.yml +7 -2
- data/lib/deltacloud/drivers/mock/data/instances/inst2.yml +7 -2
- data/lib/deltacloud/drivers/mock/mock_client.rb +17 -0
- data/lib/deltacloud/drivers/mock/mock_driver.rb +82 -8
- data/lib/deltacloud/drivers/opennebula/opennebula_driver.rb +1 -1
- data/lib/deltacloud/drivers/openstack/openstack_driver.rb +47 -0
- data/lib/deltacloud/drivers/rackspace/rackspace_driver.rb +8 -8
- data/lib/deltacloud/drivers/rhevm/rhevm_client.rb +122 -49
- data/lib/deltacloud/drivers/rhevm/rhevm_driver.rb +42 -22
- data/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb +1 -1
- data/lib/deltacloud/drivers/sbc/sbc_driver.rb +3 -2
- data/lib/deltacloud/drivers/terremark/terremark_driver.rb +2 -2
- data/lib/deltacloud/drivers/vsphere/vsphere_client.rb +25 -4
- data/lib/deltacloud/drivers/vsphere/vsphere_driver.rb +35 -12
- data/lib/deltacloud/hardware_profile.rb +34 -10
- data/lib/deltacloud/helpers/application_helper.rb +3 -28
- data/lib/deltacloud/helpers/blob_stream.rb +2 -1
- data/lib/deltacloud/models.rb +2 -0
- data/lib/deltacloud/models/bucket.rb +1 -1
- data/lib/deltacloud/models/image.rb +1 -1
- data/lib/deltacloud/models/instance.rb +2 -1
- data/lib/deltacloud/models/instance_address.rb +56 -0
- data/lib/deltacloud/models/provider.rb +27 -0
- data/{server.rb → lib/deltacloud/server.rb} +72 -14
- data/lib/deltacloud/validation.rb +31 -10
- data/lib/sinatra/rabbit.rb +34 -26
- data/lib/sinatra/rack_accept.rb +5 -5
- data/lib/sinatra/rack_matrix_params.rb +6 -2
- data/lib/sinatra/rack_syslog.rb +3 -3
- data/lib/sinatra/static_assets.rb +1 -1
- data/lib/sinatra/url_for.rb +1 -7
- data/public/images/bread-bg.png +0 -0
- data/public/images/logo-wide.png +0 -0
- data/public/images/topbar-bg.png +0 -0
- data/public/javascripts/application.js +5 -0
- data/public/javascripts/cmwgapp.js +249 -0
- data/public/javascripts/jquery-1.4.2.min.js +154 -0
- data/public/javascripts/jquery.mobile-1.0rc1.min.js +170 -0
- data/public/stylesheets/images/icons-18-black.png +0 -0
- data/public/stylesheets/images/icons-18-white.png +0 -0
- data/public/stylesheets/images/icons-36-black.png +0 -0
- data/public/stylesheets/images/icons-36-white.png +0 -0
- data/public/stylesheets/jquery.mobile-1.0rc1.min.css +12 -0
- data/public/stylesheets/new.css +4 -0
- data/support/fedora/deltacloud-core.init +20 -13
- data/tests/cimi/features/step_definitions/common_steps.rb +59 -0
- data/tests/cimi/features/step_definitions/machine_images_steps.rb +0 -0
- data/tests/cimi/features/step_definitions/machines_steps.rb +99 -0
- data/tests/cimi/features/step_definitions/volumes_steps.rb +115 -0
- data/tests/cimi/features/support/env.rb +53 -0
- data/tests/common.rb +89 -11
- data/tests/core_ext/string.rb +31 -0
- data/tests/drivers/google/api_test.rb +35 -0
- data/tests/drivers/google/buckets_test.rb +116 -0
- data/tests/drivers/google/setup.rb +38 -0
- data/tests/drivers/mock/instances_test.rb +20 -5
- data/tests/drivers/openstack/api_test.rb +41 -0
- data/tests/drivers/openstack/hardware_profiles_test.rb +53 -0
- data/tests/drivers/openstack/images_test.rb +40 -0
- data/tests/drivers/openstack/instances_test.rb +163 -0
- data/tests/drivers/openstack/realms_test.rb +36 -0
- data/tests/drivers/openstack/setup.rb +20 -0
- data/tests/drivers/rackspace/buckets_test.rb +145 -0
- data/tests/drivers/rackspace/setup.rb +3 -3
- data/tests/drivers/rhevm/api_test.rb +1 -1
- data/tests/drivers/rhevm/images_test.rb +2 -2
- data/tests/drivers/rhevm/instances_test.rb +10 -12
- data/tests/drivers/rhevm/realms_test.rb +4 -4
- data/tests/drivers/rhevm/setup.rb +3 -3
- data/tests/rabbit_test.rb +1 -1
- data/views/api/show.html.haml +13 -0
- data/views/cimi/cloudEntryPoint/index.html.haml +5 -0
- data/views/cimi/cloudEntryPoint/index.xml.haml +9 -0
- data/views/cimi/collection/index.html.haml +45 -0
- data/views/cimi/collection/response.xml.haml +3 -0
- data/views/cimi/error.html.haml +31 -0
- data/views/cimi/errors/400.html.haml +41 -0
- data/views/cimi/errors/400.xml.haml +3 -0
- data/views/cimi/errors/401.html.haml +41 -0
- data/views/cimi/errors/401.xml.haml +2 -0
- data/views/cimi/errors/403.html.haml +42 -0
- data/views/cimi/errors/403.xml.haml +2 -0
- data/views/cimi/errors/404.html.haml +29 -0
- data/views/cimi/errors/404.xml.haml +2 -0
- data/views/cimi/errors/405.html.haml +29 -0
- data/views/cimi/errors/405.xml.haml +5 -0
- data/views/cimi/errors/500.html.haml +43 -0
- data/views/cimi/errors/500.xml.haml +6 -0
- data/views/cimi/errors/502.html.haml +43 -0
- data/views/cimi/errors/502.xml.haml +7 -0
- data/views/cimi/errors/backend_capability_failure.html.haml +29 -0
- data/views/cimi/layout.html.haml +32 -0
- data/views/cimi/machine_configurations/show.html.haml +159 -0
- data/views/cimi/machine_configurations/show.xml.haml +27 -0
- data/views/cimi/machine_images/show.html.haml +79 -0
- data/views/cimi/machine_images/show.xml.haml +17 -0
- data/views/cimi/machines/show.html.haml +177 -0
- data/views/cimi/machines/show.xml.haml +28 -0
- data/views/cimi/volumes/show.html.haml +68 -0
- data/views/cimi/volumes/show.xml.haml +17 -0
- data/views/drivers/show.html.haml +10 -5
- data/views/drivers/show.xml.haml +9 -4
- data/views/error.html.haml +2 -2
- data/views/errors/500.xml.haml +7 -1
- data/views/instances/index.html.haml +1 -1
- data/views/instances/new.html.haml +19 -16
- data/views/instances/show.html.haml +7 -2
- data/views/instances/show.xml.haml +8 -7
- data/views/layout.html.haml +2 -2
- data/views/storage_volumes/show.html.haml +1 -1
- metadata +296 -204
- data/public/javascripts/jquery.mobile-1.0b1.min.js +0 -146
- data/public/stylesheets/jquery.mobile-1.0b1.min.css +0 -8
@@ -1,6 +1,6 @@
|
|
1
1
|
ENV['API_DRIVER'] = "rackspace"
|
2
|
-
ENV['API_USER'] = '
|
3
|
-
ENV['API_PASSWORD'] = '
|
2
|
+
ENV['API_USER'] = 'mandreou'
|
3
|
+
ENV['API_PASSWORD'] = 'a4d531ef02a37dd32cac1e8e516df9eb'
|
4
4
|
|
5
5
|
require 'vcr'
|
6
6
|
|
@@ -9,6 +9,6 @@ DeltacloudTestCommon::record!
|
|
9
9
|
VCR.config do |c|
|
10
10
|
c.cassette_library_dir = "#{File.dirname(__FILE__)}/../../../tests/drivers/rackspace/fixtures/"
|
11
11
|
c.stub_with :webmock
|
12
|
-
c.default_cassette_options = { :record => :
|
12
|
+
c.default_cassette_options = { :record => :new_episodes }
|
13
13
|
end
|
14
14
|
|
@@ -21,7 +21,7 @@ module RHEVMTest
|
|
21
21
|
features = (last_xml_response/'/api/link[@rel="instances"]/feature').collect { |f| f[:name] }
|
22
22
|
features.include?('user_name').should == true
|
23
23
|
features.include?('hardware_profiles').should == true
|
24
|
-
features.length.should ==
|
24
|
+
features.length.should == 3
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_03_it_has_rhevm_collections
|
@@ -32,9 +32,9 @@ module RHEVMTest
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def test_03_it_returns_single_image
|
35
|
-
get_auth_url '/api;driver=rhevm/images/
|
35
|
+
get_auth_url '/api;driver=rhevm/images/3e82e2d5-913f-4095-ae72-ebcfa9d0571d'
|
36
36
|
(last_xml_response/'image').length.should == 1
|
37
|
-
(last_xml_response/'image/name').text.should == '
|
37
|
+
(last_xml_response/'image/name').text.should == 'f15-minimal-2'
|
38
38
|
(last_xml_response/'image/state').text.should == 'OK'
|
39
39
|
end
|
40
40
|
|
@@ -12,8 +12,8 @@ module RHEVMTest
|
|
12
12
|
|
13
13
|
def test_01_01_it_can_create_instance_without_hardware_profile
|
14
14
|
params = {
|
15
|
-
:image_id => '
|
16
|
-
:name => '
|
15
|
+
:image_id => '3e82e2d5-913f-4095-ae72-ebcfa9d0571d',
|
16
|
+
:name => 'dc-webmock-1',
|
17
17
|
:'api[driver]' => 'rhevm',
|
18
18
|
}
|
19
19
|
post_url '/api/instances', params
|
@@ -21,7 +21,7 @@ module RHEVMTest
|
|
21
21
|
@@instance = last_xml_response
|
22
22
|
(@@instance/'instance').length.should > 0
|
23
23
|
(@@instance/'instance/name').first.text.should_not == nil
|
24
|
-
(@@instance/'instance/name').first.text.should == '
|
24
|
+
(@@instance/'instance/name').first.text.should == 'dc-webmock-1'
|
25
25
|
(@@instance/'instance/owner_id').first.text.should_not == ''
|
26
26
|
(@@instance/'instance/owner_id').first.text.should == ENV['API_USER']
|
27
27
|
(@@instance/'instance/state').first.text.should == 'PENDING'
|
@@ -29,8 +29,8 @@ module RHEVMTest
|
|
29
29
|
|
30
30
|
def test_01_02_it_can_create_instance_with_hardware_profile
|
31
31
|
params = {
|
32
|
-
:image_id => '
|
33
|
-
:name => '
|
32
|
+
:image_id => '3e82e2d5-913f-4095-ae72-ebcfa9d0571d',
|
33
|
+
:name => 'dc-webmock-2',
|
34
34
|
:hwp_id => 'SERVER',
|
35
35
|
:'api[driver]' => 'rhevm',
|
36
36
|
}
|
@@ -39,7 +39,7 @@ module RHEVMTest
|
|
39
39
|
@@instance2 = last_xml_response
|
40
40
|
(@@instance2/'instance').length.should > 0
|
41
41
|
(@@instance2/'instance/name').first.text.should_not == nil
|
42
|
-
(@@instance2/'instance/name').first.text.should == '
|
42
|
+
(@@instance2/'instance/name').first.text.should == 'dc-webmock-2'
|
43
43
|
(@@instance2/'instance/owner_id').first.text.should_not == ''
|
44
44
|
(@@instance2/'instance/owner_id').first.text.should == ENV['API_USER']
|
45
45
|
(@@instance2/'instance/state').first.text.should == 'PENDING'
|
@@ -154,11 +154,10 @@ module RHEVMTest
|
|
154
154
|
last_response.status.should == 204
|
155
155
|
20.times do |tick|
|
156
156
|
get_auth_url "/api;driver=rhevm/instances/#{(@@instance/'instance').first[:id]}", { :tick => tick}
|
157
|
-
|
158
|
-
break if last_response.status == 500
|
157
|
+
break if last_response.status == 404
|
159
158
|
sleep(5)
|
160
159
|
end
|
161
|
-
last_response.status.should ==
|
160
|
+
last_response.status.should == 404
|
162
161
|
end
|
163
162
|
|
164
163
|
def test_06_02_created_instance_can_be_destroyed
|
@@ -169,11 +168,10 @@ module RHEVMTest
|
|
169
168
|
last_response.status.should == 204
|
170
169
|
20.times do |tick|
|
171
170
|
get_auth_url "/api;driver=rhevm/instances/#{(@@instance2/'instance').first[:id]}", { :tick => tick}
|
172
|
-
|
173
|
-
break if last_response.status == 500
|
171
|
+
break if last_response.status == 404
|
174
172
|
sleep(5)
|
175
173
|
end
|
176
|
-
last_response.status.should ==
|
174
|
+
last_response.status.should == 404
|
177
175
|
end
|
178
176
|
end
|
179
177
|
end
|
@@ -20,14 +20,14 @@ module RHEVMTest
|
|
20
20
|
(last_xml_response/'realms/realm').each do |profile|
|
21
21
|
(profile/'name').text.should_not == nil
|
22
22
|
(profile/'name').text.should_not == ''
|
23
|
-
(profile/'name').text.
|
23
|
+
(profile/'name').text.should_not == 'Default'
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_03_it_returns_single_realm
|
28
|
-
get_auth_url '/api;driver=rhevm/realms/
|
29
|
-
(last_xml_response/'realm').first[:id].should == '
|
30
|
-
(last_xml_response/'realm/name').first.text.should == '
|
28
|
+
get_auth_url '/api;driver=rhevm/realms/3c8af388-cff6-11e0-9267-52540013f702'
|
29
|
+
(last_xml_response/'realm').first[:id].should == '3c8af388-cff6-11e0-9267-52540013f702'
|
30
|
+
(last_xml_response/'realm/name').first.text.should == 'engops-nfs'
|
31
31
|
(last_xml_response/'realm/state').first.text.should == 'AVAILABLE'
|
32
32
|
end
|
33
33
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
ENV['API_USER'] = 'rhev
|
2
|
-
ENV['API_PASSWORD'] = '
|
3
|
-
ENV['API_PROVIDER'] = 'https://
|
1
|
+
ENV['API_USER'] = 'vdcadmin@rhev.lab.eng.brq.redhat.com'
|
2
|
+
ENV['API_PASSWORD'] = '123456'
|
3
|
+
ENV['API_PROVIDER'] = 'https://rhev30-dc.lab.eng.brq.redhat.com:8443/rhevm-api;645e425e-66fe-4ac9-8874-537bd10ef08d'
|
4
4
|
|
5
5
|
require 'vcr'
|
6
6
|
|
data/tests/rabbit_test.rb
CHANGED
@@ -44,7 +44,7 @@ module DeltacloudUnitTest
|
|
44
44
|
features.should =~ [:hardware_profiles, :user_name, :authentication_key, :user_data]
|
45
45
|
|
46
46
|
op = @app.collections[:instances].operations[:create]
|
47
|
-
op.effective_params(@driver).keys.should =~ [:image_id, :hwp_memory, :hwp_id, :keyname, :name, :hwp_storage, :realm_id, :user_data]
|
47
|
+
op.effective_params(@driver).keys.should =~ [:image_id, :hwp_memory, :hwp_id, :keyname, :name, :hwp_storage, :realm_id, :user_data, :hwp_architecture, :hwp_cpu]
|
48
48
|
|
49
49
|
op.params.keys =~ [:realm_id, :image_id, :hwp_id]
|
50
50
|
end
|
data/views/api/show.html.haml
CHANGED
@@ -5,3 +5,16 @@
|
|
5
5
|
%ul{ :'data-role' => :listview, :'data-inset' => 'true'}
|
6
6
|
- @collections.sort_by { |k| k.to_s }.each do |key|
|
7
7
|
%li= link_to key.to_s.gsub('_', ' ').titlecase, api_url_for(key), :'data-icon' => "arrow-r", :'data-ajax' => false
|
8
|
+
|
9
|
+
- if @providers.size > 1
|
10
|
+
%div{ :'data-role' => :footer, :'data-theme' => 'a'}
|
11
|
+
%form{ :action => settings.root_url, :method => :post, :'data-ajax' => 'false'}
|
12
|
+
- if @driver_name
|
13
|
+
%input{ :name => :driver, :type => :hidden, :value => @driver_name }/
|
14
|
+
%div{ :'data-role' => :footer, :'data-theme' => 'a' , :class => 'middle-dialog'}
|
15
|
+
%label{ :for => :provider, :class => 'ui-input-text'}
|
16
|
+
%select{:name => 'provider', :'data-native-menu' => "true" }
|
17
|
+
%option{ :value => 'default'} default
|
18
|
+
- @providers.each do |provider|
|
19
|
+
%option{ :value => provider } #{provider}
|
20
|
+
%button{ :type => :submit} Change Provider
|
@@ -0,0 +1,9 @@
|
|
1
|
+
!!!XML
|
2
|
+
%CloudEntryPoint{ :xmlns => CMWG_NAMESPACE }
|
3
|
+
%uri= api_url_for("/cloudEntryPoint")
|
4
|
+
%name cloud entry point
|
5
|
+
%description cloud entry point
|
6
|
+
%created= Time.new.getutc.to_s
|
7
|
+
- @collections.each do |api|
|
8
|
+
- res_name = api[0].to_s.camelize(:lower_case_first_letter)
|
9
|
+
= "<#{res_name} href=\"#{api[1]}\"/>"
|
@@ -0,0 +1,45 @@
|
|
1
|
+
- new_name = @dmtfitem["uri"] + " Collection"
|
2
|
+
- new_name = new_name.gsub(/[A-Z]/, ' \0')
|
3
|
+
%h1 #{new_name.capitalize}
|
4
|
+
|
5
|
+
%form{ :action => api_url_for("/collection/" + @dmtfitem["uri"]) }
|
6
|
+
%input{ :name => :id, :type => :hidden, :value => @dmtfitem["uri"] }/
|
7
|
+
%input{ :name => :xmlRootNode, :type => :hidden, :value => @xml_root_node }/
|
8
|
+
%p
|
9
|
+
%label
|
10
|
+
Name:
|
11
|
+
%p
|
12
|
+
%input{ :name => :name, :size => 50, :value => @dmtfitem["name"], :style => "width:50%;" }
|
13
|
+
%input{ :name => :created, :type => :hidden, :size => 50, :value => @dmtfitem["created"] }
|
14
|
+
%p
|
15
|
+
%br
|
16
|
+
%label
|
17
|
+
Description:
|
18
|
+
%p
|
19
|
+
%textarea{ :name => :description, :cols => 50, :rows => 4, :style => "width:50%;" } #{@dmtfitem['description']}
|
20
|
+
%p
|
21
|
+
- if @dmtfitem["operation"]
|
22
|
+
- if @dmtfitem["operation"].kind_of? (Array)
|
23
|
+
- property_object = @dmtfitem["operation"]
|
24
|
+
- else
|
25
|
+
- property_object = [@dmtfitem["operation"]]
|
26
|
+
- iter = -1
|
27
|
+
- property_object.map do | operation|
|
28
|
+
- iter += 1
|
29
|
+
%br
|
30
|
+
%label
|
31
|
+
= operation["rel"].capitalize + ": " + api_url_for(operation["href"])
|
32
|
+
%input{ :name => "operation_"+iter.to_s, :oper_type => operation["rel"], :type => :hidden, :value => operation["href"] }
|
33
|
+
%br
|
34
|
+
%p
|
35
|
+
%br
|
36
|
+
- new_name = @dmtfitem["uri"]
|
37
|
+
- new_name = new_name.gsub(/[A-Z]/, ' \0')
|
38
|
+
- if @dmtf_col_items
|
39
|
+
%label
|
40
|
+
= new_name.capitalize.pluralize + ":"
|
41
|
+
%table{ :style => "width:52%;"}
|
42
|
+
- @dmtf_col_items.map do |template|
|
43
|
+
%tr
|
44
|
+
%td
|
45
|
+
%a{ :href => template["href"] }= template["name"]
|
@@ -0,0 +1,31 @@
|
|
1
|
+
!!!
|
2
|
+
!!! XML
|
3
|
+
|
4
|
+
%html
|
5
|
+
%head
|
6
|
+
= stylesheet_link_tag '/stylesheets/compiled/screen.css', :media => 'screen, projection'
|
7
|
+
= stylesheet_link_tag '/stylesheets/compiled/print.css', :media => 'print'
|
8
|
+
/[if lt IE 8]
|
9
|
+
= stylesheet_link_tag '/stylesheets/compiled/ie.css', :media => 'screen, projection'
|
10
|
+
= stylesheet_link_tag '/stylesheets/compiled/application.css', :media => 'screen, projection'
|
11
|
+
%script{:type => "text/javascript", :src => "/javascripts/jquery-1.4.2.min.js" }
|
12
|
+
%script{:type => "text/javascript", :src => "/javascripts/application.js" }
|
13
|
+
%body
|
14
|
+
#wrapper
|
15
|
+
#header
|
16
|
+
= link_to image_tag( "/images/logo-wide.png" ), settings.root_url
|
17
|
+
= bread_crumb
|
18
|
+
#content{:class => :error}
|
19
|
+
= yield
|
20
|
+
#footer
|
21
|
+
#formats
|
22
|
+
Format:
|
23
|
+
=link_to_format(:xml)
|
24
|
+
|
|
25
|
+
=link_to_format(:json)
|
26
|
+
#driver_info
|
27
|
+
Driver: #{driver_symbol} | API version: #{settings.version}
|
28
|
+
#copyright
|
29
|
+
Copyright 2009-2011
|
30
|
+
%a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
|
31
|
+
and individual contributors.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
%div{ :'data-role' => :content, :'data-theme' => 'b'}
|
2
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
3
|
+
%li{ :'data-role' => 'list-divider'} Server message
|
4
|
+
%li
|
5
|
+
%h3=[@error.class.name, @error.message].join(' - ')
|
6
|
+
%li{ :'data-role' => 'list-divider'} Original request URI
|
7
|
+
%li
|
8
|
+
%a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
|
9
|
+
%span=request.env['REQUEST_URI']
|
10
|
+
%span{ :class => 'ui-li-count'} Retry
|
11
|
+
%li{ :'data-role' => 'list-divider'} Error details
|
12
|
+
%li
|
13
|
+
- if @error.class.method_defined? :details
|
14
|
+
%p= @error.details
|
15
|
+
- else
|
16
|
+
%em No details
|
17
|
+
|
18
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
19
|
+
%h3 Backtrace
|
20
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
21
|
+
%li
|
22
|
+
%pre=@error.backtrace.join("\n")
|
23
|
+
|
24
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
25
|
+
%h3 Parameters
|
26
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
27
|
+
- if params.keys.empty?
|
28
|
+
%li{ :'data-role' => 'list-divider'} No parameters
|
29
|
+
- params.each do |key, value|
|
30
|
+
%li{ :'data-role' => 'list-divider'}=key
|
31
|
+
%li
|
32
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
33
|
+
|
34
|
+
|
35
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
36
|
+
%h3 Request details
|
37
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
38
|
+
- request.env.each do |key, value|
|
39
|
+
%li{ :'data-role' => 'list-divider'}=key
|
40
|
+
%li
|
41
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
@@ -0,0 +1,41 @@
|
|
1
|
+
%div{ :'data-role' => :content, :'data-theme' => 'b'}
|
2
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
3
|
+
%li{ :'data-role' => 'list-divider'} Server message
|
4
|
+
%li
|
5
|
+
%h3=[@error.class.name, @error.message].join(' - ')
|
6
|
+
%li{ :'data-role' => 'list-divider'} Original request URI
|
7
|
+
%li
|
8
|
+
%a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
|
9
|
+
%span=request.env['REQUEST_URI']
|
10
|
+
%span{ :class => 'ui-li-count'} Retry
|
11
|
+
%li{ :'data-role' => 'list-divider'} Error details
|
12
|
+
%li
|
13
|
+
- if @error.class.method_defined? :details
|
14
|
+
%p= @error.details
|
15
|
+
- else
|
16
|
+
%em No details
|
17
|
+
|
18
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
19
|
+
%h3 Backtrace
|
20
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
21
|
+
%li
|
22
|
+
%pre=@error.backtrace.join("\n")
|
23
|
+
|
24
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
25
|
+
%h3 Parameters
|
26
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
27
|
+
- if params.keys.empty?
|
28
|
+
%li{ :'data-role' => 'list-divider'} No parameters
|
29
|
+
- params.each do |key, value|
|
30
|
+
%li{ :'data-role' => 'list-divider'}=key
|
31
|
+
%li
|
32
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
33
|
+
|
34
|
+
|
35
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
36
|
+
%h3 Request details
|
37
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
38
|
+
- request.env.each do |key, value|
|
39
|
+
%li{ :'data-role' => 'list-divider'}=key
|
40
|
+
%li
|
41
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
@@ -0,0 +1,42 @@
|
|
1
|
+
%div{ :'data-role' => :content, :'data-theme' => 'b'}
|
2
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
3
|
+
%li{ :'data-role' => 'list-divider'} Server message
|
4
|
+
%li
|
5
|
+
%h3=[@error.class.name, @error.message].join(' - ')
|
6
|
+
%li{ :'data-role' => 'list-divider'} Original request URI
|
7
|
+
%li
|
8
|
+
%a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
|
9
|
+
%span=request.env['REQUEST_URI']
|
10
|
+
%span{ :class => 'ui-li-count'} Retry
|
11
|
+
%li{ :'data-role' => 'list-divider'} Error details
|
12
|
+
%li
|
13
|
+
- if @error.class.method_defined? :details
|
14
|
+
%p= @error.details
|
15
|
+
- else
|
16
|
+
%em No details
|
17
|
+
|
18
|
+
- if @error.backtrace
|
19
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
20
|
+
%h3 Backtrace
|
21
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
22
|
+
%li
|
23
|
+
%pre=@error.backtrace.join("\n")
|
24
|
+
|
25
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
26
|
+
%h3 Parameters
|
27
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
28
|
+
- if params.keys.empty?
|
29
|
+
%li{ :'data-role' => 'list-divider'} No parameters
|
30
|
+
- params.each do |key, value|
|
31
|
+
%li{ :'data-role' => 'list-divider'}=key
|
32
|
+
%li
|
33
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
34
|
+
|
35
|
+
|
36
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
37
|
+
%h3 Request details
|
38
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
39
|
+
- request.env.each do |key, value|
|
40
|
+
%li{ :'data-role' => 'list-divider'}=key
|
41
|
+
%li
|
42
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
@@ -0,0 +1,29 @@
|
|
1
|
+
%div{ :'data-role' => :content, :'data-theme' => 'b'}
|
2
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
3
|
+
%li{ :'data-role' => 'list-divider'} Server message
|
4
|
+
%li
|
5
|
+
%h3 Not Found
|
6
|
+
%li{ :'data-role' => 'list-divider'} Original request URI
|
7
|
+
%li
|
8
|
+
%a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
|
9
|
+
%span=request.env['REQUEST_URI']
|
10
|
+
%span{ :class => 'ui-li-count'} Retry
|
11
|
+
|
12
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
13
|
+
%h3 Parameters
|
14
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
15
|
+
- if params.keys.empty?
|
16
|
+
%li{ :'data-role' => 'list-divider'} No parameters
|
17
|
+
- params.each do |key, value|
|
18
|
+
%li{ :'data-role' => 'list-divider'}=key
|
19
|
+
%li
|
20
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
21
|
+
|
22
|
+
|
23
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
24
|
+
%h3 Request details
|
25
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
26
|
+
- request.env.each do |key, value|
|
27
|
+
%li{ :'data-role' => 'list-divider'}=key
|
28
|
+
%li
|
29
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
@@ -0,0 +1,29 @@
|
|
1
|
+
%div{ :'data-role' => :content, :'data-theme' => 'b'}
|
2
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
3
|
+
%li{ :'data-role' => 'list-divider'} Server message
|
4
|
+
%li
|
5
|
+
%h3 Method not allowed on given resource
|
6
|
+
%li{ :'data-role' => 'list-divider'} Original request URI
|
7
|
+
%li
|
8
|
+
%a{ :href => request.env['REQUEST_URI'], :'data-ajax' => 'false'}
|
9
|
+
%span=request.env['REQUEST_URI']
|
10
|
+
%span{ :class => 'ui-li-count'} Retry
|
11
|
+
|
12
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
13
|
+
%h3 Parameters
|
14
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
15
|
+
- if params.keys.empty?
|
16
|
+
%li{ :'data-role' => 'list-divider'} No parameters
|
17
|
+
- params.each do |key, value|
|
18
|
+
%li{ :'data-role' => 'list-divider'}=key
|
19
|
+
%li
|
20
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|
21
|
+
|
22
|
+
|
23
|
+
%div{ 'data-role' => :collapsible, 'data-collapsed' => "true"}
|
24
|
+
%h3 Request details
|
25
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'e'}
|
26
|
+
- request.env.each do |key, value|
|
27
|
+
%li{ :'data-role' => 'list-divider'}=key
|
28
|
+
%li
|
29
|
+
%span{:style => 'font-weight:normal;'}=value.inspect
|