10 Replies Latest reply on Dec 10, 2015 2:21 PM by Dale Reagan

# BLCLI commands for listing namespaces and commands in a namespace

We're using SOAP web service to access and interact with BLCLI remotely.  Are there any BLCLI commands which can be used to list the available BLCLI namespaces and the the available BLCLI commands for a given namespace?  If not through BLCLI, can this be accomplished through some other means?  Primarily interested for BladeLogic Server Automation 8.1 and later.  Thanks.

• ###### 1. Re: BLCLI commands for listing namespaces and commands in a namespace

You can look at the blcli help that ships w/ the product (in the start menu if you have the gui installed) or you can look in the docs.bmc.com site.

Also you can use the ‘blcli-browse’ command.

1 of 1 people found this helpful
• ###### 2. Re: BLCLI commands for listing namespaces and commands in a namespace

Lists of blcli namespaces/commands is available via the BLCLI Help.

You can access the index directly.  For example:

1 of 1 people found this helpful

• ###### 4. Re: BLCLI commands for listing namespaces and commands in a namespace

Question when working with the CLI. I get this when trying to use the command with a profile I defined earlier:

Available Roles are :

-----------------------

Enter role number :

Usage : <namespace> <command> <input[]>

My question is, I don't know where to get namespace and a little fuzzy on command, although I have a list of commands via the BMC docs site. Can someone help with identifying what namespace is referring to?

• ###### 5. Re: BLCLI commands for listing namespaces and commands in a namespace

https://docs.bmc.com/docs/display/public/bsacli86/Home

example:

namespace: AclPushJob

command: executeJobAndWait

https://docs.bmc.com/docs/display/public/bsacli86/AclPushJob-executeJobAndWait

• ###### 6. Re: BLCLI commands for listing namespaces and commands in a namespace

Several approaches possible - you need to review the docs and select the best fit for what you are doing.

You can export your credentials from a Console session - check the box for 'Save Credential for local session' under 'options'.

You need to establish your 'role' via an Environment variable OR declare it on the command line, i.e. something like:

BMC_PROFILE=some_valid_profile

blcli -v \${BMC_PROFILE} -r BLAdmins {... remainder of command line}

OR export these variables:

export BL_AUTH_PROFILE_NAME=valid_profile_name

blcli {command string...}

Dale

• ###### 7. Re: BLCLI commands for listing namespaces and commands in a namespace

Thanks guys.  I have a profile set and can execute commands.  I was in the process of reading through the docs and felt like I was getting stumped, but this helps a lot!

• ###### 8. Re: BLCLI commands for listing namespaces and commands in a namespace

While a bit tedious, you can extract/create a simple text file master list from the BLCLI PDF documentation (i.e. using a tool like 'pdftotext'); the number of  'namespaces' varies based on the BSA version (~100+ with BSA 8.5); there are even more with the 'un-supported commands'....  I found ~1500+ command variations the last time I looked (I created a simple text index file which I can 'grep' and then use returned matches to get me to the 'right' section in the docs...)  For me, this is often faster than searching  a PDF or online web pages....

Dale

• ###### 9. Re: BLCLI commands for listing namespaces and commands in a namespace

Use ‘blcli-generate-html’ to generate a set of html docs w/ a frameset.  You can show only released or all commands.  it’s searchable too.  probably easier than what you are doing.

• ###### 10. Re: BLCLI commands for listing namespaces and commands in a namespace

Thanks Bill - yes, looked at that but prefer a shell-level/readable resource - to locate a similar list via web browsers requires 'browsing' vs something I can run anywhere in a shell; noting that I do/will user PDF/Html files for 'details' but a simple index gets *me* there faster, i.e.

--> bcmd.nsh listall

## Searching for: listall ##
###########################################

egrep -i listall /some_path/Blcli.85.Namespace.idx.txt

## BMC Server Automation Command Line Interface 8.5
## Date:   03-Apr-2014 10:58
## URL:    https://docs.bmc.com/docs/display/bsacli85/Home
########################################################################
Count| Section   | BLCLI Command
-----|-----------|------------------------------------------------------------------
107 | 16.11     | blcli BlAclTemplate             listAllAclTemplates
237 | 28.6      | blcli ConfigurationObjectClass  listAllClassVersions
238 | 28.7      | blcli ConfigurationObjectClass  listAllRootClasses
358 | 37.9      | blcli DepotObject               listAllByGroup
525 | 49.8      | blcli Group                     listAllJobGroupMembers
526 | 49.9      | blcli Group                     listAllJobGroupMembersTabSeparated
604 | 52.74     | blcli Job                       listAllByGroup
<snip>
1250 | 94.147    | blcli Template                  listAllGroupsByParentGroup
1491 | 109.21    | blcli Virtualization            listAllVirtualGuestPackagesByType
###########################################