CORBA Programmer's Guide
Chapter 3: Macro Command

Table Of Contents

Macro Command

Behaviors and Attributes

Macro Command Management

Macro Definition

Macro ID

Parameter List

Rules

User Input

CORBA/XML Interface

External Interfaces

CAD Interface

Request Format

Reply Format

Operations


Macro Command


The Cisco BTS 10200 Softswitch requires the ability to provide a high-level view of complex data in its database. Normally, determining relationships between database items requires several commands and multiple requests to the database. This slow and costly process impedes the progress of Operations Support System (OSS) management systems. Therefore, an optimized approach is required where several operations can be collapsed into a single request to the database, which returns the correct related data based on the set of defined rules.

The ability to view complex data relationships in the Cisco BTS 10200 Softswitch is referred to as a macro. A macro is a single command that builds complex queries across multiple commands by using relationship rules defined by the user.

The Macro command is specific to the Cisco BTS 10200 Softswitch and works with both simplex and duplex configurations. The primary focus of this command in this document is its utilization in the CORBA interface definition language (IDL) interface of the CORBA Adapter (CAD) feature.


Note The Macro command was available in Release 3.5. It was not available in Releases 3.2 and 3.3.


Behaviors and Attributes

The Macro command interface allows users to select and define multiple tables against the Cisco BTS 10200 Softswitch database. Normal commands only operate on single devices and/or tables.

The Macro command interface does not allow users to write to the tables in the database. There are many rules and constraints that apply to the database tables that prevent this activity.

Macro Command Management

Macro command management is composed of the user commands that create, change, and delete Macro command definitions from the system. These user commands allow the definition and manipulation of the actual Macro commands and execute as standard provisioning commands. The other primary component is the macro execution. This is provided through the Common Object Request Broker Architecture (CORBA) interface and uses the rules with additional user-specified data to return the instance values of the macro parameters.

Macro Definition

The values that are used to build a Macro command are validated internally. Technically, each macro is a superset show command of multiple nouns and their associated parameters. All values used in the creation of the Macro command are derived from the parameters of nouns and not from the actual table and column names. This helps to preserve the abstraction over the Cisco BTS 10200 Softswitch schema. The following examples of Macro command management show typical creation, alteration, and deletion of a Macro command. The sections following the examples define the actual values used in the macro definition and the constraints imposed on them.

add macro id=CTXG_NUMBERS; \
  parameters=office_code.NDC, \
             office_code.EC,\
             dn2subscriber.DN,\
             subscriber.CTXG_ID; \
  rules="office_code.OFFICE_CODE_INDEX=\
       dn2subscriber.OFFICE_CODE_INDEX,\
       dn2subscriber.SUB_ID=subscriber.ID";

When editing an existing macro, you must enter the parameter to be modified. In this case, the parameters and rules (and, or) are a list. The entire list must be reentered. The list that is stored in the macro database entry is then replaced. The following example demonstrates this.


change macro id=CTXG_NUMBERS; \
   parameters= office_code.NDC, \
               office_code.EC,\
               dn2subscriber.DN,\
                           subscriber.ID;

When a macro is no longer required, it can be removed. This is achieved through the delete macro command. The only required parameter is the macro ID. All associated definitions for the macro are then removed from the database. The delete macro command takes following format:


delete macro id=CTXG_NUMBERS;

To display a macro, only the macro ID is required. All static components of the command are returned. The following example shows the format of this command.


show macro id=CTXG_NUMBERS;

Macro ID

The macro ID is used as the handle for all references to a macro definition. If the macro is to be invoked, the ID becomes the noun by which the macro can be invoked. The ID is also the primary key or parameter used in the change macro, delete macro, or show macro commands for editing a particular definition. The ID is a character field that must be unique to all other macros. It can be up to 79 characters long. The macro ID is intended to provide a unique macro definition that can also be verbose enough to describe the desired operation.

Parameter List

The parameter list is used to list the nouns and parameters that are displayed in the Macro command. They constitute the selected items to place in the reply. The value of the parameter list field is designed to be a comma-separated list of nouns and parameters from related Cisco BTS 10200 commands. This list has the following form as input:

parameters=<noun.parameter>,<noun.parameter>,...,<noun.parameter>;

Each item in the list takes the form of the noun with a period followed by the parameter from that noun. These nouns and parameters are validated through the Element Management System (EMS). Each item in the list must always be addressed in full with the noun and parameter. This is due to the reuse of common parameter names such as ID.

No implied order of importance is given to the parameters. They are supplied to the command processing in the order they are defined in the macro. No additional data items from other parameters of a given noun are included.

Rules

The most critical parts of the Macro command are the rules. These rules manage the relationship of the data to be selected from the Cisco BTS 10200 Softswitch database. These rules amount to the "where" clause of a database selection statement. These help focus the particular data subset that is required for particular operations. There are two basic sets of rules that can be applied to a macro: the and rules and the or rules. The generic parameter rules are applied as and rules. The definitions of these rule types are:

