~sateesh-chodapuneedi/openstack-manuals/working

« back to all changes in this revision

Viewing changes to doc/target/docbkx/webhelp/openstack-compute-api/os-devguide/content/ch03s12.html

  • Committer: Anne Gentle
  • Date: 2011-04-05 01:55:32 UTC
  • Revision ID: anne@openstack.org-20110405015532-6jev0kk1iqx0twe2
Testing mvn builds

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 
2
<!DOCTYPE html
 
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:exsl="http://exslt.org/common" xmlns:ng="http://docbook.org/docbook-ng"><head>
 
5
<meta http-equiv="X-UA-Compatible" content="IE=7"/>
 
6
<title>Faults</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><link rel="home" href="index.html" title="OpenStack Compute Developer Guide"/><link rel="up" href="ch03.html" title="Chapter 3. General API Information"/><link rel="prev" href="ch03s11.html" title="Extensions"/><link rel="next" href="ch04.html" title="Chapter 4. API Operations"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script type="text/javascript">
 
7
            //The id for tree cookie
 
8
            var treeCookieId = "treeview-4581";
 
9
            var language = "en";
 
10
            var w = new Object();
 
11
            //Localization
 
12
            txt_filesfound = 'Results';
 
13
            txt_enter_at_least_1_char = "You must enter at least one character.";
 
14
            txt_browser_not_supported = "Your browser is not supported. Use of Mozilla Firefox is recommended.";
 
15
            txt_please_wait = "Please wait. Search in progress...";
 
16
            txt_results_for = "Results for: ";
 
17
        </script><style type="text/css">
 
18
            input {
 
19
            margin-bottom: 5px;
 
20
            margin-top: 2px;
 
21
            }
 
22
 
 
23
            .folder {
 
24
            display: block;
 
25
            height: 22px;
 
26
            padding-left: 20px;
 
27
            background: transparent url(../common/jquery/treeview/images/folder.gif) 0 0px no-repeat;
 
28
            }
 
29
            
 
30
        </style><link rel="shortcut icon" href="../favicon.ico" type="image/x-icon"/><link rel="stylesheet" type="text/css" href="../common/css/positioning.css"/><link rel="stylesheet" type="text/css" href="../common/jquery/theme-redmond/jquery-ui-1.8.2.custom.css"/><link rel="stylesheet" type="text/css" href="../common/jquery/treeview/jquery.treeview.css"/><script type="text/javascript" src="../common/jquery/jquery-1.4.2.min.js"><!----></script><script type="text/javascript" src="../common/jquery/jquery-ui-1.8.2.custom.min.js"><!----></script><script type="text/javascript" src="../common/jquery/jquery.cookie.js"><!----></script><script type="text/javascript" src="../common/jquery/treeview/jquery.treeview.min.js"><!----></script><script type="text/javascript" src="search/htmlFileList.js"><!----></script><script type="text/javascript" src="search/htmlFileInfoList.js"><!----></script><script type="text/javascript" src="search/nwSearchFnt.js"><!----></script><script type="text/javascript" src="search/stemmers/en_stemmer.js"><!--//make this scalable to other languages as well.--></script><script type="text/javascript" src="search/index-1.js"><!----></script><script type="text/javascript" src="search/index-2.js"><!----></script><script type="text/javascript" src="search/index-3.js"><!----></script></head><body><div xmlns="" id="header"><img src="../common/images/openstack-logo.png" alt="OpenStack Documentation" width="157" height="47"/><p class="breadcrumbs"><a href="http://docs.openstack.org/">OpenStack Manuals</a></p><h1>Faults</h1><div id="navheader" align="right"><!----><table class="navLinks"><tr><td><a id="showHideButton" onclick="showHideToc();" class="pointLeft" title="Hide TOC tree">Sidebar
 
31
                            </a></td><td><a accesskey="p" class="navLinkPrevious" href="ch03s11.html">Prev</a>
 
