org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface.augmentation()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(231)

本文整理了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

Interface.augmentation介绍

暂无

代码示例

代码示例来源:origin: io.fd.hc2vpp.v3po/v3po2vpp

  1. /**
  2. * Returns true if interface does not have v4/v6 addresses configured
  3. */
  4. private boolean isAddressNotPresentForInterface(@Nonnull final InstanceIdentifier<Routing> id,
  5. @Nonnull final WriteContext ctx,
  6. boolean checkBefore) {
  7. final Optional<Interface> interfaceData = checkBefore
  8. ? ctx.readBefore(RWUtils.cutId(id, Interface.class))
  9. : ctx.readAfter(RWUtils.cutId(id, Interface.class));
  10. if (interfaceData.isPresent()) {
  11. final java.util.Optional<Interface1> augData = java.util.Optional.of(interfaceData.get())
  12. .map(iface -> iface.augmentation(Interface1.class));
  13. final boolean v4NotPresent =
  14. augData.map(Interface1::getIpv4).map(Ipv4::getAddress).map(List::isEmpty).orElse(true);
  15. final boolean v6NotPresent =
  16. augData.map(Interface1::getIpv6).map(Ipv6::getAddress).map(List::isEmpty).orElse(true);
  17. return v4NotPresent && v6NotPresent;
  18. }
  19. return true;
  20. }
  21. }

代码示例来源:origin: io.fd.hc2vpp.acl/acl-impl

  1. .filter(iface -> ofNullable(iface.augmentation(VppAclInterfaceAugmentation.class))
  2. .map(InterfaceAclAttributes::getAcl)
  3. .filter(references ->
  4. } else if (aclType.equals(VppMacipAcl.class)) {
  5. return interfaces.stream()
  6. .filter(iface -> ofNullable(iface.augmentation(VppAclInterfaceAugmentation.class))
  7. .map(InterfaceAclAttributes::getAcl)
  8. .map(aclAttr -> aclAttr.getIngress())

代码示例来源:origin: org.opendaylight.mdsal.binding.model.ietf/rfc7223

  1. if (!e.getValue().equals(other.augmentation(e.getKey()))) {
  2. return false;

代码示例来源:origin: io.fd.hc2vpp.v3po/v3po2vpp

  1. @Override
  2. public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier<BridgeDomain> id,
  3. @Nonnull final BridgeDomain dataBefore,
  4. @Nonnull final WriteContext ctx)
  5. throws WriteFailedException {
  6. LOG.debug("deleteCurrentAttributes: id={}, dataBefore={}, ctx={}", id, dataBefore, ctx);
  7. final String bdName = id.firstKeyOf(BridgeDomain.class).getName();
  8. final com.google.common.base.Optional<Interfaces> after =
  9. ctx.readAfter(InstanceIdentifier.create(Interfaces.class));
  10. if (after.isPresent()) {
  11. checkReferenceExist(id, Optional.ofNullable(after.get().getInterface())
  12. .orElse(Collections.emptyList())
  13. .stream()
  14. .map(iface -> Optional.ofNullable(iface.augmentation(VppInterfaceAugmentation.class))
  15. .map(VppInterfaceAugmentation::getL2)
  16. .map(L2ConfigAttributes::getInterconnection)
  17. .orElse(null))
  18. .filter(interconnection -> interconnection instanceof BridgeBased)
  19. .map(BridgeBased.class::cast)
  20. .filter(bridgeBased -> bdName.equals(bridgeBased.getBridgeDomain()))
  21. .collect(toList()));
  22. }
  23. int bdId = bdContext.getIndex(bdName, ctx.getMappingContext());
  24. final BridgeDomainAddDel request = new BridgeDomainAddDel();
  25. request.bdId = bdId;
  26. getReplyForWrite(getFutureJVpp().bridgeDomainAddDel(request).toCompletableFuture(), id);
  27. LOG.debug("Bridge domain {} (id={}) deleted successfully", bdName, bdId);
  28. }

相关文章