libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [8/8] git commit: Merge branch 'promote_key_pair_management_to_base_compute_api' into trunk
Date Tue, 10 Dec 2013 21:08:41 GMT
Merge branch 'promote_key_pair_management_to_base_compute_api' into trunk


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

Branch: refs/heads/trunk
Commit: 4a2945a4e3b58fe8a560ab1ac6739baa181b4640
Parents: 90df4f6 22f0432
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Tue Dec 10 22:03:58 2013 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Tue Dec 10 22:03:58 2013 +0100

----------------------------------------------------------------------
 .../generate_provider_feature_matrix_table.py   |  18 +-
 .../_supported_methods_key_pair_management.rst  | 121 ++++++++
 docs/compute/api.rst                            |   6 +
 docs/compute/index.rst                          |  11 +-
 docs/compute/key_pair_management.rst            |  53 ++++
 docs/compute/supported_providers.rst            |   9 +-
 docs/examples/compute/create_key_pair.py        |  13 +
 .../compute/import_key_pair_from_file.py        |  13 +
 .../compute/import_key_pair_from_string.py      |  18 ++
 docs/upgrade_notes.rst                          |  29 ++
 libcloud/compute/base.py                        | 122 +++++++-
 libcloud/compute/drivers/cloudstack.py          | 304 +++++++++++++++----
 libcloud/compute/drivers/ec2.py                 | 237 ++++++++++-----
 libcloud/compute/drivers/openstack.py           | 119 +++++---
 libcloud/compute/types.py                       |  20 ++
 .../cloudstack/createSSHKeyPair_default.json    |   1 +
 .../cloudstack/listSSHKeyPairs_get_one.json     |   1 +
 .../listSSHKeyPairs_get_one_doesnt_exist.json   |   1 +
 .../compute/fixtures/ec2/create_key_pair.xml    |  22 ++
 .../ec2/describe_key_pairs_doesnt_exist.xml     |   2 +
 .../openstack_v1.1/_os_keypairs_get_one.json    |   1 +
 .../openstack_v1.1/_os_keypairs_not_found.json  |   1 +
 libcloud/test/compute/test_cloudstack.py        |  84 +++--
 libcloud/test/compute/test_ec2.py               |  81 ++++-
 libcloud/test/compute/test_openstack.py         |  55 +++-
 25 files changed, 1131 insertions(+), 211 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/4a2945a4/docs/compute/api.rst
----------------------------------------------------------------------
diff --cc docs/compute/api.rst
index eec1504,3754360..9b8d9c5
--- a/docs/compute/api.rst
+++ b/docs/compute/api.rst
@@@ -25,9 -25,9 +25,12 @@@ Compute Base AP
  .. autoclass:: libcloud.compute.base.StorageVolume
      :members:
  
 +.. autoclass:: libcloud.compute.base.VolumeSnapshot
 +    :members:
 +
+ .. autoclass:: libcloud.compute.base.KeyPair
+     :members:
+ 
  .. autoclass:: libcloud.compute.types.NodeState
      :members:
  

http://git-wip-us.apache.org/repos/asf/libcloud/blob/4a2945a4/docs/compute/index.rst
----------------------------------------------------------------------
diff --cc docs/compute/index.rst
index e142522,3487524..99159e3
--- a/docs/compute/index.rst
+++ b/docs/compute/index.rst
@@@ -22,18 -22,15 +22,19 @@@ Terminolog
  Compute
  ~~~~~~~
  
 -* **Node** - represents a cloud or virtual server.
 -* **NodeSize** - represents node hardware configuration. Usually this is amount
 -  of the available RAM, bandwidth, CPU speed and disk size. Most of the drivers
 -  also expose hourly price (in dollars) for the Node of this size.
 -* **NodeImage** - represents an operating system image.
 -* **NodeLocation** - represents a physical location where a server can be.
 -* **NodeState** - represents a node state. Standard states are: ``running``,
 -  ``stopped``, ``rebooting``, ``terminated``, ``pending``, and ``unknown``.
 -* **KeyPair** - represents an SSH key pair object.
 +* :class:`~libcloud.compute.base.Node` - represents a cloud or virtual server.
 +* :class:`~libcloud.compute.base.NodeSize` - represents node hardware
 +  configuration. Usually this is amount of the available RAM, bandwidth,
 +  CPU speed and disk size. Most of the drivers also expose an hourly price
 +  (in dollars) for the Node of this size.
 +* :class:`~libcloud.compute.base.NodeImage` - represents an operating system
 +  image.
 +* :class:`~libcloud.compute.base.NodeLocation` - represents a physical location
 +  where a server can be.
 +* :class:`~libcloud.compute.types.NodeState` - represents a node state.
 +  Standard states are: ``running``, ``stopped``, ``rebooting``, ``terminated``,
 +  ``pending``, and ``unknown``.
