← All posts

WLST made easy ... easeSyntax() ...

The one command that drops parentheses from WLST

Unni Pillai
Unni Pillai

Are you frustrated of adding ‘( )’ to the end of ‘ls’ every time you had to view the list of ‘Child MBeans and Attributes’ or  when using ‘cd’ to navigate through Mbeans ?

SATYA (WLST’s author) recently relieved a new (he kept it a secret till now) feature which can help you in reducing all that keystrokes which you waste when typing the ’(’ and ’)’ ‘s 

Introducing the easeSyntax() command

You can supply the easeSyntax() command after starting WLST in interactive mode to ease the python syntax.

How To | List the attributes, operations, and cmo’s

Without easeSyntax() | ls()

After Turning ON easeSyntax | ls

How To | Navigate Mbean the hierarchy

Without easeSyntax() | cd(‘ApplicationRuntimes/inmemrep/ComponentRuntimes’)

After Turning ON easeSyntax | cd ApplicationRuntimes/inmemrep/ComponentRuntimes

How To | Navigate back to a parent Mbean

Without easeSyntax() | cd(’..’)

After Turning ON easeSyntax | cd ..

How To | Get / Retrieve the value of an Attribute

Without easeSyntax() | get(‘SessionTimeoutSecs’)

After Turning ON easeSyntax | get SessionTimeoutSecs

Easy syntax will not function properly in script mode and when used in loops. You can still use the regular jython syntax although you have opted for easy syntax … says Satya :)

So Bye bye… ‘( )’

Welcome… ‘easeSyntax()’

Thank u Satya :)

Happy scripting… :)  

Unni

unni@unnikrishnanpillai.tk