libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1350818 - in /libcloud/trunk/libcloud: common/ compute/drivers/
Date Fri, 15 Jun 2012 21:46:18 GMT
Author: tomaz
Date: Fri Jun 15 21:46:17 2012
New Revision: 1350818

URL: http://svn.apache.org/viewvc?rev=1350818&view=rev
Log:
Add @requires annotation to constructor docstrings in the compute drivers.
Contributed by Ilgiz Islamgulov, part of LIBCLOUD-212.

Modified:
    libcloud/trunk/libcloud/common/gandi.py
    libcloud/trunk/libcloud/compute/drivers/brightbox.py
    libcloud/trunk/libcloud/compute/drivers/ec2.py
    libcloud/trunk/libcloud/compute/drivers/joyent.py
    libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py
    libcloud/trunk/libcloud/compute/drivers/linode.py
    libcloud/trunk/libcloud/compute/drivers/openstack.py
    libcloud/trunk/libcloud/compute/drivers/rimuhosting.py
    libcloud/trunk/libcloud/compute/drivers/softlayer.py
    libcloud/trunk/libcloud/compute/drivers/vcl.py

Modified: libcloud/trunk/libcloud/common/gandi.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/common/gandi.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/common/gandi.py (original)
+++ libcloud/trunk/libcloud/common/gandi.py Fri Jun 15 21:46:17 2012
@@ -105,6 +105,9 @@ class BaseGandiDriver(object):
     name = 'Gandi'
 
     def __init__(self, key, secret=None, secure=False):
+        """
+        @requires: key, secret
+        """
         self.key = key
         self.secret = secret
         self.connection = self.connectionCls(key, secret)

Modified: libcloud/trunk/libcloud/compute/drivers/brightbox.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/brightbox.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/brightbox.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/brightbox.py Fri Jun 15 21:46:17 2012
@@ -55,6 +55,9 @@ class BrightboxNodeDriver(NodeDriver):
 
     def __init__(self, key, secret=None, secure=True, host=None, port=None,
                  api_version=API_VERSION, **kwargs):
+        """
+        @requires: key, secret
+        """
         super(BrightboxNodeDriver, self).__init__(key=key, secret=secret,
                                                   secure=secure,
                                                   host=host, port=port,

Modified: libcloud/trunk/libcloud/compute/drivers/ec2.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ec2.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ec2.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ec2.py Fri Jun 15 21:46:17 2012
@@ -1217,6 +1217,9 @@ class EucNodeDriver(EC2NodeDriver):
 
     def __init__(self, key, secret=None, secure=True, host=None,
                  path=None, port=None):
+        """
+        @requires: key, secret
+        """
         super(EucNodeDriver, self).__init__(key, secret, secure, host, port)
         if path is None:
             path = "/services/Eucalyptus"

Modified: libcloud/trunk/libcloud/compute/drivers/joyent.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/joyent.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/joyent.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/joyent.py Fri Jun 15 21:46:17 2012
@@ -96,6 +96,9 @@ class JoyentNodeDriver(NodeDriver):
     features = {'create_node': ['generates_password']}
 
     def __init__(self, *args, **kwargs):
+        """
+        @requires: key, secret
+        """
         if 'location' in kwargs:
             if kwargs['location'] not in LOCATIONS:
                 msg = 'Invalid location: "%s". Valid locations: %s'

Modified: libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/libvirt_driver.py Fri Jun 15 21:46:17 2012
@@ -46,6 +46,9 @@ class LibvirtNodeDriver(NodeDriver):
     }
 
     def __init__(self, uri):
+        """
+        @requires: uri
+        """
         if not have_libvirt:
             raise RuntimeError('Libvirt driver requires \'libvirt\' Python ' +
                                'package')

Modified: libcloud/trunk/libcloud/compute/drivers/linode.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/linode.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/linode.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/linode.py Fri Jun 15 21:46:17 2012
@@ -78,7 +78,10 @@ class LinodeNodeDriver(NodeDriver):
         """Instantiate the driver with the given API key
 
         @keyword key: the API key to use
-        @type key: C{str}"""
+        @type key: C{str}
+
+        @requires: key
+        """
         self.datacenter = None
         NodeDriver.__init__(self, key)
 

Modified: libcloud/trunk/libcloud/compute/drivers/openstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/openstack.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/openstack.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/openstack.py Fri Jun 15 21:46:17 2012
@@ -174,6 +174,9 @@ class OpenStackNodeDriver(NodeDriver, Op
 
     def __new__(cls, key, secret=None, secure=True, host=None, port=None,
                  api_version=DEFAULT_API_VERSION, **kwargs):
+        """
+        @requires: key, secret
+        """
         if cls is OpenStackNodeDriver:
             if api_version == '1.0':
                 cls = OpenStack_1_0_NodeDriver
@@ -789,6 +792,7 @@ class OpenStack_1_1_NodeDriver(OpenStack
     features = {"create_node": ["generates_password"]}
 
     def __init__(self, *args, **kwargs):
+
         self._ex_force_api_version = str(kwargs.pop('ex_force_api_version',
                                                     None))
         super(OpenStack_1_1_NodeDriver, self).__init__(*args, **kwargs)

Modified: libcloud/trunk/libcloud/compute/drivers/rimuhosting.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/rimuhosting.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/rimuhosting.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/rimuhosting.py Fri Jun 15 21:46:17 2012
@@ -113,6 +113,9 @@ class RimuHostingNodeDriver(NodeDriver):
 
     def __init__(self, key, host=API_HOST, port=443,
                  api_context=API_CONTEXT, secure=True):
+        """
+        @requires: key, secret
+        """
         # Pass in some extra vars so that
         self.key = key
         self.secure = secure

Modified: libcloud/trunk/libcloud/compute/drivers/softlayer.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/softlayer.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/softlayer.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/softlayer.py Fri Jun 15 21:46:17 2012
@@ -245,6 +245,9 @@ class SoftLayerNodeDriver(NodeDriver):
     features = {"create_node": ["generates_password"]}
 
     def __init__(self, key, secret=None, secure=False):
+        """
+        @requires: key, secret
+        """
         self.key = key
         self.secret = secret
         self.connection = self.connectionCls(key, secret)

Modified: libcloud/trunk/libcloud/compute/drivers/vcl.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/vcl.py?rev=1350818&r1=1350817&r2=1350818&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/vcl.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/vcl.py Fri Jun 15 21:46:17 2012
@@ -128,6 +128,9 @@ class VCLNodeDriver(NodeDriver):
 
     def __init__(self, key, secret, secure=True, host=None, port=None, *args,
                  **kwargs):
+        """
+        @requires: key, secret, host
+        """
         if not host:
             raise Exception('When instantiating VCL driver directly ' +
                             'you also need to provide host')



Mime
View raw message