use of org.onosproject.net.behaviour.TunnelDescription in project onos by opennetworkinglab.
the class DefaultK8sNodeHandler method createTunnelInterface.
/**
* Creates a tunnel interface in a given kubernetes node.
*
* @param k8sNode kubernetes node
*/
private void createTunnelInterface(K8sNode k8sNode, String type, String intfName) {
if (isIntfEnabled(k8sNode, intfName)) {
return;
}
Device device = deviceService.getDevice(k8sNode.ovsdb());
if (device == null || !device.is(InterfaceConfig.class)) {
log.error("Failed to create tunnel interface on {}", k8sNode.ovsdb());
return;
}
TunnelDescription tunnelDesc = buildTunnelDesc(k8sNode, type, intfName);
InterfaceConfig ifaceConfig = device.as(InterfaceConfig.class);
ifaceConfig.addTunnelMode(intfName, tunnelDesc);
}
use of org.onosproject.net.behaviour.TunnelDescription in project onos by opennetworkinglab.
the class DefaultK8sHostHandler method createTunnelInterface.
private void createTunnelInterface(DeviceId ovsdb, K8sTunnelBridge bridge, String type, String intfName) {
if (isTunPortEnabled(bridge, intfName)) {
return;
}
Device device = deviceService.getDevice(ovsdb);
if (device == null || !device.is(InterfaceConfig.class)) {
log.error("Failed to create tunnel interface on {}", ovsdb);
return;
}
TunnelDescription tunnelDesc = buildTunnelDesc(bridge, type, intfName);
InterfaceConfig ifaceConfig = device.as(InterfaceConfig.class);
ifaceConfig.addTunnelMode(intfName, tunnelDesc);
}
use of org.onosproject.net.behaviour.TunnelDescription in project onos by opennetworkinglab.
the class DefaultKubevirtNodeHandler method createTunnelInterface.
/**
* Creates a tunnel interface in a given kubernetes node.
*
* @param node kubevirt node
* @param type kubevirt type
* @param intfName tunnel interface name
*/
private void createTunnelInterface(KubevirtNode node, String type, String intfName) {
if (isIntfEnabled(node, intfName)) {
return;
}
Device device = deviceService.getDevice(node.ovsdb());
if (device == null || !device.is(InterfaceConfig.class)) {
log.error("Failed to create tunnel interface on {}", node.ovsdb());
return;
}
TunnelDescription tunnelDesc = buildTunnelDesc(type, intfName);
InterfaceConfig ifaceConfig = device.as(InterfaceConfig.class);
ifaceConfig.addTunnelMode(intfName, tunnelDesc);
}
use of org.onosproject.net.behaviour.TunnelDescription in project onos by opennetworkinglab.
the class DefaultOpenstackNodeHandler method createTunnelInterface.
/**
* Creates a tunnel interface in a given openstack node.
*
* @param osNode openstack node
*/
private void createTunnelInterface(OpenstackNode osNode, String type, String intfName) {
if (isIntfEnabled(osNode, intfName)) {
return;
}
Device device = deviceService.getDevice(osNode.ovsdb());
if (device == null || !device.is(InterfaceConfig.class)) {
log.error("Failed to create tunnel interface on {}", osNode.ovsdb());
return;
}
TunnelDescription tunnelDesc = buildTunnelDesc(type, intfName);
InterfaceConfig ifaceConfig = device.as(InterfaceConfig.class);
ifaceConfig.addTunnelMode(intfName, tunnelDesc);
}
Aggregations