++* :class:`~libcloud.compute.base.KeyPair` - represents an SSH key pair object.
  
  Block Storage
  ~~~~~~~~~~~~~

http://git-wip-us.apache.org/repos/asf/libcloud/blob/4a2945a4/docs/upgrade_notes.rst
----------------------------------------------------------------------
diff --cc docs/upgrade_notes.rst
index 41aa17e,963059d..afbe18d
--- a/docs/upgrade_notes.rst
+++ b/docs/upgrade_notes.rst
@@@ -15,48 -15,35 +15,77 @@@ single class plus ``region`` argument m
  More information on how this affects existing drivers and your code can be
  found bellow.
  
 +Default Content-Type is now provided if none is supplied and none can be guessed
 +--------------------------------------------------------------------------------
 +
 +In older versions, Libcloud would throw an exception when a content type is not
 +supplied and none can't be automatically detected when uploading an object.
 +
 +This has changed with the 0.14.0 release. Now if no content type is specified
 +and none can't be detected, a default content type of
 +``application/octet-stream`` is used.
 +
 +If you want to preserve the old behavior, you can set ``strict_mode`` attribute
 +on the driver object to ``True``.
 +
 +.. sourcecode:: python
 +
 +    from libcloud.storage.types import Provider
 +    from libcloud.stoage.providers import get_driver
 +
 +    cls = get_driver(Provider.CLOUDFILES)
 +    driver = cls('username', 'api key')
 +
 +    driver.strict_mode = True
 +
 +If you are not using strict mode and you are uploading a binary object, we
 +still encourage you to practice Python's "explicit is better than implicit"
 +mantra and explicitly specify Content-Type of ``application/octet-stream``.
 +
 +libcloud.security.VERIFY_SSL_CERT_STRICT variable has been removed
 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
 +``libcloud.security.VERIFY_SSL_CERT_STRICT`` variable has been introduced in
 +version 0.4.2 when we initially added support for SSL certificate verification.
 +This variable was added to ease the migration from older versions of Libcloud
 +which didn't verify SSL certificates.
 +
 +In version 0.6.0, this variable has been set to ``True`` by default and
 +deprecated.
 +
 +In this release, this variable has been fully removed. For more information
 +on how SSL certificate validation works in Libcloud, see the :doc:`SSL
 +Certificate Validation </other/ssl-certificate-validation>` page.
 +
+ SSH Key pair management functionality has been promoted to the base API
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
+ SSH key pair management functionality has been promoted to be a part of the
+ base compute API.
+ 
+ As such, the following new classes and methods have been added:
+ 
+ * `libcloud.compute.base.KeyPair`
+ * `libcloud.compute.base.NodeDriver.list_key_pairs`
+ * `libcloud.compute.base.NodeDriver.create_key_pair`
+ * `libcloud.compute.base.NodeDriver.import_key_pair_from_string`
+ * `libcloud.compute.base.NodeDriver.import_key_pair_from_file`
+ * `libcloud.compute.base.NodeDriver.delete_key_pair`
+ 
+ Previously, this functionality was available in some of the provider drivers
+ (CloudStack, EC2, OpenStack) via the following extension methods:
+ 
+ * `ex_list_keypairs`
+ * `ex_create_keypair`
+ * `ex_import_keypair_from_string`
+ * `ex_import_keypair`
+ * `ex_delete_keypair`
+ 
+ Existing extension methods will continue to work until the next major release,
+ but you are strongly encouraged to start using new methods which are now part
+ of the base compute API and are guaranteed to work the same across different
+ providers.
+ 
  Cache busting functionality is now only enabled in Rackspace first-gen driver
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  

http://git-wip-us.apache.org/repos/asf/libcloud/blob/4a2945a4/libcloud/compute/base.py
----------------------------------------------------------------------


Mime
View raw message