.TRY resource status p0
.EXT crm_resource --locate --resource 'p0'
resource p0 is NOT running
.SETENV showobj=p3
.TRY resource start p3
.INP: configure
.INP: _regtest on
.INP: show xml p3
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
        <meta_attributes id="p3-meta_attributes">
          <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Started"/>
        </meta_attributes>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource stop p3
.INP: configure
.INP: _regtest on
.INP: show xml p3
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
        <meta_attributes id="p3-meta_attributes">
          <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
        </meta_attributes>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=c1
.TRY resource manage c1
.INP: configure
.INP: _regtest on
.INP: show xml c1
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="c1">
        <meta_attributes id="c1-meta_attributes">
          <nvpair id="c1-meta_attributes-is-managed" name="is-managed" value="true"/>
        </meta_attributes>
        <primitive id="p1" class="ocf" provider="pacemaker" type="Dummy"/>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource unmanage c1
.INP: configure
.INP: _regtest on
.INP: show xml c1
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="c1">
        <meta_attributes id="c1-meta_attributes">
          <nvpair id="c1-meta_attributes-is-managed" name="is-managed" value="false"/>
        </meta_attributes>
        <primitive id="p1" class="ocf" provider="pacemaker" type="Dummy"/>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=p2
.TRY resource maintenance p2 on
.INP: configure
.INP: _regtest on
.INP: show xml p2
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <master id="m1">
        <meta_attributes id="m1-meta_attributes">
          <nvpair id="m1-meta_attributes-maintenance" name="maintenance" value="true"/>
        </meta_attributes>
        <primitive id="p2" class="ocf" provider="heartbeat" type="Delay">
          <instance_attributes id="p2-instance_attributes">
            <nvpair name="startdelay" value="2" id="p2-instance_attributes-startdelay"/>
            <nvpair name="mondelay" value="2" id="p2-instance_attributes-mondelay"/>
            <nvpair name="stopdelay" value="2" id="p2-instance_attributes-stopdelay"/>
          </instance_attributes>
        </primitive>
      </master>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource maintenance p2 off
.INP: configure
.INP: _regtest on
.INP: show xml p2
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <master id="m1">
        <meta_attributes id="m1-meta_attributes">
          <nvpair id="m1-meta_attributes-maintenance" name="maintenance" value="false"/>
        </meta_attributes>
        <primitive id="p2" class="ocf" provider="heartbeat" type="Delay">
          <instance_attributes id="p2-instance_attributes">
            <nvpair name="startdelay" value="2" id="p2-instance_attributes-startdelay"/>
            <nvpair name="mondelay" value="2" id="p2-instance_attributes-mondelay"/>
            <nvpair name="stopdelay" value="2" id="p2-instance_attributes-stopdelay"/>
          </instance_attributes>
        </primitive>
      </master>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=cli-prefer-p3
.TRY resource migrate p3 node1
.EXT crm_resource --quiet --move --resource 'p3' --node 'node1'
INFO: Move constraint created for p3 to node1
.INP: configure
.INP: _regtest on
.INP: show xml cli-prefer-p3
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources/>
    <constraints>
      <rsc_location id="cli-prefer-p3" rsc="p3" role="Started" node="node1" score="INFINITY"/>
    </constraints>
  </configuration>
</cib>

.SETENV showobj=
.TRY resource unmigrate p3
.EXT crm_resource --quiet --clear --resource 'p3'
INFO: Removed migration constraints for p3
.SETENV showobj=cli-prefer-p3
.TRY resource migrate p3 node1 force
.EXT crm_resource --quiet --move --resource 'p3' --node 'node1' --force
INFO: Move constraint created for p3 to node1
.INP: configure
.INP: _regtest on
.INP: show xml cli-prefer-p3
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources/>
    <constraints>
      <rsc_location id="cli-prefer-p3" rsc="p3" role="Started" node="node1" score="INFINITY"/>
    </constraints>
  </configuration>
</cib>

