.TRY Delete/Rename test
.INP: configure
.INP: # erase to start from scratch
.INP: erase
.INP: erase nodes
.INP: node node1
.INP: # create one stonith so that verify does not complain
.INP: primitive st stonith:ssh 	params hostlist='node1' 	meta target-role="Started" 	op start timeout=60s 	op monitor interval=60m timeout=60s
.EXT crm_resource --show-metadata stonith:ssh
.EXT stonithd metadata
.INP: primitive d1 ocf:pacemaker:Dummy
.EXT crm_resource --show-metadata ocf:pacemaker:Dummy
.INP: primitive d2 ocf:pacemaker:Dummy
.INP: location d1-pref d1 100: node1
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy
primitive d2 ocf:pacemaker:Dummy
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
location d1-pref d1 100: node1
.INP: _test
.INP: rename d1 p1
INFO: 13: modified location:d1-pref from d1 to p1
.INP: show
node node1
primitive d2 ocf:pacemaker:Dummy
primitive p1 ocf:pacemaker:Dummy
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
location d1-pref p1 100: node1
.INP: # delete primitive
.INP: delete d2
.INP: _test
.INP: show
node node1
primitive p1 ocf:pacemaker:Dummy
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
location d1-pref p1 100: node1
.INP: # delete primitive with constraint
.INP: delete p1
INFO: 20: hanging location:d1-pref deleted
.INP: _test
.INP: show
node node1
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
.INP: primitive d1 ocf:pacemaker:Dummy
.INP: location d1-pref d1 100: node1
.INP: _test
.INP: # delete primitive belonging to a group
.INP: primitive d2 ocf:pacemaker:Dummy
.INP: _test
.INP: group g1 d2 d1
INFO: 29: modified location:d1-pref from d1 to g1
.INP: delete d2
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
group g1 d1
location d1-pref g1 100: node1
.INP: _test
.INP: delete g1
INFO: 33: modified location:d1-pref from g1 to d1
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
location d1-pref d1 100: node1
.INP: verify
.INP: # delete a group which is in a clone
.INP: primitive d2 ocf:pacemaker:Dummy
.INP: group g1 d2 d1
INFO: 38: modified location:d1-pref from d1 to g1
.INP: clone c1 g1
INFO: 39: modified location:d1-pref from g1 to c1
.INP: delete g1
INFO: 40: modified location:d1-pref from c1 to g1
INFO: 40: modified location:d1-pref from g1 to d2
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy
primitive d2 ocf:pacemaker:Dummy
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
location d1-pref d2 100: node1
.INP: _test
.INP: group g1 d2 d1
INFO: 43: modified location:d1-pref from d2 to g1
.INP: clone c1 g1
INFO: 44: modified location:d1-pref from g1 to c1
.INP: _test
.INP: # delete group from a clone (again)
.INP: delete g1
INFO: 47: modified location:d1-pref from c1 to g1
INFO: 47: modified location:d1-pref from g1 to d2
.INP: show
node node1
primitive d1 ocf:pacemaker:Dummy
primitive d2 ocf:pacemaker:Dummy
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
location d1-pref d2 100: node1
.INP: _test
.INP: group g1 d2 d1
INFO: 50: modified location:d1-pref from d2 to g1
.INP: clone c1 g1
INFO: 51: modified location:d1-pref from g1 to c1
.INP: # delete primitive and its group and their clone
.INP: delete d2 d1 c1 g1
INFO: 53: modified location:d1-pref from c1 to g1
INFO: 53: modified location:d1-pref from g1 to d2
INFO: 53: hanging location:d1-pref deleted
.INP: show
node node1
primitive st stonith:ssh \
	params hostlist=node1 \
	meta target-role=Started \
	op start timeout=60s interval=0 \
	op monitor interval=60m timeout=60s
.INP: _test
.INP: # verify
.INP: verify
.INP: commit
