libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [5/7] libcloud git commit: Move sample code to docs/examples
Date Tue, 21 Feb 2017 16:17:58 GMT
Move sample code to docs/examples


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

Branch: refs/heads/trunk
Commit: 168c7a1981cfe406b040c33a66228206dbeee3d5
Parents: 5cb945a
Author: Samuel Chong <samuelchong1@gmail.com>
Authored: Thu Jan 5 11:01:34 2017 +1100
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Tue Feb 21 17:17:27 2017 +0100

----------------------------------------------------------------------
 libcloud/compute/drivers/dimensiondata.py | 61 --------------------------
 1 file changed, 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/168c7a19/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index e172958..697a072 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -3830,67 +3830,6 @@ class DimensionDataNodeDriver(NodeDriver):
 
         Create Node in MCP2 Data Center
 
-        >>> from pprint import pprint
-        >>> from libcloud.compute.types import Provider
-        >>> from libcloud.compute.providers import get_driver
-        >>> import libcloud.security
-        >>>
-        >>> # Get dimension data driver
-        >>> libcloud.security.VERIFY_SSL_CERT = True
-        >>> cls = get_driver(Provider.DIMENSIONDATA)
-        >>> driver = cls('schong_platcaas', 'T3stst@r!', region='dd-au')
-        >>> # driver = cls('myusername','mypassword', region='dd-au')
-        >>>
-        >>> # Get location
-        >>> location = driver.ex_get_location_by_id(id='AU9')
-        >>>
-        >>> # Get network domain by location
-        >>> networkDomainName = "Test Apache Libcloud"
-        >>> network_domains = driver.ex_list_network_domains(location=location)
-        >>> my_network_domain = [d for d in network_domains if d.name ==
-        >>>                     networkDomainName][0]
-        >>>
-        >>> vlan = driver.ex_list_vlans(name='Libcloud Test VLAN')[0]
-        >>>
-        >>> # Get Image
-        >>> images = driver.ex_list_customer_images(location=location)
-        >>> image = images[1]
-        >>>
-        >>> tags = driver.ex_list_tags()
-        >>> pprint(tags)
-        >>>
-        >>> ex_tagname_value_pairs = {}
-        >>> ex_tagname_value_pairs['AA_Tag1'] = 'demo 1'
-        >>> ex_tagname_value_pairs['AA_Tag2'] = 'demo 2'
-        >>>
-        >>> ex_tagid_value_pairs = {}
-        >>> ex_tagid_value_pairs['4927c8fd-7f41-4206-a7d5-c5def927c6d2'] =
-        >>>                      'demo 1'
-        >>> ex_tagid_value_pairs['2579fc7c-a89c-47cd-ac3b-67999dded93b'] =
-        >>>                      'demo 2'
-        >>>
-        >>>
-        >>> # Create node using vlan instead of private IPv4
-        >>> node = driver.ex_create_node_uncustomized(
-        >>>     name='test_server_05',
-        >>>     image=image,
-        >>>     ex_network_domain=my_network_domain,
-        >>>     ex_is_started=False,
-        >>>     ex_description=None,
-        >>>     ex_cluster_id=None,
-        >>>     ex_cpu_specification=None,
-        >>>     ex_memory_gb=None,
-        >>>     ex_primary_nic_private_ipv4=None,
-        >>>     ex_primary_nic_vlan=vlan,
-        >>>     ex_primary_nic_network_adapter=None,
-        >>>     ex_additional_nics=None,
-        >>>     ex_disks=None,
-        >>>     ex_tagid_value_pairs=ex_tagid_value_pairs,
-        >>>     ex_tagname_value_pairs=None
-        >>> )
-        >>>
-        >>> pprint(node)
-
         :keyword    name:   (required) String with a name for this new node
         :type       name:   ``str``
 


Mime
View raw message