Skip to content

Deal better with non-shell-normalized class and object names #1

@hstenzel

Description

@hstenzel

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

Discussion:
https://www.ibm.com/developerworks/community/forums/html/topic?id=567faa76-38df-4e41-965f-6e5dac275154#78adf768-4dc3-4858-aa62-8325a0df6542

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions