cloudstack api developer's guide - svn. cloudstack 4.0.2 cloudstack api developer's guide open...

Download CloudStack API Developer's Guide - svn. CloudStack 4.0.2 CloudStack API Developer's Guide open source…

Post on 29-Aug-2019

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Apache CloudStack 4.0.2

    CloudStack API Developer's Guide

    open source cloud com put ing

    Apache CloudStack

  • CloudStack API Developer's Guide

    Apache CloudStack 4.0.2 CloudStack API Developer's Guide Author Apache CloudStack

    Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

    Apache CloudStack is an effort undergoing incubation at The Apache Software Foundation (ASF).

    Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

    How to integrate with CloudStack using the CloudStack API.

  • iii

    1. Concepts 1 1.1. What Is CloudStack? .................................................................................................... 1 1.2. What Can CloudStack Do? ........................................................................................... 1 1.3. Deployment Architecture Overview ................................................................................ 2

    1.3.1. Management Server Overview ........................................................................... 3 1.3.2. Cloud Infrastructure Overview ............................................................................ 3 1.3.3. Networking Overview ......................................................................................... 4

    2. Introduction for Developers 5 2.1. Roles ........................................................................................................................... 5 2.2. API Reference Documentation ...................................................................................... 5 2.3. Getting Started ............................................................................................................. 5

    3. What's New in the API? 7 3.1. What's New in the API for 4.0 ...................................................................................... 7

    3.1.1. Changed API Commands in 4.0.0-incubating ...................................................... 7 3.1.2. Added API Commands in 4.0.0-incubating ........................................................ 10

    3.2. What's New in the API for 3.0 ..................................................................................... 11 3.2.1. Enabling Port 8096 .......................................................................................... 11 3.2.2. Stopped VM .................................................................................................... 12 3.2.3. Change to Behavior of List Commands ............................................................. 12 3.2.4. Removed API commands ................................................................................. 13 3.2.5. Added API commands in 3.0 ............................................................................ 13 3.2.6. Added CloudStack Error Codes ........................................................................ 15

    4. Calling the CloudStack API 17 4.1. Making API Requests ................................................................................................. 17 4.2. Enabling API Call Expiration ....................................................................................... 17 4.3. Signing API Requests ................................................................................................. 18 4.4. Responses ................................................................................................................. 19

    4.4.1. Response Formats: XML and JSON ................................................................. 19 4.4.2. Maximum Result Pages Returned ..................................................................... 20 4.4.3. Error Handling ................................................................................................. 20

    4.5. Asynchronous Commands .......................................................................................... 21 4.5.1. Job Status ....................................................................................................... 21 4.5.2. Example .......................................................................................................... 21

    5. Working With Usage Data 25 5.1. Usage Record Format ................................................................................................ 25

    5.1.1. Virtual Machine Usage Record Format .............................................................. 25 5.1.2. Network Usage Record Format ........................................................................ 25 5.1.3. IP Address Usage Record Format .................................................................... 26 5.1.4. Disk Volume Usage Record Format .................................................................. 26 5.1.5. Template, ISO, and Snapshot Usage Record Format ......................................... 27 5.1.6. Load Balancer Policy or Port Forwarding Rule Usage Record Format .................. 27 5.1.7. Network Offering Usage Record Format ............................................................ 28 5.1.8. VPN User Usage Record Format ...................................................................... 28

    5.2. Usage Types .............................................................................................................. 29 5.3. Example response from listUsageRecords ................................................................... 30 5.4. Dates in the Usage Record ......................................................................................... 31

    A. Event Types 33

    B. Alerts 35

    C. Time Zones 37

    D. Revision History 39

  • iv

  • Chapter 1.

    1

    Concepts

    1.1. What Is CloudStack? CloudStack is an open source software platform that pools computing resources to build public, private, and hybrid Infrastructure as a Service (IaaS) clouds. CloudStack manages the network, storage, and compute nodes that make up a cloud infrastructure. Use CloudStack to deploy, manage, and configure cloud computing environments.

    Typical users are service providers and enterprises. With CloudStack, you can:

    • Set up an on-demand, elastic cloud computing service. Service providers can sell self service virtual machine instances, storage volumes, and networking configurations over the Internet.

    • Set up an on-premise private cloud for use by employees. Rather than managing virtual machines in the same way as physical machines, with CloudStack an enterprise can offer self-service virtual machines to users without involving IT departments.

    1.2. What Can CloudStack Do? Multiple Hypervisor Support

    CloudStack works with a variety of hypervisors, and a single cloud deployment can contain multiple hypervisor implementations. The current release of CloudStack supports pre-packaged enterprise solutions like Citrix XenServer and VMware vSphere, as well as KVM or Xen running on Ubuntu or CentOS.

    Massively Scalable Infrastructure Management

  • Chapter 1. Concepts

    2

    CloudStack can manage tens of thousands of servers installed in multiple geographically distributed datacenters. The centralized management server scales linearly, eliminating the need for intermediate cluster-level management servers. No single component failure can cause cloud-wide outage. Periodic maintenance of the management server can be performed without affecting the functioning of virtual machines running in the cloud.

    Automatic Configuration Management

    CloudStack automatically configures each guest virtual machine’s networking and storage settings.

    CloudStack interna

Recommended

View more >