- utils.header("Creating nodes for site %s in %s"%(test_site.name(),self.name()))
- for node_spec in site_spec['nodes']:
- utils.show_spec('Creating node %s'%node_spec,node_spec)
- test_node = TestNode (self,test_site,node_spec)
- test_node.create_node ()
+ if action != "add":
+ utils.header("Deleting nodes in site %s"%test_site.name())
+ for node_spec in site_spec['nodes']:
+ test_node=TestNode(self,test_site,node_spec)
+ utils.header("Deleting %s"%test_node.name())
+ test_node.delete_node()
+ else:
+ utils.header("Creating nodes for site %s in %s"%(test_site.name(),self.name()))
+ for node_spec in site_spec['nodes']:
+ utils.show_spec('Creating node %s'%node_spec,node_spec)
+ test_node = TestNode (self,test_site,node_spec)
+ test_node.create_node ()