<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    JBoss AS7 Command-line Operation Request Format
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/aloubyansky">Alexey Loubyansky</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/docs/DOC-17599">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>For the definition and description of the AS7 management operation request, please, refer to the <a class="" href="https://community.jboss.org/docs/DOC-16336">Format of a detyped operation request</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This article describes only the format of the operation request in the command-line interface, which is</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">[node_path] : operation_name [parameter_list] [header_list]</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As you can see, all the parts except the <em>operation_name</em> preceded with ':' are optional.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">node_path := node_type=node_name (, node_type=node_name)*
parameter_list := '(' parameter_name=parameter_value (,parameter_name=parameter_value)* ')'
header_list := {header (;header)*}
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>Address (node path)</h3><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>node_path</em> represents the address of the target resource (or the node) against which the operation should be invoked. It consists of <em>node_type=node_name</em> pairs separated by a comma:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">node_type=node_name (, node_type=node_name)*</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> E.g.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>/subsystem=datasources</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>or</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>/subsystem=datasources/data-source=ExampleDS</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>etc.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>Operation</h3><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The operation consists of an operation name and an optional list of parameters. The operation name is always preceded by a colon. The colon serves as a separator between the <em>node_path</em> and the operation. Even if the <em>node_path</em> is empty, the colon is still required. This is also how an operation is different from a command (commands are not preceded with a colon).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The parameter list, if present, is surrounded with parentheses and consists of <em>parameter_name=parameter_value</em> pairs separated by commas:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">:operation-name ['(' [name=value [, name=value]*] ')']</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>E.g.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>:shutdown</em></p><p><em>:shutdown()</em></p><p><em>:shutdown(restart=true)</em></p><p><em>/subsystem=datasources/data-source=ExampleDS:write-attribute(name=min-pool-size,value=5)</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>Headers</h3><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If present, the header list is surrounded with curly braces. The headers in the list are separated by a semicolon. The syntax of headers may vary. Simple headers follow <em>header_name=header_value</em> format. But there are also headers (like rollout plans) that require a more complex custom expression. Here is an example of an operation with simple headers:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>:write-attribute(name=my-attr,value=my-value){allow-resource-service-restart=true;rollback-on-runtime-failure=false}</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3>Rollout plans</h3><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For the definition and explanation of what rollout plans are and for, please, refer to the section <strong>Operations with a Rollout Plan</strong> of the <a class="" href="https://community.jboss.org/docs/DOC-16336">Format of a detyped operation request</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This article only describes the CLI format of a rollout plan which is</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">
rollout server_group_list [rollback-across-groups]

server_group_list := server_group [ (sequence_separator | concurrent_separator) server_group ]
sequence_separator := ','
concurrent_separator := '^'
server_group := server_group_name [group_policy_list]
group_policy_list := '(' policy_property_name=policy_property_value (, policy_property_name=policy_property_value)* ')'
policy_property_name := 'rolling-to-servers' | 'max-failed-servers' | 'max-failure-percentage'
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The value of <em>policy_property_value</em> depends on the property. It can be a boolean, an integer, etc. You can fine the definition and description of each of the policy properties in </p><p>the section <strong>Operations with a Rollout Plan</strong> of the <a class="" href="https://community.jboss.org/docs/DOC-16336">Format of a detyped operation request.</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here are a few examples.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Rollout the operation in sequence first to main-server-group than the other-server-group:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>:write-attribute(name=my-attr,value=my-value){rollout main-server-group,other-server-group}</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Rollout the operation concurrently to main-server-group and the other-server-group:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>:write-attribute(name=my-attr,value=my-value){rollout main-server-group^other-server-group}</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Rollout the operation in sequence to groupA, concurrently to groupB and groupC and then to groupD using the specified policies and rollback across all the groups in case of a failure.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>:write-attribute(name=my-attr,value=my-value){rollout groupA, groupB(max-failed-servers=1) ^ groupC(max-failure-percentage=10), groupD(max-failed-servers=2, rolling-to-servers=true) rollback-across-groups}</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>Headers in commands</h4><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Headers are also allowed for the commands that translate into operation requests. Those commands accept argument <em>--headers</em> the value of which is header-list defined above. I.e. the syntax for headers for operations and commands is exactly the same, e.g.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>data-source --profile=default --name=ExampleDS --min-pool-size=5 --headers={rollout groupA, groupB(max-failed-servers=1) ^ groupC(max-failure-percentage=10), groupD(max-failed-servers=2, rolling-to-servers=true) rollback-across-groups}</em></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="https://community.jboss.org/docs/DOC-17599">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss AS 7 Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>