Sample SMI-S Java Client
This chapter describes the Sample SMI-S java client developed using JSR 48 specifications. JSR 48 is a set of java WBEM Service APIs and reference implementation for WBEM. WBEM is an initiative from the DMTF that unifies systems management and instrumentation.
The SMI-S java client uses the client and listener packages provided by the JSR 48 specifications, which consists of classes and interfaces for developing WBEM Clients and WBEM Event Listeners. The WBEMClient interface in the client package is used to invoke WBEM operations against a WBEM Server. A WBEMClient implementation can be retrieved from the WBEMClientFactory by specifying the protocol to be used. IndicationListener is implemented by the code that wants to create a listener for indications. The WBEMListener interface is used to add or remove WBEM Indication Listeners.
The SMI-S java client uses the Cisco DCNM SMI-S external agent for managing and monitoring Cisco DCNM for SAN.
You can perform the following tasks from the services provided by the SMI-S client tool:
– Obtain VSANs using enumerateInstanceNames API in WBEMClient.
– Obtain Zonesets, Zones, and Zonemembers using associatorInstances API in WBEMClient on VSAN.
– Get VSANs using enumerateInstanceNames API in WBEMClient.
– Get zonesets in selected VSAN using associatorInstances.
– Get zones in selected zoneset.
– Get VSANs using enumerateInstanceNames API in WBEMClient.
– Get Zones in selected VSAN using associatorInstances.
– Get Zonemembers in selected zone.
– Get VSANs using enumerateInstanceNames API in WBEMClient.
– Get Zoneservice of the selected VSAN using associatorInstances.
– Invoke the method createzoneset in Zoneservice class with zoneset and zone name.
– Get VSANs using enumerateInstanceNames API in WBEMClient.
– Get Zoneservice of the selected VSAN using associatorInstances.
– Invoke the method addzone in Zoneservice class with existing zoneset and zone information.
– Get VSANs using enumerateInstanceNames API in WBEMClient.
– Get Zoneservice of the selected VSAN using associatorInstances.
– Invoke the method CreateZoneMembershipSettingData in Zoneservice class with existing zone and new zonemember information.
– Get VSANs using enumerateInstanceNames API in WBEMClient.
– Get Zoneservice of the selected VSAN using associatorInstances.
– Invoke the method ActivateZoneSet in Zoneservice class with existing zoneset for activation or deactivating the zoneset.
Installing Sample SMI-S Client
![]()
Note Cisco SMI-S Client is packaged with DCNM SMI-S Server.
When you choose Cisco DCNM with SMI-S Sever during installation, SMI-S Client is also available. For more information, see the “Installing Cisco DCNM SMI-S Server” section.
The following are the SMI-S Client installation locations:“Installing Cisco DCNM SMI-S Server” section
- On Microsoft Windows, by default, Cisco DCNM is installed at C:\Program Files\Cisco Systems.
- On a UNIX (Solaris or Linux) machine, Cisco DCNM is installed at /usr/local/cisco/dcm or $HOME/dcm.
- The SMI-S Client is available at <DCNM install dir>dcm/smis/client.
- The batch files to compile and execute SMI-S Client and SMI-S Indication Client are available at <DCNM install dir>/dcm/smis/client/bin.
- The wbem jars are available at <DCNM install dir>/SmisClient/lib.
- The source files of SMI-S Client and SMI-S Indication Client are available at <DCNM install dir>/dcm/smis/client/src and the corresponding class files are available at <DCNM install dir>/dcm/smis/client/build.
- The configuration file used to retrieve Cisco DCNM credentials to access DCNM SMI-S agent are available at <DCNM install dir>/SmisClient/conf.
- You can choose the type of indication to be subscribed in the filter.properties config file.
Services Provided by SMI-S Java Client
The following NMS services are supported:
- List Switches
- List Hosts
- List Targets
- List VSANs in fabric
- List Switches in VSAN
- Enumerate the Instance of Any CIM class
- Enumerate the names of Any CIM class
- Execute Zone Operations
Table 5-1 provides the details of the SMI-S java client services.