Repository: libcloud Updated Branches: refs/heads/trunk a7dbbf37d -> 6d2a3bbfe
Improve docs with examples Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/98be91b3 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/98be91b3 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/98be91b3 Branch: refs/heads/trunk Commit: 98be91b3b8b1a297ef56dff8028a4bb307218dc8 Parents: 7118a02 Author: anthony-shaw <anthony.p.s...@gmail.com> Authored: Fri Feb 12 10:19:29 2016 +1100 Committer: anthony-shaw <anthony.p.s...@gmail.com> Committed: Fri Feb 12 11:15:19 2016 +1100 ---------------------------------------------------------------------- docs/compute/drivers/bsnl.rst | 5 ++++- docs/compute/drivers/indosat.rst | 3 +++ docs/compute/drivers/internetsolutions.rst | 3 +++ docs/compute/drivers/medone.rst | 3 +++ docs/compute/drivers/ntta.rst | 3 +++ docs/examples/compute/bsnl/instantiate_driver.py | 9 +++++++++ docs/examples/compute/indosat/instantiate_driver.py | 9 +++++++++ .../compute/internetsolutions/instantiate_driver.py | 9 +++++++++ docs/examples/compute/medone/instantiate_driver.py | 9 +++++++++ docs/examples/compute/ntta/instantiate_driver.py | 9 +++++++++ 10 files changed, 61 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/compute/drivers/bsnl.rst ---------------------------------------------------------------------- diff --git a/docs/compute/drivers/bsnl.rst b/docs/compute/drivers/bsnl.rst index 46c1238..159b0e0 100644 --- a/docs/compute/drivers/bsnl.rst +++ b/docs/compute/drivers/bsnl.rst @@ -14,7 +14,7 @@ technologies to offer you unprecedented bandwidth and latency. IaaS has its own non-standard `API`_ , `libcloud` provides a Python wrapper on top of this `API`_ with common methods with other IaaS solutions and -Public cloud providers. Therefore, you can use use the Indosat libcloud +Public cloud providers. Therefore, you can use use the BSNL libcloud driver to communicate with both the public and private clouds. Instantiating a driver @@ -35,6 +35,9 @@ Possible regions: * ``bsnl-af`` : BSNL Africa * ``bsnl-au`` : BSNL Australia +.. literalinclude:: /examples/compute/bsnl/instantiate_driver.py + :language: python + The base `libcloud` API allows you to: * list nodes, images, instance types, locations http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/compute/drivers/indosat.rst ---------------------------------------------------------------------- diff --git a/docs/compute/drivers/indosat.rst b/docs/compute/drivers/indosat.rst index 4258c4a..f9d4b4f 100644 --- a/docs/compute/drivers/indosat.rst +++ b/docs/compute/drivers/indosat.rst @@ -38,6 +38,9 @@ Possible regions: * ``indosat-af`` : Indosat Africa * ``indosat-au`` : Indosat Australia +.. literalinclude:: /examples/compute/indosat/instantiate_driver.py + :language: python + The base `libcloud` API allows you to: * list nodes, images, instance types, locations http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/compute/drivers/internetsolutions.rst ---------------------------------------------------------------------- diff --git a/docs/compute/drivers/internetsolutions.rst b/docs/compute/drivers/internetsolutions.rst index ec7a167..454a615 100644 --- a/docs/compute/drivers/internetsolutions.rst +++ b/docs/compute/drivers/internetsolutions.rst @@ -35,6 +35,9 @@ Possible regions: * ``is-ap`` : Internet Solutions Asia Pacific * ``is-canada`` : Internet Solutions Canada region +.. literalinclude:: /examples/compute/internetsolutions/instantiate_driver.py + :language: python + The base `libcloud` API allows you to: * list nodes, images, instance types, locations http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/compute/drivers/medone.rst ---------------------------------------------------------------------- diff --git a/docs/compute/drivers/medone.rst b/docs/compute/drivers/medone.rst index de24280..6301286 100644 --- a/docs/compute/drivers/medone.rst +++ b/docs/compute/drivers/medone.rst @@ -40,6 +40,9 @@ Possible regions: * ``med1-latam`` : Med-1 Latin America * ``med1-canada`` : Med-1 Canada +.. literalinclude:: /examples/compute/medone/instantiate_driver.py + :language: python + The base `libcloud` API allows you to: * list nodes, images, instance types, locations http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/compute/drivers/ntta.rst ---------------------------------------------------------------------- diff --git a/docs/compute/drivers/ntta.rst b/docs/compute/drivers/ntta.rst index 8634933..b749173 100644 --- a/docs/compute/drivers/ntta.rst +++ b/docs/compute/drivers/ntta.rst @@ -43,6 +43,9 @@ Possible regions: * ``ntta-au`` : NTT America Australia * ``ntta-ap`` : NTT America Asia Pacific +.. literalinclude:: /examples/compute/ntta/instantiate_driver.py + :language: python + The base `libcloud` API allows you to: * list nodes, images, instance types, locations http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/examples/compute/bsnl/instantiate_driver.py ---------------------------------------------------------------------- diff --git a/docs/examples/compute/bsnl/instantiate_driver.py b/docs/examples/compute/bsnl/instantiate_driver.py new file mode 100644 index 0000000..1afe197 --- /dev/null +++ b/docs/examples/compute/bsnl/instantiate_driver.py @@ -0,0 +1,9 @@ +from pprint import pprint + +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +cls = get_driver(Provider.BSNL) +driver = cls('my username', 'my password', region='bsnl-in') + +pprint(driver.list_nodes()) http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/examples/compute/indosat/instantiate_driver.py ---------------------------------------------------------------------- diff --git a/docs/examples/compute/indosat/instantiate_driver.py b/docs/examples/compute/indosat/instantiate_driver.py new file mode 100644 index 0000000..862f60b --- /dev/null +++ b/docs/examples/compute/indosat/instantiate_driver.py @@ -0,0 +1,9 @@ +from pprint import pprint + +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +cls = get_driver(Provider.INDOSAT) +driver = cls('my username', 'my password', region='indosat-id') + +pprint(driver.list_nodes()) http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/examples/compute/internetsolutions/instantiate_driver.py ---------------------------------------------------------------------- diff --git a/docs/examples/compute/internetsolutions/instantiate_driver.py b/docs/examples/compute/internetsolutions/instantiate_driver.py new file mode 100644 index 0000000..24d8768 --- /dev/null +++ b/docs/examples/compute/internetsolutions/instantiate_driver.py @@ -0,0 +1,9 @@ +from pprint import pprint + +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +cls = get_driver(Provider.INTERNETSOLUTIONS) +driver = cls('my username', 'my password', region='is-af') + +pprint(driver.list_nodes()) http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/examples/compute/medone/instantiate_driver.py ---------------------------------------------------------------------- diff --git a/docs/examples/compute/medone/instantiate_driver.py b/docs/examples/compute/medone/instantiate_driver.py new file mode 100644 index 0000000..acc5d0c --- /dev/null +++ b/docs/examples/compute/medone/instantiate_driver.py @@ -0,0 +1,9 @@ +from pprint import pprint + +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +cls = get_driver(Provider.MEDONE) +driver = cls('my username', 'my password', region='med1-il') + +pprint(driver.list_nodes()) http://git-wip-us.apache.org/repos/asf/libcloud/blob/98be91b3/docs/examples/compute/ntta/instantiate_driver.py ---------------------------------------------------------------------- diff --git a/docs/examples/compute/ntta/instantiate_driver.py b/docs/examples/compute/ntta/instantiate_driver.py new file mode 100644 index 0000000..5fa753b --- /dev/null +++ b/docs/examples/compute/ntta/instantiate_driver.py @@ -0,0 +1,9 @@ +from pprint import pprint + +from libcloud.compute.types import Provider +from libcloud.compute.providers import get_driver + +cls = get_driver(Provider.NTTA) +driver = cls('my username', 'my password', region='ntta-na') + +pprint(driver.list_nodes())