• Home
  • Raw
  • Download

Lines Matching full:server

6 The server module contains the objects and methods used to manage servers in
11 create: create a server
12 delete: deletes a server
13 modify: modify a server's role or status.
16 --role / -r: role that's related to server actions.
37 from skylab_inventory.lib import server as skylab_server
42 ATEST_DISABLE_MSG = ('Updating server_db via atest server command has been '
47 class server(topic_common.atest): class
48 """Server class
50 atest server [list|create|delete|modify] <options>
53 topic = msg_topic = 'server'
54 msg_items = '<server>'
57 """Add to the parser the options common to all the server actions.
62 super(server, self).__init__()
94 (options, leftover) = super(server, self).parse([role_info], **kwargs)
96 self.invalid_syntax('Server actions will access server database '
98 'not rely on RPC, no autotest server needs to '
101 # self.hostname is a list. Action on server only needs one hostname at
104 self.invalid_syntax('`server` topic requires hostname. '
109 self.invalid_syntax('`server` topic can only manipulate 1 server. '
136 class server_help(server):
142 class server_list(action_common.atest_list, server):
143 """atest server list [--role <role>]"""
180 """Execute 'atest server list --skylab'
218 @param results: return of the execute call, a list of server object that
219 contains server information.
233 self.failure('No server is found.',
238 class server_create(server):
239 """atest server create hostname --role <role> --note <note>
247 help='note of the server',
260 self.invalid_syntax('--role is required to create a server.')
284 'Add new server: %s' % self.hostname)
295 @return: A Server object if it is created successfully.
298 what_failed='Failed to create server',
306 @param results: return of the execute call, a server object that
307 contains server information.
310 print('Server %s is added.\n' % self.hostname)
318 class server_delete(server):
319 """atest server delete hostname"""
333 'Delete server: %s' % self.hostname)
342 @return: True if server is deleted successfully.
345 what_failed='Failed to delete server',
356 print('Server %s is deleted.\n' %
364 class server_modify(server):
365 """atest server modify hostname
368 --status: Status of the server.
369 --note: Note of the server.
370 --role: New role to be added to the server.
371 --delete_role: Existing role to be deleted from the server.
379 help='Status of the server',
383 help='Note of the server',
393 help='Name of the attribute of the server',
398 help='Value for the attribute of the server',
425 '1. --status: Change server\'s status.\n'
426 '2. --note: Change server\'s note.\n'
427 '3. --role with optional -d: Add/delete role from server.\n'
429 'server\'s attribute.\n'
431 'server.\n'
471 print('Nothing is changed for server %s.' % self.hostname)
475 'Modify server: %s' % self.hostname)
486 @return: The updated server object if it is modified successfully.
489 what_failed='Failed to modify server',
497 @param results: return of the execute call, which is the updated server
501 print('Server %s is modified.\n' % self.hostname)