32
                                        |
 
33
                                        <a accesskey="u" class="navLinkUp" href="ch03.html">Up</a>
 
34
                                    |
 
35
                                    <a accesskey="n" class="navLinkNext" href="ch04.html">Next</a></td></tr></table></div></div><div id="content"><!----><div class="section" title="Faults"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="d877e777"/>Faults</h2></div></div></div><p> When an error occurs, the system will return an HTTP error response code denoting
 
36
                the type of error. The system will also return additional information about the
 
37
                fault in the body of the response. </p><div class="example"><a id="d877e780"/><p class="title"><strong>Example 3.40. Fault Response: XML</strong></p><div class="example-contents"><pre class="programlisting">
 
38
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 
39
&lt;computeFault
 
40
    xmlns="http://docs.openstack.org/compute/api/v1.1"
 
41
    code="500"&gt;
 
42
  &lt;message&gt;Fault!&lt;/message&gt;
 
43
  &lt;details&gt;Error Details...&lt;/details&gt;
 
44
&lt;/computeFault&gt;
 
45
 
 
46
                </pre></div></div><br class="example-break"/><div class="example"><a id="d877e783"/><p class="title"><strong>Example 3.41. Fault Response: JSON</strong></p><div class="example-contents"><pre class="programlisting">
 
47
{
 
48
    "computeFault" : {
 
49
        "code" : 500,
 
50
        "message" : "Fault!",
 
51
        "details" : "Error Details..." 
 
52
    }
 
53
}
 
54
 
 
55
                </pre></div></div><br class="example-break"/><p> The error code is returned in the body of the response for convenience. The
 
56
                message section returns a human-readable message that is appropriate for display to
 
57
                the end user. The details section is optional and may contain information—for example, a stack trace—to 
 
58
                assist in tracking down an error. The detail section may or may not be
 
59
                appropriate for display to an end user. </p><p>
 
60
                The root element of the fault (e.g. computeFault)
 
61
                may change depending on the type of error. The
 
62
                following is a list of possible elements along with
 
63
                their associated error codes.
 
64
            </p><table rules="all" id="d877e788"><caption>Table 3.6. Fault Elements and Error Codes</caption><thead><tr>
 
65
                        <td>Fault Element</td>
 
66
                        <td>Associated Error Codes</td>
 
67
                        <td>Expected in All Requests?</td>
 
68
                    </tr></thead><tbody><tr>
 
69
                        <td>computeFault</td>
 
70
                        <td>500, 400, other codes possible</td>
 
71
                        <td align="center"><span class="inlinemediaobject"><object type="image/svg+xml" data="img/Check_mark_23x20_02.svg" width="324"/></span></td>
 
72
                    </tr><tr>
 
73
                        <td>serviceUnavailable</td>
 
74
                        <td>503</td>
 
75
                        <td align="center"><span class="inlinemediaobject"><object type="image/svg+xml" data="img/Check_mark_23x20_02.svg" width="324"/></span></td>
 
76
                    </tr><tr>
 
77
                        <td>unauthorized</td>
 
78
                        <td>401</td>
 
79
                        <td align="center"><span class="inlinemediaobject"><object type="image/svg+xml" data="img/Check_mark_23x20_02.svg" width="324"/></span></td>
 
80
                    </tr><tr>
 
81
                        <td>badRequest</td>
 
82
                        <td>400</td>
 
83
                        <td align="center"><span class="inlinemediaobject"><object type="image/svg+xml" data="img/Check_mark_23x20_02.svg" width="324"/></span></td>
 
84
                    </tr><tr>
 
85
                        <td>overLimit</td>
 
86
                        <td>413</td>
 
87
                        <td align="center"><span class="inlinemediaobject"><object type="image/svg+xml" data="img/Check_mark_23x20_02.svg" width="324"/></span></td>
 
88
                    </tr><tr>
 
89
                        <td>badMediaType</td>
 
