FAM-895 added methods to directly request volume, node, snapshot objects from 
Azure


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/aba57d66
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/aba57d66
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/aba57d66

Branch: refs/heads/trunk
Commit: aba57d66f0c8d49549c52d95b4a3d560278d2db4
Parents: 4004c0d
Author: Hennadii Stas <uty.arrg...@gmail.com>
Authored: Thu May 18 12:50:54 2017 +0300
Committer: Anthony Shaw <anthonys...@apache.org>
Committed: Fri Aug 11 14:59:31 2017 +1000

----------------------------------------------------------------------
 libcloud/compute/drivers/azure_arm.py | 42 ++++++++++++++++++++++++++++++
 libcloud/compute/drivers/ec2.py       |  4 +--
 2 files changed, 44 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/aba57d66/libcloud/compute/drivers/azure_arm.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure_arm.py 
b/libcloud/compute/drivers/azure_arm.py
index d5d56b7..da7596f 100644
--- a/libcloud/compute/drivers/azure_arm.py
+++ b/libcloud/compute/drivers/azure_arm.py
@@ -1533,6 +1533,48 @@ class AzureNodeDriver(NodeDriver):
         r = self.connection.request(id, params={"api-version": "2015-06-15"})
         return self._to_nic(r.object)
 
+    def ex_get_node(self, id):
+        """
+        Fetch information about a node.
+
+        :param id: The complete resource path to the node resource.
+        :type id: ``str``
+
+        :return: The Node object
+        :rtype: :class:`.Node`
+        """
+
+        r = self.connection.request(id, params={"api-version": "2015-06-15"})
+        return self._to_node(r.object)
+
+    def ex_get_volume(self, id):
+        """
+        Fetch information about a volume.
+
+        :param id: The complete resource path to the volume resource.
+        :type id: ``str``
+
+        :return: The StorageVolume object
+        :rtype: :class:`.StorageVolume`
+        """
+
+        r = self.connection.request(id, params={"api-version": "2015-06-15"})
+        return self._to_volume(r.object)
+
+    def ex_get_snapshot(self, id):
+        """
+        Fetch information about a snapshot.
+
+        :param id: The complete resource path to the snapshot resource.
+        :type id: ``str``
+
+        :return: The VolumeSnapshot object
+        :rtype: :class:`.VolumeSnapshot`
+        """
+
+        r = self.connection.request(id, params={"api-version": "2015-06-15"})
+        return self._to_snapshot(r.object)
+
     def ex_get_public_ip(self, id):
         """
         Fetch information about a public IP resource.

http://git-wip-us.apache.org/repos/asf/libcloud/blob/aba57d66/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index 26b789e..efb6275 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -6292,8 +6292,8 @@ class BaseEC2NodeDriver(NodeDriver):
         Modify volume parameters.
         A list of valid parameters can be found at https://goo.gl/N0rPEQ
 
-        :param      Volume: Volume instance
-        :type       Volume: :class:`Volume`
+        :param      volume: Volume instance
+        :type       volume: :class:`Volume`
 
         :param      parameters: Dictionary with updated volume parameters
         :type       parameters: ``dict``

Reply via email to