Using the BladeLogic Web Services interface


You can use the BladeLogic Web Services interface for executing Command Line Interface (CLI) commands only. The BladeLogic Web Services interface cannot execute NSH scripts, NSH commands, or Jython scripts.

The following code snippet illustrates a sample adapter request that uses the BladeLogic Web Services interface to execute the getAllRoleNames command, without any arguments:


<bladelogic-request>
   <command executable-type="cli">RBACRole getAllRoleNames</command>
</bladelogic-request>

The following code snippet shows the adapter response for the request with the getAllRoleNames command:


<bladelogic-response>
     <metadata>
       <status>success</status>
     </metadata>
     <targets-output>
       <target-output>
         <commands-output>
           <command-output>
             <metadata>
               <command>RBACRole getAllRoleNames</command>
               <line-count>1</line-count>
               <execution-milliseconds>1281</execution-milliseconds>
               <exit-code>0</exit-code>
               <status>success</status>
             </metadata>
             <output>
               <line index="1">[GlobalReportAdmins, GlobalReportViewers, RBACAdmins, BLAdmins]</line>
             </output>
           </command-output>
         </commands-output>
       </target-output>
     </targets-output>
   </bladelogic-response>

The following code snippet illustrates a sample adapter request that uses the BladeLogic Web Services interface to execute the printAllProperties BLCLI command with arguments:


<bladelogic-request>
 <request-data>
   <command executable-type="cli">
     <namespace>Server</namespace>
     <command-name>printAllProperties</command-name>
     <arguments>
       <argument>vm-w23-abc60</argument>
     </arguments>
   </command>
 </request-data>
</bladelogic-request>

The following code snippet illustrates the adapter response for the request with the printAllProperties command:


<adapter-response>
 <execution-duration>1609</execution-duration>
 <status>success</status>
 <messageBase64></messageBase64>
 <data>
   <bladelogic-response>
     <metadata>
       <status>success</status>
     </metadata>
     <targets-output>
       <target-output>
         <commands-output>
           <command-output>
             <metadata>
               <command>Server printAllProperties vm-w23-abc60</command>
               <line-count>65</line-count>
               <execution-milliseconds>1609</execution-milliseconds>
               <exit-code>0</exit-code>
               <status>success</status>
             </metadata>
             <output>
               <line index="1">OS_PLATFORM = x86</line>
               <line index="2">RSCD_VERSION = 8.1.0.113</line>
               <line index="3">REPEATER_MAX_CACHE_SIZE = 0</line>
               <line index="4">VM_WS_USERNAME = </line>
               <line index="5">BUILD_ENVIRONMENT = Windows2003-x86</line>
               <line index="6">USER_MODIFIED = BLAdmin</line>
               <line index="7">IS_REPEATER = true</line>
               <line index="8">MS_OFFICE_INSTALL_LOCATION = </line>
               <line index="9">NETWORK_ADDRESS = 10.128.28.0</line>
               <line index="10">HOST = vm-w23-abc60</line>
               <line index="11">DEPLOYNAME = </line>
               <line index="12">OS_VERSION = 2003</line>
               <line index="13">ROLLBACKPATH = </line>
               <line index="14">ROLE_CREATED = BLAdmins</line>
               <line index="15">AGENT_STATUS = agent is alive</line>
               <line index="16">VM_WS_URL = </line>
               <line index="17">DATE_MODIFIED = 2010/05/14 14:37:58+0530</line>
               <line index="18">NAME = vm-w23-abc60</line>
               <line index="19">DESCRIPTION = </line>
               <line index="20">CUSTOM_OBJECTS_ENVIRONMENT* = </line>
               <line index="21">MS_OFFICE_INSTALL_PWD = </line>
               <line index="22">AGENT_MINOR_VERSION* = 1</line>
               <line index="23">AUTO_GENERATED = false</line>
               <line index="24">IS_DEPLOYABLE = true</line>
               <line index="25">VM_WS_PWD = </line>
               <line index="26">VM_VIRTUAL_MACHINE = false</line>
               <line index="27">AGENT_MAJOR_VERSION* = 8</line>
               <line index="28">DEPLOY_ALLOW_NFS_DURING_SUM = false</line>
               <line index="29">ROLE_MODIFIED = BLAdmins</line>
               <line index="30">PUSH_ACL_NO_USERS_FLAG = true</line>
               <line index="31">SOLARIS_ALTERNATIVE_BOOT_ENV* = </line>
               <line index="32">AGENT_BUILD_VERSION* = 113</line>
               <line index="33">FQ_HOST = vm-w23-abc60.labs.abc.com</line>
               <line index="34">DATE_CREATED = 2010/05/14 14:37:57+0530</line>
               <line index="35">WINDIR = /C/WINDOWS</line>
               <line index="36">STATE = Enrolled</line>
               <line index="37">OS_RELEASE = 5.2</line>
               <line index="38">REPEATER_NAME = </line>
               <line index="39">LAST_UPDATED_DATE = 2010/05/14 14:37:58+0530</line>
               <line index="40">USER_CREATED = BLAdmin</line>
               <line index="41">LIFECYCLE* = </line>
               <line index="42">OS_PATCHLEVEL = SP2</line>
               <line index="43">IS_SOLARIS_LIVE_UPGRADE* = false</line>
               <line index="44">IS_ONLINE = true</line>
               <line index="45">IS_VIRTUAL* = false</line>
               <line index="46">AGENT_PATCH_VERSION* = 0</line>
               <line index="47">VM_HOST = </line>
               <line index="48">OS_ENUMERATED_VALUE* = Windows</line>
               <line index="49">RSCD_DIR = /C/Program Files/BMC Software/BladeLogic/8.1/RSCD</line>
               <line index="50">STAGING_DIR = /temp/stage</line>
               <line index="51">IP_ADDRESS = 10.118.18.93</line>
               <line index="52">MS_OFFICE_INSTALL_USERNAME = </line>
               <line index="53">CUSTOMER = </line>
               <line index="54">TRANSACTIONS_DIR = </line>
               <line index="55">HOSTIP_BITS = 00001010100000000001110001100010</line>
               <line index="56">OS = Windows</line>
               <line index="57">REPEATER_STAGING_DIR = /tmp/stage</line>
               <line index="58">BROKEN_OBJECT = false</line>
               <line index="59">OS_VENDOR = Microsoft</line>
               <line index="60">SUBNET_MASK = 255.255.212.0</line>
               <line index="61">ON_EDGE = false</line>
               <line index="62">SYSTEMROOT = /C/WINDOWS</line>
               <line index="63">BL_ACL* = 356a870d-09e0-49f8-9814-b604281f3dde 1102 DBKey:SBlAclKeyImpl:2002000</line>
               <line index="64">VIRTUALIZATION* = </line>
               <line index="65">DEPLOYPATH = </line>
             </output>
           </command-output>
         </commands-output>
       </target-output>
     </targets-output>
   </bladelogic-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 23.1