90
                        <td>415</td>
 
91
                        <td/>
 
92
                    </tr><tr>
 
93
                        <td>badMethod</td>
 
94
                        <td>405</td>
 
95
                        <td/>
 
96
                    </tr><tr>
 
97
                        <td>itemNotFound</td>
 
98
                        <td>404</td>
 
99
                        <td/>
 
100
                    </tr><tr>
 
101
                        <td>buildInProgress</td>
 
102
                        <td>409</td>
 
103
                        <td/>
 
104
                    </tr><tr>
 
105
                        <td>serverCapacityUnavailable</td>
 
106
                        <td>503</td>
 
107
                        <td/>
 
108
                    </tr><tr>
 
109
                        <td>backupOrResizeInProgress</td>
 
110
                        <td>409</td>
 
111
                        <td/>
 
112
                    </tr><tr>
 
113
                        <td>resizeNotAllowed</td>
 
114
                        <td>403</td>
 
115
                        <td/>
 
116
                    </tr><tr>
 
117
                        <td>notImplemented</td>
 
118
                        <td>501</td>
 
119
                        <td/>
 
120
                    </tr></tbody></table><div class="example"><a id="d877e863"/><p class="title"><strong>Example 3.42. Fault Response, Item Not Found: XML</strong></p><div class="example-contents"><pre class="programlisting">
 
121
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 
122
&lt;itemNotFound
 
123
    xmlns="http://docs.openstack.org/compute/api/v1.1"
 
124
    code="404"&gt;
 
125
  &lt;message&gt;Not Found&lt;/message&gt;
 
126
  &lt;details&gt;Error Details...&lt;/details&gt;
 
127
&lt;/itemNotFound&gt;
 
128
 
 
129
                </pre></div></div><br class="example-break"/><div class="example"><a id="d877e866"/><p class="title"><strong>Example 3.43. Fault Response, Item Not Found: JSON</strong></p><div class="example-contents"><pre class="programlisting">
 
130
{
 
131
    "itemNotFound" : {
 
132
        "code" : 404,
 
133
        "message" : "Not Found",
 
134
        "details" : "Error Details..." 
 
135
    }
 
136
}
 
137
 
 
138
                </pre></div></div><br class="example-break"/><p>
 
139
                From an XML schema perspective, all API faults are
 
140
                extensions of the base fault type ComputeAPIFault.
 
141
                When working with a system that binds XML to actual
 
142
                classes (such as JAXB), one should be capable of using
 
143
                ComputeAPIFault as a “catch-all” if there's no
 
144
                interest in distinguishing between individual fault
 
145
                types.
 
146
            </p><p>
 
147
                The OverLimit fault is generated when a rate limit
 
148
                threshold is exceeded.  For convenience, the fault
 
149
                adds a <span class="property">retryAt</span> attribute that
 
150
                contains the content of the Reply-After header in XML
 
151
                Schema 1.0 date/time format.
 
152
            </p><div class="example"><a id="d877e872"/><p class="title"><strong>Example 3.44. Fault Response, Over Limit: XML</strong></p><div class="example-contents"><pre class="programlisting">
 
153
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 
154
&lt;overLimit
 
155
    xmlns="http://docs.openstack.org/compute/api/v1.1"
 
156
    code="413"
 
157
    retryAt="2010-08-01T00:00:00Z"&gt;
 
158
  &lt;message&gt;OverLimit Retry...&lt;/message&gt;
 
159
  &lt;details&gt;Error Details...&lt;/details&gt;
 
160
&lt;/overLimit&gt;
 
161
 
 
162
                </pre></div></div><br class="example-break"/><div class="example"><a id="d877e875"/><p class="title"><strong>Example 3.45. Fault Response, Over Limit: JSON</strong></p><div class="example-contents"><pre class="programlisting">
 