.SETENV showobj=
.TRY resource unmigrate p3
.EXT crm_resource --quiet --clear --resource 'p3'
INFO: Removed migration constraints for p3
.SETENV showobj=p0
.TRY resource param p0 set a0 "1 2 3"
.EXT crm_resource --resource 'p0' --set-parameter 'a0' --parameter-value '1 2 3'

Set 'p0' option: id=p0-instance_attributes-a0 set=p0-instance_attributes name=a0=1 2 3
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes">
          <nvpair id="p0-instance_attributes-a0" name="a0" value="1 2 3"/>
        </instance_attributes>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource param p0 show a0
.EXT crm_resource --resource 'p0' --get-parameter 'a0'
1 2 3
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes">
          <nvpair id="p0-instance_attributes-a0" name="a0" value="1 2 3"/>
        </instance_attributes>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource param p0 delete a0
.EXT crm_resource --resource 'p0' --delete-parameter 'a0'
Deleted 'p0' option: id=p0-instance_attributes-a0 name=a0
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource meta p0 set m0 123
.EXT crm_resource --meta --resource 'p0' --set-parameter 'm0' --parameter-value '123'

Set 'p0' option: id=p0-meta_attributes-m0 set=p0-meta_attributes name=m0=123
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes">
          <nvpair id="p0-meta_attributes-m0" name="m0" value="123"/>
        </meta_attributes>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource meta p0 show m0
.EXT crm_resource --meta --resource 'p0' --get-parameter 'm0'
123
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes">
          <nvpair id="p0-meta_attributes-m0" name="m0" value="123"/>
        </meta_attributes>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource meta p0 delete m0
.EXT crm_resource --meta --resource 'p0' --delete-parameter 'm0'
Deleted 'p0' option: id=p0-meta_attributes-m0 name=m0
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes"/>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource trace p0 probe
INFO: Trace for p0:monitor is written to /var/lib/heartbeat/trace_ra/
INFO: Trace set, restart p0 to trace non-monitor operations
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes"/>
        <operations>
          <op name="monitor" interval="0" id="p0-monitor-0">
            <instance_attributes id="p0-monitor-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-monitor-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
        </operations>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource trace p0 start
INFO: Trace for p0:start is written to /var/lib/heartbeat/trace_ra/
INFO: Trace set, restart p0 to trace the start operation
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes"/>
        <operations>
          <op name="monitor" interval="0" id="p0-monitor-0">
            <instance_attributes id="p0-monitor-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-monitor-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
          <op name="start" interval="0" id="p0-start-0">
            <instance_attributes id="p0-start-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-start-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
        </operations>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource trace p0 stop
