~mysql/mysql-fabric/1.4

« back to all changes in this revision

Viewing changes to lib/mysql/hub/commands/__init__.py

  • Committer: Mats Kindahl
  • Date: 2012-06-19 21:03:31 UTC
  • Revision ID: mats.kindahl@oracle.com-20120619210331-hsa7jtpi7c13h9zf
WL#6123: Basic HA Manager Framework

This patch implement beginning of the Hub.

The patch contain the core manager, a simple executor class, and a service
manager that currently just start a single XML-RPC protocol server. The
executor module also contain two function decorators ("primitive" and
"coordinated") used to implement the procedures of the system.

The service manager automatically loads services from the mysql.hub.services
package, but does not include examples of such a service.

The patch also demonstrate how to implement new commands by creating commands
for starting and stopping the command center.  You will find the implementation
of the "shutdown" command in the next patch, since it requires a service.

The patch includes configuration file handling and a sample configuration file.
This configuration file can be used with the two commands provided with this
patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""Package that contain all the commands of the system as separate
 
2
modules.
 
3
 
 
4
All command-line scripts are placed in this package and when the
 
5
system is installed, a small stub is generated that call the main
 
6
function of the module.
 
7
 
 
8
For example, consider the mysql.hub.command.start module in this
 
9
package. When installing, a script ``hub-start`` will be created
 
10
contaning the code::
 
11
 
 
12
   from mysql.hub.command.start import main
 
13
   main()
 
14
 
 
15
In this package, there also exist some helper utilities that are used
 
16
to implement commands, such as option parsing utilities.
 
17
"""
 
18