163
{
 
164
    "overLimit" : {
 
165
        "code" : 413,
 
166
        "message" : "OverLimit Retry...",
 
167
        "details" : "Error Details...",
 
168
            "retryAt" : "2010-08-01T00:00:00Z"
 
169
    }
 
170
}
 
171
 
 
172
                </pre></div></div><br class="example-break"/></div><script xmlns="" type="text/javascript" src="../common/main.js"><!----></script><hr xmlns=""/><h2 xmlns="" class="userNotes">User Notes On This Page</h2><div xmlns="" id="disqus_thread"><script type="text/javascript">
 
173
              /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
 
174
              var disqus_shortname = 'openstackdocs'; 
 
175
              
 
176
              
 
177
              
 
178
              
 
179
              
 
180
              
 
181
              (function() {
 
182
              var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
 
183
              dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
 
184
              (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
 
185
              })();
 
186
            </script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">User notes powered by <span class="logo-disqus">Disqus</span></a></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s11.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></div><div xmlns=""><div id="leftnavigation" style="padding-top:3px; background-color:white;"><div id="tabs"><ul><li><a href="#treeDiv"><span class="contentsTab">Contents</span></a></li><li><a href="#searchDiv"><span class="searchTab">Search</span></a></li></ul><div id="treeDiv"><img src="../../../common/images/loading.gif" alt="loading table of contents..." id="tocLoading" style="display:block;"/><div id="ulTreeDiv" style="display:none"><ul id="tree" class="filetree"><li xmlns="http://www.w3.org/1999/xhtml"><span class="file"><a href="ch01.html">Overview</a></span><ul><li><span class="file"><a href="ch01s01.html">Intended Audience</a></span></li><li><span class="file"><a href="ch01s02.html">Document Change History</a></span></li></ul></li><li xmlns="http://www.w3.org/1999/xhtml"><span class="file"><a href="ch02.html">Concepts</a></span><ul><li><span class="file"><a href="ch02s01.html">Server</a></span></li><li><span class="file"><a href="ch02s02.html">Flavor</a></span></li><li><span class="file"><a href="ch02s03.html">Image</a></span></li><li><span class="file"><a href="ch02s04.html">Reboot</a></span></li><li><span class="file"><a href="ch02s05.html">Rebuild</a></span></li><li><span class="file"><a href="ch02s06.html">Resize</a></span></li></ul></li><li xmlns="http://www.w3.org/1999/xhtml"><span class="file"><a href="ch03.html">General API Information</a></span><ul><li><span class="file"><a href="ch03s01.html">Authentication</a></span></li><li><span class="file"><a href="ch03s02.html">Request/Response Types</a></span></li><li><span class="file"><a href="ch03s03.html">Content Compression</a></span></li><li><span class="file"><a href="ch03s04.html">Persistent Connections</a></span></li><li><span class="file"><a href="ch03s05.html">Links and References</a></span></li><li><span class="file"><a href="ch03s06.html">Paginated Collections</a></span></li><li><span class="file"><a href="ch03s07.html">Caching</a></span></li><li><span class="file"><a href="ch03s08.html">Efficient Polling with the
 
187
            Changes-Since Parameter</a></span></li><li><span class="file"><a href="ch03s09.html">Limits</a></span><ul><li><span class="file"><a href="ch03s09.html#d877e498">Rate Limits</a></span></li><li><span class="file"><a href="ch03s09.html#d877e549">Absolute Limits</a></span></li><li><span class="file"><a href="ch03s09.html#ProgramaticLimits">Determining Limits Programmatically</a></span></li></ul></li><li><span class="file"><a href="ch03s10.html">Versions</a></span></li><li><span class="file"><a href="ch03s11.html">Extensions</a></span></li><li id="webhelp-currentid"><span class="file"><a href="ch03s12.html">Faults</a></span></li></ul></li><li xmlns="http://www.w3.org/1999/xhtml"><span class="file"><a href="ch04.html">API Operations</a></span><ul><li><span class="file"><a href="ch04s01.html">Servers</a></span><ul><li><span class="file"><a href="ch04s01.html#d877e882">List Servers</a></span></li><li><span class="file"><a href="ch04s01.html#CreateServers">Create Server</a></span><ul><li><span class="file"><a href="ch04s01.html#d877e1008">Server Affinity</a></span></li><li><span class="file"><a href="ch04s01.html#d877e1016">Server Passwords</a></span></li><li><span class="file"><a href="ch04s01.html#d877e1023">Server Metadata</a></span></li><li><span class="file"><a href="ch04s01.html#d877e1028">Server Personality</a></span></li></ul></li><li><span class="file"><a href="ch04s01.html#d877e1033">Get Server Details</a></span></li><li><span class="file"><a href="ch04s01.html#d877e1067">Update Server Name</a></span></li><li><span class="file"><a href="ch04s01.html#d877e1112">Delete Server</a></span></li></ul></li><li><span class="file"><a href="ch04s02.html">Server Addresses</a></span><ul><li><span class="file"><a href="ch04s02.html#d877e1162">List Addresses</a></span></li><li><span class="file"><a href="ch04s02.html#d877e1194">List Addresses by Network</a></span></li></ul></li><li><span class="file"><a href="ch04s03.html">Server Actions</a></span><ul><li><span class="file"><a href="ch04s03.html#d877e1230">Change Password</a></span></li><li><span class="file"><a href="ch04s03.html#d877e1279">Reboot Server</a></span></li><li><span class="file"><a href="ch04s03.html#d877e1344">Rebuild Server</a></span></li><li><span class="file"><a href="ch04s03.html#d877e1410">Resize Server</a></span></li><li><span class="file"><a href="ch04s03.html#d877e1481">Confirm Resized Server</a></span></li><li><span class="file"><a href="ch04s03.html#d877e1528">Revert Resized Server</a></span></li></ul></li><li><span class="file"><a href="ch04s04.html">Flavors</a></span><ul><li><span class="file"><a href="ch04s04.html#d877e1578">List Flavors</a></span></li><li><span class="file"><a href="ch04s04.html#d877e1615">Get Flavor Details</a></span></li></ul></li><li><span class="file"><a href="ch04s05.html">Images</a></span><ul><li><span class="file"><a href="ch04s05.html#d877e1652">List Images</a></span></li><li><span class="file"><a href="ch04s05.html#d877e1697">Create Image</a></span></li><li><span class="file"><a href="ch04s05.html#d877e1779">Get Image Details</a></span></li><li><span class="file"><a href="ch04s05.html#d877e1813">Delete Image</a></span></li></ul></li><li><span class="file"><a href="ch04s06.html">Metadata</a></span><ul><li><span class="file"><a href="ch04s06.html#d877e1844">List Metadata</a></span></li><li><span class="file"><a href="ch04s06.html#d877e1882">Update Metadata</a></span></li><li><span class="file"><a href="ch04s06.html#d877e1928">Get Metadata Item</a></span></li><li><span class="file"><a href="ch04s06.html#d877e1969">Create or Update a Metadata Item</a></span></li><li><span class="file"><a href="ch04s06.html#d877e2018">Delete Metadata Item</a></span></li></ul></li></ul></li></ul></div></div><div id="searchDiv"><div id="search"><form onsubmit="Verifie(ditaSearch_Form);return false" name="ditaSearch_Form" class="searchForm"><fieldset class="searchFieldSet"><legend>Search</legend><center><input id="textToSearch" name="textToSearch" type="text" class="searchText"/> &nbsp; <input onclick="Verifie(ditaSearch_Form)" type="button" class="searchButton" value="Go" id="doSearch"/></center></fieldset></form></div><div id="searchResults"><center/></div><p class="searchHighlight"><a href="#" onclick="toggleHighlight()">Search Highlighter (On/Off)</a></p></div></div></div></div></body></html>
 
 
b'\\ No newline at end of file'