INFO: Trace for p0:stop is written to /var/lib/heartbeat/trace_ra/
INFO: Trace set, restart p0 to trace the stop operation
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes"/>
        <operations>
          <op name="monitor" interval="0" id="p0-monitor-0">
            <instance_attributes id="p0-monitor-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-monitor-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
          <op name="start" interval="0" id="p0-start-0">
            <instance_attributes id="p0-start-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-start-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
          <op name="stop" interval="0" id="p0-stop-0">
            <instance_attributes id="p0-stop-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-stop-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
        </operations>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource untrace p0 probe
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes"/>
        <operations>
          <op name="start" interval="0" id="p0-start-0">
            <instance_attributes id="p0-start-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-start-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
          <op name="stop" interval="0" id="p0-stop-0">
            <instance_attributes id="p0-stop-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-stop-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
        </operations>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource untrace p0 start
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes"/>
        <operations>
          <op name="stop" interval="0" id="p0-stop-0">
            <instance_attributes id="p0-stop-0-instance_attributes">
              <nvpair name="trace_ra" value="1" id="p0-stop-0-instance_attributes-trace_ra"/>
            </instance_attributes>
          </op>
        </operations>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource untrace p0 stop
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
        <instance_attributes id="p0-instance_attributes"/>
        <meta_attributes id="p0-meta_attributes"/>
      </primitive>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY configure group g p0 p3
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g">
        <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
          <instance_attributes id="p0-instance_attributes"/>
          <meta_attributes id="p0-meta_attributes"/>
        </primitive>
        <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
          <meta_attributes id="p3-meta_attributes">
            <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY options manage-children never
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g">
        <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
          <instance_attributes id="p0-instance_attributes"/>
          <meta_attributes id="p0-meta_attributes"/>
        </primitive>
        <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
          <meta_attributes id="p3-meta_attributes">
            <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource start g
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g">
        <meta_attributes id="g-meta_attributes">
          <nvpair id="g-meta_attributes-target-role" name="target-role" value="Started"/>
        </meta_attributes>
        <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"/>
        <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
          <meta_attributes id="p3-meta_attributes">
            <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource start p0
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g">
        <meta_attributes id="g-meta_attributes">
          <nvpair id="g-meta_attributes-target-role" name="target-role" value="Started"/>
        </meta_attributes>
        <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
          <meta_attributes id="p0-meta_attributes">
            <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Started"/>
          </meta_attributes>
        </primitive>
        <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
          <meta_attributes id="p3-meta_attributes">
            <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource stop g
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g">
        <meta_attributes id="g-meta_attributes">
          <nvpair id="g-meta_attributes-target-role" name="target-role" value="Stopped"/>
        </meta_attributes>
        <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
          <meta_attributes id="p0-meta_attributes">
            <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Started"/>
          </meta_attributes>
        </primitive>
        <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
          <meta_attributes id="p3-meta_attributes">
            <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY configure clone cg g
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <group id="g">
          <meta_attributes id="g-meta_attributes">
            <nvpair id="g-meta_attributes-target-role" name="target-role" value="Stopped"/>
          </meta_attributes>
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
            <meta_attributes id="p0-meta_attributes">
              <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Started"/>
            </meta_attributes>
          </primitive>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
            <meta_attributes id="p3-meta_attributes">
              <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
            </meta_attributes>
          </primitive>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY options manage-children always
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <group id="g">
          <meta_attributes id="g-meta_attributes">
            <nvpair id="g-meta_attributes-target-role" name="target-role" value="Stopped"/>
          </meta_attributes>
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
            <meta_attributes id="p0-meta_attributes">
              <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Started"/>
            </meta_attributes>
          </primitive>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
            <meta_attributes id="p3-meta_attributes">
              <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
            </meta_attributes>
          </primitive>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource start g
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <meta_attributes id="cg-meta_attributes">
          <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Started"/>
        </meta_attributes>
        <group id="g">
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"/>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"/>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource stop g
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <meta_attributes id="cg-meta_attributes">
          <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Stopped"/>
        </meta_attributes>
        <group id="g">
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"/>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"/>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource start cg
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <meta_attributes id="cg-meta_attributes">
          <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Started"/>
        </meta_attributes>
        <group id="g">
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"/>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"/>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource stop p0
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <meta_attributes id="cg-meta_attributes">
          <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Started"/>
        </meta_attributes>
        <group id="g">
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy">
            <meta_attributes id="p0-meta_attributes">
              <nvpair id="p0-meta_attributes-target-role" name="target-role" value="Stopped"/>
            </meta_attributes>
          </primitive>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"/>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource start cg
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <meta_attributes id="cg-meta_attributes">
          <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Started"/>
        </meta_attributes>
        <group id="g">
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"/>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"/>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource stop cg
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <meta_attributes id="cg-meta_attributes">
          <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Stopped"/>
        </meta_attributes>
        <group id="g">
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"/>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy"/>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource stop p3
.INP: configure
.INP: _regtest on
.INP: show xml p0
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <clone id="cg">
        <meta_attributes id="cg-meta_attributes">
          <nvpair id="cg-meta_attributes-target-role" name="target-role" value="Stopped"/>
        </meta_attributes>
        <group id="g">
          <primitive id="p0" class="ocf" provider="pacemaker" type="Dummy"/>
          <primitive id="p3" class="ocf" provider="pacemaker" type="Dummy">
            <meta_attributes id="p3-meta_attributes">
              <nvpair id="p3-meta_attributes-target-role" name="target-role" value="Stopped"/>
            </meta_attributes>
          </primitive>
        </group>
      </clone>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=