And rules—One or more sets of data qualifiers indicating a required conditional for the selection of data in the macro. A single and rule specifies that a particular noun and parameter must equal some other specific noun and parameter.

Or rules—One or more sets of data qualifiers indicating an optional conditional for the selection of data in the macro. A single or rule specifies that a particular noun and parameter can equal some other specific noun and parameter.

Equivalence and Not—The rules section of the Macro command can contain two variations. They can describe a noun/parameter pair as equivalent or not equivalent. The common syntax for this expression is "=" for equal, or "!=" for not equal.

User Input

The user input component is not required for the rules list. This is supplied at the time the macro is invoked. This additional input is treated as an and rule input. This data is intended to be the qualifying data that defines what subset of data to select. This rule data can use the equivalence syntax to express variations in the data selection. For example, a user may want to find all subscribers that do not have a specific feature.

CORBA/XML Interface

The CORBA interface servant (CIS) must support a new IDL interface for the Macro command interface. This involves the use of the following new components. The CIS subsystem supports the definition and execution of the Macro commands.

Macro command definition—Macros that can be defined through the "Bts10200.request(...);" interface as normal provisioning requests are managed.

IDL interface definition—A new IDL method is added to access a Macro command that is separate from the standard feature-provisioning interface. This is for the execution of the macro only.

CIS implementation of the IDL interface—An implementation that follows the standard behavior of other CIS interface objects by accepting strings for the authorization key and input arguments. It also returns a string to indicate the response to the macro execution. The arguments and format are described as follows:

Request—The XML Request document that contains the additional user-supplied rules for the request as well as the paging facility parameters. It must also have the noun key set to the desired macro name to execute. At this time, the verb key is not used. As a default, show is the best option. This avoids future conflicts if writes are allowed.

Key—A simple string object that contains the actual authentication key provided through the Bts10200_Security interface.

Reply—The XML Reply document that contains the returned data from the macro execution. This follows the same format as the Reply XML document from the Bts10200 interface.

External Interfaces

This section details the extensions provided in the Cisco BTS 10200 software that are reflected in the external interface of the CORBA adapter (CAD) for the Cisco BTS 10200 Softswitch. Note also that the paging parameters are available for Macro command execution. These include the limit and start-row parameters.

CAD Interface

This section describes the new IDL method signature in the CAD interface.


interface Macro {

      //---------------------------------------------------------------
      // Issue a Macro Command XML document
      //---------------------------------------------------------------
      void          execute(in  string                  request,
                            in  string                  key,
                            out string                  reply)
                    raises(CadExceptions);

      };  // end Macro

Request Format

The following example shows a macro XML Request document. This requests execution of the CTXG_NUMBERS example that was defined in the "Macro Definition" section. The additional paging parameters are added. These limit the volume of data that is returned during any single reply. Large XML documents fail in the interface. The current default limit is defined as 500 records per request.


<Request Noun="CTXG_NUMBERS" Verb="show">
    <Entry Key=" subscriber.ctxg_id" Value="rcdn_grp"/>
    <Entry Key="limit" Value="1"/>
</Request>

Reply Format

The following is an example of a XML Reply document. This reply is based on the example in the Request Format section.


<Reply id="Reply">
   <Status>true</Status>
   <Reason>Success: Entry 1 of 5002 returned.</Reason>
   <Size>1</Size>
   <AbsoluteSize>5002</AbsoluteSize>
   <StartRow>1</StartRow>
   <DataTable>
       <Row id="0">
           <Column id="NDC">601</Column>
           <Column id="EC">227</Column>
           <Column id="DN">1013</Column>
           <Column id="CTXG_ID">rcdn_grp</Column>
       </Row>
   </DataTable>
</Reply>

Operations

This section describes changes to the operations user interface as a result of the Cisco BTS 10200 Macro command. The standard paging parameters are available for the Macro command execution. These apply to large data sets.

You can use the operator interface for additional commands to manage the Macro command in the Cisco BTS 10200 Softswitch. These commands are available from the CLI interface. In addition, these same commands are also available from the CORBA and bulk-provisioning interface.

Table 3-1 shows the user commands that can be generated. [R] in the table indicates required. These are user-defined commands that have a variety of noun (id) and parameter combinations.

Table 3-1 User-Defined Macro Commands 

Noun
Verb
Options
Description

macro

add

id [R]

Identifier for the macro. The identifier can be from 1 to 79 characters. It must be unique to all other IDs.

macro

add

parameters [R]

Comma-separated list of the actual data to return as a result of the macro execution.

macro

add

rules [R]

Criteria for the display of data in the macro.

macro

change

id [R]

Identifier for the macro.

macro

change

parameters

Comma-separated list of the actual data to return as a result of the macro execution.

macro

change

rules

Criteria for the display of data in the macro.

macro

show

id [R]

Defines the macro to be displayed.

macro

delete

id [R]

Identifier for the macro.