CHAPTER 13
Using APIs for Device Management
Retrieve Domains
Retrieve the Device List in One Domain
Copyright © 2010, Juniper Networks, Inc.
Retrieve Domains on page 117
Retrieve the Device List in One Domain on page 117
This System Service API code sample retrieves information about all domains.
public void testGetSystemInfo() {
try {
GetSystemInfoRequest getSystemInfoRequest = new GetSystemInfoRequest();
getSystemInfoRequest.setAuthToken(authToken);
stub.GetSystemInfoRequest(getSystemInfoRequest);
} catch (Exception e) {
e.printStackTrace();
}
}
This Data Centric Service API code sample retrieves a list of devices in one domain.
/**
* Gets the IP addresses and the interfaces of all devices in one domain.
*/
public void testGetDeviceObjectByCategory_Filter() {
try {
System.out.println("Running testGetDeviceObjectByCategory_Filter()");
//creates an object of GetObjectViewByCategoryRequest:
:
GetObjectViewByCategoryRequest request = new
GetObjectViewByCategoryRequest();
request.setAuthToken(DataCentricServiceTest.authToken);
request.setCategory("deviceobj");
request.setDomainId(new UnsignedShort("1"));
//specifies the filter to retrieve the ip addresse and the interfaces:
117
Need help?
Do you have a question about the NETWORK AND SECURITY MANAGER 2010.4 - API GUIDE REV 1 and is the answer not in the manual?
Questions and answers