Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883 Cisco Multicast Manager Developer’s Guide and API Reference, 3.2 April 2011 Text Part Number: OL-21511-03
98
Embed
Cisco Multicast Manager Developer’s Guide and API · PDF fileUSA Tel: ... Summary of the API Operations and Java Beans 1-3 ... Cisco Multicast Manager Developer’s Guide and API
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Americas HeadquartersCisco Systems, Inc.170 West Tasman DriveSan Jose, CA 95134-1706 USAhttp://www.cisco.comTel: 408 526-4000
800 553-NETS (6387)Fax: 408 527-0883
Cisco Multicast Manager Developer’s Guide and API Reference, 3.2April 2011
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS” WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
Contents of the SDK and Web Services Sample Code Structure 1-4
SDK Source Files 1-4
Downloading the SDK 1-4
SDK Directory Structure and Key Files 1-4
Setting Up to Use the API 1-5
Required Setup for HTTPS 1-6
Required Setup for HTTP 1-9
Running the Ant Task to Compile the SDK 1-10
Compiling with an IDE 1-12
Running Client Code 1-13
C H A P T E R 2 Cisco Multicast Manager API Reference 2-1
API Operations 2-1
Add Interface Polling 2-2
Add Layer 2 Polling 2-4
Add Layer 3 and Layer 2 Devices in Bulk 2-5
Add RP Polling 2-6
Add RPF Polling 2-7
Add S,G Polling 2-8
Contents
ivCisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Add S,G Time-Based Polling 2-9
Add SSM Polling 2-11
Add Tree Polling 2-12
Add Video Probes in Bulk 2-13
Add Video Probe Polling 2-14
Add VidMon Polling 2-15
Delete Devices in Bulk 2-17
Delete Interface Polling 2-18
Delete Layer 2 Polling 2-19
Delete RP Polling 2-20
Delete RPF Polling 2-21
Delete S,G Polling 2-22
Delete SSM Polling 2-23
Delete Tree Polling 2-25
Delete Video Probe Polling 2-27
Delete VidMon Polling 2-28
Get Interface Polling Configuration 2-29
Get Layer 2 Polling Configuration 2-30
Get Multicast Trace Image File 2-31
Get Multicast Devices in a Domain 2-32
Get Multicast Events 2-33
Get RP Polling Configuration 2-34
Get RPF Polling Configuration 2-35
Get S,G on a Device 2-36
Get S,G in a Domain 2-38
Get S,G Polling Configuration 2-38
Get S,G Time-Based Polling Configuration 2-39
Get SSM Polling Configuration 2-41
Get Tree Polling Configuration 2-41
Get Video Probe Polling Configuration 2-42
Get VidMon Polling Configuration 2-43
Set Global Polling Configuration 2-44
Spring Framework Beans 2-46
Message Factory Bean 2-46
JAXB Marshaller Bean 2-46
Security Interceptor Bean 2-47
A P P E N D I X A CMM Web Services Schema A-1
cmmWebServices.xsd A-1
Contents
vCisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
A P P E N D I X B cmmNB.wsdl File B-1
cmmNB.wsdl B-1
Contents
viCisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
iiiCisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Preface
This preface describes the objectives, audience, organization, and conventions of the Cisco Multicast Manager Developer’s Guide and API Reference, 3.2. It refers you to related publications and describes online sources of technical information.
Cisco Multicast Manager (CMM) is a web-based software application that discovers the IP multicast devices in your network, monitors IP multicast, and diagnoses problems. As initially installed, CMM does not require client software—the CMM SDK is provided to enable development of client software.
This guide describes how to use the CMM SDK to develop your own client application that communicates with the CMM server.
This preface includes:
• Objectives, page iii
• Audience, page iii
• Organization, page iv
• Conventions, page iv
• Related Documentation, page v
• Obtaining Documentation, Obtaining Support, and Security Guidelines, page v
ObjectivesThis guide describes how to use the CMM SDK to develop a client application that can communicate with the CMM server.
AudienceThis guide is for software developers who use the CMM SDK to develop applications to communicate with CMM. Developers should have:
• Basic network management skills
• Basic multicast knowledge
• Knowledge of Java, XML, and Web Services Definition Language (WSDL)
ivCisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Preface
OrganizationThis guide is divided into the following chapters:
• Chapter 1, “Getting Started with the Cisco Multicast Manager SDK” provides an overview of the SDK and its components, and describes how to set up your system to use the SDK.
• Chapter 2, “Cisco Multicast Manager API Reference” provides reference information on the CMM SDK API operations and the Java beans included in the SDK.
• Chapter A, “CMM Web Services Schema” lists the cmmWebServices.xsd schema file that defines the the API operations included in the CMM SDK.
• Chapter B, “cmmNB.wsdl File” lists the contents of the cmmNB.wsdl file.
ConventionsThis guide uses basic conventions to represent text and table information.
Examples use the following conventions:
• Terminal sessions and information that the system displays are printed in screen font.
• Information that you enter is in boldface screen font. Variables for which you enter actual data are printed in italic screen font.
• Nonprinting characters, such as passwords, are shown in angle brackets (< >).
• Information that the system displays is in screen font, with default responses in square brackets ([ ]).
This publication also uses the following conventions:
• Menu items and button names are in boldface font.
• If items such as buttons or menu options are dimmed on the application window, it means that the items are not available either because you do not have the correct permissions or because the item is not applicable at this time.
Item Convention
Commands and keywords boldface font
Variables for which you supply values italic font
Displayed session and system information screen font
Elements that are optional Square brackets ([ ])
Alternate but required keywords that are grouped
Braces ({ }) and separated by a vertical bar (|)
Information you enter boldface screen font
Variables you enter italic screen font
Menu items and button names boldface font
Selecting a menu item in paragraphs Option > Network Preferences
Selecting a menu item in tables Option > Network Preferences
vCisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Preface
Note Means reader take note. Notes contain helpful suggestions or references to materials not contained in the manual.
Tip Means the following are useful tips.
Related DocumentationAdditional information can be found in the following publications of the CMM documentation set:
• Installation Guide for Cisco Multicast Manager 3.2
• User Guide for Cisco Multicast Manager, 3.2
• Release Notes for Cisco Multicast Manager 3.2
• Device Instrumentation Requirements for Cisco Multicast Manager, 3.1
• Documentation Guide and Supplemental License Agreement for Cisco Multicast Manager 3.2
Obtaining Documentation, Obtaining Support, and Security Guidelines
For information on obtaining documentation, submitting a service request, and gathering additional information, see the monthly What’s New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation, at:
Subscribe to the What’s New in Cisco Product Documentation as a Really Simple Syndication (RSS) feed and set content to be delivered directly to your desktop using a reader application. The RSS feeds are a free service and Cisco currently supports RSS Version 2.0.
viCisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Preface
C H A P T E R
1-1Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
1Getting Started with the Cisco Multicast Manager SDK
Cisco Multicast Manager (CMM) 3.2 provides a Web Services Definition Language (WSDL)-based Application Programming Interface (API) that allows you to develop document-oriented web services that send WSDL messages to CMM and receive WSDL messages in response. Using the CMM API, you can develop an application that communicates with CMM to perform tasks such as:
• Querying a layer 3 device about the currently available S, G on the device.
• Querying CMM about the available multicast streams in a specified domain.
• Adding layer 2 and layer 3 devices or video probes to CMM in bulk.
• Adding, querying, and deleting S,G polling configuration.
• Adding, querying, and deleting Layer 2 polling configuration.
• Adding, querying, and deleting interface polling configuration.
• Adding, querying, and deleting tree polling configuration.
• Adding, querying, and deleting video probe polling configuration.
• Adding, querying, and deleting VidMon polling configuration.
• Adding, querying, and deleting Source Specific Multicast (SSM) polling configuration.
• Adding and querying S, G time-based polling configuration.
• Adding, querying, and deleting Rendezvous Point (RP) polling configuration.
This chapter contains the following sections:
• WSDL-Based Services, page 1-1
• Summary of the API Operations and Java Beans, page 1-3
• Contents of the SDK and Web Services Sample Code Structure, page 1-4
• Setting Up to Use the API, page 1-5
WSDL-Based ServicesThe CMM API allows you to create WSDL-based Web Services. The CMM API is based on:
• JAXB—The Java Architecture for XML Binding (JAXB), which is provided by Oracle.
1-2Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKWSDL-Based Services
• The Spring Framework—The sample code included in the SDK uses the Spring Framework, provided by SpringSource, as an example of a framework that you can use to develop Web Services to communicate with CMM. The Spring Framework provides a Java beans package that includes a “bean factory,” which allows development of beans that enable configuration of virtually any Java object. The CMM API includes a set of beans, developed using the Spring Framework, that allow you to:
– Marshall and un-marshall SOAP messages from XML format to Java objects and back to XML format.
– Define WS-Security policies
Note You can use any framework based on the SOAP with Attachments API for Java (SAAJ) for creating Web services applications to work with CMM.
• MTOM—SOAP Message Transmission Optimization Mechanism (MTOM) is a W3C recommendation that defines standards for efficient and optimal encoding of SOAP messages.
CMM also uses basic WS-Security policies for password-based authentication.
Using JAXB, the CMM programming interface invokes a binding compiler that generates Java classes and interfaces that are derived from the CMM WSD schema—cmmWebServices.xsd.
Since the JAXB web services are document-oriented web services, there is no concept of making a remote function call. Your application creates a SOAP message and sends it to the CMM server, and in response, receives a SOAP response message or a SOAP fault.
JAXBJAXB is a Java API that allows you to use Java routines to access and maintain data in XML documents without using an XML parser.
Using JAXB, the CMM programming interface invokes a binding compiler that generates Java classes and interfaces that are derived from the CMM WSD schema—cmmWebServices.xsd. Using the Java classes, you develop document-oriented Web services as opposed to remote procedure call (RPC)-based applications. You use the JAXB-derived classes to marshall and unmarshall SOAP messages and perform the tasks for implementing an application that communicates with CMM.
For detailed information on JAXB, go to the JAXB web site at the following location:
http://www.oracle.com/technetwork/java/index.html
Since one of the CMM APIs enables you to upload an image file uploaded to a client, CMM uses MTOM (http://www.w3.org/TR/soap12-mtom/) for efficient and optimal encoding of SOAP messages. Basic WS-Security policies are used for password based authentication.
Web services APIs can be used either on HTTP or on the secure HTTPS protocol.
Since CMM uses JAXB for marshalling and un-marshalling, all APIs are described using classes generated by JAXB after compiling the WSDL file.
1-3Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKSummary of the API Operations and Java Beans
FrameworkThe CMM API uses several beans developed using the Spring Framework. The Spring Framework provides a Java beans package that includes a “bean factory,” which allows development of beans that enable configuration of virtually any Java object.
For detailed information on the Spring Framework, go to the Spring website at the following locations:
http://www.springsource.org/
The CMM 3.2 SDK uses Spring Framework 2.5.6, which can be downloaded from the Spring download site:
Note Although the CMM API includes beans derived from the Spring Framework, you can use any framework that is based on the SOAP with Attachments API for Java (SAAJ) for creating and sending SOAP messages. For basic information on SAAJ, see:http://java.sun.com/developer/EJTechTips/2005/tt0425.html#1
SOAP Message Transmission Optimization MechanismSOAP Message Transmission Optimization Mechanism (MTOM) is a W3C recommendation that defines standards for efficient and optimal encoding of SOAP messages.
Summary of the API Operations and Java BeansFor a list of the API operations in the CMM SDK, see Table 2-1, “CMM API Operations” in Chapter 2, “Cisco Multicast Manager API Reference.”
Table 1-1 describes the Java beans provided with the SDK.
Table 1-1 CMM SDK—Java Beans
Bean Description
Message Factory Bean Initializes the message factory object for using SAAJ SOAP messages.
See Message Factory Bean, page 2-46.
JAXB Marshaller Bean Converts SOAP messages from XML format to Java objects or from Java objects to XML format.
See JAXB Marshaller Bean, page 2-46.
Security Interceptor Bean Allows you to define WS-Security policies.
1-4Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKContents of the SDK and Web Services Sample Code Structure
Contents of the SDK and Web Services Sample Code StructureThis section contains the following:
• SDK Source Files, page 1-4
• Downloading the SDK, page 1-4
• SDK Directory Structure and Key Files, page 1-4
SDK Source FilesThe SDK source code and supporting files are contained in a zip file called testWeb.zip/TibcoJar.zip. This file is provided on the Software Download Area for Cisco Multicast Manager at this location:
1-5Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKSetting Up to Use the API
Setting Up to Use the APIBefore you can use the CMM SDK, you must set up your system to compile and run the SDK code.
Complete these steps to set up your system to use the CMM API:
1. If you will run your CMM client application on HTTPS, complete the setup tasks for HTTPS.
See Required Setup for HTTPS, page 1-6.
2. If you will run your CMM client application on HTTP, complete the setup tasks for HTTP.
See Required Setup for HTTP, page 1-9
3. Configure your compiler for the SDK. You can compile the SDK in several different ways:
Table 1-2 Key Files in the CMM SDK
Directory Filename Description
testWeb/client/jaxws build.xml This is an Ant build script that you can use if you are compiling the SDK in a standard Ant environment. This build.xml file contains the wsimport task. The wsimport task downloads a WSDL file from specified URL. You can change the URL to point to the IP address of the CMM server. In addition, ensure that you use the correct port depending on your choice of HTTP or HTTPS
The wsimport task downloads the CMM WSDL file (cmmNB.wsdl) and schema file (cmmWebServices.xsd) and generates code using the JAXB compiler. The generated code is written to the testWeb/client/jaxws/gen directory.
Note If you are using another compiler, such as an IDE compiler, the compiler will generate its own build.xml file.
testWeb.zip/ TibcoJar.zip Java class files for the SDK.
applicationContext.xml This is the SpringSource configuration file for configuring several beans to be used by client application, in this case CmmWebServicesClient.java is sample client application.
testWeb/client/jaxws/gen Various If you are using the Ant compiler, this directory contains he code for your application generated by the Ant compiler.
1-6Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKSetting Up to Use the API
• By using the setup files provided with the SDK for the Ant task and running the Ant task to generate the Java code for the SDK.
See Running the Ant Task to Compile the SDK, page 1-10.
• By setting up another compiler of your choice; for example the Netbeans IDE.
See Compiling with an IDE, page 1-12.
Required Setup for HTTPSIf you are using HTTPS for your application, then in order to use CMM web services on HTTPS, you must complete the following preliminary steps on the CMM server:
Step 1 On your development server download a Java source file from this location:
This is an open source GPL2 license project. It lets you create certificates with SubjectAlternativeName.
If your organization does not accept GPL2 based development in that case you can request certificate from certificate generation authority for your organization.
Step 2 Click on Documents and Files, and then click on the src link in the content area.
You will see a link called SecTool.java.
Step 3 Right-click on this link and save it under the filename SecTool.java on your development desktop.
Step 4 Verify that you have JDK 1.6 installed.
Step 5 Go to the directory where you have downloaded the file SecTool.java and run the Java compiler command to compile this file:
javac SecTool.java
You will see several warnings, which you can ignore.
The process generates three class files:
• Pair.class
• PassphraseSecretKey.class
• SecTool.class
Step 6 Copy these three class files into the sectool directory on the server machine.
Note Configure FTP to use binary mode.
• On Solaris, enter:
/opt/RMSMMT/sectool
• On Linux, enter:
/usr/local/netman/sectool
On the server machine, set up a keystore with the IP address of the server and the DNS name if a DNS name exists.
1-7Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKSetting Up to Use the API
Step 7 Run the sectool script.
• On Linux, enter:
cd /usr/local/netman/sectool ./sectool.sh
• On Solaris enter:
cd /opt/RMSMMT/sectool./sectool.sh
The following prompt appears:
Does this server have DNS name [y/n]
Step 8 Enter y.
Step 9 Enter the DNS name for the server.
For example, enter cmm-le4-07.cisco.com.
Step 10 Enter the IP address for the server.
For example, enter 172.20.111.242.
• The operating system is Linux, and the DNS name is cmm-le4-07.cisco.com (IP address: 172.20.111.242).
• The DNS name is cmm-le4-07.cisco.com.
• The IP address is IPAddress: 172.20.111.242.
The script processes the backup version of the existing keystore and creates a new keystore file. The keystore file is located in the following directory:
Step 22 Save the spring-ws-servlet.xml configuration file.
Step 23 Restart the server.
Step 24 On the client machine, navigate to the testWeb/client/jaxws directory.
Step 25 Edit the build.xml file.
Step 26 Update the location of the keystore file (copied to the client machine) and enter the default keystore password cmm_dev as arguments to JVM in the build.xml file on the client machine, as follows (you need to update this information at two places):
If no code is being generated, an error code appears on the console.
Step 30 Edit the client java file and enter.
ant run
1-9Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKSetting Up to Use the API
Required Setup for HTTPIf you are using HTTP for your application, then in order to use CMM web services on HTTP, you must complete the following preliminary steps on the CMM server:
Step 1 Verify that the server machine acegi security configuration file has an insecure channel configured for web services.
If you are using HTTP, leave the protocol set to the default (wsdl = http://(ip_adddress)
If you are using HTTP, change the protocol to https.
Step 4 Enter the following commands:
ant cleanant generate
You should see code being generated. If no code is generated, you will see an error message on the console.
Step 5 Edit the client java file and enter the following command:
ant run
The Ant build script runs the wsimport task., which downloads the WSDL file and the schema file and generates code using the JAXB compiler.
The generated code is written to the testWeb/client/jaxws/gen directory.
Note The gen directory is defined as a property in the beginning on Ant script file.
Compiling with an IDEIf you are compiling with an IDE such as the Netbeans IDE, the compilation steps will be determined by the tool that you are using.
Here is a list of steps that you would use to compile using a sample compiler—the Netbeans IDE.
1-13Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKSetting Up to Use the API
Step 1 On a Windows machine where the SDK is installed (testWeb.zip), log in to the compiler for example, Netbeans IDE.
Step 2 Create a project file.
a. Select File > New Project.
b. In the Choose Project dialog, select Java Application.
c. Uncheck the Create Main Class check box.
d. Click Next.
Step 3 Copy the contents of the /src directory to the /src directory in your TestWeb directory structure.
This is the files in the /com directory.
Step 4 Go to the Springsource website and download Springsource 2.5.6.
Step 5 Add the Springsource /jar files to your test project (under the Libraries folder).
Step 6 Go to the applicationContext.xml file in the CMM.
Step 8 Change the IP address in the defaultUri property line to the IP address of your CMM client.
Step 9 Run the compile (select Run > Clean and Build Main Project).
Step 10 Edit the application Java file (CmmWebServicesClient.java) and change the IP addresses in the generated code as required, to refer to your actual CMM device addresses.
Running Client Code
Step 1 Verify that the client machine has internet access.
Step 2 Unzip the testWeb.zip file on the client machine.
Step 3 Open the build.xml file and update the URL for server IP address
Note If you are using HTTPS, the port will always be 8080; for HTTP, port will be 8085.
Step 4 Open the CmmWebServicesClient.java file and update the domain name, device IP addresses, and other required information.
1-14Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 1 Getting Started with the Cisco Multicast Manager SDKSetting Up to Use the API
C H A P T E R
2-1Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
2Cisco Multicast Manager API Reference
This chapter contains the following sections:
• API Operations, page 2-1
• Spring Framework Beans, page 2-46
API OperationsThe WSDL definition file for the CMM API— cmmNB.wsdl, contains a set of definitions that define the following elements:
• Data types and associated messages
• A list of portTypes and associated operations
• Bindings for the SOAP protocol
• Services and associated ports
See Appendix B, “cmmNB.wsdl File” for a listing of the cmmNB.wsdl file.
The CMM API set comprises a set of operations that you can perform using these elements. Using the specific API operations, you can perform the operations shown in Table 2-1.
Table 2-1CMM API Operations
Operation See
Add Interface Polling See Add Interface Polling, page 2-2
Delete RP Polling See Delete RP Polling, page 2-20
Delete RPF Polling See Delete RPF Polling, page 2-21
Delete S, G Polling See Delete S,G Polling, page 2-22
Delete SSM Polling See Delete SSM Polling, page 2-23
Delete Tree Polling See Delete Tree Polling, page 2-25
Delete Video Probe Polling See Delete Video Probe Polling, page 2-27
Delete VidMon Polling See Delete VidMon Polling, page 2-28
Get a Multicast Trace Image File See Get Multicast Trace Image File, page 2-31
Get Interface Polling Configuration See Get Layer 2 Polling Configuration, page 2-30
Get Layer 2 Polling Configuration See Get Layer 2 Polling Configuration, page 2-30
Get Multicast Devices in a Domain See Get Multicast Devices in a Domain, page 2-32
Get Multicast Events See Get Multicast Events, page 2-33
Get RP Polling Configuration See Get RP Polling Configuration, page 2-34
Get RPF Polling Configuration See Get RPF Polling Configuration, page 2-35
Get S,G on a Device See Get S,G on a Device, page 2-36
Get S,G in a Domain See Get S,G in a Domain, page 2-38
Get S,G Polling Configuration See Get S,G on a Device, page 2-36
Get S,G Time-Based Polling Configuration See Get S,G Time-Based Polling Configuration, page 2-39
Get SSM Polling Configuration See Get SSM Polling Configuration, page 2-41
Get Tree Polling Configuration See Get Tree Polling Configuration, page 2-41
Get Video Probe Polling Configuration See Get Video Probe Polling Configuration, page 2-42
Get VidMon Polling Configuration See Get VidMon Polling Configuration, page 2-43
Set Global Polling Configuration See Set Global Polling Configuration, page 2-44
Table 2-1CMM API Operations (continued)
Operation See
2-3Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Request Message
JAXBElement<IntPollingListType>
• IntPollingListType—A JAXB-generated class that encapsulates an array list of IntPollingType.
• IntPollingType—A JAXB-generated wrapper class that encapsulates an interface name, interface index, bandwidth, router name, polling direction, high PPS threshold and low PPS threshold for polling of the interface.
Response Message
The response message contains a list of the interfaces that have been configured for polling.
JAXBElement<IntPollingListType>
• IntPollingListType—A JAXB-generated class that encapsulates an array list of IntPollingType.
• IntPollingType—A JAXB-generated wrapper class that encapsulates an interface name, interface index, bandwidth, router name, polling direction, high PPS threshold and low PPS threshold for polling of the interface.
SOAP Errors
A SOAP fault describing the error.
Example Code// Code Samplepublic void addIntPolling() { try { IntPollingListType sgplt = new IntPollingListType(); sgplt.setDomainName("test-01");
2-4Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Add Layer 2 PollingUse this operation to add Layer 2 polling for a specified switch in a domain.
Request Message
JAXBElement<L2PollingConfigType>
• L2PollingConfigType—A JAXB-generated wrapper class that encapsulates a domain name, device IP address or hostname, device type enumeration, polling direction, high PPS threshold and low PPS threshold.
Response Message:
The response message contains an integer specifying the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void addL2Polling() { try { L2PollingConfigType lt = new L2PollingConfigType(); lt.setDomainName("test-01");
2-5Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
} }
Add Layer 3 and Layer 2 Devices in BulkUse this operation for bulk addition of layer 3 and layer 2 devices. All devices must be added in the same domain.
Request Message
JAXBElement<DeviceListType>
• DeviceListType—A JAXB-generated class that encapsulates an array list of DeviceType.
• DeviceType—A JAXB-generated wrapper class that encapsulates a domain name, device IP address, device type enumeration, model, and device name.
Response Message:
JAXBElement<DeviceListType>
• DeviceListType—A JAXB-generated class that encapsulates an array list of DeviceType.
• DeviceType—A JAXB-generated wrapper class that encapsulates a domain name, device IP address, device type enumeration, model and device name.
This message contains a list of devices that have been successfully scheduled for discovery. Note that this message does not offer any guarantee that all devices listed in message have been completely discovered at the moment when the message is received by the client program.
Add RPF PollingUse this operation to add Reverse Path Forwarding (RPF) polling configuration for a specified source and group on a router.
Request Message
JAXBElement<RPFPollingConfigType>
• RPFPollingConfigType—A JAXB-generated wrapper class that encapsulates a domain name, router name or IP address, source and group IP addresses, and a delta value that specifies the number of RPF failures per sampling period that trigger a report.
Response Message:
The response message contains an integer indicating the result of the operation.
2-8Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
SOAP Errors
A SOAP fault describing the error.
Example Code/public void addRPFPolling() { try { RPFPollingConfigType lt = new RPFPollingConfigType(); lt.setDomainName("test-01");
RPFPollingType sgt = new RPFPollingType(); sgt.setRouterName("cmm-6503-c2.cisco.com"); sgt.setGroupIp("126.0.1.18"); sgt.setSourceIp("239.232.2.0"); sgt.setDelta(7); lt.setRpf(sgt);
Add S,G PollingUse this operation to add S,G polling for specified sources and groups on specified routers.
Request Message
JAXBElement<SGPollingListType>
• SGPollingListType—A JAXB-generated wrapper class that encapsulates a domain name and array list of SGPollingType.
• SGPollingType—A JAXB-generated class that encapsulates a source IP address, group IP address, units value specifying the units for monitoring, a high threshold, and a low threshold.
– The setUnits value specifies the type units for the high and low threshold. To monitor packets per second, specify 0; to monitor bits per second, specify 1.
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
2-9Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Example Codepublic void addSGPolling() { try { SGPollingListType sgplt = new SGPollingListType(); sgplt.setDomainName("test-01");
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Add S,G Time-Based PollingUse this operation to add time-based S,G polling for specified sources and groups on specified routers.
Request Message
JAXBElement<SGTimePollingListType>
2-10Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
• SGTimePollingListType—A JAXB-generated class that encapsulates an a domain name and an array list of SGTimePollingType.
• SGTimePollingType—A JAXB-generated wrapper class that encapsulates a source IP address, group IP address, units value specifying the units for monitoring, a high threshold, a low threshold, a start time hour and minutes, stop time hour and minutes, and a day value.
– The setUnits value specifies the type units for the high and low threshold. To monitor packets per second, specify 0; to monitor bits per second, specify 1.
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void addSGTimePolling() { try { SGTimePollingListType sgplt = new SGTimePollingListType(); sgplt.setDomainName("test-01");
2-11Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Add SSM PollingUse this operation to add Source Specific Multicast (SSM) polling configuration for a specified source and group.
Request Message
JAXBElement<SSMPollingConfigType>
• SSMPollingConfigType—A JAXB-generated class that encapsulates an array list of SSMPollingType.
• SSMPollingType—A JAXB-generated wrapper class that encapsulates a source IP address, group IP address, units value specifying the units for monitoring, a high threshold, a low threshold, a start time hour and minutes, stop time hour and minutes, and a day value.
– The setUnits value specifies the type units for the high and low threshold. To monitor packets per second, specify 0; to monitor bits per second, specify 1.
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void addSSMPolling() { try { //126.0.1.13 224.0.1.40 1 0 19 0 Sun 0 0 - SSMPollingConfigType lt = new SSMPollingConfigType(); lt.setDomainName("test-01");
2-13Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
}
Add Video Probes in Bulk
Description
Adding video probes is slightly different from adding other devices in CMM. Your code must identify both the router and the interface where the video probe is connected. The Request message must specify the community strings of both the router and the video probe. You can use this operation to add video probes in bulk. Your code also must associate probes with their monitoring applications on the CMM GUI.
This API operation returns a list of successfully added video probes. Since video probe addition is a synchronous operation, the returned list guarantees that the probes have been added to CMM.
Request Message
JAXBElement<VideoProbeListType>
• VideoProbeListType—A JAXB generated class that encapsulates an array list of VideoProbeType objects.
• VideoProbeType—A JAXB-generated class that encapsulates the probe name, probe IP address, probe ro community string, probe rw community string, router IP address, router ro community string, domain name, and video probe type.
Response Message
JAXBElement<VideoProbeListType>
The response message contains a list of successfully added video probes (VideoProbeListType objects).
• VideoProbeListType—A JAXB generated class that encapsulates an array list of VideoProbeType objects.
• VideoProbeType—A JAXB-generated class that encapsulates the probe name, probe IP address, probe ro community string, probe rw community string, router IP address, router ro community string, domain name, and video probe type.
SOAP Errors
A SOAP fault describing the error.
Example Code// Code sample
// Create video probe object and fill in parametersVideoProbeType videoProbe= new VideoProbeType(); videoProbe.setProbeName("Bridge3"); videoProbe.setProbeIpAddress("10.86.1.233"); videoProbe.setRoCommunity("public"); videoProbe.setRwCommunity("private"); videoProbe.setRouterIpAddress("126.1.9.15"); videoProbe.setRouterRoCommunity("lab"); videoProbe.setInterfaceDescription("Gi1/1"); videoProbe.setDomainName("test"); videoProbe.setApplicationType(VideoApplicationTypeEnumeration.BRIDGETECH); videoProbe.setSnmpRetries(8);
2-14Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
videoProbe.setSnmptimeout(2);
// Create video probe list VideoProbeListType vl= objf.createVideoProbeListType(); vl.getVideoProbe().add(videoProbe);
try{// Send and Receive JAXBElement<VideoProbeListType> responseMessage =(JAXBElement<VideoProbeListType>)getWebServiceTemplate().marshalSendAndReceive(requestMessage);// Get list of successfully added probes. VideoProbeListType vt = responseMessage.getValue(); VideoProbeType vp = (VideoProbeType) vt.getVideoProbe().get(0); System.out.println("Video probe name is Name is :"+vp.getProbeName()); } catch(SoapFaultClientException ex) { // Error System.out.println("SOAP Fault Code:"+ ex.getFaultCode().getLocalPart() ); System.out.println("SOAP Fault String:"+ ex.getFaultStringOrReason() ); } catch(Exception e) { }
Add Video Probe PollingUse this operation to add video probe polling for a specified video probe.
Request Message
JAXBElement<VideoProbePollingListType>
• VideoProbePollingListType—A JAXB-generated class that encapsulates a domain name and an array list of VideoProbePollingType.
• VideoProbePollingType—A JAXB-generated wrapper class that encapsulates a video probe name, delay Factor (DF) threshold in milliseconds, and Media Loss Rate (MLR) value.
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Code// Code Samplepublic void addVideoProbePolling() { try { VideoProbePollingListType sgplt = new VideoProbePollingListType(); sgplt.setDomainName("test-01");
VideoProbePollingType sgt = new VideoProbePollingType(); sgt.setProbeName("cmm-ckt-01"); sgt.setDf(2); sgt.setLoss(98);
2-15Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
sgplt.getVideoProbes().add(sgt);
sgt = new VideoProbePollingType(); sgt.setProbeName("cmm-glt-01"); sgt.setDf(0); sgt.setLoss(50); sgplt.getVideoProbes().add(sgt);
JAXBElement<VideoProbePollingListType> req = objf.createMulticastVideoProbePollingAddRequest(sgplt); JAXBElement<BulkMessageReturnWS> res = (JAXBElement<BulkMessageReturnWS>) getWebServiceTemplate().marshalSendAndReceive(req);
BulkMessageReturnWS ret = res.getValue(); System.out.println("==========================="); System.out.println("addVideoProbePolling"); System.out.println("===========================");
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
// Create device list type object DeviceListType dl= objf.createDeviceListType(); // Create individual device objects
Add VidMon PollingUse this operation add VidMon polling for a specified Cisco 76xx device or ASR 9000 device.
Request Message
JAXBElement<VidmonPollingListType>
• VidmonPollingListType—A JAXB-generated class that encapsulates a domain name and an array list of VidmonPollingType.
• VidmonPollingType—A JAXB-generated wrapper class that encapsulates a device name, VidMon type, delay factor (DF) in milliseconds, a Media Loss Rate (MLR) threshold value (number of packets), a milli-percentage value that specifies a MRV maximum threshold., and a milli-percentage value that specifies a MRV minimum threshold.
2-16Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Note The setVidmonType field in the VidmonPollingType class indicates the type of VidMon device for which you are adding polling. If the device is a Cisco 76xx series router, specify 1. If the device is an ASR 9000 series device, specify 0. Only 76xx devices support MLR monitoring; therefore you should only specify an MLR value in the setMlr call if the device is a 76xx device.
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void addVidmonPolling() { try { VidmonPollingListType sgplt = new VidmonPollingListType(); sgplt.setDomainName("test-01");
Delete Interface PollingUse this operation to delete interface polling for a specified interface on a specified router.
Request Message
JAXBElement<IntPollingListType>
• IntPollingListType—A JAXB-generated class that encapsulates an array list of IntPollingType.
• IntPollingType—A JAXB-generated wrapper class that encapsulates an interface name, interface index, bandwidth, router name, polling direction, high PPS threshold and low PPS threshold for polling of the interface.
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void deleteIntPolling() { try { IntPollingListType sgplt = new IntPollingListType(); sgplt.setDomainName("test-01");
IntPollingType sgt = new IntPollingType(); sgt.setInterfaceName("GigabitEthernet1/1"); sgt.setRouterName("4503"); sgt.setIfindex(2);
2-19Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Delete Layer 2 PollingUse this operation to delete Layer 2 polling for a specified switch in a domain.
Request Message
JAXBElement<L2PollingConfigType>
• L2PollingConfigType—A JAXB-generated wrapper class that encapsulates a domain name, device IP address or hostname, device type enumeration, polling direction, high PPS threshold and low PPS threshold.
Response Message:
The response message contains an integer specifying the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void deleteL2Polling() { try { L2PollingListType lt = new L2PollingListType(); lt.setDomainName("test-01");
L2PollingType sgt = new L2PollingType(); sgt.setSwitchName("cmm-1801-sa4"); sgt.setPortName("Fa3");
2-20Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Delete RPF PollingUse this operation to delete Reverse Path Forwarding (RPF) polling configuration for a specified source and group on a routre.
Request Message
JAXBElement<RPFPollingConfigType>
• RPFPollingConfigType—A JAXB-generated wrapper class that encapsulates a domain name, router name or IP address, source and group IP addresses, and a delta value that specifies the number of RPF failures per sampling period that trigger a report.
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void deleteRPFPolling() { try {
2-22Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
RPFPollingListType sgplt = new RPFPollingListType(); sgplt.setDomainName("test-01");
RPFPollingType sgt = new RPFPollingType(); sgt.setGroupIp("239.232.2.0"); sgt.setRouterName("cmm-6503-c2.cisco.com"); sgt.setSourceIp("126.0.1.18"); sgt.setDelta(7); sgplt.getRpf().add(sgt);
sgt = new RPFPollingType(); sgt.setGroupIp("239.232.0.0"); sgt.setRouterName("cmm-6503-c2.cisco.com"); sgt.setSourceIp("126.0.0.18"); sgt.setDelta(23); sgplt.getRpf().add(sgt);
JAXBElement<RPFPollingListType> req = objf.createMulticastRPFPollingDeleteRequest(sgplt); JAXBElement<BulkMessageReturnWS> res = (JAXBElement<BulkMessageReturnWS>) getWebServiceTemplate().marshalSendAndReceive(req);
BulkMessageReturnWS ret = res.getValue(); System.out.println("==========================="); System.out.println("deleteRPFPolling"); System.out.println("===========================");
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Delete S,G PollingUse this operation to delete S,G polling for specified sources and groups on specified routers.
Request Message
JAXBElement<SGPollingListType>
• SGPollingListType—A JAXB-generated wrapper class that encapsulates a domain name and array list of SGPollingType.
• SGPollingType—A JAXB-generated class that encapsulates a source IP address, group IP address, units value specifying the units for monitoring, a high threshold, and a low threshold.
– The setUnits value specifies the type units for the high and low threshold. To monitor packets per second, specify 0; to monitor bits per second, specify 1.
2-23Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void deleteSGPolling() { try { SGPollingListType sgplt = new SGPollingListType(); sgplt.setDomainName("test-01");
SGPollingType sgt = new SGPollingType(); sgt.setSourceIp("126.32.129.28"); sgt.setGroupIp("239.254.1.11"); sgt.setRouterName("cmm-7604-sd2.dns-sj.cisco.com"); sgt.setUnits(0); sgplt.getSg().add(sgt);
sgt = new SGPollingType(); sgt.setSourceIp("126.32.129.29"); sgt.setGroupIp("239.254.1.13"); sgt.setRouterName("cmm-7604-sd2.dns-sj.cisco.com"); sgt.setUnits(1); sgplt.getSg().add(sgt);
JAXBElement<SGPollingListType> req = objf.createMulticastSGPollingDeleteRequest(sgplt); JAXBElement<BulkMessageReturnWS> res = (JAXBElement<BulkMessageReturnWS>) getWebServiceTemplate().marshalSendAndReceive(req);
BulkMessageReturnWS ret = res.getValue(); System.out.println("==========================="); System.out.println("deleteSGPolling"); System.out.println("===========================");
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Delete SSM PollingUse this operation to delete Source Specific Multicast (SSM) polling configuration for a specified source and group.
2-24Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Request Message
JAXBElement<SSMPollingConfigType>
• SSMPollingConfigType—A JAXB-generated class that encapsulates an array list of SSMPollingType.
• SSMPollingType—A JAXB-generated wrapper class that encapsulates a source IP address, group IP address, units value specifying the units for monitoring, a high threshold, a low threshold, a start time hour and minutes, stop time hour and minutes, and a day value.
– The setUnits value specifies the type units for the high and low threshold. To monitor packets per second, specify 0; to monitor bits per second, specify 1.
Response Message:
The response message contains an integer indicating the result of the operation.
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); }
2-27Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Delete Video Probe PollingUse this operation to delete video probe polling for a specified video probe.
Request Message
JAXBElement<VideoProbePollingListType>
• VideoProbePollingListType—A JAXB-generated class that encapsulates a domain name and an array list of VideoProbePollingType.
• VideoProbePollingType—A JAXB-generated wrapper class that encapsulates a video probe name, delay Factor (DF) threshold in milliseconds, and Media Loss Rate (MLR) value.
Response Message:
The response message contains an integer indicating the result of the operation.
SOAP Errors
A SOAP fault describing the error.
Example Codepublic void deleteVideoProbePolling() { try { VideoProbePollingListType sgplt = new VideoProbePollingListType(); sgplt.setDomainName("test-01");
VideoProbePollingType sgt = new VideoProbePollingType(); sgt.setProbeName("cmm-glt-01"); sgplt.getVideoProbes().add(sgt);
JAXBElement<VideoProbePollingListType> req = objf.createMulticastVideoProbePollingDeleteRequest(sgplt); JAXBElement<BulkMessageReturnWS> res = (JAXBElement<BulkMessageReturnWS>) getWebServiceTemplate().marshalSendAndReceive(req);
BulkMessageReturnWS ret = res.getValue(); System.out.println("==========================="); System.out.println("deleteVideoProbePolling"); System.out.println("===========================");
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Delete VidMon PollingUse this operation to delete VidMon polling for a specified Cisco 76xx device or ASR 9000 device.
Request Message
JAXBElement<VidmonPollingListType>
• VidmonPollingListType—A JAXB-generated class that encapsulates a domain name and an array list of VidmonPollingType.
• VidmonPollingType—A JAXB-generated wrapper class that encapsulates a device name, VidMon type, delay factor (DF) in milliseconds, a Media Loss Rate (MLR) threshold value (number of packets), a milli-percentage value that specifies a MRV maximum threshold., and a milli-percentage value that specifies a MRV minimum threshold.
Note The setVidmonType field in the VidmonPollingType class indicates the type of VidMon device for which you are adding polling. If the device is a Cisco 76xx series router, specify 1. If the device is an ASR 9000 series device, specify 0. Only 76xx devices support MLR monitoring; therefore you should only specify an MLR value in the setMlr call if the device is a 76xx device.
Response Message:
The response message contains an integer indicating the result of the operation.
2-29Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
SOAP Errors
A SOAP fault describing the error.
Example Code// Code Samplepublic void deleteVidmonPolling() { try { VidmonPollingListType sgplt = new VidmonPollingListType(); sgplt.setDomainName("test-01");
VidmonPollingType sgt = new VidmonPollingType(); sgt.setVidmonName("cmm-7604-sd2.dns-sj.cisco.com"); sgplt.getVidmons().add(sgt);
JAXBElement<VidmonPollingListType> req = objf.createMulticastVidmonPollingDeleteRequest(sgplt); JAXBElement<BulkMessageReturnWS> res = (JAXBElement<BulkMessageReturnWS>) getWebServiceTemplate().marshalSendAndReceive(req);
BulkMessageReturnWS ret = res.getValue(); System.out.println("==========================="); System.out.println("deleteVidmonPolling"); System.out.println("===========================");
for (int i = 0; i < ret.getFailureList().size(); i++) { System.out.println("failure item = " + ret.getFailureList().get(i).toString()); }
for (int i = 0; i < ret.getSuccessList().size(); i++) { System.out.println("success item = " + ret.getSuccessList().get(i).toString()); } } catch (Exception e) { e.printStackTrace(); } }
Get Interface Polling ConfigurationUse this operation to retrieve the interface configuration for a specified domain.
Request Message
JAXBElement<string>
string—Specifies the domain name.
Response Message
The response message contains a list of the interfaces that have been configured for polling.
JAXBElement<IntPollingListType>
• IntPollingListType—A JAXB-generated class that encapsulates an array list of IntPollingType.
2-30Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
• IntPollingType—A JAXB-generated wrapper class that encapsulates an interface name, interface index, bandwidth, router name, polling direction, high PPS threshold and low PPS threshold for polling of the interface.
Get Layer 2 Polling ConfigurationUse this operation to retrieve the Layer 2 polling configuration for a specified domain.
Request Message
JAXBElement<string>
string—Specifies the domain name.
Response Message:
AXBElement<L2PollingConfigType>
• L2PollingConfigType—A JAXB-generated wrapper class that encapsulates a domain name, device IP address or hostname, device type enumeration, polling direction, high PPS threshold and low PPS threshold.
SOAP Errors
A SOAP fault describing the error.
2-31Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Use this operation to get a multicast trace image file from the CMM server. You can use this operation to create a current snapshot of the multicast tree for S,G or *.G and uploading of the image file in PNG format.
Request Message
JAXBElement<multicastTraceType>
multicastTraceType—A JAXB-generated class that encapsulates source, group, first hop router, last hop router, domain name, and serviceType.
Response Message
JAXBElement<ImageType>
ImageType —A JAXB-generated class that encapsulates binary data for uploading an image file from the server to the client application. The binary data in the message contains the trace image in MTOM binary format.
SOAP Errors
SOAP fault describing error.
Code Example:
public void getMulticastTrace()
2-32Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Use this operation to initiate a query about events generated by CMM.
Request Message
JAXBElement<EventsQueryType>
EventsQueryType—A class that encapsulates query parameter for filtering events.It encapsulates a number of query parameters such as the domain name, device IP address, and source and group IP address, which are used to filter the results of the query.
Response Message
JAXBElement<EventListType>
• EventListType—A JAXB-generated class that encapsulates an array list of CmmEventType.
• CmmEventType—A JAXB-generated class that encapsulates an event ID, eventType, date, device name (if applicable), and event details (as seen on the CMM GUI).
2-34Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
//et.setDeviceName("cmm-7604-sd2.dns-sj.cisco.com"); et.setEventType(EventTypeEnumeration.VIDMON_EVENTS); Calendar calendar1 = new GregorianCalendar(); calendar1.set(2008,11,1,1,1,1);
Calendar calendar2 = new GregorianCalendar(); Date endtTime = new Date(); calendar2.setTime(endtTime); et.setStartTime(calendar1); //et.setEndTime(calendar2); et.setMaxNumberOfEvents(19);
Get RPF Polling ConfigurationUse this operation to add Reverse Path Forwarding (RPF) polling configuration for a specified source and group on a router.
Request Message
JAXBElement<string>
string—Specifies the domain name.
Response Message:
JAXBElement<RPPollingListType>
• RPPollingListType—A JAXB-generated class that indicates the domain name and encapsulates an array list of RPPollingType.
• RPPollingType—A JAXB-generated wrapper class that encapsulates a device IP address or hostname, and a group limit for monitoring.
Get S,G Polling ConfigurationUse this operation to retrieve the S,G polling configuration for a specified domain.
Request Message
JAXBElement<string>
string—A string that specifies the domain name.
2-39Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Response Message:
• SGPollingListType—A JAXB-generated wrapper class that encapsulates a domain name and array list of SGPollingType.
• SGPollingType—A JAXB-generated class that encapsulates a source IP address, group IP address, units value specifying the units for monitoring, a high threshold, and a low threshold.
– The setUnits value specifies the type units for the high and low threshold. To monitor packets per second, specify 0; to monitor bits per second, specify 1.
Get S,G Time-Based Polling ConfigurationUse this operation for to retrieve the S,G time-based polling configuration for a specified domain.
Request Message
JAXBElement<string>
string—A string that specifies the domain name.
Response Message:
• SGTimePollingListType—A JAXB-generated class that encapsulates an a domain name and an array list of SGTimePollingType.
• SGTimePollingType—A JAXB-generated wrapper class that encapsulates a source IP address, group IP address, units value specifying the units for monitoring, a high threshold, a low threshold, a start time hour and minutes, stop time hour and minutes, and a day value.
2-40Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
– The setUnits value specifies the type units for the high and low threshold. To monitor packets per second, specify 0; to monitor bits per second, specify 1.
2-41Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Get SSM Polling ConfigurationUse this operation to retrieve the Source Specific Multicast (SSM) polling configuration for a specified domain.
Request Message
JAXBElement<string>
string—A string that specifies the domain name.
Response Message:
• SSMPollingConfigType—A JAXB-generated class that encapsulates an array list of SSMPollingType.
• SSMPollingType—A JAXB-generated wrapper class that encapsulates a source IP address, group IP address, units value specifying the units for monitoring, a high threshold, a low threshold, a start time hour and minutes, stop time hour and minutes, and a day value.
– The setUnits value specifies the type units for the high and low threshold. To monitor packets per second, specify 0; to monitor bits per second, specify 1.
Get Video Probe Polling ConfigurationUse this operation to retrieve the video probe polling configuration for a specified domain.
Request Message
JAXBElement<string>
string—A string that specifies the domain name.
Response Message:
JAXBElement<VideoProbePollingListType>
2-43Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
• VideoProbePollingListType—A JAXB-generated class that encapsulates a domain name and an array list of VideoProbePollingType.
• VideoProbePollingType—A JAXB-generated wrapper class that encapsulates a video probe name, delay Factor (DF) threshold in milliseconds, and Media Loss Rate (MLR) value.
SOAP Errors
A SOAP fault describing the error.
Example Code// Code Sample
public void getAllVideoProbePollingConfigs() { String dt = "test-01"; try { JAXBElement<VideoProbePollingListType> sgresp = (JAXBElement<VideoProbePollingListType>) getWebServiceTemplate().marshalSendAndReceive(objf.createMulticastGetAllVideoProbePollingRequest(dt)); VideoProbePollingListType sgt = sgresp.getValue(); System.out.println("==========================="); System.out.println("Getting Video Probe Configuratin for domain " + dt); System.out.println("===========================");
for (int i = 0; i < sgt.getVideoProbes().size(); i++) { VideoProbePollingType sg = sgt.getVideoProbes().get(i); System.out.println(sg.getProbeName() + "\t" + sg.getDf() + "\t" + sg.getLoss()); }
Get VidMon Polling ConfigurationUse this operation to retrieve the VidMon polling configuration for a specified domain.
Request Message
JAXBElement<string>
string—A string that specifies the domain name.
Response Message:
JAXBElement<VidmonPollingListType>
• VidmonPollingListType—A JAXB-generated class that encapsulates a domain name and an array list of VidmonPollingType.
• VidmonPollingType—A JAXB-generated wrapper class that encapsulates a device name, VidMon type, delay factor (DF) in milliseconds, a Media Loss Rate (MLR) threshold value (number of packets), a milli-percentage value that specifies a MRV maximum threshold., and a milli-percentage value that specifies a MRV minimum threshold.
2-44Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceAPI Operations
Note The setVidmonType field in the VidmonPollingType class indicates the type of VidMon device for which you are adding polling. If the device is a Cisco 76xx series router, specify 1. If the device is an ASR 9000 series device, specify 0. Only 76xx devices support MLR monitoring; therefore you should only specify an MLR value in the setMlr call if the device is a 76xx device.
List<String> emails = new ArrayList(); emails.add("[email protected]"); gplt.getEmailAddress().addAll(emails);
List<GlobalPollingTrap> traps = new ArrayList(); GlobalPollingTrap trap = new GlobalPollingTrap(); trap = new GlobalPollingTrap(); trap.setPort(0); trap.setTrapReceiverAddress("172.20.111.240"); traps.add(trap);
gplt.getTrapReceivers().addAll(traps);
gplt.setTrapRepeat(1); gplt.setIsRisingFalling(false); gplt.setIsFwdMixedSignalTraps(false); gplt.setVideoProbeClearTimerHur(0); JAXBElement<Integer> ret = (JAXBElement<Integer>) getWebServiceTemplate().marshalSendAndReceive(objf.createMulticastSetGlobalPollingRequest(gplt)); int val = ret.getValue(); System.out.println("Global Polling status " + val);
2-46Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceSpring Framework Beans
JAXB Marshaller Bean This bean is used for marshalling and un-marshalling SOAP messages from XML format to Java objects or from Java objects to XML format.
This is the main bean in the application. The main method gets an instance of this bean and starts issuing API operations. This bean takes the message factory bean, the marshaller bean, and the default URI as parameters. In the sample code, the service URL is supplied through the build.xml. file.
2-47Cisco Multicast Manager Developer’s Guide and API Reference, 3.2
OL-21511-03
Chapter 2 Cisco Multicast Manager API ReferenceSpring Framework Beans
Security Interceptor BeanThis bean lets you define WS-Security policies. In the current implementation of the SDK, we use the user name admin and the password rmsmmt for authenticating WS messages.
<!-- CMM 3.2 web services --> </binding> <service name="CmmWebService"> <port name="CmmWebSoap11" binding="tns:CmmWebSoap11"> <soap:address location="https://localhost:8080/cmm/service"/> </port> </service> <plnk:partnerLinkType name="cmmNB"> <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes.In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.--> <plnk:role name="CmmWebRole" portType="tns:CmmWeb"/> </plnk:partnerLinkType></definitions>
B-16Cisco Multicast Manager Developer’s Guide and API Reference, 3.2