Apache Libcloud Documentation Release 3.3.1
Total Page:16
File Type:pdf, Size:1020Kb
Apache Libcloud Documentation Release 3.3.1 The Apache Software Foundation Jan 25, 2021 Contents 1 Documentation 3 1.1 Main...................................................3 1.1.1 Getting Started.........................................3 1.1.2 Supported Providers......................................4 1.1.3 Supported Python Versions................................... 19 1.1.4 Third Party Drivers....................................... 20 1.1.5 Compute............................................ 20 1.1.6 Object Storage......................................... 22 1.1.7 Load Balancer.......................................... 22 1.1.8 DNS............................................... 23 1.1.9 Container............................................ 24 1.1.10 Backup............................................. 26 1.1.11 Troubleshooting......................................... 26 1.1.12 API Documentation....................................... 31 1.1.13 Frequently Asked Questions (FAQ).............................. 31 1.1.14 Changes in Apache Libcloud v2.0............................... 32 1.1.15 Registering a third party driver................................. 35 1.1.16 SSL Certificate Validation in <v2.0............................... 35 1.1.17 Using an HTTP / HTTPS proxy................................ 38 1.1.18 Using Libcloud in multi-threaded and async environments.................. 40 1.1.19 Working with the object oriented APIs............................. 42 1.2 Developer Information.......................................... 44 1.2.1 Developer Information..................................... 44 1.2.2 Development.......................................... 47 1.3 Committer Guide............................................. 53 1.3.1 Committer Guide........................................ 53 1.4 Other................................................... 61 1.4.1 Changelog............................................ 61 1.4.2 Upgrade Notes......................................... 140 1.4.3 Security............................................. 157 i ii Apache Libcloud Documentation, Release 3.3.1 Note: Libcloud v3.0.0 dropped support for Python 2.7 and Python 3.4 and now only supports Python >= 3.5. If you still need to us Libcloud with one of the now unsupported versions, you can do that by using the latest release of Libcloud which still supports those versions (Libcloud v2.8). Apache Libcloud is a Python library which hides differences between different cloud provider APIs and allows you to manage different cloud resources through a unified and easy to use API. Resource you can manage with Libcloud are divided in the following categories: • Cloud Servers and Block Storage - services such as Amazon EC2 and Rackspace CloudServers • Cloud Object Storage and CDN - services such as Amazon S3 and Rackspace CloudFiles • Load Balancers as a Service - services such as Amazon Elastic Load Balancer and GoGrid LoadBalancers • DNS as a Service - services such as Amazon Route 53 and Zerigo • Container Services - container virtualization like Docker and Rkt as well as container based services • Backup as a Service - services such as Amazon EBS and OpenStack Freezer Fig. 1: A subset of supported providers in Libcloud. Contents 1 Apache Libcloud Documentation, Release 3.3.1 2 Contents CHAPTER 1 Documentation 1.1 Main 1.1.1 Getting Started Installation (stable version) Libcloud is available on PyPi. You can install latest stable version using pip: pip install apache-libcloud Installation (development version) You can install latest development version from our Git repository: pip install -e git+https://git-wip-us.apache.org/repos/asf/libcloud.git@trunk ,!#egg=apache-libcloud Upgrading If you used pip to install the library you can also use it to upgrade it: pip install --upgrade apache-libcloud Using it This section describes a standard work-flow which you follow when working with any of the Libcloud drivers. 1. Obtain reference to the provider driver 3 Apache Libcloud Documentation, Release 3.3.1 from pprint import pprint import libcloud cls= libcloud.get_driver(libcloud.DriverType.COMPUTE, libcloud.DriverType.COMPUTE. ,!RACKSPACE) 2. Instantiate the driver with your provider credentials driver= cls('my username','my api key') Keep in mind that some drivers take additional arguments such as region and api_version. For more information on which arguments you can pass to your provider driver, see provider-specific documentation and the driver docstrings. 3. Start using the driver pprint(driver.list_sizes()) pprint(driver.list_nodes()) 4. Putting it all together from pprint import pprint import libcloud cls= libcloud.get_driver(libcloud.DriverType.COMPUTE, libcloud.DriverType.COMPUTE. ,!RACKSPACE) driver= cls('my username','my api key') pprint(driver.list_sizes()) pprint(driver.list_nodes()) You can find more examples with common patterns which can help you get started on the Compute Examples page. Where to go from here? The best thing to do after understanding the basic driver work-flow is to visit the documentation chapter for the API you are interested in (Compute, Object Storage, Load Balancer, DNS). Chapter for each API explains some basic terminology and things you need to know to make an effective use of that API. After you have a good grasp of those basic concepts, you are encouraged to check the driver specific documentation (if available) and usage examples. If the driver specific documentation for the provider you are interested in is not available yet, you are encouraged to check docstrings for that driver. 1.1.2 Supported Providers This pages lists supported providers and methods for all the APIs. Compute 4 Chapter 1. Documentation Apache Libcloud Documentation, Release 3.3.1 Provider Matrix Provider Documentation Provider Constant Supported Regions Module Class Name Abiquo ABIQUO single region driver libcloud.compute.drivers.abiquo AbiquoNodeDriver Aliyun ECS Click ALIYUN_ECS single region driver libcloud.compute.drivers.ecs ECSDriver PCextreme AuroraCompute Click AURORACOMPUTE single region driver libcloud.compute.drivers.auroracompute AuroraComputeNodeDriver Azure Virtual machines Click AZURE single region driver libcloud.compute.drivers.azure AzureNodeDriver Azure Virtual machines Click AZURE_ARM single region driver libcloud.compute.drivers.azure_arm AzureNodeDriver Bluebox Blocks BLUEBOX single region driver libcloud.compute.drivers.bluebox BlueboxNodeDriver Brightbox BRIGHTBOX single region driver libcloud.compute.drivers.brightbox BrightboxNodeDriver BSNL Click BSNL single region driver libcloud.compute.drivers.bsnl BSNLNodeDriver Cloudscale Click CLOUDSCALE single region driver libcloud.compute.drivers.cloudscale CloudscaleNodeDriver CloudSigma (API v2.0) Click CLOUDSIGMA single region driver libcloud.compute.drivers.cloudsigma CloudSigmaNodeDriver CloudStack Click CLOUDSTACK single region driver libcloud.compute.drivers.cloudstack CloudStackNodeDriver Cloudwatt Click CLOUDWATT single region driver libcloud.compute.drivers.cloudwatt CloudwattNodeDriver DigitalOcean Click DIGITAL_OCEAN single region driver libcloud.compute.drivers.digitalocean DigitalOceanNodeDriver DimensionData Click DIMENSIONDATA single region driver libcloud.compute.drivers.dimensiondata DimensionDataNodeDriver Amazon EC2 Click EC2 ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, cn-north-1, cn-northwest-1, eu-central-1, eu-north-1, eu-west-1, eu-west-2, eu-west-3, sa-east-1, us-east-1, us-east-2, us-gov-west-1, us-west-1, us-west-2 libcloud.compute.drivers.ec2 EC2NodeDriver Enomaly Elastic Computing Platform ECP single region driver libcloud.compute.drivers.ecp ECPNodeDriver ElasticHosts ELASTICHOSTS single region driver libcloud.compute.drivers.elastichosts ElasticHostsNodeDriver EquinixMetal Click EQUINIXMETAL single region driver libcloud.compute.drivers.equinixmetal EquinixMetalNodeDriver Eucalyptus EUCALYPTUS single region driver libcloud.compute.drivers.ec2 EucNodeDriver Exoscale Click EXOSCALE single region driver libcloud.compute.drivers.exoscale ExoscaleNodeDriver Gandi Click GANDI single region driver libcloud.compute.drivers.gandi GandiNodeDriver Google Compute Engine Click GCE single region driver libcloud.compute.drivers.gce GCENodeDriver GiG G8 Node Provider GIG_G8 single region driver libcloud.compute.drivers.gig_g8 G8NodeDriver GoGrid GOGRID single region driver libcloud.compute.drivers.gogrid GoGridNodeDriver Gridscale Click GRIDSCALE single region driver libcloud.compute.drivers.gridscale GridscaleNodeDriver HostVirtual HOSTVIRTUAL single region driver libcloud.compute.drivers.hostvirtual HostVirtualNodeDriver Ikoula Click IKOULA single region driver libcloud.compute.drivers.ikoula IkoulaNodeDriver Indosat Click INDOSAT single region driver libcloud.compute.drivers.indosat IndosatNodeDriver InternetSolutions Click INTERNETSOLUTIONS single region driver libcloud.compute.drivers.internetsolutions InternetSolutionsNodeDriver Joyent JOYENT single region driver libcloud.compute.drivers.joyent JoyentNodeDriver Kamatera Click KAMATERA single region driver libcloud.compute.drivers.kamatera KamateraNodeDriver Kili Public Cloud Click KILI single region driver libcloud.compute.drivers.kili KiliCloudNodeDriver KTUCloud KTUCLOUD single region driver libcloud.compute.drivers.ktucloud KTUCloudNodeDriver kubevirt KUBEVIRT single region driver libcloud.compute.drivers.kubevirt KubeVirtNodeDriver Libvirt Click LIBVIRT single region driver libcloud.compute.drivers.libvirt_driver LibvirtNodeDriver Linode LINODE