269 |
269 |
'--nics'),
|
270 |
270 |
network_id=ValueArgument(
|
271 |
271 |
'Show the connection details to that network', '--network-id'),
|
272 |
|
vnc=FlagArgument(
|
273 |
|
'Show VNC connection information (valid for a short period)',
|
274 |
|
'--vnc-credentials'),
|
275 |
|
stats=FlagArgument('Get URLs for server statistics', '--stats')
|
|
272 |
stats=FlagArgument('Get URLs for server statistics', '--stats'),
|
|
273 |
diagnostics=FlagArgument('Diagnostic information', '--diagnostics')
|
276 |
274 |
)
|
277 |
275 |
|
278 |
276 |
@errors.generic.all
|
... | ... | |
286 |
284 |
self._print(
|
287 |
285 |
self.client.get_server_network_nics(
|
288 |
286 |
server_id, self['network_id']), self.print_dict)
|
289 |
|
elif self['vnc']:
|
290 |
|
self.error(
|
291 |
|
'(!) For security reasons, the following credentials are '
|
292 |
|
'invalidated\nafter a short time period, depending on the '
|
293 |
|
'server settings\n')
|
294 |
|
self._print(
|
295 |
|
self.client.get_server_console(server_id), self.print_dict)
|
296 |
287 |
elif self['stats']:
|
297 |
288 |
self._print(
|
298 |
289 |
self.client.get_server_stats(server_id), self.print_dict)
|
... | ... | |
745 |
736 |
|
746 |
737 |
@command(server_cmds)
|
747 |
738 |
class server_console(_init_cyclades, _optional_json):
|
748 |
|
"""DEPRECATED, use: [kamaki] server info SERVER_ID --vnc-credentials"""
|
|
739 |
"""Create a VMC console and show connection information"""
|
749 |
740 |
|
750 |
|
def main(self, *args):
|
751 |
|
raiseCLIError('DEPRECATED since v0.12', importance=3, details=[
|
752 |
|
'Replaced by',
|
753 |
|
' [kamaki] server info <SERVER_ID> --vnc-credentials'])
|
|
741 |
@errors.generic.all
|
|
742 |
@errors.cyclades.connection
|
|
743 |
@errors.cyclades.server_id
|
|
744 |
def _run(self, server_id):
|
|
745 |
self.error('The following credentials will be invalidated shortly')
|
|
746 |
self._print(
|
|
747 |
self.client.get_server_console(server_id), self.print_dict)
|
|
748 |
|
|
749 |
def main(self, server_id):
|
|
750 |
super(self.__class__, self)._run()
|
|
751 |
self._run(server_id=server_id)
|
754 |
752 |
|
755 |
753 |
|
756 |
754 |
@command(server_cmds)
|