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)
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
......
......@@ -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
......
......@@ -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\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']:
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)
......
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