deltacloud-core 0.1.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/DISCLAIMER +8 -0
- data/{COPYING → LICENSE} +0 -0
- data/NOTICE +13 -0
- data/Rakefile +50 -51
- data/bin/deltacloudd +8 -1
- data/config.ru +0 -2
- data/config/drivers.yaml +48 -0
- data/deltacloud-core.gemspec +75 -0
- data/deltacloud.rb +3 -2
- data/lib/deltacloud/backend_capability.rb +15 -3
- data/lib/deltacloud/base_driver.rb +0 -2
- data/lib/deltacloud/base_driver/base_driver.rb +85 -89
- data/lib/deltacloud/base_driver/features.rb +61 -7
- data/lib/deltacloud/base_driver/mock_driver.rb +42 -43
- data/lib/deltacloud/core_ext.rb +18 -0
- data/lib/deltacloud/core_ext/integer.rb +31 -0
- data/lib/deltacloud/core_ext/string.rb +50 -0
- data/lib/deltacloud/drivers/azure/azure_driver.rb +71 -22
- data/lib/deltacloud/drivers/ec2/ec2_driver.rb +641 -584
- data/lib/deltacloud/drivers/ec2/ec2_mock_driver.rb +0 -2
- data/lib/deltacloud/drivers/eucalyptus/eucalyptus_driver.rb +167 -0
- data/lib/deltacloud/drivers/gogrid/gogrid_client.rb +39 -1
- data/lib/deltacloud/drivers/gogrid/gogrid_driver.rb +41 -25
- data/lib/deltacloud/drivers/mock/data/buckets/blobs/blob1.yml +6 -3
- data/lib/deltacloud/drivers/mock/data/buckets/blobs/blob2.yml +6 -3
- data/lib/deltacloud/drivers/mock/data/buckets/blobs/blob3.yml +4 -2
- data/lib/deltacloud/drivers/mock/data/buckets/blobs/blob4.yml +5 -2
- data/lib/deltacloud/drivers/mock/data/buckets/blobs/blob5.yml +4 -2
- data/lib/deltacloud/drivers/mock/data/instances/inst0.yml +1 -0
- data/lib/deltacloud/drivers/mock/data/instances/inst1.yml +1 -0
- data/lib/deltacloud/drivers/mock/data/instances/inst2.yml +1 -0
- data/lib/deltacloud/drivers/mock/data/storage_volumes/vol1.yml +1 -0
- data/lib/deltacloud/drivers/mock/data/storage_volumes/vol2.yml +1 -0
- data/lib/deltacloud/drivers/mock/data/storage_volumes/vol3.yml +1 -0
- data/lib/deltacloud/drivers/mock/mock_driver.rb +138 -30
- data/lib/deltacloud/drivers/opennebula/cloud_client.rb +13 -15
- data/lib/deltacloud/drivers/opennebula/occi_client.rb +13 -15
- data/lib/deltacloud/drivers/opennebula/opennebula_driver.rb +13 -15
- data/lib/deltacloud/drivers/rackspace/rackspace_driver.rb +224 -113
- data/lib/deltacloud/drivers/rhevm/rhevm_client.rb +332 -0
- data/lib/deltacloud/drivers/rhevm/rhevm_driver.rb +221 -170
- data/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb +0 -1
- data/lib/deltacloud/drivers/sbc/sbc_client.rb +247 -0
- data/lib/deltacloud/drivers/sbc/sbc_driver.rb +297 -0
- data/lib/deltacloud/drivers/terremark/terremark_driver.rb +0 -2
- data/lib/deltacloud/hardware_profile.rb +1 -3
- data/lib/deltacloud/helpers.rb +0 -2
- data/lib/deltacloud/helpers/application_helper.rb +86 -12
- data/lib/deltacloud/helpers/blob_stream.rb +19 -2
- data/lib/deltacloud/helpers/conversion_helper.rb +0 -2
- data/lib/deltacloud/helpers/hardware_profiles_helper.rb +0 -2
- data/lib/deltacloud/method_serializer.rb +0 -2
- data/lib/deltacloud/models/base_model.rb +0 -2
- data/lib/deltacloud/models/blob.rb +1 -2
- data/lib/deltacloud/models/bucket.rb +0 -2
- data/lib/deltacloud/models/image.rb +0 -2
- data/lib/deltacloud/models/instance.rb +19 -2
- data/lib/deltacloud/models/instance_profile.rb +4 -2
- data/lib/deltacloud/models/key.rb +0 -2
- data/lib/deltacloud/models/load_balancer.rb +0 -2
- data/lib/deltacloud/models/realm.rb +0 -2
- data/lib/deltacloud/models/storage_snapshot.rb +0 -2
- data/lib/deltacloud/models/storage_volume.rb +4 -2
- data/lib/deltacloud/runner.rb +132 -0
- data/lib/deltacloud/state_machine.rb +0 -2
- data/lib/deltacloud/validation.rb +9 -7
- data/lib/drivers.rb +36 -48
- data/lib/sinatra/accept_media_types.rb +26 -0
- data/lib/sinatra/lazy_auth.rb +16 -0
- data/lib/sinatra/rabbit.rb +112 -54
- data/lib/sinatra/rack_driver_select.rb +50 -16
- data/lib/sinatra/rack_etag.rb +79 -0
- data/lib/sinatra/rack_matrix_params.rb +84 -0
- data/lib/sinatra/rack_runtime.rb +47 -0
- data/lib/sinatra/static_assets.rb +16 -0
- data/lib/sinatra/url_for.rb +31 -4
- data/public/favicon.ico +0 -0
- data/public/images/bread-bg.png +0 -0
- data/public/images/error.png +0 -0
- data/public/images/pending.png +0 -0
- data/public/images/running.png +0 -0
- data/public/images/stopped.png +0 -0
- data/public/javascripts/application.js +35 -0
- data/public/stylesheets/compiled/application.css +59 -5
- data/public/stylesheets/compiled/screen.css +1 -1
- data/server.rb +293 -29
- data/support/fedora/deltacloud-core +78 -0
- data/support/fedora/deltacloud-core.spec +143 -0
- data/support/fedora/deltacloudd +78 -18
- data/support/fedora/rubygem-deltacloud-core.spec +76 -40
- data/tests/common.rb +172 -0
- data/tests/drivers/mock/api_test.rb +133 -0
- data/tests/drivers/mock/hardware_profiles_test.rb +134 -0
- data/tests/drivers/mock/images_test.rb +126 -0
- data/tests/drivers/mock/instance_states_test.rb +71 -0
- data/tests/drivers/mock/instances_test.rb +236 -0
- data/tests/drivers/mock/realms_test.rb +93 -0
- data/tests/drivers/mock/setup.rb +3 -0
- data/tests/drivers/mock/url_for_test.rb +67 -0
- data/tests/drivers/rackspace/api_test.rb +41 -0
- data/tests/drivers/rackspace/hardware_profiles_test.rb +53 -0
- data/tests/drivers/rackspace/images_test.rb +40 -0
- data/tests/drivers/rackspace/instances_test.rb +161 -0
- data/tests/drivers/rackspace/realms_test.rb +36 -0
- data/tests/drivers/rackspace/setup.rb +14 -0
- data/tests/drivers/rhevm/api_test.rb +39 -0
- data/tests/drivers/rhevm/hardware_profiles_test.rb +53 -0
- data/tests/drivers/rhevm/images_test.rb +42 -0
- data/tests/drivers/rhevm/instances_test.rb +179 -0
- data/tests/drivers/rhevm/realms_test.rb +35 -0
- data/tests/drivers/rhevm/setup.rb +14 -0
- data/tests/rabbit_test.rb +52 -0
- data/views/api/show.html.haml +2 -5
- data/views/blobs/new.html.haml +17 -1
- data/views/blobs/show.html.haml +6 -0
- data/views/blobs/show.xml.haml +5 -1
- data/views/buckets/index.html.haml +1 -12
- data/views/buckets/index.xml.haml +3 -5
- data/views/docs/operation.html.haml +23 -11
- data/views/drivers/index.html.haml +15 -0
- data/views/drivers/index.xml.haml +7 -0
- data/views/drivers/show.html.haml +20 -0
- data/views/drivers/show.xml.haml +7 -0
- data/views/error.html.haml +31 -0
- data/views/errors/auth_exception.xml.haml +2 -1
- data/views/errors/backend_capability_failure.xml.haml +2 -1
- data/views/errors/backend_error.html.haml +3 -0
- data/views/errors/backend_error.xml.haml +2 -2
- data/views/errors/validation_failure.xml.haml +3 -2
- data/views/images/index.html.haml +1 -6
- data/views/images/index.xml.haml +2 -0
- data/views/images/new.html.haml +14 -0
- data/views/images/show.xml.haml +2 -0
- data/views/instances/index.html.haml +8 -6
- data/views/instances/index.xml.haml +4 -0
- data/views/instances/new.html.haml +40 -11
- data/views/instances/run.html.haml +9 -0
- data/views/instances/run.xml.haml +7 -0
- data/views/instances/run_command.html.haml +16 -0
- data/views/instances/show.html.haml +14 -0
- data/views/instances/show.xml.haml +12 -4
- data/views/layout.html.haml +7 -2
- data/views/load_balancers/index.html.haml +1 -1
- data/views/load_balancers/new.html.haml +2 -2
- data/views/load_balancers/show.html.haml +1 -1
- data/views/storage_snapshots/index.html.haml +3 -0
- data/views/storage_snapshots/new.html.haml +9 -0
- data/views/storage_volumes/attach.html.haml +20 -0
- data/views/storage_volumes/index.html.haml +16 -1
- data/views/storage_volumes/index.xml.haml +1 -10
- data/views/storage_volumes/new.html.haml +17 -0
- data/views/storage_volumes/show.html.haml +8 -0
- data/views/storage_volumes/show.xml.haml +25 -3
- metadata +197 -127
- data/lib/deltacloud/drivers/rackspace/rackspace_client.rb +0 -130
- data/parse.rb +0 -7
- data/test.rb +0 -3
- data/views/api/drivers.xml.haml +0 -6
@@ -0,0 +1,20 @@
|
|
1
|
+
%h1
|
2
|
+
Details for driver #{@name}
|
3
|
+
|
4
|
+
%dl
|
5
|
+
%di
|
6
|
+
%dt ID
|
7
|
+
%dd= @name
|
8
|
+
%di
|
9
|
+
%dt Name
|
10
|
+
%dd= @driver[:name]
|
11
|
+
%di
|
12
|
+
%dt Provider
|
13
|
+
%dd
|
14
|
+
- providers = driver_provider(@driver).keys.collect { |k| k.to_s }.sort
|
15
|
+
- if providers.empty?
|
16
|
+
None
|
17
|
+
- else
|
18
|
+
%ol
|
19
|
+
- providers.each do |k|
|
20
|
+
%li= k
|
@@ -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" ), 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.
|
@@ -1,7 +1,8 @@
|
|
1
1
|
%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
|
2
2
|
%parameter #{@error.name}
|
3
|
-
%message #{@error.message}
|
3
|
+
%message< #{cdata @error.message}
|
4
4
|
- unless @error.param.options.empty?
|
5
5
|
%valid_options
|
6
6
|
- @error.param.options.each do |v|
|
7
|
-
%value #{v}
|
7
|
+
%value< #{cdata v}
|
8
|
+
|
@@ -1,5 +1,4 @@
|
|
1
|
-
%h1
|
2
|
-
Images
|
1
|
+
%h1 Images
|
3
2
|
|
4
3
|
%table.display
|
5
4
|
%thead
|
@@ -10,8 +9,6 @@
|
|
10
9
|
Name
|
11
10
|
%th
|
12
11
|
Owner
|
13
|
-
%th
|
14
|
-
Architecture
|
15
12
|
%th
|
16
13
|
Description
|
17
14
|
%tbody
|
@@ -23,8 +20,6 @@
|
|
23
20
|
= image.name
|
24
21
|
%td
|
25
22
|
= link_to image.owner_id, images_url
|
26
|
-
%td
|
27
|
-
= image.architecture
|
28
23
|
%td
|
29
24
|
= image.description
|
30
25
|
|
data/views/images/index.xml.haml
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
%h1 Create image from #{@instance.id}
|
2
|
+
|
3
|
+
%form{ :action => images_url, :method => :post, :class => :new_instance }
|
4
|
+
%input{ :name => :instance_id, :type => :hidden, :value => @instance.id }/
|
5
|
+
%p
|
6
|
+
%label
|
7
|
+
Name:
|
8
|
+
%input{ :name => :name, :size => 30, :type => :text }/
|
9
|
+
%p
|
10
|
+
%label
|
11
|
+
Description:
|
12
|
+
%textarea{ :name => :description, :cols => 70, :rows => 20}
|
13
|
+
%p
|
14
|
+
%input{ :type => :submit, :value => 'Create' }
|
data/views/images/show.xml.haml
CHANGED
@@ -7,24 +7,26 @@
|
|
7
7
|
%th Owner
|
8
8
|
%th Name
|
9
9
|
%th Image
|
10
|
-
%th
|
10
|
+
%th Profile
|
11
11
|
%th State
|
12
12
|
%th Actions
|
13
13
|
%tbody
|
14
14
|
- @instances.each do |instance|
|
15
15
|
%tr
|
16
16
|
%td
|
17
|
-
= link_to instance.id, instance_url( instance.id )
|
17
|
+
= link_to truncate_words(instance.id), instance_url( instance.id )
|
18
18
|
%td
|
19
|
-
= link_to instance.owner_id,
|
19
|
+
= link_to instance.owner_id, "#{instances_url}?owner_id=#{instance.owner_id}"
|
20
20
|
%td
|
21
21
|
= instance.name
|
22
22
|
%td
|
23
|
-
= link_to instance.image_id, image_url( instance.image_id )
|
23
|
+
= link_to truncate_words(instance.image_id), image_url( instance.image_id )
|
24
24
|
%td
|
25
|
-
= instance.
|
25
|
+
= instance.hardware_profile ? link_to(instance.hardware_profile, hardware_profile_url( instance.instance_profile.id )) : 'default'
|
26
26
|
%td
|
27
|
-
= instance.state
|
27
|
+
= image_for_state(instance.state)
|
28
28
|
%td
|
29
29
|
-instance.actions.each do |action|
|
30
30
|
=link_to_action action, self.send(:"#{action}_instance_url", instance.id), instance_action_method(action)
|
31
|
+
- if driver.respond_to?(:run_on_instance) and instance.state=="RUNNING"
|
32
|
+
=link_to_action "Run command", url_for("/api/instances/#{instance.id}/run"), :get
|
@@ -13,6 +13,10 @@
|
|
13
13
|
%actions
|
14
14
|
- instance.actions.compact.each do |action|
|
15
15
|
%link{:rel => action, :href => self.send("#{action}_instance_url", instance.id), :method => instance_action_method(action)}
|
16
|
+
- if driver.respond_to?(:run_on_instance)
|
17
|
+
%link{:rel => 'run', :method => :post, :href => run_instance_url(instance.id)}
|
18
|
+
- if instance.can_create_image?
|
19
|
+
%link{:rel => 'create_image', :method => :post, :href => "#{create_image_url};instance_id=#{instance.id}"}
|
16
20
|
%public_addresses
|
17
21
|
- instance.public_addresses.each do |address|
|
18
22
|
%address #{address}
|
@@ -1,27 +1,40 @@
|
|
1
|
-
%h1
|
1
|
+
%h1 Launch new Instance
|
2
2
|
|
3
|
+
%h3{:class => "description"}= @image.description
|
3
4
|
%h2= @image.id
|
4
|
-
%h3= @image.description
|
5
5
|
|
6
|
-
%form{ :action => instances_url, :method => :post }
|
6
|
+
%form{ :action => instances_url, :method => :post, :class => :new_instance }
|
7
7
|
%input{ :name => :image_id, :type => :hidden, :value => @instance.image_id }/
|
8
8
|
%p
|
9
9
|
%label
|
10
|
-
|
11
|
-
|
10
|
+
Name:
|
11
|
+
%input{ :name => 'name', :size => 30, :type => :text }/
|
12
|
+
-if driver_has_feature?(:instance_count)
|
13
|
+
%p
|
14
|
+
%label
|
15
|
+
Number of instances:
|
16
|
+
%input{ :type => :text, :value => "1", :name => :instance_count }
|
17
|
+
-if driver_has_feature?(:sandboxing)
|
18
|
+
%p
|
19
|
+
%label
|
20
|
+
Sandbox?:
|
21
|
+
%input{ :type => :checkbox, :value => "1", :name => :sandbox }
|
12
22
|
-if driver_has_feature?(:register_to_load_balancer)
|
13
23
|
%p
|
14
24
|
%label
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
25
|
+
Load balancer to assign:
|
26
|
+
%select{:name => 'load_balancer_id'}
|
27
|
+
%option
|
28
|
+
- @load_balancers.each do |load_balancer|
|
29
|
+
%option{:value => load_balancer.id} #{load_balancer.id}
|
20
30
|
-if driver_has_feature?(:authentication_key)
|
21
31
|
%p
|
22
32
|
%label
|
23
33
|
Instance Keyname:
|
24
|
-
|
34
|
+
%select{:name => 'keyname'}
|
35
|
+
%option
|
36
|
+
- @keys.each do |key|
|
37
|
+
%option{ :value => key.id } #{key.id}
|
25
38
|
- if !@hardware_profiles.empty?
|
26
39
|
%h3 What size machine?
|
27
40
|
- for hwp in @hardware_profiles
|
@@ -60,4 +73,20 @@
|
|
60
73
|
%br/
|
61
74
|
%span.radio-group-details
|
62
75
|
= "#{realm.name}, #{realm.limit}"
|
76
|
+
- if driver_has_feature?(:user_files, :instances)
|
77
|
+
%h2 User-supplied files
|
78
|
+
%table
|
79
|
+
%thead
|
80
|
+
%tr
|
81
|
+
%th
|
82
|
+
%th Path
|
83
|
+
%th Content (must be base64 encoded)
|
84
|
+
%tbody
|
85
|
+
- 1.upto(5) do |i|
|
86
|
+
%tr
|
87
|
+
%td #{i.ordinalize} File:
|
88
|
+
%td
|
89
|
+
%input{ :name => "path#{i}", :size => 20 }
|
90
|
+
%td
|
91
|
+
%input{ :name => "content#{i}", :size => 50 }
|
63
92
|
%input{ :type => :submit, :name => "commit", :value => "create" }/
|
@@ -0,0 +1,16 @@
|
|
1
|
+
%h1
|
2
|
+
Run command on
|
3
|
+
= @instance.id
|
4
|
+
|
5
|
+
%form{ :action => run_instance_url(@instance.id), :method => :post }
|
6
|
+
%p
|
7
|
+
%label{ :for => :cmd } Desired command:
|
8
|
+
%input{ :name => :cmd, :value => "", :type => :text}
|
9
|
+
%p
|
10
|
+
%label{ :for => :private_key } Private key:
|
11
|
+
%p
|
12
|
+
%small Leave private key blank if using password authentication method
|
13
|
+
%p
|
14
|
+
%textarea{ :name => :private_key, :cols => 65, :rows => 20 }
|
15
|
+
%p
|
16
|
+
%input{ :type => :submit, :value => "Execute" }
|
@@ -36,8 +36,22 @@
|
|
36
36
|
%dt Private Addresses
|
37
37
|
%dd
|
38
38
|
= @instance.private_addresses.collect { |address| "<div>#{address}</div>" }.join
|
39
|
+
- if @instance.password
|
40
|
+
%di
|
41
|
+
%dt Username
|
42
|
+
%dd
|
43
|
+
= @instance.username
|
44
|
+
%di
|
45
|
+
%dt Password
|
46
|
+
%dd
|
47
|
+
= @instance.password
|
39
48
|
%di
|
40
49
|
%dt
|
41
50
|
%dd
|
42
51
|
-@instance.actions.each do |action|
|
43
52
|
=link_to_action action, self.send(:"#{action}_instance_url", @instance.id), instance_action_method(action)
|
53
|
+
%dt
|
54
|
+
%dd
|
55
|
+
- if @instance.can_create_image?
|
56
|
+
=link_to_action 'Create Image', url_for("/api/images/new?instance_id=#{@instance.id}"), :get
|
57
|
+
|
@@ -21,16 +21,24 @@
|
|
21
21
|
%actions
|
22
22
|
- @instance.actions.compact.each do |instance_action|
|
23
23
|
%link{:rel => instance_action, :method => instance_action_method(instance_action), :href => self.send("#{instance_action}_instance_url", @instance.id)}
|
24
|
+
- if driver.respond_to?(:run_on_instance)
|
25
|
+
%link{:rel => 'run', :method => :post, :href => "#{run_instance_url(@instance.id)};id=#{@instance.id}"}
|
26
|
+
- if @instance.can_create_image?
|
27
|
+
%link{:rel => 'create_image', :method => :post, :href => "#{create_image_url};instance_id=#{@instance.id}"}
|
24
28
|
- if @instance.instance_variables.include?("@launch_time")
|
25
29
|
%launch_time<
|
26
30
|
=@instance.launch_time
|
27
31
|
- if @instance.public_addresses
|
28
|
-
%public_addresses
|
32
|
+
%public_addresses<
|
29
33
|
- @instance.public_addresses.each do |address|
|
30
|
-
|
31
|
-
|
34
|
+
- if address.class.eql?(Hash) and address[:address]!=""
|
35
|
+
%address{ :port => address[:port], :type => address[:type], :mac => address[:mac] }<
|
36
|
+
=address[:address]
|
37
|
+
- elsif address.class.eql?(String)
|
38
|
+
%address<
|
39
|
+
=address
|
32
40
|
- if @instance.private_addresses
|
33
|
-
%private_addresses
|
41
|
+
%private_addresses<
|
34
42
|
- @instance.private_addresses.each do |address|
|
35
43
|
%address<
|
36
44
|
=address
|
data/views/layout.html.haml
CHANGED
@@ -18,9 +18,14 @@
|
|
18
18
|
#content
|
19
19
|
= yield
|
20
20
|
#footer
|
21
|
+
#formats
|
22
|
+
Format:
|
23
|
+
=link_to_format(:xml)
|
24
|
+
|
|
25
|
+
=link_to_format(:json)
|
21
26
|
#driver_info
|
22
27
|
Driver: #{driver_symbol} | API version: #{settings.version}
|
23
28
|
#copyright
|
24
|
-
Copyright 2009
|
25
|
-
%a{:href => 'http://
|
29
|
+
Copyright 2009-2011
|
30
|
+
%a{:href => 'http://incubator.apache.org/deltacloud/'} The Apache Software Foundation
|
26
31
|
and individual contributors.
|
@@ -17,7 +17,7 @@
|
|
17
17
|
%td
|
18
18
|
= balancer.public_addresses.first
|
19
19
|
%td
|
20
|
-
=
|
20
|
+
=link_to balancer.realms.first.id, realm_url( balancer.realms.first.id )
|
21
21
|
%td
|
22
22
|
- balancer.listeners.each do |listener|
|
23
23
|
="#{listener.protocol}[#{listener.load_balancer_port}]<br/>"
|
@@ -28,11 +28,11 @@
|
|
28
28
|
%p
|
29
29
|
%label
|
30
30
|
Load balancer port:
|
31
|
-
%input{ :name => "
|
31
|
+
%input{ :name => "listener_balancer_port", :size => 30}
|
32
32
|
%p
|
33
33
|
%label
|
34
34
|
Instances port:
|
35
|
-
%input{ :name => "
|
35
|
+
%input{ :name => "listener_instance_port", :size => 30}
|
36
36
|
%p
|
37
37
|
%input{ :type => :submit, :name => "commit", :value => "create" }/
|
38
38
|
|
@@ -25,7 +25,7 @@
|
|
25
25
|
- @load_balancer.instances.each do |inst|
|
26
26
|
%dd
|
27
27
|
=inst.id
|
28
|
-
=link_to_action
|
28
|
+
=link_to_action 'Delete', unregister_load_balancer_url(@load_balancer.id, :instance_id => inst.id), :post
|
29
29
|
|
30
30
|
%form{:action => url_for("/api/load_balancers/#{@load_balancer.id}/register"), :method => :post}
|
31
31
|
%p
|
@@ -7,6 +7,7 @@
|
|
7
7
|
%th Volume
|
8
8
|
%th Created
|
9
9
|
%th State
|
10
|
+
%th Actions
|
10
11
|
%tbody
|
11
12
|
- @storage_snapshots.each do |snapshot|
|
12
13
|
%tr
|
@@ -18,3 +19,5 @@
|
|
18
19
|
= snapshot.created
|
19
20
|
%td
|
20
21
|
= snapshot.state
|
22
|
+
%td
|
23
|
+
= link_to_action "Delete", destroy_storage_snapshot_url(snapshot.id), :delete
|