.TRY configure rename p3 p4
.EXT crm_resource --show-metadata stonith:null
.EXT stonithd metadata
.EXT crm_resource --show-metadata ocf:pacemaker:Dummy
.EXT crm_resource --show-metadata ocf:heartbeat:Delay
.TRY configure primitive p3 Dummy
.EXT crm_resource --show-metadata ocf:heartbeat:Dummy
.EXT crm_resource --show-metadata stonith:null
.EXT stonithd metadata
.EXT crm_resource --show-metadata ocf:pacemaker:Dummy
.EXT crm_resource --show-metadata ocf:heartbeat:Delay
.TRY resource stop p3
.TRY resource start p3
.TRY resource cleanup
.EXT crm_resource --cleanup
.TRY resource cleanup p3
.EXT crm_resource --cleanup --resource p3
.TRY resource cleanup p3 node1
.EXT crm_resource --cleanup --resource p3 --node node1
.TRY resource cleanup force
.EXT crm_resource --cleanup --force
.TRY resource cleanup p3 force
.EXT crm_resource --cleanup --resource p3 --force
.TRY resource cleanup p3 node1 force
.EXT crm_resource --cleanup --resource p3 --node node1 --force
.TRY resource refresh
.EXT crm_resource --refresh
.TRY resource refresh p3
.EXT crm_resource --refresh --resource p3
.TRY resource refresh p3 node1
.EXT crm_resource --refresh --resource p3 --node node1
.TRY resource refresh force
.EXT crm_resource --refresh --force
.TRY resource refresh p3 force
.EXT crm_resource --refresh --resource p3 --force
.TRY resource refresh p3 node1 force
.EXT crm_resource --refresh --resource p3 --node node1 --force
.TRY resource stop p3
.TRY configure rm cg
.TRY configure ms msg g
.TRY resource scores
.EXT crm_simulate -sUL
3 of 6 resources DISABLED and 0 BLOCKED from being started due to failures

Current cluster status:
Node node1: UNCLEAN (offline)

 st	(stonith:null):	Stopped 
 Clone Set: c1 [p1] (unmanaged)
     Stopped: [ node1 ]
 Master/Slave Set: m1 [p2]
     Stopped: [ node1 ]
 p3	(ocf::heartbeat:Dummy):	Stopped ( disabled ) 
 Master/Slave Set: msg [g]
     Stopped: [ node1 ]

Allocation scores and utilization information:
Original: node1 capacity:
native_color: st allocation score on node1: 0
clone_color: c1 allocation score on node1: 0
clone_color: p1:0 allocation score on node1: 0
native_color: p1:0 allocation score on node1: -INFINITY
clone_color: m1 allocation score on node1: 0
clone_color: p2:0 allocation score on node1: 0
native_color: p2:0 allocation score on node1: -INFINITY
p2:0 promotion score on none: 0
native_color: p3 allocation score on node1: -INFINITY
clone_color: msg allocation score on node1: 0
clone_color: g:0 allocation score on node1: 0
clone_color: p0:0 allocation score on node1: 0
clone_color: p4:0 allocation score on node1: 0
group_color: g:0 allocation score on node1: -INFINITY
group_color: p0:0 allocation score on node1: -INFINITY
group_color: p4:0 allocation score on node1: -INFINITY
native_color: p0:0 allocation score on node1: -INFINITY
native_color: p4:0 allocation score on node1: -INFINITY
g:0 promotion score on none: 0
Remaining: node1 capacity:

