---
 server/lib/deltacloud/base_driver/features.rb |    9 +--------
 server/lib/deltacloud/models/instance.rb      |   13 ++++++++-----
 server/views/instances/new.html.haml          |    2 +-
 server/views/instances/show.xml.haml          |   16 ++++------------
 4 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/server/lib/deltacloud/base_driver/features.rb 
b/server/lib/deltacloud/base_driver/features.rb
index 8ad354a..e90dec6 100644
--- a/server/lib/deltacloud/base_driver/features.rb
+++ b/server/lib/deltacloud/base_driver/features.rb
@@ -136,21 +136,14 @@ module Deltacloud
       end
     end
 
-    declare_feature :instances, :authentication_key do
+    declare_feature :instances, :authentication do
       operation :create do
         param :keyname, :string,  :optional, nil
-        "EC2 key authentification method"
       end
       operation :show do
       end
     end
 
-    declare_feature :instances, :authentication_password do
-      operation :create do
-        param :password, :string, :optional
-      end
-    end
-
     declare_feature :instances, :hardware_profiles do
       description "Size instances according to changes to a hardware profile"
       # The parameters are filled in from the hardware profiles
diff --git a/server/lib/deltacloud/models/instance.rb 
b/server/lib/deltacloud/models/instance.rb
index 60a2e8a..5e88166 100644
--- a/server/lib/deltacloud/models/instance.rb
+++ b/server/lib/deltacloud/models/instance.rb
@@ -28,10 +28,13 @@ class Instance < BaseModel
   attr_accessor :private_addresses
   attr_accessor :instance_profile
   attr_accessor :launch_time
- def initialize(init=nil)
-   super(init)
-   self.actions = [] if self.actions.nil?
-   self.public_addresses = [] if self.public_addresses.nil?
-   self.private_addresses = [] if self.private_addresses.nil?
+  attr_accessor :authentication
+
+  def initialize(init=nil)
+    super(init)
+    self.actions = [] if self.actions.nil?
+    self.public_addresses = [] if self.public_addresses.nil?
+    self.private_addresses = [] if self.private_addresses.nil?
   end
+
 end
diff --git a/server/views/instances/new.html.haml 
b/server/views/instances/new.html.haml
index 6d67c2d..11ada2c 100644
--- a/server/views/instances/new.html.haml
+++ b/server/views/instances/new.html.haml
@@ -9,7 +9,7 @@
     %label
       Instance Name:
       %input{ :name => 'name', :size => 30 }/
-  -if driver_has_feature?(:authentication_key)
+  -if driver_has_feature?(:authentication)
     %p
       %label
         Instance Keyname:
diff --git a/server/views/instances/show.xml.haml 
b/server/views/instances/show.xml.haml
index bab150b..3dfffc2 100644
--- a/server/views/instances/show.xml.haml
+++ b/server/views/instances/show.xml.haml
@@ -29,16 +29,8 @@
   - unless @instance.launch_time.nil?
     %launch-time<
       [email protected]_time
-  - if driver_has_auth_features?
-    %authentication{ :type => driver_auth_feature_name }
-      - if @instance.authn_feature_failed?
-        %error  #[email protected]_error}
-      - else
-        - if driver_auth_feature_name == 'password'
-          %login
-            %username #[email protected]}
-            %password #[email protected]}
-        - if driver_auth_feature_name == 'key'
-          %login
-            %keyname #[email protected]}
+  - if @instance.authentication
+    %authentication
+      ="#[email protected]}"
+
 
-- 
1.7.1

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to