• Home
  • History
  • Annotate
  • Raw
  • Download

Lines Matching full:role

9 After a role is added or removed from a server, certain services may need to
31 # (the role of which the command should be executed, the command)
32 RESTART_SCHEDULER = (server_models.ServerRole.ROLE.SCHEDULER,
34 RESTART_HOST_SCHEDULER = (server_models.ServerRole.ROLE.HOST_SCHEDULER,
36 RELOAD_APACHE = (server_models.ServerRole.ROLE.SCHEDULER,
39 STOP_SCHEDULER = (server_models.ServerRole.ROLE.SCHEDULER,
41 STOP_HOST_SCHEDULER = (server_models.ServerRole.ROLE.HOST_SCHEDULER,
44 # Dictionary of actions needed for a role to be enabled. Key is the role, and
45 # value is a list of action. All these actions should be applied after the role
48 server_models.ServerRole.ROLE.SCHEDULER: [RESTART_SCHEDULER],
49 server_models.ServerRole.ROLE.HOST_SCHEDULER: [RESTART_HOST_SCHEDULER],
50 server_models.ServerRole.ROLE.DRONE: [RESTART_SCHEDULER],
51 server_models.ServerRole.ROLE.DATABASE:
53 server_models.ServerRole.ROLE.DEVSERVER: [RESTART_SCHEDULER],
56 # Dictionary of actions needed for a role to be disabled. Key is the role, and
58 # Action should be taken before role is deleted from a server, or the server's
61 server_models.ServerRole.ROLE.SCHEDULER: [STOP_SCHEDULER],
62 server_models.ServerRole.ROLE.HOST_SCHEDULER: [STOP_HOST_SCHEDULER],
63 server_models.ServerRole.ROLE.DATABASE:
66 # Action should be taken after role is deleted from a server, or the server's
69 server_models.ServerRole.ROLE.DRONE: [RESTART_SCHEDULER],
70 server_models.ServerRole.ROLE.DEVSERVER: [RESTART_SCHEDULER],
77 It usually involves ssh to the server with specific role and run the
80 @param action: A tuple of (the role of which the command should be executed,
87 role = action[0]
89 # Find the servers with role
91 role=role, status=server_models.Server.STATUS.PRIMARY)
94 'server with given role %s was found.' % (action, role),
110 """Try to execute actions for given role changes of the server.
112 @param server: Server that has the role changes.
117 the role changes, otherwise, set to False.
128 # role or server database is not enabled. Note that no action is needed
146 for role in roles:
147 all_actions.extend(possible_actions.get(role, []))