File: servers.html

package info (click to toggle)
python-cloudservers 1.1-1.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,724 kB
  • sloc: python: 2,004; makefile: 79
file content (567 lines) | stat: -rw-r--r-- 31,181 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Servers &mdash; python-cloudservers v1.0 documentation</title>
    <link rel="stylesheet" href="../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="python-cloudservers v1.0 documentation" href="../index.html" />
    <link rel="up" title="API Reference" href="index.html" />
    <link rel="next" title="Release notes" href="../releases.html" />
    <link rel="prev" title="Shared IP addresses" href="ipgroups.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../releases.html" title="Release notes"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="ipgroups.html" title="Shared IP addresses"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">python-cloudservers v1.0 documentation</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">API Reference</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="servers">
<h1>Servers<a class="headerlink" href="#servers" title="Permalink to this headline">¶</a></h1>
<p>A virtual machine instance.</p>
<div class="section" id="classes">
<h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="cloudservers.ServerManager">
<em class="property">class </em><tt class="descclassname">cloudservers.</tt><tt class="descname">ServerManager</tt><big>(</big><em>api</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="cloudservers.ServerManager.get">
<tt class="descname">get</tt><big>(</big><em>server</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>server</strong> &#8211; ID of the <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> to get.</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">&lt;pending_xref py:class=&#8221;ServerManager&#8221; py:module=&#8221;cloudservers&#8221; refdoc=&#8221;ref/servers&#8221; refdomain=&#8221;py&#8221; refexplicit=&#8221;False&#8221; reftarget=&#8221;Server&#8221; reftype=&#8221;class&#8221;&gt;&lt;literal classes=&#8221;xref py py-class&#8221;&gt;Server&lt;/literal&gt;&lt;/pending_xref&gt;</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.list">
<tt class="descname">list</tt><big>(</big><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.list" title="Permalink to this definition">¶</a></dt>
<dd>Get a list of servers.
:rtype: list of <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a></dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.find">
<tt class="descname">find</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.find" title="Permalink to this definition">¶</a></dt>
<dd><p>Find a single item with attributes matching <tt class="docutils literal"><span class="pre">**kwargs</span></tt>.</p>
<p>This isn&#8217;t very efficient: it loads the entire list then filters on
the Python side.</p>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.findall">
<tt class="descname">findall</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.findall" title="Permalink to this definition">¶</a></dt>
<dd><p>Find all items with attributes matching <tt class="docutils literal"><span class="pre">**kwargs</span></tt>.</p>
<p>This isn&#8217;t very efficient: it loads the entire list then filters on
the Python side.</p>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.create">
<tt class="descname">create</tt><big>(</big><em>name</em>, <em>image</em>, <em>flavor</em>, <em>ipgroup=None</em>, <em>meta=None</em>, <em>files=None</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.create" title="Permalink to this definition">¶</a></dt>
<dd><p>Create (boot) a new server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> &#8211; Something to name the server.</li>
<li><strong>image</strong> &#8211; The <a title="cloudservers.Image" class="reference external" href="images.html#cloudservers.Image"><tt class="xref py py-class docutils literal"><span class="pre">Image</span></tt></a> to boot with.</li>
<li><strong>flavor</strong> &#8211; The <a title="cloudservers.Flavor" class="reference external" href="flavors.html#cloudservers.Flavor"><tt class="xref py py-class docutils literal"><span class="pre">Flavor</span></tt></a> to boot onto.</li>
<li><strong>ipgroup</strong> &#8211; An initial <a title="cloudservers.IPGroup" class="reference external" href="ipgroups.html#cloudservers.IPGroup"><tt class="xref py py-class docutils literal"><span class="pre">IPGroup</span></tt></a> for this server.</li>
<li><strong>meta</strong> &#8211; A dict of arbitrary key/value metadata to store for this
server. A maximum of five entries is allowed, and both
keys and values must be 255 characters or less.</li>
<li><strong>files</strong> &#8211; A dict of files to overrwrite on the server upon boot.
Keys are file names (i.e. <tt class="docutils literal"><span class="pre">/etc/passwd</span></tt>) and values
are the file contents (either as a string or as a
file-like object). A maximum of five entries is allowed,
and each file must be 10k or less.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>There&#8217;s a bunch more info about how a server boots in Rackspace&#8217;s
official API docs, page 23.</p>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.update">
<tt class="descname">update</tt><big>(</big><em>server</em>, <em>name=None</em>, <em>password=None</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the name or the password for a server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>server</strong> &#8211; The <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> (or its ID) to update.</li>
<li><strong>name</strong> &#8211; Update the server&#8217;s name.</li>
<li><strong>password</strong> &#8211; Update the root password.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.delete">
<tt class="descname">delete</tt><big>(</big><em>server</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.delete" title="Permalink to this definition">¶</a></dt>
<dd>Delete (i.e. shut down and delete the image) this server.</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.share_ip">
<tt class="descname">share_ip</tt><big>(</big><em>server</em>, <em>ipgroup</em>, <em>address</em>, <em>configure=True</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.share_ip" title="Permalink to this definition">¶</a></dt>
<dd><p>Share an IP address from the given IP group onto a server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>server</strong> &#8211; The <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> (or its ID) to share onto.</li>
<li><strong>ipgroup</strong> &#8211; The <a title="cloudservers.IPGroup" class="reference external" href="ipgroups.html#cloudservers.IPGroup"><tt class="xref py py-class docutils literal"><span class="pre">IPGroup</span></tt></a> that the given address belongs to.</li>
<li><strong>address</strong> &#8211; The IP address to share.</li>
<li><strong>configure</strong> &#8211; If <tt class="xref docutils literal"><span class="pre">True</span></tt>, the server will be automatically
configured to use this IP. I don&#8217;t know why you&#8217;d
want this to be <tt class="xref docutils literal"><span class="pre">False</span></tt>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.unshare_ip">
<tt class="descname">unshare_ip</tt><big>(</big><em>server</em>, <em>address</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.unshare_ip" title="Permalink to this definition">¶</a></dt>
<dd><p>Stop sharing the given address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>server</strong> &#8211; The <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> (or its ID) to share onto.</li>
<li><strong>address</strong> &#8211; The IP address to stop sharing.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.reboot">
<tt class="descname">reboot</tt><big>(</big><em>server</em>, <em>type='SOFT'</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.reboot" title="Permalink to this definition">¶</a></dt>
<dd><p>Reboot a server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>server</strong> &#8211; The <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> (or its ID) to share onto.</li>
<li><strong>type</strong> &#8211; either <a title="cloudservers.REBOOT_SOFT" class="reference internal" href="#cloudservers.REBOOT_SOFT"><tt class="xref py py-data docutils literal"><span class="pre">REBOOT_SOFT</span></tt></a> for a software-level reboot,
or <cite>REBOOT_HARD</cite> for a virtual power cycle hard reboot.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.rebuild">
<tt class="descname">rebuild</tt><big>(</big><em>server</em>, <em>image</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.rebuild" title="Permalink to this definition">¶</a></dt>
<dd><p>Rebuild &#8211; shut down and then re-image &#8211; a server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>server</strong> &#8211; The <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> (or its ID) to share onto.</li>
<li><strong>image</strong> &#8211; the <a title="cloudservers.Image" class="reference external" href="images.html#cloudservers.Image"><tt class="xref py py-class docutils literal"><span class="pre">Image</span></tt></a> (or its ID) to re-image with.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.resize">
<tt class="descname">resize</tt><big>(</big><em>server</em>, <em>flavor</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.resize" title="Permalink to this definition">¶</a></dt>
<dd><p>Resize a server&#8217;s resources.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>server</strong> &#8211; The <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> (or its ID) to share onto.</li>
<li><strong>flavor</strong> &#8211; the <a title="cloudservers.Flavor" class="reference external" href="flavors.html#cloudservers.Flavor"><tt class="xref py py-class docutils literal"><span class="pre">Flavor</span></tt></a> (or its ID) to resize to.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Until a resize event is confirmed with <a title="cloudservers.ServerManager.confirm_resize" class="reference internal" href="#cloudservers.ServerManager.confirm_resize"><tt class="xref py py-meth docutils literal"><span class="pre">confirm_resize()</span></tt></a>, the old
server will be kept around and you&#8217;ll be able to roll back to the old
flavor quickly with <a title="cloudservers.ServerManager.revert_resize" class="reference internal" href="#cloudservers.ServerManager.revert_resize"><tt class="xref py py-meth docutils literal"><span class="pre">revert_resize()</span></tt></a>. All resizes are
automatically confirmed after 24 hours.</p>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.confirm_resize">
<tt class="descname">confirm_resize</tt><big>(</big><em>server</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.confirm_resize" title="Permalink to this definition">¶</a></dt>
<dd><p>Confirm that the resize worked, thus removing the original server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>server</strong> &#8211; The <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> (or its ID) to share onto.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.ServerManager.revert_resize">
<tt class="descname">revert_resize</tt><big>(</big><em>server</em><big>)</big><a class="headerlink" href="#cloudservers.ServerManager.revert_resize" title="Permalink to this definition">¶</a></dt>
<dd><p>Revert a previous resize, switching back to the old server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>server</strong> &#8211; The <a title="cloudservers.Server" class="reference internal" href="#cloudservers.Server"><tt class="xref py py-class docutils literal"><span class="pre">Server</span></tt></a> (or its ID) to share onto.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="cloudservers.Server">
<em class="property">class </em><tt class="descclassname">cloudservers.</tt><tt class="descname">Server</tt><big>(</big><em>manager</em>, <em>info</em><big>)</big><a class="headerlink" href="#cloudservers.Server" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="cloudservers.Server.id">
<tt class="descname">id</tt><a class="headerlink" href="#cloudservers.Server.id" title="Permalink to this definition">¶</a></dt>
<dd>This server&#8217;s ID.</dd></dl>

<dl class="attribute">
<dt id="cloudservers.Server.name">
<tt class="descname">name</tt><a class="headerlink" href="#cloudservers.Server.name" title="Permalink to this definition">¶</a></dt>
<dd>The name you gave the server when you booted it.</dd></dl>

<dl class="attribute">
<dt id="cloudservers.Server.imageId">
<tt class="descname">imageId</tt><a class="headerlink" href="#cloudservers.Server.imageId" title="Permalink to this definition">¶</a></dt>
<dd>The <a title="cloudservers.Image" class="reference external" href="images.html#cloudservers.Image"><tt class="xref py py-class docutils literal"><span class="pre">Image</span></tt></a> this server was booted with.</dd></dl>

<dl class="attribute">
<dt id="cloudservers.Server.flavorId">
<tt class="descname">flavorId</tt><a class="headerlink" href="#cloudservers.Server.flavorId" title="Permalink to this definition">¶</a></dt>
<dd>This server&#8217;s current <a title="cloudservers.Flavor" class="reference external" href="flavors.html#cloudservers.Flavor"><tt class="xref py py-class docutils literal"><span class="pre">Flavor</span></tt></a>.</dd></dl>

<dl class="attribute">
<dt id="cloudservers.Server.hostId">
<tt class="descname">hostId</tt><a class="headerlink" href="#cloudservers.Server.hostId" title="Permalink to this definition">¶</a></dt>
<dd>Rackspace doesn&#8217;t document this value. It appears to be SHA1 hash.</dd></dl>

<dl class="attribute">
<dt id="cloudservers.Server.status">
<tt class="descname">status</tt><a class="headerlink" href="#cloudservers.Server.status" title="Permalink to this definition">¶</a></dt>
<dd>The server&#8217;s status (<tt class="docutils literal"><span class="pre">BOOTING</span></tt>, <tt class="docutils literal"><span class="pre">ACTIVE</span></tt>, etc).</dd></dl>

<dl class="attribute">
<dt id="cloudservers.Server.progress">
<tt class="descname">progress</tt><a class="headerlink" href="#cloudservers.Server.progress" title="Permalink to this definition">¶</a></dt>
<dd>When booting, resizing, updating, etc., this will be set to a
value between 0 and 100 giving a rough estimate of the progress
of the current operation.</dd></dl>

<dl class="attribute">
<dt id="cloudservers.Server.addresses">
<tt class="descname">addresses</tt><a class="headerlink" href="#cloudservers.Server.addresses" title="Permalink to this definition">¶</a></dt>
<dd><p>The public and private IP addresses of this server. This&#8217;ll be a dict
of the form:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
  <span class="s">&quot;public&quot;</span> <span class="p">:</span> <span class="p">[</span><span class="s">&quot;67.23.10.138&quot;</span><span class="p">],</span>
  <span class="s">&quot;private&quot;</span> <span class="p">:</span> <span class="p">[</span><span class="s">&quot;10.176.42.19&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>You <em>can</em> get more than one public/private IP provisioned, but not
directly from the API; you&#8217;ll need to open a support ticket.</p>
</dd></dl>

<dl class="attribute">
<dt id="cloudservers.Server.metadata">
<tt class="descname">metadata</tt><a class="headerlink" href="#cloudservers.Server.metadata" title="Permalink to this definition">¶</a></dt>
<dd>The metadata dict you gave when creating the server.</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.update">
<tt class="descname">update</tt><big>(</big><em>name=None</em>, <em>password=None</em><big>)</big><a class="headerlink" href="#cloudservers.Server.update" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the name or the password for this server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>name</strong> &#8211; Update the server&#8217;s name.</li>
<li><strong>password</strong> &#8211; Update the root password.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.delete">
<tt class="descname">delete</tt><big>(</big><big>)</big><a class="headerlink" href="#cloudservers.Server.delete" title="Permalink to this definition">¶</a></dt>
<dd>Delete (i.e. shut down and delete the image) this server.</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.share_ip">
<tt class="descname">share_ip</tt><big>(</big><em>ipgroup</em>, <em>address</em>, <em>configure=True</em><big>)</big><a class="headerlink" href="#cloudservers.Server.share_ip" title="Permalink to this definition">¶</a></dt>
<dd><p>Share an IP address from the given IP group onto this server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>ipgroup</strong> &#8211; The <a title="cloudservers.IPGroup" class="reference external" href="ipgroups.html#cloudservers.IPGroup"><tt class="xref py py-class docutils literal"><span class="pre">IPGroup</span></tt></a> that the given address belongs to.</li>
<li><strong>address</strong> &#8211; The IP address to share.</li>
<li><strong>configure</strong> &#8211; If <tt class="xref docutils literal"><span class="pre">True</span></tt>, the server will be automatically
configured to use this IP. I don&#8217;t know why you&#8217;d
want this to be <tt class="xref docutils literal"><span class="pre">False</span></tt>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.unshare_ip">
<tt class="descname">unshare_ip</tt><big>(</big><em>address</em><big>)</big><a class="headerlink" href="#cloudservers.Server.unshare_ip" title="Permalink to this definition">¶</a></dt>
<dd><p>Stop sharing the given address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>address</strong> &#8211; The IP address to stop sharing.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.reboot">
<tt class="descname">reboot</tt><big>(</big><em>type='SOFT'</em><big>)</big><a class="headerlink" href="#cloudservers.Server.reboot" title="Permalink to this definition">¶</a></dt>
<dd><p>Reboot the server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>type</strong> &#8211; either <a title="cloudservers.REBOOT_SOFT" class="reference internal" href="#cloudservers.REBOOT_SOFT"><tt class="xref py py-data docutils literal"><span class="pre">REBOOT_SOFT</span></tt></a> for a software-level reboot,
or <cite>REBOOT_HARD</cite> for a virtual power cycle hard reboot.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.rebuild">
<tt class="descname">rebuild</tt><big>(</big><em>image</em><big>)</big><a class="headerlink" href="#cloudservers.Server.rebuild" title="Permalink to this definition">¶</a></dt>
<dd><p>Rebuild &#8211; shut down and then re-image &#8211; this server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>image</strong> &#8211; the <a title="cloudservers.Image" class="reference external" href="images.html#cloudservers.Image"><tt class="xref py py-class docutils literal"><span class="pre">Image</span></tt></a> (or its ID) to re-image with.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.resize">
<tt class="descname">resize</tt><big>(</big><em>flavor</em><big>)</big><a class="headerlink" href="#cloudservers.Server.resize" title="Permalink to this definition">¶</a></dt>
<dd><p>Resize the server&#8217;s resources.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>flavor</strong> &#8211; the <a title="cloudservers.Flavor" class="reference external" href="flavors.html#cloudservers.Flavor"><tt class="xref py py-class docutils literal"><span class="pre">Flavor</span></tt></a> (or its ID) to resize to.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Until a resize event is confirmed with <a title="cloudservers.Server.confirm_resize" class="reference internal" href="#cloudservers.Server.confirm_resize"><tt class="xref py py-meth docutils literal"><span class="pre">confirm_resize()</span></tt></a>, the old
server will be kept around and you&#8217;ll be able to roll back to the old
flavor quickly with <a title="cloudservers.Server.revert_resize" class="reference internal" href="#cloudservers.Server.revert_resize"><tt class="xref py py-meth docutils literal"><span class="pre">revert_resize()</span></tt></a>. All resizes are
automatically confirmed after 24 hours.</p>
</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.confirm_resize">
<tt class="descname">confirm_resize</tt><big>(</big><big>)</big><a class="headerlink" href="#cloudservers.Server.confirm_resize" title="Permalink to this definition">¶</a></dt>
<dd>Confirm that the resize worked, thus removing the original server.</dd></dl>

<dl class="method">
<dt id="cloudservers.Server.revert_resize">
<tt class="descname">revert_resize</tt><big>(</big><big>)</big><a class="headerlink" href="#cloudservers.Server.revert_resize" title="Permalink to this definition">¶</a></dt>
<dd>Revert a previous resize, switching back to the old server.</dd></dl>

</dd></dl>

</div>
<div class="section" id="constants">
<h2>Constants<a class="headerlink" href="#constants" title="Permalink to this headline">¶</a></h2>
<p>Reboot types:</p>
<dl class="data">
<dt id="cloudservers.REBOOT_SOFT">
<tt class="descclassname">cloudservers.</tt><tt class="descname">REBOOT_SOFT</tt><a class="headerlink" href="#cloudservers.REBOOT_SOFT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="data">
<dt id="cloudservers.REBOOT_HARD">
<tt class="descclassname">cloudservers.</tt><tt class="descname">REBOOT_HARD</tt><a class="headerlink" href="#cloudservers.REBOOT_HARD" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference external" href="#">Servers</a><ul>
<li><a class="reference external" href="#classes">Classes</a></li>
<li><a class="reference external" href="#constants">Constants</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="ipgroups.html"
                        title="previous chapter">Shared IP addresses</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../releases.html"
                        title="next chapter">Release notes</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/ref/servers.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../releases.html" title="Release notes"
             >next</a> |</li>
        <li class="right" >
          <a href="ipgroups.html" title="Shared IP addresses"
             >previous</a> |</li>
        <li><a href="../index.html">python-cloudservers v1.0 documentation</a> &raquo;</li>
          <li><a href="index.html" >API Reference</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009, Jacob Kaplan-Moss.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0pre.
    </div>
  </body>
</html>