deltacloud-core 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +145 -0
- data/NOTICE +10 -1
- data/Rakefile +50 -2
- data/bin/deltacloudd +111 -14
- data/config/addresses.xml +14 -0
- data/config/condor.yaml +30 -0
- data/config/drivers/azure.yaml +3 -0
- data/config/drivers/condor.yaml +3 -0
- data/config/{drivers.yaml → drivers/ec2.yaml} +5 -34
- data/config/drivers/eucalyptus.yaml +8 -0
- data/config/drivers/gogrid.yaml +3 -0
- data/config/drivers/mock.yaml +3 -0
- data/config/drivers/opennebula.yaml +4 -0
- data/config/drivers/rackspace.yaml +3 -0
- data/config/drivers/rhevm.yaml +3 -0
- data/config/drivers/rimuhosting.yaml +3 -0
- data/config/drivers/sbc.yaml +2 -0
- data/config/drivers/terremark.yaml +3 -0
- data/config/drivers/vsphere.yaml +8 -0
- data/deltacloud-core.gemspec +13 -5
- data/deltacloud.rb +4 -2
- data/lib/deltacloud/backend_capability.rb +2 -2
- data/lib/deltacloud/base_driver/base_driver.rb +23 -52
- data/lib/deltacloud/base_driver/exceptions.rb +168 -0
- data/lib/deltacloud/base_driver/features.rb +31 -12
- data/lib/deltacloud/base_driver/mock_driver.rb +2 -1
- data/lib/deltacloud/core_ext/string.rb +2 -0
- data/lib/deltacloud/drivers/azure/azure_driver.rb +5 -5
- data/lib/deltacloud/drivers/condor/condor_client.rb +273 -0
- data/lib/deltacloud/drivers/condor/condor_driver.rb +236 -0
- data/lib/deltacloud/drivers/condor/ip_agents/confserver.rb +75 -0
- data/lib/deltacloud/drivers/condor/ip_agents/default.rb +84 -0
- data/lib/deltacloud/drivers/ec2/ec2_driver.rb +326 -95
- data/lib/deltacloud/drivers/ec2/ec2_mock_driver.rb +3 -3
- data/lib/deltacloud/drivers/eucalyptus/eucalyptus_driver.rb +40 -8
- data/lib/deltacloud/drivers/gogrid/gogrid_client.rb +7 -7
- data/lib/deltacloud/drivers/gogrid/gogrid_driver.rb +42 -25
- data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob1.yml +6 -4
- data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob2.yml +7 -5
- data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob3.yml +6 -4
- data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob4.yml +6 -4
- data/lib/deltacloud/drivers/mock/data/{buckets/blobs → blobs}/blob5.yml +6 -4
- data/lib/deltacloud/drivers/mock/data/buckets/bucket1.yml +7 -1
- data/lib/deltacloud/drivers/mock/data/buckets/bucket2.yml +6 -1
- data/lib/deltacloud/drivers/mock/data/images/img1.yml +6 -2
- data/lib/deltacloud/drivers/mock/data/images/img2.yml +6 -2
- data/lib/deltacloud/drivers/mock/data/images/img3.yml +6 -2
- data/lib/deltacloud/drivers/mock/data/instances/inst0.yml +11 -10
- data/lib/deltacloud/drivers/mock/data/instances/inst1.yml +14 -7
- data/lib/deltacloud/drivers/mock/data/instances/inst2.yml +14 -7
- data/lib/deltacloud/drivers/mock/data/storage_snapshots/snap1.yml +3 -2
- data/lib/deltacloud/drivers/mock/data/storage_snapshots/snap2.yml +3 -2
- data/lib/deltacloud/drivers/mock/data/storage_snapshots/snap3.yml +3 -2
- data/lib/deltacloud/drivers/mock/data/storage_volumes/vol1.yml +4 -3
- data/lib/deltacloud/drivers/mock/data/storage_volumes/vol2.yml +4 -3
- data/lib/deltacloud/drivers/mock/data/storage_volumes/vol3.yml +4 -3
- data/lib/deltacloud/drivers/mock/mock_client.rb +101 -0
- data/lib/deltacloud/drivers/mock/mock_driver.rb +367 -429
- data/lib/deltacloud/drivers/opennebula/opennebula_driver.rb +6 -0
- data/lib/deltacloud/drivers/rackspace/rackspace_driver.rb +59 -9
- data/lib/deltacloud/drivers/rhevm/rhevm_client.rb +62 -8
- data/lib/deltacloud/drivers/rhevm/rhevm_driver.rb +100 -45
- data/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb +3 -2
- data/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb +8 -11
- data/lib/deltacloud/drivers/sbc/sbc_client.rb +6 -6
- data/lib/deltacloud/drivers/sbc/sbc_driver.rb +16 -0
- data/lib/deltacloud/drivers/terremark/terremark_driver.rb +17 -12
- data/lib/deltacloud/drivers/vsphere/vsphere_client.rb +140 -0
- data/lib/deltacloud/drivers/vsphere/vsphere_driver.rb +405 -0
- data/lib/deltacloud/drivers/vsphere/vsphere_filemanager.rb +182 -0
- data/lib/deltacloud/hardware_profile.rb +1 -1
- data/lib/deltacloud/helpers.rb +2 -1
- data/lib/deltacloud/helpers/application_helper.rb +92 -20
- data/lib/deltacloud/helpers/blob_stream.rb +160 -12
- data/lib/deltacloud/helpers/conversion_helper.rb +6 -2
- data/lib/deltacloud/helpers/json_helper.rb +31 -0
- data/lib/deltacloud/models/address.rb +28 -0
- data/lib/deltacloud/models/base_model.rb +5 -1
- data/lib/deltacloud/models/blob.rb +1 -1
- data/lib/deltacloud/models/bucket.rb +10 -0
- data/lib/deltacloud/models/firewall.rb +22 -0
- data/lib/deltacloud/models/firewall_rule.rb +23 -0
- data/lib/deltacloud/models/image.rb +12 -0
- data/lib/deltacloud/models/instance.rb +20 -2
- data/lib/deltacloud/models/key.rb +1 -1
- data/lib/deltacloud/runner.rb +3 -3
- data/lib/deltacloud/validation.rb +3 -7
- data/lib/drivers.rb +7 -1
- data/lib/sinatra/body_proxy.rb +34 -0
- data/lib/sinatra/lazy_auth.rb +5 -0
- data/lib/sinatra/rabbit.rb +54 -31
- data/lib/sinatra/rack_accept.rb +157 -0
- data/lib/sinatra/rack_date.rb +38 -0
- data/lib/sinatra/rack_etag.rb +2 -3
- data/lib/sinatra/rack_matrix_params.rb +51 -29
- data/lib/sinatra/rack_runtime.rb +1 -1
- data/lib/sinatra/rack_syslog.rb +86 -0
- data/lib/sinatra/url_for.rb +14 -1
- data/public/images/address.png +0 -0
- data/public/images/balancer.png +0 -0
- data/public/images/blob.png +0 -0
- data/public/images/bucket.png +0 -0
- data/public/images/cloud.png +0 -0
- data/public/images/firewall.png +0 -0
- data/public/images/image.png +0 -0
- data/public/images/key.png +0 -0
- data/public/images/machine.png +0 -0
- data/public/images/profile.png +0 -0
- data/public/images/realm.png +0 -0
- data/public/images/snapshot.png +0 -0
- data/public/images/volume.png +0 -0
- data/public/javascripts/application.js +119 -16
- data/public/javascripts/jquery.min.js +18 -0
- data/public/javascripts/jquery.mobile-1.0b1.min.js +146 -0
- data/public/stylesheets/compiled/application.css +8 -0
- data/public/stylesheets/images/ajax-loader.png +0 -0
- data/public/{images → stylesheets/images}/bread-bg.png +0 -0
- data/public/{images → stylesheets/images}/error.png +0 -0
- data/public/{images → stylesheets/images}/grid.png +0 -0
- data/public/stylesheets/images/icon-search-black.png +0 -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/{images → stylesheets/images}/logo-wide.png +0 -0
- data/public/{images → stylesheets/images}/pending.png +0 -0
- data/public/{images → stylesheets/images}/rails.png +0 -0
- data/public/{images → stylesheets/images}/running.png +0 -0
- data/public/{images → stylesheets/images}/stopped.png +0 -0
- data/public/{images → stylesheets/images}/topbar-bg.png +0 -0
- data/public/stylesheets/jquery.mobile-1.0b1.min.css +8 -0
- data/public/stylesheets/new.css +53 -0
- data/server.rb +487 -175
- data/support/condor/bash/cached_images.sh +8 -0
- data/support/condor/bash/cloud_exit_hook.sh +17 -0
- data/support/condor/bash/cloud_functions +175 -0
- data/support/condor/bash/cloud_prepare_hook.sh +20 -0
- data/support/condor/bash/libvirt_cloud_script.sh +13 -0
- data/support/condor/config/50condor_cloud.config +37 -0
- data/support/condor/config/50condor_cloud_node.config +37 -0
- data/support/condor/config/condor-cloud +2 -0
- data/support/condor/config/condor_config.local +44 -0
- data/support/fedora/deltacloud-core +48 -26
- data/support/fedora/deltacloud-core-config +26 -0
- data/support/fedora/deltacloud-core.spec +314 -68
- data/support/fedora/deltacloudd-fedora +5 -0
- data/tests/common.rb +34 -4
- data/tests/drivers/mock/api_test.rb +3 -3
- data/tests/drivers/mock/images_test.rb +12 -0
- data/tests/drivers/mock/instances_test.rb +2 -0
- data/tests/rabbit_test.rb +2 -2
- data/views/addresses/_address.html.haml +6 -0
- data/views/addresses/associate.html.haml +12 -0
- data/views/addresses/index.html.haml +9 -0
- data/views/addresses/index.xml.haml +4 -0
- data/views/addresses/show.html.haml +21 -0
- data/views/addresses/show.xml.haml +14 -0
- data/views/api/show.html.haml +6 -11
- data/views/api/show.xml.haml +2 -0
- data/views/blobs/new.html.haml +24 -23
- data/views/blobs/show.html.haml +30 -31
- data/views/buckets/index.html.haml +9 -21
- data/views/buckets/index.xml.haml +3 -7
- data/views/buckets/new.html.haml +13 -12
- data/views/buckets/show.html.haml +22 -22
- data/views/buckets/show.xml.haml +5 -3
- data/views/docs/collection.html.haml +23 -34
- data/views/docs/collection.xml.haml +2 -2
- data/views/docs/index.html.haml +9 -13
- data/views/docs/index.xml.haml +1 -1
- data/views/docs/operation.html.haml +28 -38
- data/views/docs/operation.xml.haml +1 -1
- data/views/drivers/index.html.haml +8 -13
- data/views/drivers/show.html.haml +18 -18
- data/views/error.html.haml +32 -27
- data/views/errors/400.html.haml +41 -0
- data/views/errors/{validation_failure.xml.haml → 400.xml.haml} +0 -4
- data/views/errors/401.html.haml +41 -0
- data/views/errors/{auth_exception.xml.haml → 401.xml.haml} +0 -0
- data/views/errors/403.html.haml +42 -0
- data/views/errors/{not_allowed.xml.haml → 403.xml.haml} +0 -0
- data/views/errors/404.html.haml +29 -0
- data/views/errors/{not_found.xml.haml → 404.xml.haml} +1 -1
- data/views/errors/405.html.haml +29 -0
- data/views/errors/405.xml.haml +5 -0
- data/views/errors/500.html.haml +43 -0
- data/views/errors/500.xml.haml +5 -0
- data/views/errors/502.html.haml +43 -0
- data/views/errors/{backend_error.xml.haml → 502.xml.haml} +1 -2
- data/views/errors/backend_capability_failure.html.haml +27 -9
- data/views/firewalls/index.html.haml +15 -0
- data/views/firewalls/index.xml.haml +28 -0
- data/views/firewalls/new.html.haml +11 -0
- data/views/firewalls/new_rule.html.haml +20 -0
- data/views/firewalls/show.html.haml +42 -0
- data/views/firewalls/show.xml.haml +26 -0
- data/views/hardware_profiles/index.html.haml +15 -23
- data/views/hardware_profiles/show.html.haml +22 -18
- data/views/images/index.html.haml +11 -23
- data/views/images/index.xml.haml +4 -13
- data/views/images/new.html.haml +12 -13
- data/views/images/show.html.haml +26 -20
- data/views/images/show.xml.haml +2 -1
- data/views/instance_states/show.html.haml +21 -25
- data/views/instances/index.html.haml +13 -30
- data/views/instances/index.xml.haml +2 -23
- data/views/instances/new.html.haml +83 -88
- data/views/instances/show.html.haml +53 -55
- data/views/instances/show.xml.haml +12 -10
- data/views/keys/index.html.haml +13 -24
- data/views/keys/new.html.haml +7 -7
- data/views/keys/show.html.haml +26 -21
- data/views/layout.html.haml +28 -27
- data/views/load_balancers/index.html.haml +11 -31
- data/views/load_balancers/index.xml.haml +0 -1
- data/views/load_balancers/new.html.haml +1 -1
- data/views/load_balancers/show.html.haml +33 -34
- data/views/load_balancers/show.xml.haml +2 -2
- data/views/realms/index.html.haml +11 -24
- data/views/realms/index.xml.haml +2 -8
- data/views/realms/show.html.haml +17 -15
- data/views/realms/show.xml.haml +2 -1
- data/views/storage_snapshots/index.html.haml +11 -21
- data/views/storage_snapshots/index.xml.haml +2 -5
- data/views/storage_snapshots/new.html.haml +1 -1
- data/views/storage_snapshots/show.html.haml +21 -13
- data/views/storage_snapshots/show.xml.haml +2 -1
- data/views/storage_volumes/index.html.haml +11 -34
- data/views/storage_volumes/new.html.haml +1 -1
- data/views/storage_volumes/show.html.haml +33 -27
- data/views/storage_volumes/show.xml.haml +2 -1
- metadata +266 -178
- data/lib/sinatra/respond_to.rb +0 -248
- data/support/fedora/deltacloudd +0 -128
- data/support/fedora/rubygem-deltacloud-core.spec +0 -127
- data/views/accounts/index.html.haml +0 -11
- data/views/accounts/show.html.haml +0 -30
- data/views/errors/auth_exception.html.haml +0 -8
- data/views/errors/backend_error.html.haml +0 -22
- data/views/errors/not_allowed.html.haml +0 -6
- data/views/errors/not_found.html.haml +0 -6
- data/views/errors/validation_failure.html.haml +0 -11
@@ -1,57 +1,55 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
=header "Instance"
|
2
|
+
=subheader @instance.id
|
3
3
|
|
4
|
-
%
|
5
|
-
%
|
6
|
-
%
|
7
|
-
%
|
8
|
-
|
9
|
-
|
10
|
-
%
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
%
|
16
|
-
|
17
|
-
|
18
|
-
%
|
19
|
-
%
|
4
|
+
%div{ :'data-role' => :content, :'data-theme' => 'c'}
|
5
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
|
6
|
+
%li{ :'data-role' => 'list-divider'} Name
|
7
|
+
%li
|
8
|
+
%p{ :'data-role' => 'fieldcontain'}=@instance.name
|
9
|
+
%li{ :'data-role' => 'list-divider'} Owner
|
10
|
+
%li
|
11
|
+
%p{ :'data-role' => 'fieldcontain'}=@instance.owner_id
|
12
|
+
%li{ :'data-role' => 'list-divider'} State
|
13
|
+
%li
|
14
|
+
%p{ :'data-role' => 'fieldcontain'}=@instance.state
|
15
|
+
%li{ :'data-role' => 'list-divider'} Image
|
16
|
+
%li
|
17
|
+
%a{ :href => image_url(@instance.image_id), :'data-ajax' => 'false' }=@instance.image_id
|
18
|
+
%li{ :'data-role' => 'list-divider'} Hardware Profile
|
19
|
+
%li
|
20
20
|
- prof = @instance.instance_profile
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
%
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
%
|
30
|
-
|
31
|
-
|
32
|
-
%
|
33
|
-
%
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
%
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
%
|
50
|
-
%
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
=link_to_action 'Create Image', url_for("/api/images/new?instance_id=#{@instance.id}"), :get
|
57
|
-
|
21
|
+
%a{ :href => hardware_profile_url(prof.name), :'data-ajax' => 'false'}
|
22
|
+
=[prof.name, format_instance_profile(prof)].join(', ')
|
23
|
+
%li{ :'data-role' => 'list-divider'} Realm
|
24
|
+
%li
|
25
|
+
- if @instance.realm_id
|
26
|
+
%a{ :href => realm_url(@instance.realm_id), :'data-ajax' => 'false' }=@instance.realm_id
|
27
|
+
- else
|
28
|
+
default
|
29
|
+
%li{ :'data-role' => 'list-divider'} Public addresses
|
30
|
+
%li
|
31
|
+
%p{ :'data-role' => 'fieldcontain'}=@instance.public_addresses.map.join(',')
|
32
|
+
%li{ :'data-role' => 'list-divider'} Private addresses
|
33
|
+
%li
|
34
|
+
%p{ :'data-role' => 'fieldcontain'}=@instance.private_addresses.map.join(',')
|
35
|
+
- if @instance.password or @instance.keyname
|
36
|
+
%li{ :'data-role' => 'list-divider'} Authentication
|
37
|
+
- if @instance.password
|
38
|
+
%li{ :'data-role' => 'list-divider'} Username
|
39
|
+
%li=@instance.username
|
40
|
+
%li{ :'data-role' => 'list-divider'} Password
|
41
|
+
%li=@instance.password
|
42
|
+
- if @instance.keyname
|
43
|
+
%li{ :'data-role' => 'list-divider'} SSH key name
|
44
|
+
%li
|
45
|
+
%a{ :href => key_url(@instance.keyname), :'data-ajax' => 'false'}=@instance.keyname
|
46
|
+
- if @instance.firewalls
|
47
|
+
%li{ :'data-role' => 'list-divider'} Firewalls
|
48
|
+
%li=@instance.firewalls.join(", ")
|
49
|
+
%li{ :'data-role' => 'list-divider'} Actions
|
50
|
+
%li
|
51
|
+
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
|
52
|
+
- @instance.actions.each do |action|
|
53
|
+
=link_to_action action, self.send(:"#{action}_instance_url", @instance.id), instance_action_method(action)
|
54
|
+
- if @instance.can_create_image?
|
55
|
+
=link_to_action 'Create Image', api_url_for("images/new?instance_id=#{@instance.id}"), :get
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
- unless defined?(partial)
|
2
|
+
!!! XML
|
2
3
|
%instance{:href => instance_url(@instance.id), :id => @instance.id}
|
3
4
|
- if @instance.name
|
4
5
|
%name<
|
@@ -32,26 +33,27 @@
|
|
32
33
|
%public_addresses<
|
33
34
|
- @instance.public_addresses.each do |address|
|
34
35
|
- if address.class.eql?(Hash) and address[:address]!=""
|
35
|
-
|
36
|
-
=address[:address]
|
36
|
+
=format_address(address[:address], :port => address[:port], :type => address[:type], :mac => address[:mac])
|
37
37
|
- elsif address.class.eql?(String)
|
38
|
-
|
39
|
-
=address
|
38
|
+
=format_address(address)
|
40
39
|
- if @instance.private_addresses
|
41
40
|
%private_addresses<
|
42
41
|
- @instance.private_addresses.each do |address|
|
43
|
-
|
44
|
-
|
42
|
+
=format_address(address)
|
43
|
+
- if @instance.firewalls
|
44
|
+
%firewalls<
|
45
|
+
- @instance.firewalls.each do |firewall|
|
46
|
+
%firewall{:href => firewall_url(firewall), :id => firewall }
|
45
47
|
- if driver_has_auth_features?
|
46
48
|
%authentication{ :type => driver_auth_feature_name }
|
47
49
|
- if @instance.authn_feature_failed?
|
48
50
|
%error #{@instance.authn_error}
|
49
51
|
- else
|
50
|
-
- if
|
52
|
+
- if @instance.password
|
51
53
|
%login
|
52
54
|
%username #{@instance.username}
|
53
|
-
%password
|
54
|
-
- if
|
55
|
+
%password=cdata(@instance.password)
|
56
|
+
- if @instance.keyname
|
55
57
|
%login
|
56
58
|
%keyname #{@instance.keyname}
|
57
59
|
|
data/views/keys/index.html.haml
CHANGED
@@ -1,26 +1,15 @@
|
|
1
|
-
|
1
|
+
=header "Keys" do
|
2
|
+
%a{ :href => api_url_for('keys/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new key
|
2
3
|
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%tr
|
6
|
-
%th ID
|
7
|
-
%th Credentials details
|
8
|
-
%th Actions
|
9
|
-
%tbody
|
4
|
+
%div{ :'data-role' => :content, :'data-theme' => 'c'}
|
5
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
|
10
6
|
- @elements.each do |key|
|
11
|
-
%
|
12
|
-
%
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- if driver.respond_to?(:destroy_key)
|
21
|
-
=link_to_action 'Destroy', destroy_key_url(key.id), :delete
|
22
|
-
%tfoot
|
23
|
-
- if driver.respond_to?(:create_key)
|
24
|
-
%tr
|
25
|
-
%td{:colspan => 3, :style => "text-align:right;"}
|
26
|
-
=link_to 'Create »', "#{url_for('/api/keys/new')}", :class => 'button'
|
7
|
+
%li
|
8
|
+
%a{ :href => key_url(key.id), :'data-ajax' => 'false'}
|
9
|
+
%img{ :class => 'ui-link-thumb', :src => '/images/key.png'}
|
10
|
+
%h3=key.id
|
11
|
+
%p
|
12
|
+
- if key.credential_type.eql?(:key)
|
13
|
+
= key.fingerprint
|
14
|
+
- if key.credential_type.eql?(:password)
|
15
|
+
= "#{key.username} - #{key.password}"
|
data/views/keys/new.html.haml
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
=header "Create new SSH key"
|
2
2
|
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
%
|
3
|
+
%div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
|
4
|
+
%form{ :action => keys_url, :method => :post}
|
5
|
+
%div{ 'data-role' => :fieldcontain }
|
6
|
+
%label{ :for => :name} Key name:
|
7
|
+
%input{ :type => :text, :id => :name, :name => :name, :value => '' }
|
8
|
+
%button{ :type => :submit} Create key
|
data/views/keys/show.html.haml
CHANGED
@@ -1,22 +1,27 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
=header "Key"
|
2
|
+
=subheader @key.id
|
3
3
|
|
4
|
-
%
|
5
|
-
-
|
6
|
-
%
|
7
|
-
|
8
|
-
%
|
9
|
-
|
10
|
-
-
|
11
|
-
|
12
|
-
%
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
%
|
18
|
-
%
|
19
|
-
|
20
|
-
%
|
21
|
-
%
|
22
|
-
|
4
|
+
%div{ :'data-role' => :content, :'data-theme' => 'c'}
|
5
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
|
6
|
+
%li{ :'data-role' => 'list-divider'} Identifier
|
7
|
+
%li
|
8
|
+
%p{ :'data-role' => 'fieldcontain'}=@key.id
|
9
|
+
- if @key.is_password?
|
10
|
+
%li{ :'data-role' => 'list-divider'} Username
|
11
|
+
%li
|
12
|
+
%p{ :'data-role' => 'fieldcontain'}=@key.username
|
13
|
+
%li{ :'data-role' => 'list-divider'} Password
|
14
|
+
%li
|
15
|
+
%p{ :'data-role' => 'fieldcontain'}=@key.password
|
16
|
+
- else
|
17
|
+
%li{ :'data-role' => 'list-divider'} Fingerprint
|
18
|
+
%li
|
19
|
+
%p{ :'data-role' => 'fieldcontain'}=@key.fingerprint
|
20
|
+
%li{ :'data-role' => 'list-divider'} PEM key
|
21
|
+
%li
|
22
|
+
%p{ :'data-role' => 'fieldcontain'}
|
23
|
+
%pre=@key.pem_rsa_key
|
24
|
+
%li{ :'data-role' => 'list-divider'} Actions
|
25
|
+
%li
|
26
|
+
%div{ :'data-role' => 'controlgroup', :'data-type' => "horizontal" }
|
27
|
+
=link_to_action "Destroy", destroy_key_url(@key.id), :delete
|
data/views/layout.html.haml
CHANGED
@@ -1,31 +1,32 @@
|
|
1
|
-
!!!
|
2
|
-
!!! XML
|
3
|
-
|
1
|
+
!!!5
|
4
2
|
%html
|
5
3
|
%head
|
6
|
-
|
7
|
-
= stylesheet_link_tag '/stylesheets/
|
8
|
-
|
9
|
-
|
10
|
-
= stylesheet_link_tag '/stylesheets/compiled/application.css', :media => 'screen, projection'
|
11
|
-
%script{:type => "text/javascript", :src => "/javascripts/jquery-1.4.2.min.js" }
|
4
|
+
%title Deltacloud API #{settings.version}
|
5
|
+
= stylesheet_link_tag '/stylesheets/jquery.mobile-1.0b1.min.css'
|
6
|
+
= stylesheet_link_tag '/stylesheets/new.css'
|
7
|
+
%script{:type => "text/javascript", :src => "/javascripts/jquery.min.js" }
|
12
8
|
%script{:type => "text/javascript", :src => "/javascripts/application.js" }
|
9
|
+
%script{:type => "text/javascript", :src => "/javascripts/jquery.mobile-1.0b1.min.js" }
|
10
|
+
:javascript
|
11
|
+
$(document).ready(function() {
|
12
|
+
$(document).bind("mobileinit", function(){
|
13
|
+
$.mobile.ajaxEnabled = false;
|
14
|
+
$.mobile.hashListeningEnabled = false;
|
15
|
+
});
|
16
|
+
})
|
17
|
+
|
13
18
|
%body
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
#copyright
|
29
|
-
Copyright 2009-2011
|
30
|
-
%a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
|
31
|
-
and individual contributors.
|
19
|
+
%div{ 'data-role' => :page }
|
20
|
+
= yield
|
21
|
+
%div{ 'data-role' => :footer, :'data-theme' => 'a'}
|
22
|
+
%div{ 'data-role' => :navbar}
|
23
|
+
%ul
|
24
|
+
%li
|
25
|
+
%a{ :'data-icon' => 'home', :href => api_url_for(''), :'data-ajax' => 'false'} Home
|
26
|
+
%li=link_to_format(:xml)
|
27
|
+
%li=link_to_format(:json)
|
28
|
+
%div{ 'data-role' => :header, 'data-theme' => 'a' }
|
29
|
+
#copyright
|
30
|
+
Copyright 2009-2011
|
31
|
+
%a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
|
32
|
+
and individual contributors.
|
@@ -1,33 +1,13 @@
|
|
1
|
-
|
1
|
+
=header "Load balancers" do
|
2
|
+
%a{ :href => api_url_for('load_balancers/new'), :'data-icon' => :plus, :'data-role' => :button, :class => 'ui-btn-right'} Create new load balancer
|
3
|
+
=subheader "#{Thread::current[:provider] || ENV['API_PROVIDER'] || 'default'}"
|
2
4
|
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%tr
|
6
|
-
%th ID
|
7
|
-
%th Hostname
|
8
|
-
%th Realm
|
9
|
-
%th Balancer port
|
10
|
-
%th Instances port
|
11
|
-
%th Actions
|
12
|
-
%tbody
|
5
|
+
%div{ :'data-role' => :content, :'data-theme' => 'c'}
|
6
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'a'}
|
13
7
|
- @elements.each do |balancer|
|
14
|
-
%
|
15
|
-
%
|
16
|
-
|
17
|
-
|
18
|
-
=
|
19
|
-
|
20
|
-
=link_to balancer.realms.first.id, realm_url( balancer.realms.first.id )
|
21
|
-
%td
|
22
|
-
- balancer.listeners.each do |listener|
|
23
|
-
="#{listener.protocol}[#{listener.load_balancer_port}]<br/>"
|
24
|
-
%td
|
25
|
-
- balancer.listeners.each do |listener|
|
26
|
-
="#{listener.protocol}[#{listener.load_balancer_port}]<br/>"
|
27
|
-
%td
|
28
|
-
=link_to_action 'Destroy', destroy_load_balancer_url(balancer.id), :delete
|
29
|
-
%tfoot
|
30
|
-
%tr
|
31
|
-
%td{:colspan => 6, :style => "text-align:right;"}
|
32
|
-
=link_to 'Create »', "#{url_for('/api/load_balancers/new')}", :class => 'button'
|
33
|
-
|
8
|
+
%li
|
9
|
+
%a{ :href => load_balancer_url(balancer.id), :'data-ajax' => 'false'}
|
10
|
+
%img{ :class => 'ui-link-thumb', :src => '/images/balancer.png'}
|
11
|
+
%h3=balancer.id
|
12
|
+
%p=balancer.public_addresses.join(', ')
|
13
|
+
%span{ :class => 'ui-li-count'}=balancer.realms.first.id
|
@@ -1,37 +1,36 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
=header "Loadbalancer"
|
2
|
+
=subheader @load_balancer.id
|
3
3
|
|
4
|
-
%
|
5
|
-
%
|
6
|
-
%
|
7
|
-
%
|
8
|
-
|
9
|
-
-
|
10
|
-
|
11
|
-
%
|
12
|
-
=
|
13
|
-
%
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
-
|
24
|
-
|
25
|
-
|
26
|
-
%dd
|
27
|
-
=inst.id
|
28
|
-
=link_to_action 'Delete', unregister_load_balancer_url(@load_balancer.id, :instance_id => inst.id), :post
|
4
|
+
%div{ :'data-role' => :content, :'data-theme' => 'c'}
|
5
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
|
6
|
+
%li{ :'data-role' => 'list-divider'} Created at
|
7
|
+
%li
|
8
|
+
%p{ :'data-role' => 'fieldcontain'}=@load_balancer.created_at
|
9
|
+
%li{ :'data-role' => 'list-divider'} Public addresses
|
10
|
+
- @load_balancer.public_addresses.each do |address|
|
11
|
+
%li
|
12
|
+
%p{ :'data-role' => 'fieldcontain'}=address
|
13
|
+
%li{ :'data-role' => 'list-divider'} Realms
|
14
|
+
- @load_balancer.realms.each do |realm|
|
15
|
+
%li
|
16
|
+
%a{ :href => realm_url(realm.id), :'data-ajax' => 'false'}
|
17
|
+
%h3=realm.name
|
18
|
+
%li{ :'data-role' => 'list-divider'} Instances
|
19
|
+
- @load_balancer.instances.each do |instance|
|
20
|
+
%li
|
21
|
+
%a{ :href => instance_url(instance.id), :'data-ajax' => 'false'}
|
22
|
+
%h3=instance.name
|
23
|
+
%li{ :'data-role' => 'list-divider'} Actions
|
24
|
+
%li
|
25
|
+
=link_to_action "Destroy", destroy_load_balancer_url(@load_balancer.id), :delete
|
29
26
|
|
30
|
-
|
31
|
-
%
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
=header "Listeners", :back => 'false'
|
28
|
+
%ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
|
29
|
+
- @load_balancer.listeners.each do |listener|
|
30
|
+
%li{ :'data-role' => 'list-divider'} Load balancer port
|
31
|
+
%li
|
32
|
+
%p{ :'data-role' => 'fieldcontain'}=listener.load_balancer_port
|
33
|
+
%li{ :'data-role' => 'list-divider'} Instance port
|
34
|
+
%li
|
35
|
+
%p{ :'data-role' => 'fieldcontain'}=listener.instance_port
|
37
36
|
|