Transition Summary:
.SETENV showobj=
.TRY configure primitive p5 Dummy
.EXT crm_resource --show-metadata ocf:heartbeat:Dummy
.EXT crm_resource --show-metadata stonith:null
.EXT stonithd metadata
.EXT crm_resource --show-metadata ocf:pacemaker:Dummy
.EXT crm_resource --show-metadata ocf:heartbeat:Delay
.TRY configure group g1 p5
.TRY resource manage p5
.SETENV showobj=p5
.TRY -F resource maintenance p5 on
INFO: 'maintenance' conflicts with 'is-managed' attribute. Remove 'is-managed' for resource p5? [YES]
.INP: configure
.INP: _regtest on
.INP: show xml p5
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g1">
        <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy">
          <meta_attributes id="p5-meta_attributes-0">
            <nvpair id="p5-meta_attributes-0-maintenance" name="maintenance" value="true"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=p5
.TRY -F resource unmanage p5
INFO: 'is-managed' conflicts with 'maintenance' attribute. Remove 'maintenance' for resource p5? [YES]
.INP: configure
.INP: _regtest on
.INP: show xml p5
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g1">
        <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy">
          <meta_attributes id="p5-meta_attributes">
            <nvpair id="p5-meta_attributes-is-managed" name="is-managed" value="false"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=p5
.TRY -F resource maintenance g1
.INP: configure
.INP: _regtest on
.INP: show xml p5
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g1">
        <meta_attributes id="g1-meta_attributes">
          <nvpair id="g1-meta_attributes-maintenance" name="maintenance" value="true"/>
        </meta_attributes>
        <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy"/>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource start p5
.INP: configure
.INP: _regtest on
.INP: show xml p5
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g1">
        <meta_attributes id="g1-meta_attributes">
          <nvpair id="g1-meta_attributes-maintenance" name="maintenance" value="true"/>
        </meta_attributes>
        <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy">
          <meta_attributes id="p5-meta_attributes">
            <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=g1
.TRY -F resource manage g1
INFO: 'is-managed' conflicts with 'maintenance' attribute. Remove 'maintenance' for resource g1? [YES]
.INP: configure
.INP: _regtest on
.INP: show xml g1
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g1">
        <meta_attributes id="g1-meta_attributes-0">
          <nvpair id="g1-meta_attributes-0-is-managed" name="is-managed" value="true"/>
        </meta_attributes>
        <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy">
          <meta_attributes id="p5-meta_attributes">
            <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.TRY resource start p5
.INP: configure
.INP: _regtest on
.INP: show xml g1
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g1">
        <meta_attributes id="g1-meta_attributes-0">
          <nvpair id="g1-meta_attributes-0-is-managed" name="is-managed" value="true"/>
        </meta_attributes>
        <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy">
          <meta_attributes id="p5-meta_attributes">
            <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=p5
.TRY -F resource maintenance p5 on
.INP: configure
.INP: _regtest on
.INP: show xml p5
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g1">
        <meta_attributes id="g1-meta_attributes-0">
          <nvpair id="g1-meta_attributes-0-is-managed" name="is-managed" value="true"/>
        </meta_attributes>
        <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy">
          <meta_attributes id="p5-meta_attributes">
            <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/>
            <nvpair id="p5-meta_attributes-maintenance" name="maintenance" value="true"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

.SETENV showobj=g1
.TRY -F resource maintenance g1
INFO: 'maintenance' conflicts with 'is-managed' attribute. Remove 'is-managed' for resource g1? [YES]
.INP: configure
.INP: _regtest on
.INP: show xml g1
<?xml version="1.0" ?>
<cib>
  <configuration>
    <crm_config/>
    <nodes/>
    <resources>
      <group id="g1">
        <meta_attributes id="g1-meta_attributes">
          <nvpair id="g1-meta_attributes-maintenance" name="maintenance" value="true"/>
        </meta_attributes>
        <primitive id="p5" class="ocf" provider="heartbeat" type="Dummy">
          <meta_attributes id="p5-meta_attributes">
            <nvpair id="p5-meta_attributes-target-role" name="target-role" value="Started"/>
          </meta_attributes>
        </primitive>
      </group>
    </resources>
    <constraints/>
  </configuration>
</cib>

