-
Notifications
You must be signed in to change notification settings - Fork 91
Issue 979 - enhanced help (add bean descriptions, att descriptions, and interactive mode) #1148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still want to play with it to see what the output looks like but, in general, the changes look fine to me (other than the specific comments I left).
The one philosophical question we as a team need to decide is do we like setting online_mbean
to unknown
explicitly or should we just omit the attribute entirely when it is unknown/not relevant? In general, we have tended to omit attributes rather than setting them when they aren't providing useful information. It seems like unknown
just means there is no information so that same thing could be achieved by simply omitting the attribute.
...esources/oracle/weblogic/deploy/aliases/category_modules/CoherenceClusterSystemResource.json
Outdated
Show resolved
Hide resolved
* Includes an undocumented main intended for ad-hoc printing of a particular bean or bean property help. | ||
*/ | ||
|
||
public class WLSBeanHelp { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a general comment but I think we try to keep the class organized so that methods of the same visibility and scope are grouped together. For example:
- public static
- static
- private static
All utility classes should generally have a private constructor to prevent developers from accidentally trying to instantiate it. I suspect Sonar will flag some of these issues...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
core/src/main/java/oracle/weblogic/deploy/util/WLSBeanHelp.java
Outdated
Show resolved
Hide resolved
|
Edit: Fixed. |
@@ -120,11 +128,13 @@ | |||
}, | |||
"JdbcSystemResourceOverride": { | |||
"wlst_type": "${JdbcSystemResourceOverride:JDBCSystemResourceOverrides}", | |||
"online_bean": "unknown", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddsharpe can we decide if we want to explicitly set the value to unknown
or omit the attribute to indicate that the value is unknown? It seems like omitting it is more consistent with the approach we take in the aliases so I think it is worth a quick discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, "unknown" is easier to search for. Useful for finding entries that perhaps can be fixed with a bit more manual research. We could also put in "NotApplicable" or some-such for those that are known to have no corresponding mbean...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Derek and Richard both agree with you. So by popular demand:
- replaced a few of the unknowns with their bean after a bit of research
- removed the remaining unknown unknowns
Fixed
…ow known unknowns
The following command prints the attributes and folders for the Server MBean: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interactive and the normal command model path should work the same.
@ddsharpe Good catch. Fixed. |
Kudos, SonarCloud Quality Gate passed! |
Enhance WDT help to:
Expand help for a folder:
-- Show the bean help for a folder, when available, at the end of the folder help.
-- Append the "alias offline" default value, when available, for each attribute listed in a folder.
-- Append a "+" at the end of an attribute line when detailed help is available for the attribute.
Provide help for particular attributes:
-- Instead of generating a 'not a folder' error when specifying a path that ends in an attribute:
-- Show bean help and the "alias offline" default value for the attribute.
-- List the legal values for the attribute if it is an enumerated type.
Support an interactive mode.
-- Get the help for multiple attributes and folders using commands like "cd", "ls", "help", and "top".
Examples:
Show known defaults for each attribute listed in a folder:
(Note that this also appends a "+" if full help is available for a particular att.)
$ modelHelp.sh resources:/JMSServer
Show help for a particular attribute of a folder:
modelHelp.sh topology:/Server/Log/StdoutSeverity
Access interactive help starting at directory 'top':
modelHelp.sh -interactive top