-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Q:
Is there a way to get a list of all config objects that doesn't rename them? We use dashes and underscores in object names often and the output from dpxmlsh_get_config_list renames the objects so that its output cannot be used as input. A recent use case was to disable SSL3 in all Crypto Profiles. There's no good way to get a list of these with the tool. I ended up doing a dpxmlsh_ls, grepping for .cfg files, doing a dpxmlsh_get_file on those, and then grepping for CryptoProfile just to get the names of all the CryptoProfiles. If dpxmlsh_get_config_list had not renamed objects (or at least done so in a reconstructable fashion), I would have been able to use that output.
A: As for how to get a list of class+object names that are not normalized for shell, try something like this:
dpxmlsh_soma_get_config | xmlstarlet sel --text -N dp="http://www.datapower.com/schemas/management" --template --match '//dp:config/*' --value-of 'name(.)' -o "::" --value-of '@name' --nl