Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up DigitalOcean docs after removal of API v1 support. #892

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/_static/images/provider_logos/digitalocean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 8 additions & 21 deletions docs/compute/drivers/digital_ocean.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
DigitalOcean Compute Driver Documentation
=========================================

`DigitalOcean`_ is an American virtual private server provider based in New
York City with data centers in New York, Amsterdam, San Francisco, London,
Singapore and Frankfurt.
`DigitalOcean`_ is an American cloud provider based in New York City with data
centers in New York, Amsterdam, San Francisco, London, Singapore, Frankfurt,
Toronto, and Bangalore.

.. figure:: /_static/images/provider_logos/digitalocean.png
:align: center
Expand All @@ -13,25 +13,17 @@ Singapore and Frankfurt.
Instantiating a driver
----------------------

DigitalOcean driver supports two API versions - old API v1.0 and the new API
v2.0. Since trunk (to be libcloud v0.18.0), the driver uses the correct API
based on the initialization with the Client ID (key) and Access Token (secret)
for v1.0 or the Personal Access Token (key) in v2.0 and will throw an
exception if the `api_version` is set explicitly without the proper arguments.
The DigitalOcean driver supports API v2.0, requiring a Personal Access
Token to initialize as the key. The older API v1.0 `reached end of life on
November 9, 2015`_. Support for API v1.0 was removed in libcloud v1.2.2.

Instantiating a driver using API v2.0
-------------------------------------

.. literalinclude:: /examples/compute/digitalocean/instantiate_api_v2.0.py
:language: python

Instantiating a driver using API v1.0
-------------------------------------

.. literalinclude:: /examples/compute/digitalocean/instantiate_api_v1.0.py
:language: python

Creating a droplet using API v2.0
Creating a Droplet using API v2.0
---------------------------------

.. literalinclude:: /examples/compute/digitalocean/create_api_v2.0.py
Expand All @@ -47,11 +39,6 @@ API v2.0
:members:
:inherited-members:

API v1.0
~~~~~~~~

.. autoclass:: libcloud.compute.drivers.digitalocean.DigitalOcean_v1_NodeDriver
:members:
:inherited-members:

.. _`DigitalOcean`: https://www.digitalocean.com/
.. _`reached end of life on November 9, 2015`: https://developers.digitalocean.com/documentation/changelog/api-v1/sunsetting-api-v1/
10 changes: 5 additions & 5 deletions docs/dns/drivers/digital_ocean.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
DigitalOcean DNS Driver Documentation
=====================================

`DigitalOcean`_ is an American virtual private server provider based in New
York City with data centers in New York, Amsterdam, San Francisco, London,
Singapore and Frankfurt.
`DigitalOcean`_ is an American cloud provider based in New York City with data
centers in New York, Amsterdam, San Francisco, London, Singapore, Frankfurt,
Toronto, and Bangalore.

.. figure:: /_static/images/provider_logos/digitalocean.png
:align: center
Expand All @@ -13,8 +13,8 @@ Singapore and Frankfurt.
Instantiating a driver
----------------------

DigitalOcean dns driver only supports the v2.0 API requiring a Personal Access
Token to initialize as the key.
The DigitalOcean DNS driver only supports the v2.0 API requiring a Personal
Access Token to initialize as the key.

Instantiating the driver
------------------------
Expand Down
5 changes: 0 additions & 5 deletions docs/examples/compute/digitalocean/instantiate_api_v1.0.py

This file was deleted.

13 changes: 5 additions & 8 deletions libcloud/compute/drivers/digitalocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,15 @@ class DigitalOceanNodeDriver(NodeDriver):
"""
DigitalOcean NodeDriver defaulting to using APIv2.

:keyword key: Required for authentication. Used in both ``v1`` and
``v2`` implementations.
:keyword key: Personal Access Token required for authentication.
:type key: ``str``

:keyword secret: Used in driver authentication with key. Defaults to
None and when set, will cause driver to use ``v1`` for
connection and response. (optional)
:keyword secret: Previously used with API version ``v1``. (deprecated)
:type secret: ``str``

:keyword api_version: Specifies the API version to use. ``v1`` and
``v2`` are the only valid options. Defaults to
using ``v2`` (optional)
:keyword api_version: Specifies the API version to use. Defaults to
using ``v2``, currently the only valid option.
(optional)
:type api_version: ``str``
"""
type = Provider.DIGITAL_OCEAN
Expand Down