Bug 1158602

Summary: unable to check result "undefined" in cli
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Giuseppe Bonocore <gbonocor>
Component: CLIAssignee: jboss-set
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.2CC: brian.stansberry, cdewolf, kkhan
Target Milestone: ER1   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:38:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Giuseppe Bonocore 2014-10-29 17:22:50 UTC
Description of problem:

When using "if"  construct in CLI, we are unable to check result undefined


Version-Release number of selected component (if applicable):

EAP 6.1, EAP 6.2

How reproducible:

Configure an EAP instance with an undefined propertie (e.g.: ssl protocol

...

 <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" enable-lookups="false" secure="true">
                <ssl name="https" key-alias="ALIAS" password="password" certificate-key-file="${jboss.server.config.dir}/keystore.jks" />
            </connector>
....

Check that a read-attribute return undefined:

/subsystem=web/connector=https/ssl=configuration/:read-attribute(name=protocol)
{
    "outcome" => "success",
    "result" => undefined
}


Define an if construct checking for undefined:

 [standalone@localhost:9999 /] if (result == undefined) of /subsystem=web/connector=https/ssl=configuration/:read-attribute(name=protocol)
[standalone@localhost:9999 / #] /subsystem=web/connector=https/ssl=configuration/:write-attribute(name=protocol,value="TLSv1,TLSv1.1")
#1 /subsystem=web/connector=https/ssl=configuration:write-attribute(name=protocol,value="TLSv1,TLSv1.1")
[standalone@localhost:9999 / #] end-if

Verify that the attribute is not changed:


/subsystem=web/connector=https/ssl=configuration/:read-attribute(name=protocol)
{
    "outcome" => "success",
    "result" => undefined
}



Steps to Reproduce:
1.
2.
3.

Actual results:

If condition not evaluated correctly

Expected results:

If condition works correctly with undefined

Additional info:

Comment 1 Kabir Khan 2014-12-15 16:58:43 UTC
https://github.com/jbossas/jboss-eap/pull/2146

Comment 2 Petr Kremensky 2015-01-13 06:54:28 UTC
Verified on EAP 6.4.0.ER1