incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1187441 - in /incubator/deltacloud/trunk/server: config/drivers/openstack.yaml lib/deltacloud/drivers/openstack/ lib/deltacloud/drivers/openstack/openstack_driver.rb lib/deltacloud/drivers/rackspace/rackspace_driver.rb
Date Fri, 21 Oct 2011 16:13:18 GMT
Author: mfojtik
Date: Fri Oct 21 16:13:17 2011
New Revision: 1187441

URL: http://svn.apache.org/viewvc?rev=1187441&view=rev
Log:
Openstack: Initial driver import

Added:
    incubator/deltacloud/trunk/server/config/drivers/openstack.yaml
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/openstack/
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
  (with props)
Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb

Added: incubator/deltacloud/trunk/server/config/drivers/openstack.yaml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/config/drivers/openstack.yaml?rev=1187441&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/config/drivers/openstack.yaml (added)
+++ incubator/deltacloud/trunk/server/config/drivers/openstack.yaml Fri Oct 21 16:13:17 2011
@@ -0,0 +1,3 @@
+---
+:openstack:
+  :name: Openstack

Added: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/openstack/openstack_driver.rb?rev=1187441&view=auto
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
(added)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
Fri Oct 21 16:13:17 2011
@@ -0,0 +1,47 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+
+require 'deltacloud/drivers/rackspace/rackspace_driver.rb'
+module Deltacloud
+  module Drivers
+    module Openstack
+      class OpenstackDriver < Rackspace::RackspaceDriver
+
+        feature :instances, :user_name
+        feature :instances, :authentication_password
+        feature :instances, :user_files
+
+        define_instance_states do
+          start.to( :pending )          .on( :create )
+          pending.to( :running )        .automatically
+          running.to( :running )        .on( :reboot )
+          running.to( :shutting_down )  .on( :stop )
+          shutting_down.to( :stopped )  .automatically
+          stopped.to( :finish )         .automatically
+        end
+
+        def new_client(credentials)
+          safely do
+            CloudServers::Connection.new(:username => credentials.user, :api_key =>
credentials.password, :auth_url => api_provider)
+          end
+        end
+
+        private :new_client
+      end
+    end
+  end
+end
+

Propchange: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb?rev=1187441&r1=1187440&r2=1187441&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb
(original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb
Fri Oct 21 16:13:17 2011
@@ -356,8 +356,7 @@ class RackspaceDriver < Deltacloud::Base
     return http, request
   end
 
-private
-
+  private
 
   def new_client(credentials)
     safely do



Mime
View raw message