Bug 1158602 - unable to check result "undefined" in cli
Summary: unable to check result "undefined" in cli
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI
Version: 6.2.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER1
: EAP 6.4.0
Assignee: jboss-set
QA Contact: Petr Kremensky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-29 17:22 UTC by Giuseppe Bonocore
Modified: 2019-08-19 12:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:38:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-4118 0 Minor Resolved Unable to check result "undefined" in cli 2016-01-14 09:45:30 UTC

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


Note You need to log in before you can comment on or make changes to this bug.