本文整理匯總了Java中org.onosproject.vtnrsc.VirtualPort.bindingHostId方法的典型用法代碼示例。如果您正苦於以下問題:Java VirtualPort.bindingHostId方法的具體用法?Java VirtualPort.bindingHostId怎麽用?Java VirtualPort.bindingHostId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.onosproject.vtnrsc.VirtualPort
的用法示例。
在下文中一共展示了VirtualPort.bindingHostId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateExGwPort
import org.onosproject.vtnrsc.VirtualPort; //導入方法依賴的package包/類
private void updateExGwPort(VirtualPort exgwPort) {
VirtualPortService service = get(VirtualPortService.class);
Map<String, String> strMap = Maps.newHashMap();
strMap.putIfAbsent("name", exgwPort.name());
strMap.putIfAbsent("deviceOwner", exgwPort.deviceOwner());
strMap.putIfAbsent("bindingvnicType", exgwPort.bindingVnicType());
strMap.putIfAbsent("bindingvifType", exgwPort.bindingVifType());
strMap.putIfAbsent("bindingvnicDetails", exgwPort.bindingVifDetails());
VirtualPort virtualPort = new DefaultVirtualPort(exgwPort.portId(),
exgwPort.networkId(),
false, strMap,
VirtualPort.State.DOWN,
MacAddress.valueOf(macAddress),
exgwPort.tenantId(),
exgwPort.deviceId(),
exgwPort.fixedIps(),
exgwPort.bindingHostId(),
Sets.newHashSet(exgwPort
.allowedAddressPairs()),
Sets.newHashSet(exgwPort
.securityGroups()));
Set<VirtualPort> virtualPorts = Sets.newHashSet(virtualPort);
service.updatePorts(virtualPorts);
}