Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
kamaki
Commits
fc7c3c4c
Commit
fc7c3c4c
authored
Jul 22, 2013
by
Stavros Sachtouris
Browse files
Update documentation for server resize
Refs: #4153
parent
eb8208a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
docs/commands.rst
View file @
fc7c3c4c
...
...
@@ -160,6 +160,7 @@ server (Compute/Cyclades)
shutdown: Shutdown a server
start : Start a server
stats : Get server statistics
resize : Set a different flavor for an existing server
wait : Wait for server to finish
Showcase: Create a server
...
...
docs/man/kamaki.rst
View file @
fc7c3c4c
...
...
@@ -130,6 +130,7 @@ server commands
* shutdown Shutdown an active server (VM)
* start Start an existing server (VM)
* stats Get server (VM) statistics
* resize Set a different flavor for an existing server
* wait Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
...
...
docs/usage.rst
View file @
fc7c3c4c
...
...
@@ -183,6 +183,7 @@ and of a command in that group (list) are shown.
shutdown: Shutdown an active server (VM)
start : Start an existing server (VM)
stats : Get server (VM) statistics
resize : Set a different flavor for an existing server
wait : Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
.. code-block:: console
...
...
kamaki/cli/commands/cyclades.py
View file @
fc7c3c4c
...
...
@@ -434,8 +434,8 @@ class server_console(_init_cyclades, _optional_json):
class
server_resize
(
_init_cyclades
,
_optional_output_cmd
):
"""Set a different flavor for an existing server
To get server ids and flavor ids:
/server list
/flavor list
/server list
/flavor list
"""
@
errors
.
generic
.
all
...
...
kamaki/clients/compute/__init__.py
View file @
fc7c3c4c
...
...
@@ -143,6 +143,18 @@ class ComputeClient(ComputeRestClient):
r
=
self
.
servers_post
(
server_id
,
'action'
,
json_data
=
req
)
return
r
.
headers
def
resize_server
(
self
,
server_id
,
flavor_id
):
"""
:param server_id: (str)
:param flavor_id: (int)
:returns: (dict) request headers
"""
req
=
{
'resize'
:
{
'flavorRef'
:
flavor_id
}}
r
=
self
.
servers_post
(
server_id
,
'action'
,
json_data
=
req
)
return
r
.
headers
def
get_server_metadata
(
self
,
server_id
,
key
=
''
):
"""
:param server_id: integer (str or int)
...
...
@@ -349,13 +361,3 @@ class ComputeClient(ComputeRestClient):
"""
r
=
self
.
floating_ips_delete
(
tenant_id
,
fip_id
)
return
r
.
headers
def
resize_server
(
self
,
server_id
,
flavor_id
):
"""
:param server_id: (str)
:param flavor_id: (int)
"""
req
=
{
'resize'
:
{
'flavorRef'
:
flavor_id
}}
r
=
self
.
servers_post
(
server_id
,
'action'
,
json_data
=
req
)
return
r
.
headers
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment