1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Testing: IP allocation simulation - rename an example to node_group_simple.py.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 0a2a5602233a8208e2729192e50d816faed0151a)
This commit is contained in:
Martin Schwenke 2010-08-02 15:07:56 +10:00
parent 4af049780a
commit d438b2398f

View File

@ -0,0 +1,26 @@
#!/usr/bin/env python
# This example demonstrates a simple, sensible node group
# configuration. When run with deterministic IPs (use "-d" to show
# the problem) it does many gratuitous IP reassignments.
from ctdb_takeover import Cluster, Node, process_args
process_args()
addresses1 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']
addresses2 = ['I', 'J', 'K']
c = Cluster()
for i in range(4):
c.add_node(Node(addresses1))
for i in range(3):
c.add_node(Node(addresses2))
c.add_node(Node([]))
c.recover()
c.random_iterations()