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
df4781a4
Commit
df4781a4
authored
Dec 20, 2013
by
Stavros Sachtouris
Browse files
Restore server console
Conflicts: kamaki/cli/commands/cyclades.py
parent
5b4e563f
Changes
3
Show whitespace changes
Inline
Side-by-side
docs/commands.rst
View file @
df4781a4
...
...
@@ -211,6 +211,7 @@ server (Compute/Cyclades)
start Start an existing virtual server
shutdown Shutdown an active virtual server
delete Delete a virtual server
console Create a VMC console and show connection information
wait Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
Showcase: Create a server
...
...
docs/man/kamaki.rst
View file @
df4781a4
...
...
@@ -225,6 +225,7 @@ server
* start Start an existing virtual server
* shutdown Shutdown an active virtual server
* delete Delete a virtual server
* console Create a VMC console and show connection information
* wait Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
flavor
...
...
kamaki/cli/commands/cyclades.py
View file @
df4781a4
...
...
@@ -269,10 +269,8 @@ class server_info(_init_cyclades, _optional_json):
'--nics'
),
network_id
=
ValueArgument
(
'Show the connection details to that network'
,
'--network-id'
),
vnc
=
FlagArgument
(
'Show VNC connection information (valid for a short period)'
,
'--vnc-credentials'
),
stats
=
FlagArgument
(
'Get URLs for server statistics'
,
'--stats'
)
stats
=
FlagArgument
(
'Get URLs for server statistics'
,
'--stats'
),
diagnostics
=
FlagArgument
(
'Diagnostic information'
,
'--diagnostics'
)
)
@
errors
.
generic
.
all
...
...
@@ -286,13 +284,6 @@ class server_info(_init_cyclades, _optional_json):
self
.
_print
(
self
.
client
.
get_server_network_nics
(
server_id
,
self
[
'network_id'
]),
self
.
print_dict
)
elif
self
[
'vnc'
]:
self
.
error
(
'(!) For security reasons, the following credentials are '
'invalidated
\n
after a short time period, depending on the '
'server settings
\n
'
)
self
.
_print
(
self
.
client
.
get_server_console
(
server_id
),
self
.
print_dict
)
elif
self
[
'stats'
]:
self
.
_print
(
self
.
client
.
get_server_stats
(
server_id
),
self
.
print_dict
)
...
...
@@ -745,12 +736,19 @@ class server_nics(_init_cyclades):
@
command
(
server_cmds
)
class
server_console
(
_init_cyclades
,
_optional_json
):
"""
DEPRECATED, use: [kamaki] server info SERVER_ID --vnc-credentials
"""
"""
Create a VMC console and show connection information
"""
def
main
(
self
,
*
args
):
raiseCLIError
(
'DEPRECATED since v0.12'
,
importance
=
3
,
details
=
[
'Replaced by'
,
' [kamaki] server info <SERVER_ID> --vnc-credentials'
])
@
errors
.
generic
.
all
@
errors
.
cyclades
.
connection
@
errors
.
cyclades
.
server_id
def
_run
(
self
,
server_id
):
self
.
error
(
'The following credentials will be invalidated shortly'
)
self
.
_print
(
self
.
client
.
get_server_console
(
server_id
),
self
.
print_dict
)
def
main
(
self
,
server_id
):
super
(
self
.
__class__
,
self
).
_run
()
self
.
_run
(
server_id
=
server_id
)
@
command
(
server_cmds
)
...
...
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