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:
parent
4af049780a
commit
d438b2398f
26
ctdb/tests/takeover/node_group_simple.py
Executable file
26
ctdb/tests/takeover/node_group_simple.py
Executable 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()
|
Loading…
Reference in New Issue
Block a user