• Home
  • Raw
  • Download

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 RESTART_SUITE_SCHEDULER = (server_models.ServerRole.ROLE.SUITE_SCHEDULER,
33 RELOAD_APACHE = (server_models.ServerRole.ROLE.SCHEDULER,
36 STOP_SCHEDULER = (server_models.ServerRole.ROLE.SCHEDULER,
38 STOP_HOST_SCHEDULER = (server_models.ServerRole.ROLE.HOST_SCHEDULER,
40 STOP_SUITE_SCHEDULER = (server_models.ServerRole.ROLE.SUITE_SCHEDULER,
43 # Dictionary of actions needed for a role to be enabled. Key is the role, and
44 # value is a list of action. All these actions should be applied after the role
47 server_models.ServerRole.ROLE.SCHEDULER: [RESTART_SCHEDULER],
48 server_models.ServerRole.ROLE.HOST_SCHEDULER: [RESTART_HOST_SCHEDULER],
49 server_models.ServerRole.ROLE.SUITE_SCHEDULER:
51 server_models.ServerRole.ROLE.DRONE: [RESTART_SCHEDULER],
52 server_models.ServerRole.ROLE.DATABASE:
54 server_models.ServerRole.ROLE.DEVSERVER: [RESTART_SCHEDULER],
57 # Dictionary of actions needed for a role to be disabled. Key is the role, and
59 # Action should be taken before role is deleted from a server, or the server's
62 server_models.ServerRole.ROLE.SCHEDULER: [STOP_SCHEDULER],
63 server_models.ServerRole.ROLE.HOST_SCHEDULER: [STOP_HOST_SCHEDULER],
64 server_models.ServerRole.ROLE.SUITE_SCHEDULER: [STOP_SUITE_SCHEDULER],
65 server_models.ServerRole.ROLE.DATABASE:
68 # Action should be taken after role is deleted from a server, or the server's
71 server_models.ServerRole.ROLE.DRONE: [RESTART_SCHEDULER],
72 server_models.ServerRole.ROLE.DEVSERVER: [RESTART_SCHEDULER],
79 It usually involves ssh to the server with specific role and run the
82 @param action: A tuple of (the role of which the command should be executed,
89 role = action[0]
91 # Find the servers with role
93 role=role, status=server_models.Server.STATUS.PRIMARY)
96 'server with given role %s was found.' %
97 (action, role))
112 """Try to execute actions for given role changes of the server.
114 @param server: Server that has the role changes.
119 the role changes, otherwise, set to False.
130 # role or server database is not enabled. Note that no action is needed
147 for role in roles:
148 all_actions.extend(possible_actions.get(role, []))