use of org.onosproject.netconf.NetconfSession in project onos by opennetworkinglab.
the class PolatisNetconfUtility method netconfGetConfig.
/**
* Retrieves session reply information for get config operation.
*
* @param handler parent driver handler
* @param filter the filter string of xml content
* @return the reply string
*/
public static String netconfGetConfig(DriverHandler handler, String filter) {
NetconfSession session = getNetconfSession(handler);
String reply;
try {
reply = session.getConfig(DatastoreId.RUNNING, filter);
} catch (NetconfException e) {
throw new IllegalStateException(new NetconfException("Failed to retrieve configuration.", e));
}
return reply;
}
use of org.onosproject.netconf.NetconfSession in project onos by opennetworkinglab.
the class PolatisNetconfUtility method netconfGet.
/**
* Retrieves session reply information for get operation.
*
* @param handler parent driver handler
* @param filter the filter string of xml content
* @return the reply string
*/
public static String netconfGet(DriverHandler handler, String filter) {
NetconfSession session = getNetconfSession(handler);
String reply;
try {
reply = session.get(filter, null);
} catch (NetconfException e) {
throw new IllegalStateException(new NetconfException("Failed to retrieve configuration.", e));
}
return reply;
}
Aggregations