import repository from arizona
[raven.git] / apps / gacks / gacksnodepicker_test.py
1 from gacksresource import GacksResourceDirectory
2 from gacksnodepicker import GacksNodePicker
3
4 SLICENAME = "arizona_beta"
5
6 def main():
7     rdir = GacksResourceDirectory(dir="./resources.d")
8
9     picker = GacksNodePicker(rdir)
10
11     print "removing all nodes from", SLICENAME
12     picker.pick(SLICENAME, "plc.vicci.cores", None, 0, expand=False)
13
14     raw_input("press enter:")
15
16     print "picking 5 nodes"
17     picker.pick(SLICENAME, "plc.vicci.cores", None, 5, expand=True)
18
19     raw_input("press enter:")
20
21     print "adding 4 nodes in washington"
22     picker.pick(SLICENAME, "plc.vicci.cores", "washington", 4, expand=True)
23
24     raw_input("press enter:")
25
26     print "deleting 2 of the washington nodes"
27     picker.pick(SLICENAME, "plc.vicci.cores", "washington", 2, expand=False)
28
29 if __name__=="__main__":
30    main()
31