libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r894788 - /incubator/libcloud/trunk/libcloud/drivers/linode.py
Date Thu, 31 Dec 2009 07:39:07 GMT
Author: pquerna
Date: Thu Dec 31 07:39:07 2009
New Revision: 894788

URL: http://svn.apache.org/viewvc?rev=894788&view=rev
Log:
Add has_features to linode driver

Modified:
    incubator/libcloud/trunk/libcloud/drivers/linode.py

Modified: incubator/libcloud/trunk/libcloud/drivers/linode.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/linode.py?rev=894788&r1=894787&r2=894788&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/linode.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/linode.py Thu Dec 31 07:39:07 2009
@@ -25,7 +25,7 @@
 from libcloud.base import ConnectionKey, Response
 from libcloud.base import NodeDriver, NodeSize, Node, NodeLocation
 from libcloud.base import NodeAuthPassword, NodeAuthSSHKey
-from libcloud.base import NodeImage
+from libcloud.base import NodeImage, Features
 from copy import copy
 
 # JSON is included in the standard library starting with Python 2.6.  For 2.5
@@ -419,3 +419,13 @@
             private_ip=private_ip, driver=self.connection.driver)
         n.extra = copy(obj)
         return n
+
+    _features = {
+        Features.AUTH_SSH_KEY: True,
+        Features.AUTH_PASSWORD: True,
+        }
+    def has_feature(self, feature):
+        try:
+            return self._features[feature]
+        except:
+            return False



Mime
View raw message