本文整理了Java中org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface.augmentation()
方法的一些代码示例,展示了Interface.augmentation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interface.augmentation()
方法的具体详情如下:
包路径:org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface
类名称:Interface
方法名:augmentation
暂无
代码示例来源:origin: io.fd.hc2vpp.v3po/v3po2vpp
/**
* Returns true if interface does not have v4/v6 addresses configured
*/
private boolean isAddressNotPresentForInterface(@Nonnull final InstanceIdentifier<Routing> id,
@Nonnull final WriteContext ctx,
boolean checkBefore) {
final Optional<Interface> interfaceData = checkBefore
? ctx.readBefore(RWUtils.cutId(id, Interface.class))
: ctx.readAfter(RWUtils.cutId(id, Interface.class));
if (interfaceData.isPresent()) {
final java.util.Optional<Interface1> augData = java.util.Optional.of(interfaceData.get())
.map(iface -> iface.augmentation(Interface1.class));
final boolean v4NotPresent =
augData.map(Interface1::getIpv4).map(Ipv4::getAddress).map(List::isEmpty).orElse(true);
final boolean v6NotPresent =
augData.map(Interface1::getIpv6).map(Ipv6::getAddress).map(List::isEmpty).orElse(true);
return v4NotPresent && v6NotPresent;
}
return true;
}
}
代码示例来源:origin: io.fd.hc2vpp.acl/acl-impl
.filter(iface -> ofNullable(iface.augmentation(VppAclInterfaceAugmentation.class))
.map(InterfaceAclAttributes::getAcl)
.filter(references ->
} else if (aclType.equals(VppMacipAcl.class)) {
return interfaces.stream()
.filter(iface -> ofNullable(iface.augmentation(VppAclInterfaceAugmentation.class))
.map(InterfaceAclAttributes::getAcl)
.map(aclAttr -> aclAttr.getIngress())
代码示例来源:origin: org.opendaylight.mdsal.binding.model.ietf/rfc7223
if (!e.getValue().equals(other.augmentation(e.getKey()))) {
return false;
代码示例来源:origin: io.fd.hc2vpp.v3po/v3po2vpp
@Override
public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<BridgeDomain> id,
@Nonnull final BridgeDomain dataBefore,
@Nonnull final WriteContext ctx)
throws WriteFailedException {
LOG.debug("deleteCurrentAttributes: id={}, dataBefore={}, ctx={}", id, dataBefore, ctx);
final String bdName = id.firstKeyOf(BridgeDomain.class).getName();
final com.google.common.base.Optional<Interfaces> after =
ctx.readAfter(InstanceIdentifier.create(Interfaces.class));
if (after.isPresent()) {
checkReferenceExist(id, Optional.ofNullable(after.get().getInterface())
.orElse(Collections.emptyList())
.stream()
.map(iface -> Optional.ofNullable(iface.augmentation(VppInterfaceAugmentation.class))
.map(VppInterfaceAugmentation::getL2)
.map(L2ConfigAttributes::getInterconnection)
.orElse(null))
.filter(interconnection -> interconnection instanceof BridgeBased)
.map(BridgeBased.class::cast)
.filter(bridgeBased -> bdName.equals(bridgeBased.getBridgeDomain()))
.collect(toList()));
}
int bdId = bdContext.getIndex(bdName, ctx.getMappingContext());
final BridgeDomainAddDel request = new BridgeDomainAddDel();
request.bdId = bdId;
getReplyForWrite(getFutureJVpp().bridgeDomainAddDel(request).toCompletableFuture(), id);
LOG.debug("Bridge domain {} (id={}) deleted successfully", bdName, bdId);
}
内容来源于网络,如有侵权,请联系作者删除!