Lines Matching full:role

8 After a role is added or removed from a server, certain services may need to
26 # (the role of which the command should be executed, the command)
27 RESTART_SCHEDULER = (server_models.ServerRole.ROLE.SCHEDULER,
29 RESTART_HOST_SCHEDULER = (server_models.ServerRole.ROLE.HOST_SCHEDULER,
31 RELOAD_APACHE = (server_models.ServerRole.ROLE.SCHEDULER,
34 STOP_SCHEDULER = (server_models.ServerRole.ROLE.SCHEDULER,
36 STOP_HOST_SCHEDULER = (server_models.ServerRole.ROLE.HOST_SCHEDULER,
39 # Dictionary of actions needed for a role to be enabled. Key is the role, and
40 # value is a list of action. All these actions should be applied after the role
43 server_models.ServerRole.ROLE.SCHEDULER: [RESTART_SCHEDULER],
44 server_models.ServerRole.ROLE.HOST_SCHEDULER: [RESTART_HOST_SCHEDULER],
45 server_models.ServerRole.ROLE.DRONE: [RESTART_SCHEDULER],
46 server_models.ServerRole.ROLE.DATABASE:
48 server_models.ServerRole.ROLE.DEVSERVER: [RESTART_SCHEDULER],
51 # Dictionary of actions needed for a role to be disabled. Key is the role, and
53 # Action should be taken before role is deleted from a server, or the server's
56 server_models.ServerRole.ROLE.SCHEDULER: [STOP_SCHEDULER],
57 server_models.ServerRole.ROLE.HOST_SCHEDULER: [STOP_HOST_SCHEDULER],
58 server_models.ServerRole.ROLE.DATABASE:
61 # Action should be taken after role is deleted from a server, or the server's
64 server_models.ServerRole.ROLE.DRONE: [RESTART_SCHEDULER],
65 server_models.ServerRole.ROLE.DEVSERVER: [RESTART_SCHEDULER],
72 It usually involves ssh to the server with specific role and run the
75 @param action: A tuple of (the role of which the command should be executed,
82 role = action[0]
84 # Find the servers with role
86 role=role, status=server_models.Server.STATUS.PRIMARY)
89 'server with given role %s was found.' %
90 (action, role))
105 """Try to execute actions for given role changes of the server.
107 @param server: Server that has the role changes.
112 the role changes, otherwise, set to False.
123 # role or server database is not enabled. Note that no action is needed
141 for role in roles:
142 all_actions.extend(possible_actions.get(role, []))