Commit df4781a4 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Restore server console

Conflicts:

	kamaki/cli/commands/cyclades.py
parent 5b4e563f
...@@ -211,6 +211,7 @@ server (Compute/Cyclades) ...@@ -211,6 +211,7 @@ server (Compute/Cyclades)
start Start an existing virtual server start Start an existing virtual server
shutdown Shutdown an active virtual server shutdown Shutdown an active virtual server
delete Delete a 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] wait Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
Showcase: Create a server Showcase: Create a server
......
...@@ -225,6 +225,7 @@ server ...@@ -225,6 +225,7 @@ server
* start Start an existing virtual server * start Start an existing virtual server
* shutdown Shutdown an active virtual server * shutdown Shutdown an active virtual server
* delete Delete a 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] * wait Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
flavor flavor
......
...@@ -269,10 +269,8 @@ class server_info(_init_cyclades, _optional_json): ...@@ -269,10 +269,8 @@ class server_info(_init_cyclades, _optional_json):
'--nics'), '--nics'),
network_id=ValueArgument( network_id=ValueArgument(
'Show the connection details to that network', '--network-id'), 'Show the connection details to that network', '--network-id'),
vnc=FlagArgument( stats=FlagArgument('Get URLs for server statistics', '--stats'),
'Show VNC connection information (valid for a short period)', diagnostics=FlagArgument('Diagnostic information', '--diagnostics')
'--vnc-credentials'),
stats=FlagArgument('Get URLs for server statistics', '--stats')
) )
@errors.generic.all @errors.generic.all
...@@ -286,13 +284,6 @@ class server_info(_init_cyclades, _optional_json): ...@@ -286,13 +284,6 @@ class server_info(_init_cyclades, _optional_json):
self._print( self._print(
self.client.get_server_network_nics( self.client.get_server_network_nics(
server_id, self['network_id']), self.print_dict) server_id, self['network_id']), self.print_dict)
elif self['vnc']:
self.error(
'(!) For security reasons, the following credentials are '
'invalidated\nafter 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']: elif self['stats']:
self._print( self._print(
self.client.get_server_stats(server_id), self.print_dict) self.client.get_server_stats(server_id), self.print_dict)
...@@ -745,12 +736,19 @@ class server_nics(_init_cyclades): ...@@ -745,12 +736,19 @@ class server_nics(_init_cyclades):
@command(server_cmds) @command(server_cmds)
class server_console(_init_cyclades, _optional_json): 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): @errors.generic.all
raiseCLIError('DEPRECATED since v0.12', importance=3, details=[ @errors.cyclades.connection
'Replaced by', @errors.cyclades.server_id
' [kamaki] server info <SERVER_ID> --vnc-credentials']) 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) @command(server_cmds)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment