├── packaging ├── deb │ ├── trusty │ │ ├── debian │ │ │ ├── compat │ │ │ ├── source │ │ │ │ └── format │ │ │ ├── rules │ │ │ └── copyright │ │ ├── build_dependencies │ │ ├── honeycomb.conf │ │ └── debuild.sh │ ├── bionic │ │ ├── build_dependencies │ │ ├── .gitignore │ │ ├── clean.sh │ │ ├── honeycomb.service │ │ ├── debuild.sh │ │ └── debian │ │ │ └── rules │ ├── xenial │ │ ├── build_dependencies │ │ ├── clean.sh │ │ ├── honeycomb.service │ │ ├── debuild.sh │ │ └── debian │ │ │ └── rules │ ├── .gitignore │ └── common │ │ ├── debuild.sh │ │ └── vpp_dependencies └── rpm │ ├── version │ ├── .gitignore │ ├── honeycomb.service │ ├── hc2vpp_version │ ├── vpp_dependencies │ ├── release │ └── rpmbuild.sh ├── l3 ├── api │ └── asciidoc │ │ └── Readme.adoc ├── impl │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── fd │ │ └── hc2vpp │ │ └── l3 │ │ └── ProxyArpModule.java ├── asciidoc │ └── Readme.adoc └── utils │ └── asciidoc │ └── Readme.adoc ├── samples ├── asciidoc │ └── Readme.adoc ├── samples-api │ └── asciidoc │ │ └── Readme.adoc └── samples-impl │ ├── asciidoc │ └── Readme.adoc │ └── src │ └── main │ ├── resources │ └── module.json │ └── java │ └── io │ └── fd │ └── hc2vpp │ └── samples │ └── ModuleConfiguration.java ├── acl ├── acl-api │ └── asciidoc │ │ └── Readme.adoc ├── acl-impl │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ ├── test │ │ └── resources │ │ │ ├── acl │ │ │ ├── ipv4 │ │ │ │ └── ipv4-acl.json │ │ │ ├── standard │ │ │ │ ├── interface-ref-acl-udp.json │ │ │ │ ├── standard-acl-udp.json │ │ │ │ ├── standard-acl-tcp-src-only.json │ │ │ │ ├── standard-acl-icmp.json │ │ │ │ ├── standard-acl-icmp-v6.json │ │ │ │ └── standard-acl-tcp.json │ │ │ └── macip │ │ │ │ └── macip-acl.json │ │ │ ├── rules │ │ │ ├── no-protocol-rule.json │ │ │ ├── tcp-rule-no-flags.json │ │ │ ├── udp-rule.json │ │ │ ├── icmp-rule.json │ │ │ ├── icmp-v6-rule.json │ │ │ └── tcp-rule.json │ │ │ └── interface-acl │ │ │ └── acl-references.json │ │ └── main │ │ └── java │ │ └── io │ │ └── fd │ │ └── hc2vpp │ │ └── acl │ │ └── util │ │ └── FutureJVppAclCustomizer.java └── asciidoc │ └── Readme.adoc ├── interface-role ├── api │ ├── asciidoc │ │ └── Readme.adoc │ └── pom.xml ├── asciidoc │ └── Readme.adoc ├── impl │ └── asciidoc │ │ └── Readme.adoc └── pom.xml ├── it ├── asciidoc │ └── Readme.adoc ├── api-coverage │ └── asciidoc │ │ └── Readme.adoc ├── api-test │ └── asciidoc │ │ └── Readme.adoc └── jvpp-benchmark │ └── src │ └── main │ └── java │ └── io │ └── fd │ └── hc2vpp │ └── it │ └── jvpp │ └── benchmark │ ├── classify │ └── ClassifyTableProvider.java │ └── acl │ └── AclProvider.java ├── lisp ├── api │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ └── main │ │ └── yang │ │ └── eid-mapping-context@2016-08-01.yang ├── lisp2vpp │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── honeycomb-minimal-resources │ │ │ │ └── config │ │ │ │ └── lisp.json │ │ └── java │ │ │ └── io │ │ │ └── fd │ │ │ └── hc2vpp │ │ │ └── lisp │ │ │ ├── context │ │ │ └── util │ │ │ │ └── ContextsReaderFactoryProvider.java │ │ │ └── translate │ │ │ └── util │ │ │ └── CheckedLispCustomizer.java │ │ └── test │ │ └── resources │ │ ├── locator-set.json │ │ ├── lisp-config.json │ │ ├── lisp-operational.json │ │ ├── gpe │ │ ├── gpe-fwd-entry-without-action.json │ │ ├── gpe-fwd-entry-without-locators.json │ │ ├── invalid │ │ │ ├── invalid-gpe-fwd-entry-no-local-eid.json │ │ │ └── invalid-gpe-fwd-entry-no-remote-eid.json │ │ └── gpe-fwd-entry-full.json │ │ └── adjacencies-identification-context.json └── asciidoc │ └── Readme.adoc ├── nsh ├── api │ └── asciidoc │ │ └── Readme.adoc ├── impl │ └── asciidoc │ │ └── Readme.adoc └── asciidoc │ └── Readme.adoc ├── v3po ├── api │ └── asciidoc │ │ └── Readme.adoc ├── asciidoc │ └── Readme.adoc └── v3po2vpp │ └── src │ ├── main │ └── java │ │ └── io │ │ └── fd │ │ └── hc2vpp │ │ └── v3po │ │ ├── read │ │ └── cache │ │ │ ├── InterfaceStatisticsManager.java │ │ │ ├── InterfaceStatisticsManagerProvider.java │ │ │ ├── InterfaceStatisticsManagerImpl.java │ │ │ └── InterfaceCacheDumpManagerProvider.java │ │ └── interfacesstate │ │ └── cache │ │ └── InterfaceNamesDumpManagerProvider.java │ └── test │ └── java │ └── io │ └── fd │ └── hc2vpp │ └── v3po │ └── util │ └── SubinterfaceUtilsTest.java ├── asciidoc └── Readme.adoc ├── .gitreview ├── dhcp ├── asciidoc │ └── Readme.adoc ├── dhcp-impl │ ├── src │ │ └── test │ │ │ ├── resources │ │ │ └── relay │ │ │ │ ├── ipv6DhcpRelayAfter.json │ │ │ │ ├── ipv4DhcpRelay.json │ │ │ │ └── ipv6DhcpRelayBefore.json │ │ │ └── java │ │ │ └── io │ │ │ └── fd │ │ │ └── hc2vpp │ │ │ └── dhcp │ │ │ └── helpers │ │ │ └── SchemaContextTestHelper.java │ └── asciidoc │ │ └── Readme.adoc └── dhcp-api │ └── asciidoc │ └── Readme.adoc ├── ioam ├── api │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ └── main │ │ └── yang │ │ └── ioam-sb-export@2017-02-06.yang ├── impl │ └── asciidoc │ │ └── Readme.adoc └── asciidoc │ └── Readme.adoc ├── ipsec ├── ipsec-api │ └── asciidoc │ │ └── Readme.adoc ├── ipsec-impl │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ ├── test │ │ └── resources │ │ │ ├── ikev2 │ │ │ ├── identity │ │ │ │ ├── identity_remote_fqdn.json │ │ │ │ ├── identity_local_ipv4.json │ │ │ │ ├── identity_local_rfc822.json │ │ │ │ └── identity_remote_ipv6.json │ │ │ ├── addIkev2Profile.json │ │ │ ├── addDelProfile_before.json │ │ │ └── addDelProfile_after.json │ │ │ ├── sadEntries │ │ │ ├── delSadEntry.json │ │ │ ├── addDelSadEntry_Ipv6_after.json │ │ │ ├── addDelSadEntry.json │ │ │ └── addDelSadEntry_Ipv6_before.json │ │ │ └── spdEntries │ │ │ ├── addDelSpd_after.json │ │ │ ├── addDelSpd_before.json │ │ │ └── addDelSpd.json │ │ └── main │ │ └── java │ │ └── io │ │ └── fd │ │ └── hc2vpp │ │ └── ipsec │ │ ├── dto │ │ └── AuthMethod.java │ │ └── FutureJVppIkev2Customizer.java └── asciidoc │ └── Readme.adoc ├── mpls ├── asciidoc │ └── Readme.adoc ├── api │ └── asciidoc │ │ └── Readme.adoc └── impl │ └── asciidoc │ └── Readme.adoc ├── stats ├── asciidoc │ └── Readme.adoc ├── stats-impl │ └── asciidoc │ │ └── Readme.adoc └── stats-api │ ├── asciidoc │ └── Readme.adoc │ └── pom.xml ├── examples ├── docker │ ├── honeycomb │ │ ├── kill.sh │ │ └── start.sh │ ├── vpp │ │ ├── start.sh │ │ └── kill.sh │ ├── packages │ │ └── .gitignore │ ├── remove_hc2vpp_image.sh │ ├── remove_all_images.sh │ ├── start_hc2vpp_container.sh │ ├── copy_packages.sh │ ├── remove_all_containers.sh │ ├── bgp_demo │ │ ├── init │ │ │ ├── vpp1.cmd │ │ │ ├── vpp2.cmd │ │ │ ├── io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config │ │ │ ├── init.sh │ │ │ └── io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config │ │ ├── run_terminals.sh │ │ ├── build_topology.sh │ │ └── Readme.txt │ ├── test │ │ ├── docker_ip.sh │ │ └── show_interfaces_state.sh │ ├── create_image.sh │ ├── mpls_demo │ │ ├── init │ │ │ ├── vpp1.cmd │ │ │ ├── vpp2.cmd │ │ │ ├── vpp3.cmd │ │ │ ├── vpp4.cmd │ │ │ └── vpp.sh │ │ ├── run_terminals.sh │ │ ├── build_topology.sh │ │ └── Readme.txt │ ├── remove_hc2vpp_containers.sh │ ├── SRv6_5-node │ │ ├── watch_int_vpp.sh │ │ ├── clean_demo.sh │ │ ├── restart_demo.sh │ │ ├── pcap_vpp.sh │ │ └── show_configuration.sh │ ├── Readme.txt │ └── Dockerfile └── ncclient │ ├── acl │ ├── config_invalid_acl.xml │ ├── test_acl.sh │ └── test_acl_update.sh │ ├── bd │ ├── test_bd.sh │ └── config_bd.xml │ ├── nat │ ├── test_nat.sh │ └── test_nat_update.sh │ ├── interfaces │ ├── tap │ │ ├── test_diff_tap.sh │ │ ├── test_edit_tap.sh │ │ └── edit_config_tap_interface.xml │ ├── loop │ │ ├── test_diff_loopback.sh │ │ ├── test_edit_loopback.sh │ │ └── edit_config_loop_interface.xml │ └── af-packet │ │ ├── test_diff_af_packet.sh │ │ ├── test_edit_af_packet.sh │ │ └── edit_config_af_packet_interface.xml │ ├── test_diff_config.sh │ ├── test_copy_config.sh │ └── test_edit_config.sh ├── routing ├── asciidoc │ └── Readme.adoc ├── routing-impl │ ├── src │ │ ├── main │ │ │ └── resources │ │ │ │ └── honeycomb-minimal-resources │ │ │ │ └── config │ │ │ │ └── routing.json │ │ └── test │ │ │ ├── resources │ │ │ ├── routing.json │ │ │ ├── ra │ │ │ │ ├── simplePrefix.json │ │ │ │ ├── complexPrefix.json │ │ │ │ ├── simpleRa.json │ │ │ │ └── complexRa.json │ │ │ ├── ipv4 │ │ │ │ ├── tablehop │ │ │ │ │ ├── tableHopRouteWithoutClassifier.json │ │ │ │ │ └── tableHopRouteWithClassifier.json │ │ │ │ ├── specialhop │ │ │ │ │ ├── specialHopRouteReceive.json │ │ │ │ │ ├── specialHopRouteBlackhole.json │ │ │ │ │ ├── specialHopRouteProhibited.json │ │ │ │ │ └── specialHopRouteUnreachable.json │ │ │ │ ├── simplehop │ │ │ │ │ ├── simpleHopRouteNoRouteAttrs.json │ │ │ │ │ ├── simpleHopRouteWithoutClassifier.json │ │ │ │ │ └── simpleHopRouteWithClassifier.json │ │ │ │ └── multihop │ │ │ │ │ ├── multiHopRouteWithNoRouteAttrs.json │ │ │ │ │ ├── multiHopRouteWithoutClassifier.json │ │ │ │ │ └── multiHopRouteWithClassifier.json │ │ │ └── ipv6 │ │ │ │ ├── tablehop │ │ │ │ ├── tableHopRouteWithoutClassifier.json │ │ │ │ ├── tableHopRouteWithClassifier.json │ │ │ │ └── tableHopRouteWithClassifier2.json │ │ │ │ ├── specialhop │ │ │ │ ├── specialHopRouteBlackhole.json │ │ │ │ ├── specialHopRouteProhibited.json │ │ │ │ ├── specialHopRouteReceive.json │ │ │ │ └── specialHopRouteUnreachable.json │ │ │ │ ├── simplehop │ │ │ │ ├── simpleHopRouteWithoutRouteAttrs.json │ │ │ │ ├── simpleHopRouteWithoutClassifier.json │ │ │ │ ├── simpleHopRoute128.json │ │ │ │ └── simpleHopRouteWithClassifier.json │ │ │ │ └── multihop │ │ │ │ ├── multiHopRouteWithoutRouteAttrs.json │ │ │ │ ├── multiHopRouteWithoutClassifier.json │ │ │ │ └── multiHopRouteWithClassifier.json │ │ │ └── java │ │ │ └── io │ │ │ └── fd │ │ │ └── hc2vpp │ │ │ └── routing │ │ │ ├── Ipv4RouteData.java │ │ │ └── helpers │ │ │ ├── InterfaceTestHelper.java │ │ │ └── ClassifyTableTestHelper.java │ └── asciidoc │ │ └── Readme.adoc └── routing-api │ └── asciidoc │ └── Readme.adoc ├── srv6 ├── asciidoc │ └── Readme.adoc ├── srv6-api │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── yang │ │ └── gen │ │ └── v1 │ │ └── http │ │ └── cisco │ │ └── com │ │ └── ns │ │ └── yang │ │ └── oc │ │ └── srte │ │ └── policy │ │ └── rev170918 │ │ ├── MplsLabelBuilder.java │ │ └── SidValueTypeBuilder.java └── srv6-impl │ └── src │ └── main │ └── java │ └── io │ └── fd │ └── hc2vpp │ └── srv6 │ ├── write │ ├── DeleteRequest.java │ ├── UpdateRequest.java │ ├── WriteRequest.java │ └── sid │ │ └── request │ │ └── NoProtocolLocalSidRequest.java │ ├── util │ └── JVppRequest.java │ └── Srv6Configuration.java ├── vpp-integration ├── api-docs │ ├── asciidoc │ │ └── Readme.adoc │ ├── core │ │ ├── asciidoc │ │ │ └── Readme.adoc │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── fd │ │ │ └── hc2vpp │ │ │ └── docs │ │ │ └── core │ │ │ └── LinkGenerator.java │ ├── scripts │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ ├── vpp-management.json │ │ │ ├── routing.json │ │ │ └── yang_to_jvpp_template │ └── api │ │ └── asciidoc │ │ └── Readme.adoc ├── minimal-distribution │ └── asciidoc │ │ └── Readme.adoc └── asciidoc │ └── Readme.adoc ├── vpp-management ├── impl │ ├── src │ │ ├── test │ │ │ └── resources │ │ │ │ └── vpp-management.json │ │ └── main │ │ │ ├── resources │ │ │ └── honeycomb-minimal-resources │ │ │ │ └── config │ │ │ │ └── vpp-management.json │ │ │ └── java │ │ │ └── io │ │ │ └── fd │ │ │ └── hc2vpp │ │ │ └── management │ │ │ └── VppManagementConfiguration.java │ └── asciidoc │ │ └── Readme.adoc ├── asciidoc │ └── Readme.adoc └── api │ └── asciidoc │ └── Readme.adoc ├── nat ├── nat2vpp │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ ├── test │ │ └── resources │ │ │ ├── nat44 │ │ │ ├── static-mapping.json │ │ │ ├── external-ip-pool.json │ │ │ ├── static-mapping-address-update.json │ │ │ └── static-mapping-unsupported-proto.json │ │ │ └── nat64 │ │ │ ├── static-mapping-unsupported-proto.json │ │ │ ├── external-ip-pool.json │ │ │ ├── static-mapping.json │ │ │ └── static-mapping-address-update.json │ │ └── main │ │ └── java │ │ └── io │ │ └── fd │ │ └── hc2vpp │ │ └── nat │ │ └── read │ │ └── ifc │ │ ├── VppAttributesBuilder.java │ │ ├── InboundAttributesBuilder.java │ │ └── OutboundAttributesReader.java ├── asciidoc │ └── Readme.adoc └── nat-api │ └── asciidoc │ └── Readme.adoc ├── vpp-common ├── asciidoc │ └── Readme.adoc ├── vpp-impl-parent │ └── asciidoc │ │ └── Readme.adoc ├── naming-context-api │ └── asciidoc │ │ └── Readme.adoc ├── naming-context-impl │ └── asciidoc │ │ └── Readme.adoc ├── vpp-translate-test │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ └── main │ │ └── resources │ │ └── logback-test.xml ├── vpp-common-integration │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ ├── test │ │ └── resources │ │ │ └── jvpp.json │ │ └── main │ │ ├── resources │ │ └── honeycomb-minimal-resources │ │ │ └── config │ │ │ └── jvpp.json │ │ └── java │ │ └── io │ │ └── fd │ │ └── hc2vpp │ │ └── common │ │ └── integration │ │ ├── VppConfigAttributes.java │ │ └── JVppTimeoutProvider.java └── vpp-translate-utils │ ├── asciidoc │ └── Readme.adoc │ └── src │ ├── test │ └── resources │ │ ├── naming.json │ │ └── multi-mapping.json │ └── main │ └── java │ └── io │ └── fd │ └── hc2vpp │ └── common │ └── translate │ └── util │ ├── ReadTimeoutException.java │ └── WriteTimeoutException.java ├── common ├── asciidoc │ └── Readme.adoc ├── impl-parent │ └── asciidoc │ │ └── Readme.adoc ├── api-parent │ └── asciidoc │ │ └── Readme.adoc ├── minimal-distribution-parent │ └── asciidoc │ │ └── Readme.adoc └── hc2vpp-parent │ ├── asciidoc │ └── Readme.adoc │ └── pom.xml ├── vpp-classifier ├── api │ └── asciidoc │ │ └── Readme.adoc ├── asciidoc │ └── Readme.adoc └── impl │ ├── asciidoc │ └── Readme.adoc │ └── src │ └── main │ └── java │ └── io │ └── fd │ └── hc2vpp │ └── vpp │ └── classifier │ └── write │ └── ClassifyWriter.java ├── bgp ├── inet │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── fd │ │ └── hc2vpp │ │ └── bgp │ │ └── inet │ │ ├── InetRouteWriterFactory.java │ │ └── RouteRequestProducer.java ├── asciidoc │ └── Readme.adoc └── bgp-prefix-sid │ ├── asciidoc │ └── Readme.adoc │ └── src │ └── main │ └── java │ └── io │ └── fd │ └── hc2vpp │ └── bgp │ └── prefix │ └── sid │ └── BgpPrefixSidWriterFactory.java ├── release-notes ├── src │ └── main │ │ └── asciidoc │ │ ├── api_docs │ │ ├── api_docs.adoc │ │ └── api_docs_index.adoc │ │ ├── devel_guide │ │ └── devel_guide.adoc │ │ ├── install_guide │ │ └── install_from_available_archives.adoc │ │ ├── user_guide │ │ └── user_troubleshooting.adoc │ │ └── release_notes.adoc ├── asciidoc │ └── Readme.adoc └── site.xml ├── fib-management ├── asciidoc │ └── Readme.adoc ├── fib-management-impl │ ├── asciidoc │ │ └── Readme.adoc │ └── src │ │ └── test │ │ ├── resources │ │ └── fib.json │ │ └── java │ │ └── io │ │ └── fd │ │ └── hc2vpp │ │ └── fib │ │ └── management │ │ └── helpers │ │ └── SchemaContextTestHelper.java └── fib-management-api │ ├── asciidoc │ └── Readme.adoc │ └── pom.xml ├── jvpp ├── version ├── common.sh ├── install_from_package.sh └── install_from_vpp_build_dir.sh ├── csit-test-branch ├── jvpp-version ├── vpp-version ├── .gitignore └── scripts └── bump_version.sh /packaging/deb/trusty/debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /packaging/deb/trusty/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /packaging/rpm/version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo 1.19.08 3 | -------------------------------------------------------------------------------- /l3/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = l3-api 2 | 3 | Overview of l3-api -------------------------------------------------------------------------------- /l3/impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = l3-impl 2 | 3 | Overview of l3-impl -------------------------------------------------------------------------------- /samples/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = samples 2 | 3 | Overview of samples -------------------------------------------------------------------------------- /acl/acl-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = acl-api 2 | 3 | Overview of acl-api -------------------------------------------------------------------------------- /acl/acl-impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = acl-impl 2 | 3 | Overview of acl-impl -------------------------------------------------------------------------------- /interface-role/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = api 2 | 3 | Overview of api -------------------------------------------------------------------------------- /it/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = it-aggregator 2 | 3 | Overview of it-aggregator -------------------------------------------------------------------------------- /l3/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = l3-aggregator 2 | 3 | Overview of l3-aggregator -------------------------------------------------------------------------------- /l3/utils/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = l3-utils 2 | 3 | Overview of l3-utils -------------------------------------------------------------------------------- /lisp/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = lisp-api 2 | 3 | Overview of lisp-api -------------------------------------------------------------------------------- /nsh/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vppnsh-api 2 | 3 | Overview of vppnsh-api -------------------------------------------------------------------------------- /v3po/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = v3po-api 2 | 3 | Overview of v3po-api -------------------------------------------------------------------------------- /acl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = acl-aggregator 2 | 3 | Overview of acl-aggregator -------------------------------------------------------------------------------- /asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = hc2vpp-aggregator 2 | 3 | Overview of hc2vpp-aggregator -------------------------------------------------------------------------------- /lisp/lisp2vpp/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = lisp2vpp 2 | 3 | Overview of lisp2vpp -------------------------------------------------------------------------------- /nsh/impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vppnsh-impl 2 | 3 | Overview of vppnsh-impl -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=gerrit.fd.io 3 | port=29418 4 | project=hc2vpp 5 | -------------------------------------------------------------------------------- /dhcp/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = dhcp-aggregator 2 | 3 | Overview of dhcp-aggregator -------------------------------------------------------------------------------- /ioam/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vppioam-api 2 | 3 | Overview of vppioam-api 4 | -------------------------------------------------------------------------------- /ioam/impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vppioam-impl 2 | 3 | Overview of vppioam-impl 4 | -------------------------------------------------------------------------------- /ipsec/ipsec-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = ipsec-api 2 | 3 | Overview of ipsec-api 4 | -------------------------------------------------------------------------------- /mpls/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = mpls-aggregator 2 | 3 | Overview of mpls-aggregator -------------------------------------------------------------------------------- /packaging/deb/trusty/build_dependencies: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "debhelper (>= 9)" 3 | -------------------------------------------------------------------------------- /stats/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = stats-aggregator 2 | 3 | Overview of stats-aggregator -------------------------------------------------------------------------------- /stats/stats-impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = stats-impl 2 | 3 | Overview of stats-impl -------------------------------------------------------------------------------- /examples/docker/honeycomb/kill.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /opt/honeycomb/honeycomb-kill 4 | -------------------------------------------------------------------------------- /examples/docker/vpp/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | vpp -c /etc/vpp/startup.conf & 4 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = ipsec-impl 2 | 3 | Overview of ipsec-impl 4 | -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/main/resources/honeycomb-minimal-resources/config/lisp.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /routing/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = routing-aggregator 2 | 3 | Overview of routing-aggregator -------------------------------------------------------------------------------- /samples/samples-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = samples-api 2 | 3 | Overview of samples-api -------------------------------------------------------------------------------- /srv6/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = srv6-aggregator 2 | 3 | Overview of srv6-aggregator 4 | -------------------------------------------------------------------------------- /vpp-integration/api-docs/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = api-docs 2 | 3 | Overview of api-docs -------------------------------------------------------------------------------- /packaging/rpm/.gitignore: -------------------------------------------------------------------------------- 1 | BUILD 2 | BUILDROOT 3 | RPMS 4 | SOURCES 5 | SPECS 6 | SRPMS 7 | -------------------------------------------------------------------------------- /samples/samples-impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = samples-impl 2 | 3 | Overview of samples-impl -------------------------------------------------------------------------------- /samples/samples-impl/src/main/resources/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "some.prop.name":"someValue" 3 | } -------------------------------------------------------------------------------- /vpp-integration/api-docs/core/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = docs-core 2 | 3 | Overview of docs-core -------------------------------------------------------------------------------- /vpp-management/impl/src/test/resources/vpp-management.json: -------------------------------------------------------------------------------- 1 | { 2 | "keepalive-delay":30 3 | } -------------------------------------------------------------------------------- /nat/nat2vpp/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = nat2vpp 2 | 3 | Uses jvpp-nat to work with VPP's NAT plugin. -------------------------------------------------------------------------------- /packaging/deb/bionic/build_dependencies: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "debhelper (>= 11), dh-systemd" 3 | -------------------------------------------------------------------------------- /packaging/deb/xenial/build_dependencies: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "debhelper (>= 9), dh-systemd" 3 | -------------------------------------------------------------------------------- /vpp-common/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-common-aggregator 2 | 3 | Overview of vpp-common-aggregator -------------------------------------------------------------------------------- /common/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = hc2vpp-common-aggregator 2 | 3 | Overview of hc2vpp-common-aggregator -------------------------------------------------------------------------------- /examples/docker/packages/.gitignore: -------------------------------------------------------------------------------- 1 | # Do not store packages used by Dockerfile in the repo 2 | *.deb -------------------------------------------------------------------------------- /examples/docker/vpp/kill.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ps -ef | grep vpp | awk '{print $2}'| xargs kill 4 | -------------------------------------------------------------------------------- /stats/stats-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = stats-api 2 | 3 | The APIs are based on vpp stats model. 4 | -------------------------------------------------------------------------------- /vpp-classifier/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-classifier-api 2 | 3 | Overview of vpp-classifier-api -------------------------------------------------------------------------------- /vpp-common/vpp-impl-parent/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-impl-parent 2 | 3 | Overview of vpp-impl-parent -------------------------------------------------------------------------------- /examples/docker/remove_hc2vpp_image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Delete all images 4 | docker rmi hc2vpp 5 | -------------------------------------------------------------------------------- /vpp-integration/api-docs/scripts/src/main/resources/vpp-management.json: -------------------------------------------------------------------------------- 1 | { 2 | "keepalive-delay":30 3 | } -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/locator-set.json: -------------------------------------------------------------------------------- 1 | { 2 | "locator-set": { 3 | "name": "loc1" 4 | } 5 | } -------------------------------------------------------------------------------- /packaging/deb/.gitignore: -------------------------------------------------------------------------------- 1 | *.tar.xz 2 | *.tar.gz 3 | **/honeycomb-*/ 4 | *.deb 5 | *.changes 6 | *.buildinfo 7 | -------------------------------------------------------------------------------- /vpp-classifier/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-classifier-aggregator 2 | 3 | Overview of vpp-classifier-aggregator -------------------------------------------------------------------------------- /vpp-common/naming-context-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = naming-context-api 2 | 3 | Overview of naming-context-api -------------------------------------------------------------------------------- /vpp-common/naming-context-impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = naming-context-impl 2 | 3 | Overview of naming-context-impl -------------------------------------------------------------------------------- /vpp-common/vpp-translate-test/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-translate-test 2 | 3 | Overview of vpp-translate-test -------------------------------------------------------------------------------- /vpp-management/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-management-aggregator 2 | 3 | Overview of vpp-management-aggregator -------------------------------------------------------------------------------- /bgp/inet/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = inet 2 | 3 | Provides mapping code between IPv4/IPv6 BGP routes and VPP core APIs. -------------------------------------------------------------------------------- /examples/docker/remove_all_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Delete all images 4 | docker rmi $(docker images -q) 5 | -------------------------------------------------------------------------------- /packaging/deb/bionic/.gitignore: -------------------------------------------------------------------------------- 1 | *.tar.xz 2 | *.tar.gz 3 | **/honeycomb-*/ 4 | *.deb 5 | *.changes 6 | *.buildinfo 7 | -------------------------------------------------------------------------------- /common/impl-parent/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = impl-parent 2 | 3 | Common parent for projects implementing translation layer. -------------------------------------------------------------------------------- /vpp-common/vpp-common-integration/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-common-integration 2 | 3 | Overview of vpp-common-integration -------------------------------------------------------------------------------- /examples/docker/honeycomb/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Start honeycomb in background 4 | /opt/honeycomb/honeycomb-start 5 | -------------------------------------------------------------------------------- /vpp-integration/api-docs/scripts/src/main/resources/routing.json: -------------------------------------------------------------------------------- 1 | { 2 | "learned-route-name-prefix": "learned-route" 3 | } 4 | -------------------------------------------------------------------------------- /vpp-management/impl/src/main/resources/honeycomb-minimal-resources/config/vpp-management.json: -------------------------------------------------------------------------------- 1 | { 2 | "keepalive-delay":30 3 | } -------------------------------------------------------------------------------- /bgp/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = bgp-aggregator 2 | 3 | This is a Honeycomb plugin providing mapping code between BGP routes and VPP core APIs. -------------------------------------------------------------------------------- /common/api-parent/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = api-parent 2 | 3 | Maven parent for api projects. Provides common yangtools plugin configuration. -------------------------------------------------------------------------------- /release-notes/src/main/asciidoc/api_docs/api_docs.adoc: -------------------------------------------------------------------------------- 1 | == API documentation 2 | 3 | link:api_docs_index.html[VPP API to Yang index] 4 | -------------------------------------------------------------------------------- /vpp-integration/minimal-distribution/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-integration-distribution 2 | 3 | Overview of vpp-integration-distribution -------------------------------------------------------------------------------- /packaging/deb/xenial/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # remove outcomes of honeycomb package generation 4 | rm -rf honeycomb-* honeycomb_* vpp* -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/lisp-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "lisp": { 3 | "enable": true, 4 | "lisp-feature-data": { 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /packaging/deb/bionic/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # remove outcomes of honeycomb package generation 4 | rm -rf honeycomb-* honeycomb_* vpp* 5 | -------------------------------------------------------------------------------- /vpp-common/vpp-common-integration/src/test/resources/jvpp.json: -------------------------------------------------------------------------------- 1 | { 2 | "jvpp-connection-name": "honeycomb", 3 | "jvpp-request-timeout":15 4 | } -------------------------------------------------------------------------------- /routing/routing-impl/src/main/resources/honeycomb-minimal-resources/config/routing.json: -------------------------------------------------------------------------------- 1 | { 2 | "learned-route-name-prefix": "learned-route" 3 | } 4 | -------------------------------------------------------------------------------- /common/minimal-distribution-parent/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = minimal-distribution-parent 2 | 3 | Maven parent for projects that provide honeycomb distribution. -------------------------------------------------------------------------------- /fib-management/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = fib-management-aggregator 2 | 3 | Aggregates Fib management API module and Fib management Implementation module. 4 | -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/lisp-operational.json: -------------------------------------------------------------------------------- 1 | { 2 | "lisp-state": { 3 | "enable":true, 4 | "lisp-feature-data": { 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/routing.json: -------------------------------------------------------------------------------- 1 | { 2 | "default-routing-id": "0.0.0.0", 3 | "learned-route-name-prefix": "learned-route" 4 | } 5 | -------------------------------------------------------------------------------- /bgp/bgp-prefix-sid/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = bgp-prefix-sid 2 | 3 | This is a Honeycomb plugin providing mapping code between BGP Prefix SID routes and VPP core APIs. -------------------------------------------------------------------------------- /common/hc2vpp-parent/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = hc2vpp-aggregator 2 | 3 | Single maven parent for all hc2vpp projects. Provides documentation template used by site plugin. -------------------------------------------------------------------------------- /lisp/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = Honeycomb translation layer SPI implementation for VPP's LISP APIs 2 | 3 | Provides customizers translating lisp.yang model into VPP's LISP API calls -------------------------------------------------------------------------------- /packaging/deb/common/debuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | BUILD_DIR=$1 4 | 5 | # Build deb binary only package 6 | cd ${BUILD_DIR} 7 | dpkg-buildpackage -b -uc 8 | cd - 9 | -------------------------------------------------------------------------------- /vpp-common/vpp-common-integration/src/main/resources/honeycomb-minimal-resources/config/jvpp.json: -------------------------------------------------------------------------------- 1 | { 2 | "jvpp-connection-name": "honeycomb", 3 | "jvpp-request-timeout":5 4 | } -------------------------------------------------------------------------------- /vpp-integration/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = VPP-integration 2 | 3 | This is an integration project building HC distribution for VPP, including all available HC plugins for VPP 4 | -------------------------------------------------------------------------------- /vpp-common/vpp-translate-utils/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = Honeycomb. VPP translation layer utils 2 | 3 | Provides utility classes useful in translation layer implementation for the VPP. -------------------------------------------------------------------------------- /examples/docker/start_hc2vpp_container.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Create & start container 4 | # $1 - container name 5 | docker run -dt --privileged --name=$1 hc2vpp 6 | docker start $1 7 | -------------------------------------------------------------------------------- /interface-role/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = interface-role-aggregator 2 | 3 | This module contains api and implementation(TODO: HC2VPP-128) for interface role specification (config only feature) -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/ikev2/identity/identity_remote_fqdn.json: -------------------------------------------------------------------------------- 1 | { 2 | "identity" : { 3 | "remote": 4 | { 5 | "fqdn-string": "vpp.home" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/ikev2/identity/identity_local_ipv4.json: -------------------------------------------------------------------------------- 1 | { 2 | "identity" : { 3 | "local": 4 | { 5 | "ipv4-address": "192.168.123.22" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/docker/copy_packages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm packages/*.deb 4 | 5 | # Copies locally-built vpp and hc2vpp packages 6 | cp ~/vpp/build-root/*.deb ../../packaging/deb/xenial/*.deb packages/ -------------------------------------------------------------------------------- /examples/docker/remove_all_containers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ids=$(docker ps -aq) 4 | 5 | # Stop all containers 6 | docker stop $ids 7 | 8 | # Delete all containers 9 | docker rm $ids 10 | -------------------------------------------------------------------------------- /examples/docker/bgp_demo/init/vpp1.cmd: -------------------------------------------------------------------------------- 1 | create host-interface name veth12 2 | set int state host-veth12 up 3 | set int ip address host-veth12 10.12.1.1/24 4 | set interface unnumbered tuntap-0 use host-veth12 5 | -------------------------------------------------------------------------------- /examples/docker/bgp_demo/init/vpp2.cmd: -------------------------------------------------------------------------------- 1 | create host-interface name veth21 2 | set int state host-veth21 up 3 | set int ip address host-veth21 10.12.1.2/24 4 | set interface unnumbered tuntap-0 use host-veth21 5 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/ikev2/identity/identity_local_rfc822.json: -------------------------------------------------------------------------------- 1 | { 2 | "identity" : { 3 | "local": 4 | { 5 | "rfc822-address-string": "rfc822@example.com" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/ikev2/identity/identity_remote_ipv6.json: -------------------------------------------------------------------------------- 1 | { 2 | "identity" : { 3 | "remote": 4 | { 5 | "ipv6-address": "2001:DB8:0:0:8:800:200C:417A" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packaging/deb/trusty/honeycomb.conf: -------------------------------------------------------------------------------- 1 | description "honeycomb agent for VPP" 2 | author "fd.io/honeycomb " 3 | 4 | manual 5 | 6 | script 7 | exec /opt/honeycomb/honeycomb 8 | end script -------------------------------------------------------------------------------- /release-notes/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = release-notes-aggregator 2 | 3 | This module contains only release notes related documentation. 4 | 5 | Full release notes can be found at link:release_notes.html[Release Notes] 6 | -------------------------------------------------------------------------------- /examples/docker/test/docker_ip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Obtain IP address of the container 4 | # See http://blog.oddbit.com/2014/08/11/four-ways-to-connect-a-docker/ 5 | docker inspect --format '{{ .NetworkSettings.IPAddress }}' "$@" 6 | -------------------------------------------------------------------------------- /jvpp/version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Defines jvpp version used by hc2vpp-integration job 4 | # which produces honeycomb DEB and RPM artifacts. 5 | # 6 | # Version should match the one used in pom files. 7 | # 8 | echo 19.08-SNAPSHOT 9 | -------------------------------------------------------------------------------- /packaging/rpm/honeycomb.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=fd.io Honeycomb 3 | Wants=vpp.service 4 | After=vpp.service 5 | 6 | [Service] 7 | ExecStart=/opt/honeycomb/honeycomb 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /v3po/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = V3po 2 | 3 | This is a Honeycomb plugin providing mapping code between HC and VPP core APIs. 4 | 5 | == Usage 6 | 7 | Refer to postman_rest_collection.json for sample requests. All capabilities of V3po are demo-ed there -------------------------------------------------------------------------------- /vpp-integration/api-docs/scripts/src/main/resources/yang_to_jvpp_template: -------------------------------------------------------------------------------- 1 | .${pluginName} to Yang index 2 | [width="80%",options="header",cols="1,1,m,1"] 3 | |=== 4 | |*VPP api* |*Java api* |*Yang nodes* |*Supported Operations* 5 | ${tableContent} 6 | |=== -------------------------------------------------------------------------------- /packaging/deb/bionic/honeycomb.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=honeycomb agent for VPP 3 | 4 | [Service] 5 | Type=simple 6 | ExecStart=/bin/sh -ec "exec /opt/honeycomb/honeycomb" 7 | Restart=on-failure 8 | 9 | [Install] 10 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /packaging/deb/xenial/honeycomb.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=honeycomb agent for VPP 3 | 4 | [Service] 5 | Type=simple 6 | ExecStart=/bin/sh -ec "exec /opt/honeycomb/honeycomb" 7 | Restart=on-failure 8 | 9 | [Install] 10 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /examples/docker/create_image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Build docker image with vpp and hc2vpp installed 4 | docker build -t hc2vpp -f Dockerfile . 5 | 6 | # make backup copy of image (uncomment next line if desired) 7 | # docker save -o hc2vpp-latest.tar hc2vpp:latest 8 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/sadEntries/delSadEntry.json: -------------------------------------------------------------------------------- 1 | { 2 | "sad": { 3 | "sad-entries": [ 4 | { 5 | "spi": 1002, 6 | "direction": "outbound", 7 | "sa-id": 10 8 | } 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/docker/mpls_demo/init/vpp1.cmd: -------------------------------------------------------------------------------- 1 | create host-interface name veth12 2 | set int state host-veth12 up 3 | set int ip address host-veth12 10.12.1.1/24 4 | 5 | create host-interface name veth13 6 | set int state host-veth13 up 7 | set int ip address host-veth13 10.13.1.1/24 8 | -------------------------------------------------------------------------------- /examples/docker/mpls_demo/init/vpp2.cmd: -------------------------------------------------------------------------------- 1 | create host-interface name veth21 2 | set int state host-veth21 up 3 | set int ip address host-veth21 10.12.1.2/24 4 | 5 | create host-interface name veth24 6 | set int state host-veth24 up 7 | set int ip address host-veth24 10.24.1.2/24 8 | -------------------------------------------------------------------------------- /it/api-coverage/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = api-coverage 2 | 3 | Provides integration test that measures VPP API coverage. 4 | To run the test, invoke: 5 | 6 | mvn test -pl it/api-coverage -Papi-coverage 7 | 8 | The test counts number of usages of each api method defined in jvpp jars. -------------------------------------------------------------------------------- /packaging/deb/trusty/debuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | DIR=$(dirname $0) 4 | DIR=$(readlink -f ${DIR}) 5 | 6 | BUILD_FOLDER=$(${DIR}/../common/prepare.sh ${DIR} ${DIR}/debian honeycomb.conf /etc/init/ ${DIR}/build_dependencies) 7 | ${DIR}/../common/debuild.sh ${BUILD_FOLDER} -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ra/simplePrefix.json: -------------------------------------------------------------------------------- 1 | { 2 | "prefix-list": { 3 | "prefix": [ 4 | { 5 | "prefix-spec": "2001:0db8:0a0b:12f0:0000:0000:0000:0002/64", 6 | "autonomous-flag": "true" 7 | } 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /vpp-management/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-management-api 2 | 3 | Overview of vpp-management-api 4 | 5 | Provides model for two major features 6 | 7 | * Management attributes of underlaying vpp instance(version,pid,...) 8 | * RPC support for invoking CLI commands 9 | 10 | -------------------------------------------------------------------------------- /vpp-common/vpp-translate-utils/src/test/resources/naming.json: -------------------------------------------------------------------------------- 1 | { 2 | "mappings": { 3 | "mapping": [ 4 | { 5 | "name": "name-1", 6 | "index": 1 7 | }, 8 | { 9 | "name": "name-2", 10 | "index": 2 11 | } 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /nat/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = NAT 2 | 3 | Support for VPP's NAT plugin: 4 | https://wiki.fd.io/view/VPP/NAT 5 | 6 | == Supported features 7 | 8 | === 1:1 NAT 9 | - Create/Read/Delete static 1:1 IPv4 (no port) mappings 10 | 11 | === Interface NAT feature 12 | - Enable/Disable NAT feature for interface -------------------------------------------------------------------------------- /packaging/rpm/hc2vpp_version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Determines hc2vpp jar version to use while building 4 | # DEB/RPM packages. 5 | 6 | DIR_NAME=$(dirname $0) 7 | VERSION=`$DIR_NAME/version` 8 | 9 | echo "${VERSION}-SNAPSHOT" 10 | # echo "${VERSION}-RC1" 11 | # echo "${VERSION}-RC2" 12 | # echo "${VERSION}" 13 | -------------------------------------------------------------------------------- /csit-test-branch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo master 3 | 4 | # Determines which CSIT branch to use for integration testing 5 | # (see hc2vpp job definition in the jjb/hc2vpp dir of ci-management project). 6 | # Should be 'master' for hc2vpp master. 7 | # After CSIT branch cut, it should be set to 'rls1801' for hc2vpp stable/1801, etc. 8 | -------------------------------------------------------------------------------- /examples/docker/remove_hc2vpp_containers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ids=$(docker ps -aq --filter ancestor=hc2vpp) 4 | 5 | # Stop all hc2vpp based containers 6 | echo "Stopping containers: $ids" 7 | docker stop $ids 8 | 9 | # Delete all hc2vpp based containers 10 | echo "Removing containers: $ids" 11 | docker rm $ids 12 | -------------------------------------------------------------------------------- /ipsec/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = ipsec-aggregator 2 | 3 | This is a Honeycomb plugin providing mapping code between HC and IpSec Plugin APIs. 4 | 5 | == Usage 6 | 7 | Refer to Ipsec_postman_collection.json for sample requests and the wiki page for additional info: 8 | 9 | https://wiki.fd.io/view/VPP/IPSec_and_IKEv2 10 | -------------------------------------------------------------------------------- /packaging/rpm/vpp_dependencies: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # defines vpp and vpp-plugins dependencies for rpm packages 3 | # using range 4 | echo "vpp >= 19.08, vpp < 19.09, vpp-plugins >= 19.08, vpp-plugins < 19.09, vpp-api-java >= 19.08, vpp-api-java < 19.09" 5 | # or specific vpp version 6 | #echo "vpp = 19.08-rc1, vpp-plugins = 19.08-rc1" 7 | -------------------------------------------------------------------------------- /fib-management/fib-management-impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = fib-management-impl 2 | 3 | # Supported Features 4 | 5 | FIB management plugin allows to create Ipv4/6 based FIB tables. 6 | 7 | Provides readers and writers to read or write FIB configuration to VPP. + 8 | Uses vpp-fib-management yang model (see fib-management-api for details). 9 | -------------------------------------------------------------------------------- /nat/nat2vpp/src/test/resources/nat44/static-mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "mapping-table" : { 3 | "mapping-entry": { 4 | "index": 22, 5 | "type": "static", 6 | "transport-protocol": 17, 7 | "internal-src-address": "192.168.1.87/32", 8 | "external-src-address": "45.1.5.7/32" 9 | } 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /packaging/deb/bionic/debuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | DIR=$(dirname $0) 4 | DIR=$(readlink -f ${DIR}) 5 | 6 | BUILD_FOLDER=$(${DIR}/prepare.sh ${DIR} ${DIR}/../trusty/debian honeycomb.service /lib/systemd/system ${DIR}/build_dependencies) 7 | cp -r ${DIR}/debian/* ${BUILD_FOLDER}/debian/ 8 | ${DIR}/../common/debuild.sh ${BUILD_FOLDER} 9 | -------------------------------------------------------------------------------- /fib-management/fib-management-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = fib-management-api 2 | 3 | Provides vpp-fib-table-management model to store configuration of FIB tables: 4 | 5 | - supports IPv4 and IPv6 Fib table configuration 6 | - uses AddressFamily to distinguish between IPv4 and IPv6 FIB table type 7 | - uses vni-reference type to store FIB table id 8 | -------------------------------------------------------------------------------- /packaging/deb/xenial/debuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | DIR=$(dirname $0) 4 | DIR=$(readlink -f ${DIR}) 5 | 6 | BUILD_FOLDER=$(${DIR}/../common/prepare.sh ${DIR} ${DIR}/../trusty/debian honeycomb.service /lib/systemd/system ${DIR}/build_dependencies) 7 | cp -r ${DIR}/debian/* ${BUILD_FOLDER}/debian/ 8 | ${DIR}/../common/debuild.sh ${BUILD_FOLDER} -------------------------------------------------------------------------------- /examples/docker/SRv6_5-node/watch_int_vpp.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | vpp_node=$1 4 | packet_count=$2 5 | 6 | if [ -z "$1" ]; then 7 | echo "VPP node argument missing!" 8 | echo "Usage:" 9 | echo -e "\n'$0 ' to run this command!\n" 10 | exit 1 11 | fi 12 | 13 | watch -d -n 1 sudo docker exec ${vpp_node} vppctl sh int 14 | -------------------------------------------------------------------------------- /interface-role/impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = impl 2 | 3 | Add support for configuration of following interface roles: 4 | 5 | * virtual-domain-interface(Tenant network interface) 6 | 7 | 8 | * public-interface(Public interface for external access) 9 | 10 | 11 | Data stored in configuration storage only. 12 | Does not support operational read. -------------------------------------------------------------------------------- /nat/nat2vpp/src/test/resources/nat44/external-ip-pool.json: -------------------------------------------------------------------------------- 1 | { 2 | "instances": { 3 | "instance": { 4 | "id": 0, 5 | "policy": { 6 | "id": 0, 7 | "external-ip-address-pool": { 8 | "pool-id": 22, 9 | "external-ip-pool": "192.168.1.1/24" 10 | } 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /routing/routing-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = routing-api 2 | 3 | Contains 4 models 4 | 5 | - *ietf-routing* - Common model for routing 6 | - *ietf-ipv4-unicast-routing* - Ipv4 address family specific routing 7 | - *ietf-ipv6-unicast-routing* - Ipv6 address family specific routing 8 | - *vpp-routing* - Vpp specific attributes necessary to map routes 9 | -------------------------------------------------------------------------------- /nat/nat2vpp/src/test/resources/nat44/static-mapping-address-update.json: -------------------------------------------------------------------------------- 1 | { 2 | "mapping-table" : { 3 | "mapping-entry": { 4 | "index": 22, 5 | "type": "static", 6 | "transport-protocol": 17, 7 | "internal-src-address": "192.168.1.86/32", 8 | "external-src-address": "45.1.5.6/32" 9 | } 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /nat/nat2vpp/src/test/resources/nat44/static-mapping-unsupported-proto.json: -------------------------------------------------------------------------------- 1 | { 2 | "mapping-table" : { 3 | "mapping-entry": { 4 | "index": 22, 5 | "type": "static", 6 | "transport-protocol": 123, 7 | "internal-src-address": "192.168.1.87/32", 8 | "external-src-address": "45.1.5.7/32" 9 | } 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/acl/ipv4/ipv4-acl.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "ipv4-acl-type", 7 | "aces": { 8 | "ace": [ 9 | { 10 | "name": "rule1" 11 | } 12 | ] 13 | } 14 | } 15 | ] 16 | } 17 | } -------------------------------------------------------------------------------- /jvpp-version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo 'RELEASE' 3 | 4 | # Determines which JVPP version to use in hc2vpp-integration job. 5 | # 'RELEASE' will use the latest JVPP in the respective branch. 6 | # Alternatively use a specific JVPP version. 7 | # Do not include the suffix ('_amd64', '.x86_64'), it will be appended. 8 | # Examples: '19.04-release', '19.04-rc0~11-gd9599f0~b8', ... 9 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/tablehop/tableHopRouteWithoutClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "secondary-vrf": 0 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /vpp-version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo 'RELEASE' 3 | 4 | # Determines which VPP version to use in hc2vpp-integration job. 5 | # 'RELEASE' will use the latest VPP in the respective branch. 6 | # Alternatively use a specific VPP version. 7 | # Do not include the suffix ('_amd64', '.x86_64'), it will be appended. 8 | # Examples: '17.04-release', '17.07-rc0~151-g6bc8c64~b2254', ... 9 | -------------------------------------------------------------------------------- /examples/docker/bgp_demo/run_terminals.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Opens connections to hc2vpp containers 4 | 5 | xfce4-terminal --title=vpp1 --command="docker exec -it vpp1 \ 6 | bash -c '/hc2vpp/bgp_demo/init/init.sh 1; exec $SHELL'" 7 | 8 | xfce4-terminal --title=vpp2 --command="docker exec -it vpp2 \ 9 | bash -c '/hc2vpp/bgp_demo/init/init.sh 2; exec $SHELL'" 10 | -------------------------------------------------------------------------------- /nat/nat2vpp/src/test/resources/nat64/static-mapping-unsupported-proto.json: -------------------------------------------------------------------------------- 1 | { 2 | "mapping-table" : { 3 | "mapping-entry": { 4 | "index": 58, 5 | "type": "static", 6 | "transport-protocol": 123, 7 | "internal-src-address": "2001:db8:85a3::8a2e:370:7333/128", 8 | "external-src-address": "10.1.1.3/32" 9 | } 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /packaging/deb/common/vpp_dependencies: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # defines vpp and vpp-plugin-core dependencies for debian packages 3 | # using range 4 | echo "vpp (>= 19.08), vpp (<< 19.09), vpp-plugin-core (>= 19.08), vpp-plugin-core (<< 19.09), vpp-api-java (>= 19.08), vpp-api-java (<< 19.09)" 5 | # or specific vpp version 6 | #echo "vpp (= 19.08-rc1), vpp-plugin-core (= 19.08-rc1)" 7 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteReceive.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "special-next-hop-enum": "receive" 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteBlackhole.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "special-next-hop-enum": "blackhole" 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteProhibited.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "special-next-hop-enum": "prohibit" 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/specialhop/specialHopRouteUnreachable.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "special-next-hop-enum": "unreachable" 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ra/complexPrefix.json: -------------------------------------------------------------------------------- 1 | { 2 | "prefix-list": { 3 | "prefix": [ 4 | { 5 | "prefix-spec": "2001:0db8:0a0b:12f0:0000:0000:0000:0002/64", 6 | "autonomous-flag": "false", 7 | "vpp-routing-ra:advertise-router-address" : "false", 8 | "valid-lifetime" : "0xffffffff" 9 | } 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .classpath 3 | .project 4 | .settings 5 | target 6 | *.iml 7 | .idea 8 | bin 9 | xtend-gen 10 | yang-gen-config 11 | yang-gen-sal 12 | target 13 | .DS_Store 14 | META-INF 15 | maven-metadata-local.xml 16 | *.log 17 | .asciidoctor/ 18 | **/asciidoc/*.png 19 | **/asciidoc/*.png.cache 20 | # usused builders generated by yangtools 21 | **/org/opendaylight/yang/gen/v1/ 22 | -------------------------------------------------------------------------------- /examples/ncclient/acl/config_invalid_acl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | acl0 5 | x:ipv4-acl 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ioam/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = ioam 2 | 3 | This is a Honeycomb plugin providing mapping code between HC and iOAM Plugin APIs. 4 | 5 | == Usage 6 | 7 | Refer to ioam_postman_collection.json for sample requests. 8 | 9 | In order to make HC iOAM plugin work, need to start vpp and load ioam plugin first. 10 | 11 | At this point in time, iOAM trace plugin configurations are supported. 12 | -------------------------------------------------------------------------------- /nat/nat2vpp/src/test/resources/nat64/external-ip-pool.json: -------------------------------------------------------------------------------- 1 | { 2 | "instances": { 3 | "instance": { 4 | "id": 0, 5 | "policy": { 6 | "id": 0, 7 | "external-ip-address-pool": { 8 | "pool-id": 22, 9 | "external-ip-pool": "192.168.1.1/24", 10 | "vpp-nat:pool-type": "nat64" 11 | } 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/tablehop/tableHopRouteWithoutClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "secondary-vrf": 0 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /it/api-test/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = api-test 2 | 3 | Overview of api-test 4 | 5 | == LeafRefContextTest 6 | 7 | Provides test whether LeafRefContext is constructable from standard 8 | set of modules consisting of following modules models 9 | 10 | * v3po 11 | * lisp 12 | * routing 13 | * dhcp 14 | * nat 15 | * acl 16 | * nsh 17 | * iaom 18 | * l3 19 | * management 20 | * vpp-classifier 21 | 22 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteBlackhole.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "special-next-hop-enum": "blackhole" 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteProhibited.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "special-next-hop-enum": "prohibit" 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteReceive.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "special-next-hop-enum": "receive" 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/specialhop/specialHopRouteUnreachable.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "special-next-hop-enum": "unreachable" 9 | } 10 | } 11 | ] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/docker/mpls_demo/init/vpp3.cmd: -------------------------------------------------------------------------------- 1 | create host-interface name veth31 2 | set int state host-veth31 up 3 | set int ip address host-veth31 10.13.1.3/24 4 | 5 | create host-interface name veth341 6 | set int state host-veth341 up 7 | set int ip address host-veth341 10.34.1.3/24 8 | 9 | create host-interface name veth342 10 | set int state host-veth342 up 11 | set int ip address host-veth342 10.34.2.3/24 12 | -------------------------------------------------------------------------------- /examples/docker/mpls_demo/init/vpp4.cmd: -------------------------------------------------------------------------------- 1 | create host-interface name veth42 2 | set int state host-veth42 up 3 | set int ip address host-veth42 10.24.1.4/24 4 | 5 | create host-interface name veth431 6 | set int state host-veth431 up 7 | set int ip address host-veth431 10.34.1.4/24 8 | 9 | create host-interface name veth432 10 | set int state host-veth432 up 11 | set int ip address host-veth432 10.34.2.4/24 12 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ra/simpleRa.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "interface": [ 4 | { 5 | "name": "eth0", 6 | "ietf-ip:ipv6": { 7 | "hc2vpp-ietf-ipv6-unicast-routing:ipv6-router-advertisements": { 8 | "send-advertisements": "true", 9 | "managed-flag": "true" 10 | } 11 | } 12 | } 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteNoRouteAttrs.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "next-hop-address" : "192.168.2.2", 9 | "outgoing-interface": "iface" 10 | } 11 | } 12 | ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vpp-classifier/impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-classifier-impl 2 | 3 | Overview of vpp-classifier-impl 4 | 5 | == Modules 6 | * VppClassifierModule - Defines logic to manipulate classifier tables 7 | * VppClassifierAclModule - Defines utilities to work with classifier acl's 8 | * InterfaceClassifierAclModule - Enables classifier acl's on interfaces 9 | * SubInterfaceClassifierAclModule - Enables classifier acl's on sub-interfaces -------------------------------------------------------------------------------- /dhcp/dhcp-impl/src/test/resources/relay/ipv6DhcpRelayAfter.json: -------------------------------------------------------------------------------- 1 | { 2 | "relays": { 3 | "relay": [ 4 | { 5 | "address-family": "vpp-fib-table-management:ipv6", 6 | "rx-vrf-id": 1, 7 | "gateway-address": "2001::2", 8 | "server" : [ 9 | { 10 | "vrf-id": 2, 11 | "address": "2001::10" 12 | } 13 | ] 14 | } 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vpp-management/impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = vpp-management-impl 2 | 3 | Overview of vpp-management-impl 4 | 5 | Provides following features 6 | 7 | * Read support for VPP management attributes 8 | * Implementation of RPC support of CLI commands 9 | * Initialization of Keep-alive service 10 | 11 | Exposes following configuration 12 | 13 | *vpp-management.json* 14 | 15 | * keepalive-delay - delay period for keep-alive manager -------------------------------------------------------------------------------- /packaging/rpm/release: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Snapshot version (do not use on stable branch) 4 | # 5 | # 6 | echo $(expr $BUILD_NUMBER + 0) 7 | # 8 | # Stable versions 9 | # 10 | # echo RC1~$BUILD_NUMBER 11 | # echo RC1 12 | # echo RC2~$BUILD_NUMBER 13 | # echo RC2 14 | # 15 | # Release snapshot (1.19.08~XXX, 1.19.08.1~XXX, ...) 16 | # echo RELEASE~$BUILD_NUMBER 17 | # 18 | # Release version (1.19.08, 1.19.08.1, ...) 19 | # echo RELEASE -------------------------------------------------------------------------------- /nat/nat-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = nat-api 2 | 3 | The APIs are based on ietf-nat YANG model draft: 4 | https://tools.ietf.org/html/draft-sivakumar-yang-nat-05 5 | 6 | == Notes on model 7 | * Nat-instances map to VRF in VPP (nat-instance/id mapps to VRF-ID) 8 | 9 | == Deviations 10 | * nat-state/nat-instances/nat-instance/id type changed to uint32 from int32 11 | * "mandatory true" statements commented to support partial model implementation 12 | -------------------------------------------------------------------------------- /examples/docker/mpls_demo/init/vpp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Starts and initializes vpp. 4 | # Then starts honeycomb 5 | # 6 | # $1 - node name 7 | # 8 | 9 | /hc2vpp/vpp/start.sh 10 | echo "Waiting for vpp to start" 11 | sleep 5 12 | 13 | # Configure veth interfaces 14 | # (not yet fully supported by honeycomb) 15 | echo "Configuring vpp" 16 | vppctl exec /hc2vpp/mpls_demo/init/$1.cmd 17 | 18 | echo "Starting honeycomb" 19 | /hc2vpp/honeycomb/start.sh 20 | -------------------------------------------------------------------------------- /examples/docker/test/show_interfaces_state.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Obtain IP of the container 4 | # $1 - container name 5 | ip=$(/hc2vpp/test/docker_ip.sh $1) 6 | url="https://$ip:8445/restconf/operational/ietf-interfaces:interfaces/" 7 | echo "GET $url" 8 | 9 | # Show interfaces 10 | curl --insecure -X GET $url \ 11 | -H 'authorization: Basic YWRtaW46YWRtaW4=' \ 12 | -H 'cache-control: no-cache' \ 13 | -H 'content-type: application/json' 14 | 15 | echo 16 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/tablehop/tableHopRouteWithClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "secondary-vrf": 0 9 | }, 10 | "vpp-ipv4-route" : { 11 | "classify-table": "classify-table-one" 12 | } 13 | } 14 | ] 15 | } 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /dhcp/dhcp-impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = dhcp-impl 2 | 3 | Provides translation layer for YANG models defined in dhcp-api 4 | 5 | == DHCP Relay 6 | DHCP Relay configuration CUD requests are mapped to dhcp_proxy_config_2 message: 7 | https://git.fd.io/vpp/tree/src/vnet/dhcp/dhcp.api#n48 8 | 9 | Operational read is not supported (missing VPP binary api for read). 10 | 11 | Examples of request can be found in: 12 | https://git.fd.io/cgit/hc2vpp/tree/dhcp/dhcp_postman_collection.json -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutRouteAttrs.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "next-hop-address" : "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 9 | "outgoing-interface": "iface" 10 | } 11 | } 12 | ] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithoutClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "next-hop-address" : "192.168.2.2", 9 | "outgoing-interface": "iface" 10 | }, 11 | "vpp-v4ur:vpp-ipv4-route": { 12 | } 13 | } 14 | ] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packaging/rpm/rpmbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -xe 3 | DIR=$(dirname $0) 4 | DIR=$(readlink -f $DIR) 5 | HC2VPP_VERSION=$(${DIR}/hc2vpp_version) 6 | ZIPDIR=${DIR}/../../vpp-integration/minimal-distribution/target/ 7 | ZIPFILE=${ZIPDIR}/vpp-integration-distribution-${HC2VPP_VERSION}-hc.zip 8 | mkdir -p ${DIR}/SOURCES/ 9 | cp $ZIPFILE ${DIR}/SOURCES/ 10 | cp ${DIR}/honeycomb.spec ${DIR}/SOURCES/ 11 | cd ${DIR} 12 | rpmbuild -bb --define "_topdir ${DIR}" ${DIR}/honeycomb.spec 13 | cd - 14 | 15 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/tablehop/tableHopRouteWithClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "secondary-vrf": 0 9 | }, 10 | "vpp-ipv6-route" : { 11 | "classify-table": "classify-table-one" 12 | } 13 | } 14 | ] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/tablehop/tableHopRouteWithClassifier2.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "secondary-vrf": 0 9 | }, 10 | "vpp-ipv6-route" : { 11 | "classify-table": "classify-table-0" 12 | } 13 | } 14 | ] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/docker/Readme.txt: -------------------------------------------------------------------------------- 1 | HC2VPP Docker image building&testing instructions 2 | --------------------------------------------------- 3 | 4 | 1) Copy vpp and hc2vpp packages to docker/packages dir 5 | 6 | 2) Build hc2vpp image 7 | ./create_image.sh 8 | 9 | 3) Create & start container 10 | ./start_hc2vpp_container.sh vpp1 11 | 12 | 4) Start vpp & honeycomb 13 | docker exec -it vpp1 bash 14 | ./vpp/start.sh 15 | ./honeycomb/start.sh 16 | 17 | 5) Test 18 | ./test/show_interfaces_state.sh vpp1 19 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/acl/standard/interface-ref-acl-udp.json: -------------------------------------------------------------------------------- 1 | { 2 | "attachment-points": { 3 | "interface": [ 4 | { 5 | "interface-id": "eth2", 6 | "ingress": { 7 | "acl-sets": { 8 | "acl-set": [ 9 | { 10 | "name": "standard-acl" 11 | }, 12 | { 13 | "name": "acl4" 14 | } 15 | ] 16 | } 17 | } 18 | } 19 | ] 20 | } 21 | } -------------------------------------------------------------------------------- /nsh/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = nsh 2 | 3 | This is a Honeycomb plugin providing mapping code between HC and NSH_SFC Plugin APIs. 4 | 5 | == Usage 6 | 7 | Refer to nsh_postman_collection.json for sample requests. All capabilities of NSH_SFC are demo-ed there. 8 | 9 | In order to make HC NSH plugin work, need to start vpp and load nsh_sfc plugin first. 10 | 11 | Please follow the right order to support NSH_SFC feature: 12 | (1). Creates vxlan-gpe interface. 13 | (2). Creates nsh-entry. 14 | (3). Creates nsh-map. -------------------------------------------------------------------------------- /nat/nat2vpp/src/test/resources/nat64/static-mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "mapping-table" : { 3 | "mapping-entry": { 4 | "index": 58, 5 | "type": "static", 6 | "transport-protocol": 58, 7 | "internal-src-address": "2001:db8:85a3::8a2e:370:7333/128", 8 | "internal-src-port": { 9 | "start-port-number": 123 10 | }, 11 | "external-src-address": "10.1.1.3/32", 12 | "external-src-port": { 13 | "start-port-number": 456 14 | } 15 | } 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /dhcp/dhcp-impl/src/test/resources/relay/ipv4DhcpRelay.json: -------------------------------------------------------------------------------- 1 | { 2 | "relays": { 3 | "relay": [ 4 | { 5 | "address-family": "vpp-fib-table-management:ipv4", 6 | "rx-vrf-id": 0, 7 | "gateway-address": "5.6.7.8", 8 | "server" : [ 9 | { 10 | "vrf-id": 0, 11 | "address": "1.2.3.4" 12 | }, 13 | { 14 | "vrf-id": 0, 15 | "address": "1.2.3.5" 16 | } 17 | ] 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /nat/nat2vpp/src/test/resources/nat64/static-mapping-address-update.json: -------------------------------------------------------------------------------- 1 | { 2 | "mapping-table" : { 3 | "mapping-entry": { 4 | "index": 58, 5 | "type": "static", 6 | "transport-protocol": 58, 7 | "internal-src-address": "2001:db8:85a3::8a2e:370:7334/128", 8 | "external-src-address": "10.1.1.4/32", 9 | "internal-src-port" : { 10 | "start-port-number" : 1234 11 | }, 12 | "external-src-port" : { 13 | "start-port-number" : 5678 14 | } 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /dhcp/dhcp-impl/src/test/resources/relay/ipv6DhcpRelayBefore.json: -------------------------------------------------------------------------------- 1 | { 2 | "relays": { 3 | "relay": [ 4 | { 5 | "address-family": "vpp-fib-table-management:ipv6", 6 | "rx-vrf-id": 1, 7 | "gateway-address": "2001::2", 8 | "server" : [ 9 | { 10 | "vrf-id": 2, 11 | "address": "2001::1" 12 | }, 13 | { 14 | "vrf-id": 2, 15 | "address": "2001::10" 16 | } 17 | ] 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/simplehop/simpleHopRouteWithClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "next-hop-address" : "192.168.2.2", 9 | "outgoing-interface": "iface" 10 | }, 11 | "vpp-ipv4-route" : { 12 | "classify-table": "classify-table-one" 13 | } 14 | } 15 | ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithoutClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "next-hop-address" : "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 9 | "outgoing-interface": "iface" 10 | }, 11 | "vpp-v6ur:vpp-ipv6-route": { 12 | } 13 | } 14 | ] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vpp-common/vpp-translate-test/src/main/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %date{"yyyy-MM-dd HH:mm:ss.SSS z"} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /scripts/bump_version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Replaces version string in all files from the Git index 4 | # Usage: 5 | # ./bump_version.sh 1.2.3-SNAPSHOT 1.2.3-RC1 6 | 7 | if [ "$#" -ne 2 ]; then 8 | echo "Usage: ./bump_version.sh OLD_VERSION NEW_VERSION" 9 | exit 1 10 | fi 11 | 12 | OLD_VERSION=$1 13 | NEW_VERSION=$2 14 | BUMP_SCRIPT_FILENAME=$(basename "$0") 15 | GIT_ROOT=$(git rev-parse --show-toplevel) 16 | 17 | cd $GIT_ROOT 18 | 19 | for i in $(git ls-files); do 20 | sed -i "s/${OLD_VERSION}/${NEW_VERSION}/g" $i 21 | done 22 | 23 | cd - 24 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRoute128.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/128", 7 | "next-hop": { 8 | "next-hop-address" : "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 9 | "outgoing-interface": "iface" 10 | }, 11 | "vpp-ipv6-route" : { 12 | "classify-table": "classify-table-one" 13 | } 14 | } 15 | ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/spdEntries/addDelSpd_after.json: -------------------------------------------------------------------------------- 1 | { 2 | "ipsec" : { 3 | "spd": [ 4 | { 5 | "spd-entries": [ 6 | { 7 | "name": "TestSPDEntryUpdate", 8 | "priority":80, 9 | "direction":"inbound", 10 | "operation":"bypass", 11 | "laddr-start":"2001::1", 12 | "laddr-stop":"2001::100", 13 | "raddr-start":"2001::101", 14 | "raddr-stop":"2001::200" 15 | } 16 | ], 17 | "spd-id": 10 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/simplehop/simpleHopRouteWithClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "next-hop-address" : "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 9 | "outgoing-interface": "iface" 10 | }, 11 | "vpp-ipv6-route" : { 12 | "classify-table": "classify-table-one" 13 | } 14 | } 15 | ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /dhcp/dhcp-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = dhcp-api 2 | 3 | Provides YANG model that defines DHCP configuration for VPP. 4 | 5 | Currently only DHCP relay configuration is supported. 6 | 7 | Operational data model is not supported 8 | (there is no binary API for reading DHCP configuration). 9 | 10 | == Notes on model 11 | * DHCP relay configuration is based on dhcp_proxy_config_2 message API: 12 | https://git.fd.io/vpp/tree/src/vnet/dhcp/dhcp.api#n48 13 | * More info regarding functionality provided by VPP can be found 14 | at https://docs.fd.io/vpp/17.07/clicmd_src_vnet_dhcp.html#clicmd_set_dhcp_proxy 15 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/spdEntries/addDelSpd_before.json: -------------------------------------------------------------------------------- 1 | { 2 | "ipsec" : { 3 | "spd": [ 4 | { 5 | "spd-entries": [ 6 | { 7 | "name": "TestSPDEntryUpdate", 8 | "priority":100, 9 | "direction":"outbound", 10 | "operation":"discard", 11 | "laddr-start":"192.168.124.0", 12 | "laddr-stop":"192.168.124.255", 13 | "raddr-start":"192.168.125.0", 14 | "raddr-stop":"192.168.125.255" 15 | } 16 | ], 17 | "spd-id": 10 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/gpe/gpe-fwd-entry-without-action.json: -------------------------------------------------------------------------------- 1 | { 2 | "gpe-entry-table": { 3 | "gpe-entry": { 4 | "id": "gpe-fwd-entry-1", 5 | "dp-table": 10, 6 | "vni": 12, 7 | "local-eid": { 8 | "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", 9 | "virtual-network-id": 12, 10 | "ipv4-prefix": "192.168.2.0/24" 11 | }, 12 | "remote-eid": { 13 | "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", 14 | "virtual-network-id": 12, 15 | "ipv4-prefix": "192.168.3.0/16" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/rules/no-protocol-rule.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "aces": { 8 | "ace": [ 9 | { 10 | "name": "no-protocol-rule", 11 | "matches": { 12 | "ipv4": { 13 | "source-ipv4-network": "192.168.2.2/32", 14 | "destination-ipv4-network": "192.168.2.1/32" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /examples/docker/SRv6_5-node/clean_demo.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [[ $UID != 0 ]]; then 4 | echo "Please run this script with sudo:" 5 | echo "sudo $0 $*" 6 | exit 1 7 | fi 8 | 9 | echo "Stopping docker containers:" 10 | sudo docker stop vppA 11 | sudo docker stop vppB 12 | sudo docker stop vppC 13 | sudo docker stop vppD 14 | sudo docker stop vppE 15 | echo "Deleting docker containers:" 16 | sudo docker rm vppA 17 | sudo docker rm vppB 18 | sudo docker rm vppC 19 | sudo docker rm vppD 20 | sudo docker rm vppE 21 | 22 | echo "Cleaning namespaces." 23 | sudo ip -all netns delete 24 | 25 | echo "Cleanup finished." 26 | -------------------------------------------------------------------------------- /examples/docker/bgp_demo/build_topology.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../utils.sh 3 | 4 | if [[ $UID != 0 ]]; then 5 | echo "Please run this script with sudo:" 6 | echo "sudo $0 $*" 7 | exit 1 8 | fi 9 | 10 | # Cleanup 11 | ../remove_hc2vpp_containers.sh 12 | 13 | # Create directory for storing network namespaces 14 | mkdir -p /var/run/netns 15 | 16 | # Build topology 17 | # 18 | # vpp1 – vpp2 19 | # 20 | create_container vpp1 hc2vpp 21 | create_container vpp2 hc2vpp 22 | 23 | start_container vpp1 24 | start_container vpp2 25 | 26 | # Connect containers using veth interfaces 27 | create_link vpp1 veth12 veth21 vpp2 28 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ra/complexRa.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "interface": [ 4 | { 5 | "name": "eth0", 6 | "ipv6" :{ 7 | "ipv6-router-advertisements": { 8 | "send-advertisements": "true", 9 | "min-rtr-adv-interval": "20", 10 | "max-rtr-adv-interval": "100", 11 | "default-lifetime": "601", 12 | "vpp-routing-ra:suppress-link-layer": "false", 13 | "vpp-routing-ra:initial-count": "2", 14 | "vpp-routing-ra:initial-interval": "15" 15 | } 16 | } 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /jvpp/common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Installs jvpp jar to local maven repository. 4 | # 5 | # $1 - jvpp jar file path 6 | # $1 - target artifact version 7 | # 8 | function install_jvpp_jar { 9 | jarfile=$1 10 | version=$2 11 | 12 | # Filename (includes version suffix), e.g. jvpp-core-19.08 13 | basefile=$(basename -s .jar "$jarfile") 14 | 15 | # Remove version suffix 16 | artifactId=$(echo "$basefile" | rev | cut -d '-' -f 2- | rev) 17 | 18 | mvn install:install-file \ 19 | -Dfile=$jarfile \ 20 | -DgroupId=io.fd.jvpp \ 21 | -DartifactId=$artifactId \ 22 | -Dversion=$version \ 23 | -Dpackaging=jar 24 | } 25 | -------------------------------------------------------------------------------- /examples/docker/mpls_demo/run_terminals.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Opens connections to hc2vpp containers 4 | 5 | xfce4-terminal --title=vpp1 --command="docker exec -it vpp1 \ 6 | bash -c '/hc2vpp/mpls_demo/init/vpp.sh vpp1; exec $SHELL'" 7 | 8 | xfce4-terminal --title=vpp2 --command="docker exec -it vpp2 \ 9 | bash -c '/hc2vpp/mpls_demo/init/vpp.sh vpp2; exec $SHELL'" 10 | 11 | xfce4-terminal --title=vpp3 --command="docker exec -it vpp3 \ 12 | bash -c '/hc2vpp/mpls_demo/init/vpp.sh vpp3; exec $SHELL'" 13 | 14 | xfce4-terminal --title=vpp4 --command="docker exec -it vpp4 \ 15 | bash -c '/hc2vpp/mpls_demo/init/vpp.sh vpp4; exec $SHELL'" 16 | -------------------------------------------------------------------------------- /release-notes/src/main/asciidoc/devel_guide/devel_guide.adoc: -------------------------------------------------------------------------------- 1 | == Devel guide 2 | 3 | Hc2vpp plugin development guide. 4 | 5 | === Tutorials 6 | * link:devel_plugin_vpp_tutorial.html[How to write Honeycomb plugins for VPP] 7 | * for general tutorials on building Honeycomb agents, see https://docs.fd.io/honeycomb/{project-version}/release-notes-aggregator/release_notes.html#_tutorials[Honeycomb tutorials] 8 | 9 | === Samples 10 | * {project-git-web}/samples?h={project-branch}[Vxlan management sample from Hc2vpp] 11 | ** Generic(non-VPP) plugin with a custom distribution containing lots of useful information about Honeycomb and its plugins. 12 | 13 | -------------------------------------------------------------------------------- /vpp-integration/api-docs/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = docs-api 2 | 3 | Defines general api for VPP binary api coverage 4 | 5 | == Elements 6 | 7 | * PluginCoverage - Contains coverage data for single JVPP plugin, including supported 8 | VPP binary equivalents in JVpp, what Yang nodes are bind to such api and what operations are 9 | supported 10 | * VppApiMessage - Reference to single VPP binary api with link to its documentation 11 | * JavaApiMessage - Reference to JVpp equivalent of VPP binary api 12 | * YangType - Reference to single Yang type with link to its model 13 | * Operation - reference to single CRUD operation with link to binding class -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/gpe/gpe-fwd-entry-without-locators.json: -------------------------------------------------------------------------------- 1 | { 2 | "gpe-entry-table": { 3 | "gpe-entry": { 4 | "id": "gpe-fwd-entry-1", 5 | "dp-table": 10, 6 | "vni": 12, 7 | "local-eid": { 8 | "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", 9 | "virtual-network-id": 12, 10 | "ipv4-prefix": "192.168.2.0/24" 11 | }, 12 | "remote-eid": { 13 | "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", 14 | "virtual-network-id": 12, 15 | "ipv4-prefix": "192.168.3.0/16" 16 | }, 17 | "action": "natively-forward" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /examples/docker/SRv6_5-node/restart_demo.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | if [[ $UID != 0 ]]; then 4 | echo "Please run this script with sudo:" 5 | echo "sudo $0 $*" 6 | exit 1 7 | fi 8 | 9 | if [ -z "$1" ]; then 10 | echo "Demo type argument missing!" 11 | echo "Usage:" 12 | echo -e "\n'$0 ' to run this command!\n" 13 | echo " - vpp or hc" 14 | exit 2 15 | fi 16 | 17 | demo_type=$1 18 | 19 | if [[ "$demo_type" != "vpp" && "$demo_type" != "hc" ]]; then 20 | echo "Demo type argument is wrong!" 21 | echo " - vpp or hc" 22 | exit 3 23 | fi 24 | 25 | ./clean_demo.sh 26 | sleep 5 27 | ./start_demo.sh ${demo_type} 28 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/sadEntries/addDelSadEntry_Ipv6_after.json: -------------------------------------------------------------------------------- 1 | { 2 | "sad": { 3 | "sad-entries": [ 4 | { 5 | "spi": 1002, 6 | "direction": "inbound", 7 | "sa-id": 10, 8 | "security-protocol": "ah", 9 | "sa-mode": "transport", 10 | "ah": { 11 | "hmac-md5-96": { 12 | "key-str": "0123456789012346" 13 | } 14 | }, 15 | "source-address": { 16 | "ipv6-address": "2001::11" 17 | }, 18 | "destination-address": { 19 | "ipv6-address": "2001::12" 20 | }, 21 | "anti-replay-window": 32 22 | } 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /srv6/srv6-api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = srv6-api 2 | 3 | SRv6 API consists of models obtained 4 | from https://datatracker.ietf.org/doc/draft-raza-spring-srv6-yang/[draft-raza-spring-srv6-yang]: 5 | 6 | - `hc2vpp-ietf-srv6-base@2018-03-01.yang` 7 | - `hc2vpp-ietf-srv6-static@2018-03-01.yang` 8 | - `ietf-srv6-types@2018-03-01.yang` 9 | 10 | Models *hc2vpp-ietf-srv6-base* and *hc2vpp-ietf-srv6-static* 11 | are changed (https://jira.fd.io/browse/HC2VPP-332[HC2VPP-332]): 12 | 13 | - imports for routing models (https://jira.fd.io/browse/HC2VPP-298[HC2VPP-298]) 14 | - presence in end function containers was added to fix 15 | mandatory child verification if parent container is not present 16 | -------------------------------------------------------------------------------- /mpls/api/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = mpls-api 2 | 3 | == IETF models 4 | 5 | Hc2vpp implementation of MPLS uses following ietf models: 6 | - ietf-mpls 7 | - ietf-mpls-static 8 | - ietf-routing-types 9 | 10 | Models were modified due to YANGTOOLS/MDSAL issues 11 | and some problems with the models itself. 12 | More information can be found in yang files. 13 | 14 | Original YANG files were downloaded from 15 | 16 | https://github.com/ietf-mpls-yang/te/ 17 | 18 | == VPP specific options 19 | 20 | VPP allows to perform lookup in ipv4 or ipv6 or mpls table. 21 | Lookup table for pop-and-lookup operation can be specified 22 | using static-lsp-vpp-lookup-augmentation 23 | provided by vpp-mpls yang module. -------------------------------------------------------------------------------- /examples/docker/SRv6_5-node/pcap_vpp.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | vpp_node=$1 4 | packet_count=$2 5 | 6 | if [ -z "$1" ]; then 7 | echo "VPP node argument missing!" 8 | echo "Usage:" 9 | echo -e "\n'$0 ' to run this command!\n" 10 | exit 1 11 | fi 12 | 13 | if [ -z "$2" ]; then 14 | echo "Packet count argument missing!" 15 | echo "Usage:" 16 | echo -e "\n'$0 ' to run this command!\n" 17 | exit 1 18 | fi 19 | 20 | sudo docker exec ${vpp_node} vppctl clear trace 21 | sudo docker exec ${vpp_node} vppctl trace add af-packet-input ${packet_count} 22 | sleep ${packet_count} 23 | sudo docker exec ${vpp_node} vppctl show trace 24 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/ikev2/addIkev2Profile.json: -------------------------------------------------------------------------------- 1 | { 2 | "ikev2": { 3 | "policy": [ 4 | { 5 | "name": "testPolicy", 6 | "lifetime": 0, 7 | "connection-type": "both", 8 | "authentication" : { 9 | "preshared-key" : "true" 10 | }, 11 | "pre-shared-key": "0123456789012345", 12 | "traffic-selectors": [ 13 | { 14 | "ts-name":"TS1", 15 | "protocol":0, 16 | "local-address-low":"192.168.124.0", 17 | "local-address-high":"192.168.124.255", 18 | "local-port-low":0, 19 | "local-port-high":65535 20 | } 21 | ] 22 | } 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/ikev2/addDelProfile_before.json: -------------------------------------------------------------------------------- 1 | { 2 | "ikev2": { 3 | "policy": [ 4 | { 5 | "name": "testPolicy", 6 | "lifetime": 0, 7 | "connection-type": "both", 8 | "authentication" : { 9 | "preshared-key" : "true" 10 | }, 11 | "pre-shared-key": "0123456789012345", 12 | "traffic-selectors": [ 13 | { 14 | "ts-name":"TS1", 15 | "protocol":0, 16 | "local-address-low":"192.168.124.0", 17 | "local-address-high":"192.168.124.255", 18 | "local-port-low":0, 19 | "local-port-high":65535 20 | } 21 | ] 22 | } 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/adjacencies-identification-context.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | 4 | "mappings": { 5 | "mapping": [ 6 | { 7 | "id": "first", 8 | "eid-identificator-pair": { 9 | "local-eid-id": "local-eid-1", 10 | "remote-eid-id": "remote-eid-1" 11 | } 12 | }, 13 | { 14 | "id": "second", 15 | "eid-identificator-pair": { 16 | "local-eid-id": "local-eid-2", 17 | "remote-eid-id": "remote-eid-2" 18 | } 19 | }, 20 | { 21 | "id": "third", 22 | "eid-identificator-pair": { 23 | "local-eid-id": "local-eid-3", 24 | "remote-eid-id": "remote-eid-3" 25 | } 26 | } 27 | ] 28 | } 29 | } -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/ikev2/addDelProfile_after.json: -------------------------------------------------------------------------------- 1 | { 2 | "ikev2": { 3 | "policy": [ 4 | { 5 | "name": "testPolicy", 6 | "lifetime": 0, 7 | "connection-type": "both", 8 | "authentication" : { 9 | "rsa-signature" : "true" 10 | }, 11 | "certificate": "/home/localadmin/certs/server-cert.pem", 12 | "traffic-selectors": [ 13 | { 14 | "ts-name":"TS1", 15 | "protocol":0, 16 | "remote-address-low":"192.168.124.0", 17 | "remote-address-high":"192.168.124.255", 18 | "remote-port-low":0, 19 | "remote-port-high":65535 20 | } 21 | ] 22 | } 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /fib-management/fib-management-impl/src/test/resources/fib.json: -------------------------------------------------------------------------------- 1 | { 2 | "fib-tables": { 3 | "vpp-fib-table-management:table": [ 4 | { 5 | "table-id": 0, 6 | "address-family": "vpp-fib-table-management:ipv4", 7 | "name": "ipv4-VRF:0" 8 | }, 9 | { 10 | "table-id": 12, 11 | "address-family": "vpp-fib-table-management:ipv4", 12 | "name": "ipv4-VRF:12" 13 | }, 14 | { 15 | "table-id": 0, 16 | "address-family": "vpp-fib-table-management:ipv6", 17 | "name": "ipv6-VRF:0" 18 | }, 19 | { 20 | "table-id": 25, 21 | "address-family": "vpp-fib-table-management:ipv6", 22 | "name": "ipv6-VRF:25" 23 | } 24 | ] 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vpp-common/vpp-translate-utils/src/test/resources/multi-mapping.json: -------------------------------------------------------------------------------- 1 | { 2 | "mappings": { 3 | "mapping": [ 4 | { 5 | "name": "parent-1", 6 | "value": [ 7 | { 8 | "index": 1, 9 | "name": "child-1" 10 | }, 11 | { 12 | "index": 2, 13 | "name": "child-2" 14 | }, 15 | { 16 | "index": 3, 17 | "name": "child-3" 18 | } 19 | ] 20 | }, 21 | { 22 | "name": "parent-2" 23 | }, 24 | { 25 | "name": "parent-3", 26 | "value": [ 27 | { 28 | "index": 1, 29 | "name": "child-1" 30 | } 31 | ] 32 | } 33 | ] 34 | } 35 | } -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/gpe/invalid/invalid-gpe-fwd-entry-no-local-eid.json: -------------------------------------------------------------------------------- 1 | { 2 | "gpe-entry-table": { 3 | "gpe-entry": { 4 | "id": "gpe-fwd-entry-1", 5 | "dp-table": 10, 6 | "vni": 12, 7 | "remote-eid": { 8 | "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", 9 | "virtual-network-id": 12, 10 | "ipv4-prefix": "192.168.3.0/16" 11 | }, 12 | "locator-pair": [ 13 | { 14 | "local-locator": "192.168.4.1", 15 | "remote-locator": "192.168.4.2", 16 | "weight": 3 17 | }, 18 | { 19 | "local-locator": "192.168.5.1", 20 | "remote-locator": "192.168.5.2", 21 | "weight": 2 22 | } 23 | ] 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /jvpp/install_from_package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Installs jvpp jars from vpp-api-java package to local maven repository. 4 | # Use before building hc2vpp to make sure it matches installed vpp. 5 | # Not needed when using honeycomb package from nexus.fd.io 6 | # (compatible vpp version is given as package dependency). 7 | 8 | DIR_NAME=$(dirname $0) 9 | source ${DIR_NAME}/common.sh 10 | 11 | # Directory used by vpp-api-java package 12 | JAR_DIR="/usr/share/java/" 13 | echo "Installing vpp-api-java package jars from $JAR_DIR" 14 | 15 | JARS=$(find "$JAR_DIR" -type f -iname 'jvpp-*.jar') 16 | echo "Found:" 17 | echo "$JARS" 18 | 19 | JVPP_VERSION=`$DIR_NAME/version` 20 | echo "Target jvpp version: $JVPP_VERSION" 21 | 22 | for i in ${JARS} 23 | do 24 | install_jvpp_jar "$i" "$JVPP_VERSION" 25 | done -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/gpe/invalid/invalid-gpe-fwd-entry-no-remote-eid.json: -------------------------------------------------------------------------------- 1 | { 2 | "gpe-entry-table": { 3 | "gpe-entry": { 4 | "id": "gpe-fwd-entry-1", 5 | "dp-table": 10, 6 | "vni": 12, 7 | "local-eid": { 8 | "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", 9 | "virtual-network-id": 12, 10 | "ipv4-prefix": "192.168.2.0/24" 11 | }, 12 | "locator-pair": [ 13 | { 14 | "local-locator": "192.168.4.1", 15 | "remote-locator": "192.168.4.2", 16 | "weight": 3 17 | }, 18 | { 19 | "local-locator": "192.168.5.1", 20 | "remote-locator": "192.168.5.2", 21 | "weight": 2 22 | } 23 | ], 24 | "action": "natively-forward" 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /examples/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | WORKDIR /hc2vpp 4 | 5 | ADD . /hc2vpp 6 | 7 | RUN apt-get update && apt-get install -y \ 8 | # Utils 9 | iproute2 iputils-ping net-tools vim-tiny jshon telnet curl \ 10 | # VPP package dependencies 11 | libnuma1 libssl1.0.0 libmbedcrypto1 libmbedtls10 libmbedx509-0 \ 12 | # Honeycomb package dependencies 13 | openjdk-8-jre-headless \ 14 | 15 | # Install packages 16 | && dpkg -i packages/vpp-lib_*.deb \ 17 | && dpkg -i packages/vpp_*.deb \ 18 | && dpkg -i packages/vpp-plugins_*.deb \ 19 | && dpkg -i packages/honeycomb_*.deb \ 20 | 21 | # Disable DPDK for PCI devices 22 | && echo "dpdk {\n no-pci\n}" >> /etc/vpp/startup.conf \ 23 | 24 | # Reduce image size 25 | && rm -rf /var/lib/apt/lists/* `# clear apt cache` \ 26 | && rm -rf packages 27 | -------------------------------------------------------------------------------- /release-notes/src/main/asciidoc/install_guide/install_from_available_archives.adoc: -------------------------------------------------------------------------------- 1 | = Installing from available archives 2 | 3 | link:release_notes.html[< Home] 4 | 5 | Hc2vpp provides zip and tar.gz archives that can be downloaded and extracted to provide Honeycomb VPP distribution. 6 | 7 | == Downloading archives 8 | In https://nexus.fd.io/#nexus-search;quick~vpp-integration-distribution[fdio's nexus] look for vpp-integration-distribution artifact with version {project-version} and download either zip or tar.gz. After extracting the archive, a folder vpp-integration-distribution-{project-version} will be created. 9 | 10 | == Running extracted distribution 11 | In the new folder, locate honeycomb executable shell script and run it. 12 | 13 | NOTE: sudo privileges are necessary with default configuration. 14 | 15 | -------------------------------------------------------------------------------- /examples/ncclient/acl/test_acl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2018 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | ${DIR_NAME}/../test_copy_config.sh ${DIR_NAME}/config_acl.xml ${DIR_NAME}/expected_config_acl.xml * 19 | -------------------------------------------------------------------------------- /examples/ncclient/bd/test_bd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2018 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | ${DIR_NAME}/../test_copy_config.sh ${DIR_NAME}/config_bd.xml ${DIR_NAME}/expected_config_bd.xml * 19 | -------------------------------------------------------------------------------- /examples/ncclient/nat/test_nat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2018 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | ${DIR_NAME}/../test_copy_config.sh ${DIR_NAME}/config_nat.xml ${DIR_NAME}/expected_config_nat.xml * 19 | -------------------------------------------------------------------------------- /examples/ncclient/interfaces/tap/test_diff_tap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | ${DIR_NAME}/../../test_diff_config.sh ${DIR_NAME}/candidate_config_tap_interface.xml 19 | -------------------------------------------------------------------------------- /examples/ncclient/interfaces/loop/test_diff_loopback.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | ${DIR_NAME}/../../test_diff_config.sh ${DIR_NAME}/candidate_config_loop_interface.xml 19 | -------------------------------------------------------------------------------- /examples/ncclient/interfaces/af-packet/test_diff_af_packet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | ${DIR_NAME}/../../test_diff_config.sh ${DIR_NAME}/candidate_config_af_packet_interface.xml 19 | -------------------------------------------------------------------------------- /release-notes/src/main/asciidoc/api_docs/api_docs_index.adoc: -------------------------------------------------------------------------------- 1 | == VPP API to Yang index 2 | 3 | // TODO - generate this file based on list of JVPP plugins used 4 | 5 | Mapping between VPP binary apis and JVpp binding in hc2vpp 6 | 7 | include::api_docs/futurejvppcore-yang-config-index.adoc[JVpp Core plugin docs] 8 | 9 | include::api_docs/futurejvppacl-yang-config-index.adoc[JVpp Acl plugin docs] 10 | 11 | include::api_docs/futurejvppnat-yang-config-index.adoc[JVpp Nat plugin docs] 12 | 13 | include::api_docs/futurejvppnsh-yang-config-index.adoc[JVpp Nsh plugin docs] 14 | 15 | include::api_docs/futurejvppioamtrace-yang-config-index.adoc[JVpp Ioam Trace plugin docs] 16 | 17 | include::api_docs/futurejvppioampot-yang-config-index.adoc[JVpp Ioam Pot plugin docs] 18 | 19 | include::api_docs/futurejvppioamexport-yang-config-index.adoc[JVpp Ioam Export plugin docs] 20 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/acl/macip/macip-acl.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "macip-acl", 6 | "type": "vpp-acl:vpp-macip-acl", 7 | "tag": "macip-tag-value", 8 | "aces": { 9 | "ace": [ 10 | { 11 | "name": "macip-rule", 12 | "matches": { 13 | "eth": { 14 | "source-mac-address": "aa:aa:aa:aa:aa:aa", 15 | "source-mac-address-mask": "ff:00:00:00:00:00" 16 | }, 17 | "ipv4": { 18 | "source-ipv4-network": "192.168.2.2/32" 19 | } 20 | }, 21 | "actions": { 22 | "forwarding": "ietf-access-control-list:accept" 23 | } 24 | } 25 | ] 26 | } 27 | } 28 | ] 29 | } 30 | } -------------------------------------------------------------------------------- /jvpp/install_from_vpp_build_dir.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Installs jvpp jars from vpp build dir to local maven repository. 4 | # Use before building hc2vpp to make sure it matches your locally-built vpp. 5 | # Not needed when using honeycomb package from nexus.fd.io 6 | # (compatible vpp version is given as package dependency). 7 | 8 | DIR_NAME=$(dirname $0) 9 | source ${DIR_NAME}/common.sh 10 | 11 | # Set VPP_DIR if not defined 12 | DEFAULT_VPP_DIR="$HOME/vpp" 13 | VPP_DIR=${VPP_DIR:-"$DEFAULT_VPP_DIR"} 14 | echo "Installing jvpp jars from VPP_DIR=$VPP_DIR" 15 | 16 | JARS="$(find "$VPP_DIR/build-root/install-vpp-native/vpp/share/java/" -type f -iname 'jvpp-*.jar')" 17 | echo "Found:" 18 | echo "$JARS" 19 | 20 | JVPP_VERSION=`$DIR_NAME/version` 21 | echo "Target jvpp version: $JVPP_VERSION" 22 | 23 | for i in ${JARS} 24 | do 25 | install_jvpp_jar "$i" "$JVPP_VERSION" 26 | done -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithNoRouteAttrs.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "next-hop": { 8 | "next-hop-list": { 9 | "next-hop": [ 10 | { 11 | "index": "1", 12 | "next-hop-address": "192.168.2.1", 13 | "outgoing-interface": "iface", 14 | "weight": "2" 15 | }, 16 | { 17 | "index": "2", 18 | "next-hop-address": "192.168.2.2", 19 | "outgoing-interface": "iface", 20 | "weight": "3" 21 | } 22 | ] 23 | } 24 | } 25 | } 26 | ] 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/rules/tcp-rule-no-flags.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "aces": { 8 | "ace": [ 9 | { 10 | "name": "tcp-no-flags-rule", 11 | "matches": { 12 | "ipv4": { 13 | "destination-ipv4-network": "192.168.2.1/32", 14 | "source-ipv4-network": "192.168.2.2/32" 15 | }, 16 | "tcp": { 17 | "source-port": { 18 | "lower-port": "123" 19 | }, 20 | "destination-port": { 21 | "lower-port": "65000" 22 | } 23 | } 24 | } 25 | } 26 | ] 27 | } 28 | } 29 | ] 30 | } 31 | } -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/sadEntries/addDelSadEntry.json: -------------------------------------------------------------------------------- 1 | { 2 | "sad": { 3 | "sad-entries": [ 4 | { 5 | "spi": 1002, 6 | "direction": "outbound", 7 | "sa-id": 10, 8 | "security-protocol": "esp", 9 | "sa-mode": "tunnel", 10 | "esp": { 11 | "authentication": { 12 | "hmac-sha1-96": { 13 | "key-str": "0123456789012346" 14 | } 15 | }, 16 | "encryption": { 17 | "aes-128-cbc": { 18 | "key-str": "9876543210987654" 19 | } 20 | } 21 | }, 22 | "source-address": { 23 | "ipv4-address": "192.168.1.1" 24 | }, 25 | "destination-address": { 26 | "ipv4-address": "192.168.1.2" 27 | }, 28 | "anti-replay-window": 0 29 | } 30 | ] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/spdEntries/addDelSpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "ipsec" : { 3 | "spd": [ 4 | { 5 | "spd-id": 10, 6 | "spd-entries": [ 7 | { 8 | "name": "test", 9 | "priority":100, 10 | "direction":"outbound", 11 | "operation":"bypass", 12 | "laddr-start":"192.168.124.0", 13 | "laddr-stop":"192.168.124.255", 14 | "raddr-start":"192.168.125.0", 15 | "raddr-stop":"192.168.125.255" 16 | }, 17 | { 18 | "name": "TestSPDEntryIpv6", 19 | "priority":100, 20 | "direction":"inbound", 21 | "operation":"bypass", 22 | "laddr-start":"2001::1", 23 | "laddr-stop":"2001::100", 24 | "raddr-start":"2001::101", 25 | "raddr-stop":"2001::200" 26 | } 27 | ] 28 | } 29 | ] 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithoutClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "vpp-v4ur:vpp-ipv4-route": { 8 | }, 9 | "next-hop": { 10 | "next-hop-list": { 11 | "next-hop": [ 12 | { 13 | "index": "1", 14 | "next-hop-address": "192.168.2.1", 15 | "outgoing-interface": "iface", 16 | "weight": "2" 17 | }, 18 | { 19 | "index": "2", 20 | "next-hop-address": "192.168.2.2", 21 | "outgoing-interface": "iface", 22 | "weight": "3" 23 | } 24 | ] 25 | } 26 | } 27 | } 28 | ] 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /interface-role/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | hc2vpp-parent 7 | io.fd.hc2vpp.common 8 | 1.19.08-SNAPSHOT 9 | ../common/hc2vpp-parent 10 | 11 | 12 | 4.0.0 13 | 14 | io.fd.hc2vpp.iface.role 15 | interface-role-aggregator 16 | pom 17 | 1.19.08-SNAPSHOT 18 | ${project.artifactId} 19 | 20 | 21 | api 22 | impl 23 | 24 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/test/resources/sadEntries/addDelSadEntry_Ipv6_before.json: -------------------------------------------------------------------------------- 1 | { 2 | "sad": { 3 | "sad-entries": [ 4 | { 5 | "spi": 1002, 6 | "direction": "outbound", 7 | "sa-id": 10, 8 | "security-protocol": "esp", 9 | "sa-mode": "tunnel", 10 | "esp": { 11 | "authentication": { 12 | "hmac-sha1-96": { 13 | "key-str": "0123456789012346" 14 | } 15 | }, 16 | "encryption": { 17 | "aes-128-cbc": { 18 | "key-str": "9876543210987654" 19 | } 20 | } 21 | }, 22 | "source-address": { 23 | "ipv6-address": "2001::1" 24 | }, 25 | "destination-address": { 26 | "ipv6-address": "2001::10" 27 | }, 28 | "anti-replay-window": 32 29 | } 30 | ] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/rules/udp-rule.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "aces": { 8 | "ace": [ 9 | { 10 | "name": "imcp-rule", 11 | "matches": { 12 | "ipv4": { 13 | "destination-ipv4-network": "192.168.2.1/32", 14 | "source-ipv4-network": "192.168.2.2/32" 15 | }, 16 | "udp": { 17 | "source-port": { 18 | "lower-port": "1", 19 | "upper-port": "5487" 20 | }, 21 | "destination-port": { 22 | "lower-port": "87", 23 | "upper-port": "6745" 24 | } 25 | } 26 | } 27 | } 28 | ] 29 | } 30 | } 31 | ] 32 | } 33 | } -------------------------------------------------------------------------------- /examples/docker/mpls_demo/build_topology.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source ../utils.sh 3 | 4 | if [[ $UID != 0 ]]; then 5 | echo "Please run this script with sudo:" 6 | echo "sudo $0 $*" 7 | exit 1 8 | fi 9 | 10 | # Cleanup 11 | ../remove_hc2vpp_containers.sh 12 | 13 | # Create directory for storing network namespaces 14 | mkdir -p /var/run/netns 15 | 16 | # Build topology 17 | # 18 | # vpp1 – vpp2 – vpp4 19 | # \ // 20 | # –– vpp3 –– 21 | # 22 | create_container vpp1 hc2vpp 23 | create_container vpp2 hc2vpp 24 | create_container vpp3 hc2vpp 25 | create_container vpp4 hc2vpp 26 | 27 | start_container vpp1 28 | start_container vpp2 29 | start_container vpp3 30 | start_container vpp4 31 | 32 | # Connect containers using veth interfaces 33 | create_link vpp1 veth12 veth21 vpp2 34 | create_link vpp1 veth13 veth31 vpp3 35 | create_link vpp2 veth24 veth42 vpp4 36 | create_link vpp3 veth341 veth431 vpp4 37 | create_link vpp3 veth342 veth432 vpp4 38 | -------------------------------------------------------------------------------- /examples/ncclient/acl/test_acl_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2018 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | ${DIR_NAME}/../test_copy_config.sh ${DIR_NAME}/config_acl.xml ${DIR_NAME}/expected_config_acl.xml * 19 | 20 | ${DIR_NAME}/../test_copy_config.sh ${DIR_NAME}/config_acl_update.xml ${DIR_NAME}/expected_config_acl_update.xml * 21 | -------------------------------------------------------------------------------- /examples/ncclient/nat/test_nat_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2018 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | ${DIR_NAME}/../test_copy_config.sh ${DIR_NAME}/config_nat.xml ${DIR_NAME}/expected_config_nat.xml * 19 | 20 | ${DIR_NAME}/../test_copy_config.sh ${DIR_NAME}/config_nat_update.xml ${DIR_NAME}/expected_config_nat_update.xml * 21 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutRouteAttrs.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "next-hop": { 8 | "next-hop-list": { 9 | "next-hop": [ 10 | { 11 | "index": "1", 12 | "next-hop-address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 13 | "outgoing-interface": "iface", 14 | "weight": "2" 15 | }, 16 | { 17 | "index": "2", 18 | "next-hop-address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 19 | "outgoing-interface": "iface", 20 | "weight": "2" 21 | } 22 | ] 23 | } 24 | } 25 | } 26 | ] 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /common/hc2vpp-parent/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | io.fd.honeycomb.common 9 | honeycomb-parent 10 | 1.19.08-SNAPSHOT 11 | 12 | 13 | 14 | io.fd.hc2vpp.common 15 | hc2vpp-parent 16 | ${project.artifactId} 17 | 1.19.08-SNAPSHOT 18 | pom 19 | 20 | 21 | 1.19.08-SNAPSHOT 22 | 19.08-SNAPSHOT 23 | 24 | -------------------------------------------------------------------------------- /it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/classify/ClassifyTableProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.it.jvpp.benchmark.classify; 18 | 19 | import io.fd.jvpp.core.dto.ClassifyAddDelTable; 20 | 21 | interface ClassifyTableProvider { 22 | ClassifyAddDelTable next(); 23 | } 24 | -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/test/resources/gpe/gpe-fwd-entry-full.json: -------------------------------------------------------------------------------- 1 | { 2 | "gpe-entry-table": { 3 | "gpe-entry": { 4 | "id": "gpe-fwd-entry-1", 5 | "dp-table": 10, 6 | "vni": 12, 7 | "local-eid": { 8 | "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", 9 | "virtual-network-id": 12, 10 | "ipv4-prefix": "192.168.2.0/24" 11 | }, 12 | "remote-eid": { 13 | "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", 14 | "virtual-network-id": 12, 15 | "ipv4-prefix": "192.168.3.0/16" 16 | }, 17 | "locator-pair": [ 18 | { 19 | "local-locator": "192.168.4.1", 20 | "remote-locator": "192.168.4.2", 21 | "weight": 3 22 | }, 23 | { 24 | "local-locator": "192.168.5.1", 25 | "remote-locator": "192.168.5.2", 26 | "weight": 2 27 | } 28 | ], 29 | "action": "natively-forward" 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/cache/InterfaceStatisticsManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 PANTHEON.tech. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.v3po.read.cache; 18 | 19 | public interface InterfaceStatisticsManager { 20 | 21 | boolean isStatisticsEnabled(); 22 | 23 | void enableStatistics(); 24 | 25 | void disableStatistics(); 26 | } 27 | -------------------------------------------------------------------------------- /mpls/impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = mpls-impl 2 | 3 | == MPLS interface management 4 | 5 | Allows to enable/disable MPLS on given interface. 6 | 7 | Translates 8 | /ietf-routing:routing/ietf-mpls:mpls/interface 9 | 10 | to 11 | 12 | sw_interface_set_mpls_enable. 13 | 14 | == Label push 15 | 16 | Translates impose-and-forward operation of 17 | /hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpl:mpls/ 18 | hc2vpp-ietf-mpls-static:static-lsps/static-lsp 19 | 20 | to ip_add_del_route call. 21 | 22 | For single outgoing-label, use simple-path out-segment. 23 | For multiple outgoing labels, use path-list out-segment 24 | with single path (multiple path support is not implemented yet). 25 | 26 | == Label pop 27 | 28 | Translates pop-and-lookup operation of 29 | /hc2vpp-ietf-routing:routing/hc2vpp-ietf-mpl:mpls/ 30 | hc2vpp-ietf-mpls-static:static-lsps/static-lsp 31 | 32 | to mpls_route_add_del call. 33 | 34 | Configuring VPP specific lookup options 35 | defined in vpp-mpls yang module is required. 36 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/Ipv4RouteData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.routing; 18 | 19 | 20 | public class Ipv4RouteData { 21 | public static final byte[] FIRST_ADDRESS_AS_ARRAY = {-64, -88, 2, 1}; 22 | public static final byte[] SECOND_ADDRESS_AS_ARRAY = {-64, -88, 2, 2}; 23 | } 24 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv4/multihop/multiHopRouteWithClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv4": { 4 | "route": [ 5 | { 6 | "destination-prefix": "192.168.2.1/24", 7 | "vpp-v4ur:vpp-ipv4-route": { 8 | "classify-table": "classify-table-one" 9 | }, 10 | "next-hop":{ 11 | "next-hop-list": { 12 | "next-hop": [ 13 | { 14 | "index": "1", 15 | "next-hop-address": "192.168.2.1", 16 | "outgoing-interface": "iface", 17 | "weight": "2" 18 | }, 19 | { 20 | "index": "2", 21 | "next-hop-address": "192.168.2.2", 22 | "outgoing-interface": "iface", 23 | "weight": "3" 24 | } 25 | ] 26 | } 27 | } 28 | } 29 | ] 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packaging/deb/trusty/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | #export DH_VERBOSE = 1 5 | 6 | # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* 7 | DPKG_EXPORT_BUILDFLAGS = 1 8 | include /usr/share/dpkg/default.mk 9 | 10 | # see FEATURE AREAS in dpkg-buildflags(1) 11 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all 12 | 13 | # see ENVIRONMENT in dpkg-buildflags(1) 14 | # package maintainers to append CFLAGS 15 | #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic 16 | # package maintainers to append LDFLAGS 17 | #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed 18 | 19 | 20 | # main packaging script based on dh7 syntax 21 | %: 22 | dh $@ 23 | 24 | # dh_make generated override targets 25 | # This is example for Cmake (See https://bugs.debian.org/641051 ) 26 | #override_dh_auto_configure: 27 | # dh_auto_configure -- \ 28 | # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithoutClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "vpp-ipv6-route": { 8 | }, 9 | "next-hop": { 10 | "next-hop-list": { 11 | "next-hop": [ 12 | { 13 | "index": "1", 14 | "next-hop-address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 15 | "outgoing-interface": "iface", 16 | "weight": "2" 17 | }, 18 | { 19 | "index": "2", 20 | "next-hop-address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 21 | "outgoing-interface": "iface", 22 | "weight": "2" 23 | } 24 | ] 25 | } 26 | } 27 | } 28 | ] 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /examples/docker/mpls_demo/Readme.txt: -------------------------------------------------------------------------------- 1 | MPLS SR demo 2 | --------------------------------------------------- 3 | 4 | Provides examples of MPLS SR config using Honeycomb 5 | for the following topology: 6 | 7 | A 8 | / 9 | vpp1 – vpp2 – vpp4 10 | \ // \ 11 | –– vpp3 –– B 12 | 13 | Each vpp node represents docker container 14 | with honeycomb running. 15 | 16 | A and B represent egrees nodes modeled using tap interfaces. 17 | 18 | 1) Create & start containers (requires hc2vpp image) 19 | sudo ./build_topology.sh 20 | 21 | 3) Run vpp and honeycomb with preconfigured veth interfaces 22 | 23 | Either manually connect 24 | docker exec -it vpp1 bash 25 | docker exec -it vpp2 bash 26 | ... 27 | 28 | and then run vpp and honeycomb: 29 | /hc2vpp/mpls_demo/init/vpp.sh vpp1 30 | /hc2vpp/mpls_demo/init/vpp.sh vpp2 31 | ... 32 | 33 | or run everything via script (uses xfce4-terminal): 34 | ./run_terminals.sh 35 | 36 | 4) Use postman_collection.json for MPLS configuration examples 37 | -------------------------------------------------------------------------------- /it/jvpp-benchmark/src/main/java/io/fd/hc2vpp/it/jvpp/benchmark/acl/AclProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.it.jvpp.benchmark.acl; 18 | 19 | import io.fd.jvpp.acl.dto.AclAddReplace; 20 | 21 | /** 22 | * Provides ACLs for JVpp Benchmark. 23 | */ 24 | interface AclProvider { 25 | AclAddReplace next(); 26 | void setAclIndex(final int index); 27 | } 28 | -------------------------------------------------------------------------------- /packaging/deb/bionic/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | #export DH_VERBOSE = 1 5 | 6 | # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* 7 | DPKG_EXPORT_BUILDFLAGS = 1 8 | include /usr/share/dpkg/default.mk 9 | 10 | # see FEATURE AREAS in dpkg-buildflags(1) 11 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all 12 | 13 | # see ENVIRONMENT in dpkg-buildflags(1) 14 | # package maintainers to append CFLAGS 15 | #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic 16 | # package maintainers to append LDFLAGS 17 | #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed 18 | 19 | 20 | # main packaging script based on dh7 syntax 21 | %: 22 | dh $@ --with systemd 23 | 24 | # dh_make generated override targets 25 | # This is example for Cmake (See https://bugs.debian.org/641051 ) 26 | #override_dh_auto_configure: 27 | # dh_auto_configure -- \ 28 | # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /packaging/deb/xenial/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | #export DH_VERBOSE = 1 5 | 6 | # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* 7 | DPKG_EXPORT_BUILDFLAGS = 1 8 | include /usr/share/dpkg/default.mk 9 | 10 | # see FEATURE AREAS in dpkg-buildflags(1) 11 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all 12 | 13 | # see ENVIRONMENT in dpkg-buildflags(1) 14 | # package maintainers to append CFLAGS 15 | #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic 16 | # package maintainers to append LDFLAGS 17 | #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed 18 | 19 | 20 | # main packaging script based on dh7 syntax 21 | %: 22 | dh $@ --with systemd 23 | 24 | # dh_make generated override targets 25 | # This is example for Cmake (See https://bugs.debian.org/641051 ) 26 | #override_dh_auto_configure: 27 | # dh_auto_configure -- \ 28 | # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/rules/icmp-rule.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "aces": { 8 | "ace": [ 9 | { 10 | "name": "imcp-rule", 11 | "matches": { 12 | "ipv4": { 13 | "source-ipv4-network": "192.168.2.2/32", 14 | "destination-ipv4-network": "192.168.2.1/32" 15 | }, 16 | "icmp": { 17 | "vpp-acl:vpp-icmp-ace": { 18 | "vpp-acl:icmp-type-range": { 19 | "first": "5", 20 | "last": "8" 21 | }, 22 | "vpp-acl:icmp-code-range": { 23 | "first": "1", 24 | "last": "3" 25 | } 26 | } 27 | } 28 | } 29 | } 30 | ] 31 | } 32 | } 33 | ] 34 | } 35 | } -------------------------------------------------------------------------------- /routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/InterfaceTestHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.routing.helpers; 18 | 19 | import io.fd.hc2vpp.common.test.util.NamingContextHelper; 20 | 21 | public interface InterfaceTestHelper extends NamingContextHelper { 22 | 23 | String INTERFACE_NAME = "iface"; 24 | int INTERFACE_INDEX = 3; 25 | } 26 | -------------------------------------------------------------------------------- /srv6/srv6-api/src/main/java/org/opendaylight/yang/gen/v1/http/cisco/com/ns/yang/oc/srte/policy/rev170918/MplsLabelBuilder.java: -------------------------------------------------------------------------------- 1 | package org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.oc.srte.policy.rev170918; 2 | 3 | /** 4 | * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. 5 | * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). 6 | * 7 | * The reason behind putting it under src/main/java is: 8 | * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent 9 | * loss of user code. 10 | */ 11 | public class MplsLabelBuilder { 12 | private MplsLabelBuilder() { 13 | //Exists only to defeat instantiation. 14 | } 15 | 16 | public static MplsLabel getDefaultInstance(java.lang.String defaultValue) { 17 | throw new java.lang.UnsupportedOperationException("Not yet implemented"); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /examples/ncclient/interfaces/tap/test_edit_tap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | xPath="./{urn:ietf:params:xml:ns:yang:ietf-interfaces}interfaces/\ 18 | {urn:ietf:params:xml:ns:yang:ietf-interfaces}interface[{urn:ietf:params:xml:ns:yang:ietf-interfaces}name='tap1']" 19 | 20 | ${DIR_NAME}/../../test_edit_config.sh ${DIR_NAME}/edit_config_tap_interface.xml ${DIR_NAME}/edit_config_tap_interface.xml ${xPath} 21 | -------------------------------------------------------------------------------- /srv6/srv6-api/src/main/java/org/opendaylight/yang/gen/v1/http/cisco/com/ns/yang/oc/srte/policy/rev170918/SidValueTypeBuilder.java: -------------------------------------------------------------------------------- 1 | package org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.oc.srte.policy.rev170918; 2 | 3 | /** 4 | * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. 5 | * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). 6 | * 7 | * The reason behind putting it under src/main/java is: 8 | * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent 9 | * loss of user code. 10 | */ 11 | public class SidValueTypeBuilder { 12 | private SidValueTypeBuilder() { 13 | //Exists only to defeat instantiation. 14 | } 15 | 16 | public static SidValueType getDefaultInstance(java.lang.String defaultValue) { 17 | throw new java.lang.UnsupportedOperationException("Not yet implemented"); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/resources/ipv6/multihop/multiHopRouteWithClassifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "static-routes": { 3 | "ipv6": { 4 | "route": [ 5 | { 6 | "destination-prefix": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64", 7 | "vpp-ipv6-route": { 8 | "classify-table": "classify-table-one" 9 | }, 10 | "next-hop": { 11 | "next-hop-list": { 12 | "next-hop": [ 13 | { 14 | "index": "1", 15 | "next-hop-address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 16 | "outgoing-interface": "iface", 17 | "weight": "2" 18 | }, 19 | { 20 | "index": "2", 21 | "next-hop-address": "2001:0db8:0a0b:12f0:0000:0000:0000:0002", 22 | "outgoing-interface": "iface", 23 | "weight": "2" 24 | } 25 | ] 26 | } 27 | } 28 | } 29 | ] 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /examples/ncclient/interfaces/loop/test_edit_loopback.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | xPath="./{urn:ietf:params:xml:ns:yang:ietf-interfaces}interfaces/\ 18 | {urn:ietf:params:xml:ns:yang:ietf-interfaces}interface[{urn:ietf:params:xml:ns:yang:ietf-interfaces}name='loop0']" 19 | 20 | ${DIR_NAME}/../../test_edit_config.sh ${DIR_NAME}/edit_config_loop_interface.xml ${DIR_NAME}/edit_config_loop_interface.xml ${xPath} 21 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/dto/AuthMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 PANTHEON.tech. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.ipsec.dto; 18 | 19 | public enum AuthMethod { 20 | RSA_SIG((byte) 1), 21 | SHARED_KEY_MIC((byte) 2); 22 | 23 | private final byte value; 24 | 25 | AuthMethod(final byte method) { 26 | this.value = method; 27 | } 28 | 29 | public byte getValue() { 30 | return value; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /release-notes/src/main/asciidoc/user_guide/user_troubleshooting.adoc: -------------------------------------------------------------------------------- 1 | = Troubleshooting 2 | 3 | link:release_notes.html[< Home] 4 | 5 | CAUTION: Trying to fix any Honeycomb issue should start with looking at honeycomb log file (default location: /var/log/honeycomb/) 6 | 7 | == Unable to open SSH session 8 | If following warning is shown when invoking ssh command: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!. Just invoke (as suggested by the warning): 9 | 10 | ssh-keygen -f ... 11 | 12 | == Honeycomb fails to start properly 13 | First thing to do is to take a look at Honeycomb logs(default location: /var/log/honeycomb/). 14 | 15 | If following log message is present: VPP-ERROR: VPP api client connection failed java.io.IOException: Connection returned error -1. Make sure VPP is installed in the system and it's running. 16 | 17 | NOTE: If the VPP-ERROR also contains message stating vpp japi out of sync. It indicates incompatible versions of VPP and Honeycomb. 18 | 19 | == Honeycomb does not respond 20 | Check suggestions from previous item: Honeycomb fails to start properly -------------------------------------------------------------------------------- /ioam/api/src/main/yang/ioam-sb-export@2017-02-06.yang: -------------------------------------------------------------------------------- 1 | module ioam-sb-export { 2 | 3 | yang-version 1; 4 | 5 | namespace "urn:cisco:params:xml:ns:yang:ioam-sb-export"; 6 | 7 | prefix ioam-sb-export; 8 | 9 | import ietf-inet-types { 10 | prefix inet; 11 | } 12 | 13 | organization "Cisco Systems, Inc."; 14 | contact 15 | "Shwetha Bhandari 16 | Sagar Srivastav "; 17 | 18 | description 19 | "This module contains a collection of YANG definitions for 20 | managing in-band OAM based export 21 | parameters."; 22 | 23 | revision 2017-02-06 { 24 | description 25 | "set source and collector addresses as mandatory"; 26 | reference 27 | ""; 28 | } 29 | 30 | container ioam-export { 31 | 32 | leaf disable { 33 | type boolean; 34 | } 35 | 36 | leaf collector-address { 37 | mandatory true; 38 | type inet:ipv4-address; 39 | } 40 | 41 | leaf source-address { 42 | mandatory true; 43 | type inet:ipv4-address; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/DeleteRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.srv6.write; 18 | 19 | import io.fd.honeycomb.translate.write.WriteFailedException; 20 | import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; 21 | 22 | public interface DeleteRequest { 23 | 24 | void delete(final InstanceIdentifier identifier) throws WriteFailedException; 25 | } 26 | -------------------------------------------------------------------------------- /srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/UpdateRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.srv6.write; 18 | 19 | import io.fd.honeycomb.translate.write.WriteFailedException; 20 | import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; 21 | 22 | public interface UpdateRequest { 23 | 24 | void update(final InstanceIdentifier identifier) throws WriteFailedException; 25 | } 26 | -------------------------------------------------------------------------------- /srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/WriteRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.srv6.write; 18 | 19 | import io.fd.honeycomb.translate.write.WriteFailedException; 20 | import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; 21 | 22 | public interface WriteRequest { 23 | 24 | void write(final InstanceIdentifier identifier) throws WriteFailedException; 25 | } 26 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/rules/icmp-v6-rule.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "aces": { 8 | "ace": [ 9 | { 10 | "name": "imcp-v6-rule", 11 | "matches": { 12 | "ipv6": { 13 | "source-ipv6-network": "2001:0db8:0a0b:12f0:0000:0000:0000:0002/48", 14 | "destination-ipv6-network": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64" 15 | }, 16 | "icmp": { 17 | "vpp-acl:vpp-icmp-ace": { 18 | "vpp-acl:icmp-type-range": { 19 | "first": "5", 20 | "last": "8" 21 | }, 22 | "vpp-acl:icmp-code-range": { 23 | "first": "1", 24 | "last": "3" 25 | } 26 | } 27 | } 28 | } 29 | } 30 | ] 31 | } 32 | } 33 | ] 34 | } 35 | } -------------------------------------------------------------------------------- /v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/cache/InterfaceStatisticsManagerProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 PANTHEON.tech. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.v3po.read.cache; 18 | 19 | import com.google.inject.Provider; 20 | 21 | public class InterfaceStatisticsManagerProvider implements Provider { 22 | 23 | @Override 24 | public InterfaceStatisticsManager get() { 25 | return new InterfaceStatisticsManagerImpl(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packaging/deb/trusty/debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: honeycomb 3 | Source: https://git.fd.io/cgit/honeycomb/tree/ 4 | 5 | Files: * 6 | Copyright: 2016 Cisco and/or its affiliates 7 | License: Apache-2.0 8 | Copyright (c) 2016 Cisco and/or its affiliates. 9 | . 10 | Licensed under the Apache License, Version 2.0 (the "License"); 11 | you may not use this file except in compliance with the License. 12 | You may obtain a copy of the License at: 13 | . 14 | http://www.apache.org/licenses/LICENSE-2.0 15 | . 16 | Unless required by applicable law or agreed to in writing, software 17 | distributed under the License is distributed on an "AS IS" BASIS, 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | See the License for the specific language governing permissions and 20 | limitations under the License. 21 | . 22 | On Debian systems, the complete text of the GNU General 23 | Public License version 2 can be found in "/usr/share/common-licenses/Apache-2.0". 24 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/interface-acl/acl-references.json: -------------------------------------------------------------------------------- 1 | { 2 | "attachment-points": { 3 | "interface": [ 4 | { 5 | "interface-id": "eth0", 6 | "ingress": { 7 | "acl-sets": { 8 | "acl-set": [ 9 | { 10 | "name": "acl1" 11 | } 12 | ] 13 | } 14 | } 15 | }, 16 | { 17 | "interface-id": "eth1", 18 | "ingress": { 19 | "acl-sets": { 20 | "acl-set": [ 21 | { 22 | "name": "acl1" 23 | }, 24 | { 25 | "name": "acl2" 26 | } 27 | ] 28 | } 29 | } 30 | }, 31 | { 32 | "interface-id": "eth2", 33 | "ingress": { 34 | "acl-sets": { 35 | "acl-set": [ 36 | { 37 | "name": "acl1" 38 | }, 39 | { 40 | "name": "acl4" 41 | } 42 | ] 43 | } 44 | } 45 | } 46 | ] 47 | } 48 | } -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/rules/tcp-rule.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "aces": { 8 | "ace": [ 9 | { 10 | "name": "tcp-rule", 11 | "matches": { 12 | "ipv4": { 13 | "destination-ipv4-network": "192.168.2.1/32", 14 | "source-ipv4-network": "192.168.2.2/32" 15 | }, 16 | "tcp": { 17 | "source-port": { 18 | "lower-port": "1", 19 | "upper-port": "5487" 20 | }, 21 | "destination-port": { 22 | "lower-port": "87", 23 | "upper-port": "6745" 24 | }, 25 | "flags": "cwr ece urg", 26 | "vpp-acl:vpp-tcp-ace": { 27 | "vpp-acl:flags-mask": "cwr" 28 | } 29 | } 30 | } 31 | } 32 | ] 33 | } 34 | } 35 | ] 36 | } 37 | } -------------------------------------------------------------------------------- /vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/LinkGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.docs.core; 18 | 19 | public interface LinkGenerator { 20 | 21 | default String generateLink(final String raw) { 22 | //https://git.fd.io/hc2vpp/tree/interface-role/api/src/main/yang/interface-role@2017-06-15.yang?h=stable%2F1707 23 | return "https://git.fd.io/hc2vpp/tree" + raw + "?h={project-branch}"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/acl/standard/standard-acl-udp.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "tag": "udp-tag-value", 8 | "aces": { 9 | "ace": [ 10 | { 11 | "name": "udp-rule", 12 | "matches": { 13 | "ipv4": { 14 | "destination-ipv4-network": "192.168.2.1/24", 15 | "source-ipv4-network": "192.168.2.2/32" 16 | }, 17 | "udp": { 18 | "source-port": { 19 | "lower-port": "1", 20 | "upper-port": "5487" 21 | }, 22 | "destination-port": { 23 | "lower-port": "87", 24 | "upper-port": "6745" 25 | } 26 | } 27 | }, 28 | "actions": { 29 | "forwarding": "ietf-access-control-list:accept" 30 | } 31 | } 32 | ] 33 | } 34 | } 35 | ] 36 | } 37 | } -------------------------------------------------------------------------------- /srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/write/sid/request/NoProtocolLocalSidRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.srv6.write.sid.request; 18 | 19 | import io.fd.jvpp.core.future.FutureJVppCore; 20 | 21 | /** 22 | * Local SID using End function 23 | */ 24 | public class NoProtocolLocalSidRequest extends LocalSidFunctionRequest { 25 | 26 | public NoProtocolLocalSidRequest(final FutureJVppCore api) { 27 | super(api); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /samples/samples-impl/src/main/java/io/fd/hc2vpp/samples/ModuleConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.fd.hc2vpp.samples; 17 | 18 | 19 | import net.jmob.guice.conf.core.BindConfig; 20 | import net.jmob.guice.conf.core.InjectConfig; 21 | import net.jmob.guice.conf.core.Syntax; 22 | 23 | @BindConfig(value = "module", syntax = Syntax.JSON) 24 | public class ModuleConfiguration { 25 | 26 | // inject property from resource file 27 | @InjectConfig(value = "some.prop.name") 28 | String somePropValue; 29 | } 30 | -------------------------------------------------------------------------------- /release-notes/site.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /release-notes/src/main/asciidoc/release_notes.adoc: -------------------------------------------------------------------------------- 1 | = Hc2vpp {project-version} Release notes 2 | 3 | Release notes for honeycomb for VPP {project-version}. Based on VPP {project-vpp-snapshot-version} 4 | and honeycomb {project-version}. 5 | 6 | == Release plan 7 | https://wiki.fd.io/view/Hc2vpp/Release_Plans/Release_Plan_{project-public-version}[Release plan] 8 | 9 | == Features 10 | Adding to the list of existing features: https://docs.fd.io/hc2vpp/1.19.04/hc2vpp-parent/release-notes-aggregator/release_notes.html#_features[1904 feature list]: 11 | 12 | === New features 13 | 14 | === Removed features 15 | 16 | * https://jira.fd.io/browse/HC2VPP-341[Postman collections in v1.0/v2.0 format] 17 | 18 | === Modified features 19 | 20 | === Deprecated features 21 | 22 | == Backlog 23 | 24 | * https://jira.fd.io/projects/HC2VPP/versions/{project-version-in-jira}[JIRA] 25 | * https://jira.fd.io/jira/secure/ReleaseNote.jspa?projectId=10601&version={project-version-in-jira}[Release notes] 26 | 27 | include::install_guide/install_guide.adoc[] 28 | 29 | include::user_guide/user_guide.adoc[] 30 | 31 | include::devel_guide/devel_guide.adoc[] 32 | 33 | include::api_docs/api_docs.adoc[] -------------------------------------------------------------------------------- /vpp-classifier/impl/src/main/java/io/fd/hc2vpp/vpp/classifier/write/ClassifyWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.vpp.classifier.write; 18 | 19 | import javax.xml.bind.DatatypeConverter; 20 | import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.HexString; 21 | 22 | interface ClassifyWriter { 23 | default byte[] getBinaryVector(final HexString hexString) { 24 | return DatatypeConverter.parseHexBinary(hexString.getValue().replace(":", "")); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/ncclient/test_diff_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # $1 candidate config element to diff against actual config 17 | # $2 xPath to verify config against 18 | 19 | DIR_NAME=$(dirname $0) 20 | 21 | ${DIR_NAME}/get_config.py --reply_filename _actual_config.xml --simple 22 | 23 | echo "Differences in running and candidate config:" 24 | 25 | ${DIR_NAME}/diff_xml.py $1 _actual_config.xml $2 26 | ret_code=$? 27 | 28 | if [[ ${ret_code} == 0 ]]; then 29 | exit 0 30 | fi 31 | rm _actual_config.xml 32 | echo "finished." 33 | exit 0 34 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/acl/standard/standard-acl-tcp-src-only.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "aces": { 8 | "ace": [ 9 | { 10 | "name": "tcp-rule", 11 | "matches": { 12 | "ipv4": { 13 | "source-ipv4-network": "192.168.2.2/32" 14 | }, 15 | "tcp": { 16 | "source-port": { 17 | "lower-port": "1", 18 | "upper-port": "5487" 19 | }, 20 | "destination-port": { 21 | "lower-port": "87", 22 | "upper-port": "6745" 23 | }, 24 | "flags": "cwr ece urg", 25 | "vpp-acl:vpp-tcp-ace": { 26 | "vpp-acl:flags-mask": "cwr" 27 | } 28 | } 29 | }, 30 | "actions": { 31 | "forwarding": "ietf-access-control-list:accept" 32 | } 33 | } 34 | ] 35 | } 36 | } 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /examples/ncclient/interfaces/af-packet/test_edit_af_packet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | DIR_NAME=$(dirname $0) 17 | 18 | # create linux side of AF-packet interface 19 | sudo ip link add vethAF type veth peer name vethFA 20 | xPath="./{urn:ietf:params:xml:ns:yang:ietf-interfaces}interfaces/\ 21 | {urn:ietf:params:xml:ns:yang:ietf-interfaces}interface[{urn:ietf:params:xml:ns:yang:ietf-interfaces}name='host-vethAF']" 22 | 23 | ${DIR_NAME}/../../test_edit_config.sh ${DIR_NAME}/edit_config_af_packet_interface.xml ${DIR_NAME}/edit_config_af_packet_interface.xml ${xPath} 24 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/acl/standard/standard-acl-icmp.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "tag": "icmp-v4-tag-value", 8 | "aces": { 9 | "ace": [ 10 | { 11 | "name": "imcp-rule", 12 | "matches": { 13 | "ipv4": { 14 | "source-ipv4-network": "192.168.2.2/32", 15 | "destination-ipv4-network": "192.168.2.1/24" 16 | }, 17 | "icmp": { 18 | "vpp-acl:vpp-icmp-ace": { 19 | "vpp-acl:icmp-type-range": { 20 | "first": "5", 21 | "last": "8" 22 | }, 23 | "vpp-acl:icmp-code-range": { 24 | "first": "1", 25 | "last": "3" 26 | } 27 | } 28 | } 29 | }, 30 | "actions": { 31 | "forwarding": "ietf-access-control-list:accept" 32 | } 33 | } 34 | ] 35 | } 36 | } 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/VppAttributesBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.nat.read.ifc; 18 | 19 | import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev190527.InterfaceNatVppFeatureAttributes; 20 | import org.opendaylight.yangtools.concepts.Builder; 21 | 22 | interface VppAttributesBuilder> { 23 | void enableNat44(final B builder); 24 | 25 | void enableNat64(final B builder); 26 | 27 | void enablePostRouting(final B builder); 28 | } 29 | -------------------------------------------------------------------------------- /vpp-management/impl/src/main/java/io/fd/hc2vpp/management/VppManagementConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.management; 18 | 19 | import net.jmob.guice.conf.core.BindConfig; 20 | import net.jmob.guice.conf.core.InjectConfig; 21 | import net.jmob.guice.conf.core.Syntax; 22 | 23 | @BindConfig(value = "vpp-management", syntax = Syntax.JSON) 24 | public class VppManagementConfiguration { 25 | 26 | @InjectConfig("keepalive-delay") 27 | private int keepaliveDelay; 28 | 29 | public int getKeepaliveDelay() { 30 | return this.keepaliveDelay; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /examples/docker/SRv6_5-node/show_configuration.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -e "\n\033[1mvppA Configuration:" 3 | echo -e "----------------------------------------------------------------------------------------\033[m" 4 | sudo docker exec vppA vppctl sh sr localsids 5 | sudo docker exec vppA vppctl sh sr policies 6 | sudo docker exec vppA vppctl sh sr steering 7 | echo -e "\n\033[1mvppB Configuration:" 8 | echo -e "----------------------------------------------------------------------------------------\033[m" 9 | sudo docker exec vppB vppctl sh sr localsids 10 | echo -e "\n\033[1mvppC Configuration:" 11 | echo -e "----------------------------------------------------------------------------------------\033[m" 12 | sudo docker exec vppC vppctl sh sr localsids 13 | echo -e "\n\033[1mvppD Configuration:" 14 | echo -e "----------------------------------------------------------------------------------------\033[m" 15 | sudo docker exec vppD vppctl sh sr localsids 16 | echo -e "\n\033[1mvppE Configuration:" 17 | echo -e "----------------------------------------------------------------------------------------\033[m" 18 | sudo docker exec vppE vppctl sh sr localsids 19 | sudo docker exec vppE vppctl sh sr policies 20 | sudo docker exec vppE vppctl sh sr steering 21 | -------------------------------------------------------------------------------- /v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/cache/InterfaceStatisticsManagerImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 PANTHEON.tech. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.v3po.read.cache; 18 | 19 | public class InterfaceStatisticsManagerImpl implements InterfaceStatisticsManager { 20 | 21 | private boolean isEnabled; 22 | 23 | @Override 24 | public boolean isStatisticsEnabled() { 25 | return isEnabled; 26 | } 27 | 28 | @Override 29 | public void enableStatistics() { 30 | isEnabled = true; 31 | } 32 | 33 | @Override 34 | public void disableStatistics() { 35 | isEnabled = false; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/acl/standard/standard-acl-icmp-v6.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "tag": "icmp-v6-tag-value", 8 | "aces": { 9 | "ace": [ 10 | { 11 | "name": "imcp-v6-rule", 12 | "matches": { 13 | "ipv6": { 14 | "source-ipv6-network": "2001:0db8:0a0b:12f0:0000:0000:0000:0002/48", 15 | "destination-ipv6-network": "2001:0db8:0a0b:12f0:0000:0000:0000:0001/64" 16 | }, 17 | "icmp": { 18 | "vpp-acl:vpp-icmp-ace": { 19 | "vpp-acl:icmp-type-range": { 20 | "first": "5", 21 | "last": "8" 22 | }, 23 | "vpp-acl:icmp-code-range": { 24 | "first": "1", 25 | "last": "3" 26 | } 27 | } 28 | } 29 | }, 30 | "actions": { 31 | "forwarding": "ietf-access-control-list:accept" 32 | } 33 | } 34 | ] 35 | } 36 | } 37 | ] 38 | } 39 | } -------------------------------------------------------------------------------- /examples/docker/bgp_demo/Readme.txt: -------------------------------------------------------------------------------- 1 | BGP demo 2 | --------------------------------------------------- 3 | 4 | Provides examples of BGP config using Honeycomb 5 | two VPP nodes (docker containers). 6 | 7 | Configuration was tested using VPP 18.01 and hc2vpp 1.18.01. 8 | 9 | 1) Create & start containers (requires hc2vpp image) 10 | sudo ./build_topology.sh 11 | 12 | 3) Run vpp and honeycomb with preconfigured veth interfaces 13 | 14 | Either manually connect 15 | docker exec -it vpp1 bash 16 | docker exec -it vpp2 bash 17 | 18 | and then run vpp and honeycomb on vpp1 and vpp2 respectively: 19 | /hc2vpp/mpls_demo/init/vpp.sh 1 20 | /hc2vpp/mpls_demo/init/vpp.sh 2 21 | 22 | or run everything via script (uses xfce4-terminal): 23 | ./run_terminals.sh 24 | 25 | After vpp and honeycomb stars, 26 | you should be able to ping vpp2 from vpp1. 27 | 28 | Either using vppctl: 29 | vppctl ping 10.12.1.2 30 | 31 | or directly (we are using tuntap): 32 | ping 10.12.1.2 33 | 34 | 4) Use postman_collection.json for BGP configuration examples 35 | 36 | First configure loop0 interface on vpp2. 37 | 38 | Then configure eBGP peers on vpp1 and vpp2 39 | and program route to loop0 using application peer from vpp2. 40 | 41 | Now loop0 is reachable from vpp1: 42 | vppctl ping 10.100.1.1 43 | -------------------------------------------------------------------------------- /interface-role/api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | io.fd.hc2vpp.common 7 | api-parent 8 | 1.19.08-SNAPSHOT 9 | ../../common/api-parent 10 | 11 | 4.0.0 12 | 13 | io.fd.hc2vpp.iface.role 14 | api 15 | 1.19.08-SNAPSHOT 16 | ${project.artifactId} 17 | 18 | 19 | 20 | org.opendaylight.mdsal.model 21 | yang-ext 22 | 23 | 24 | 25 | org.opendaylight.mdsal.binding.model.ietf 26 | rfc8343 27 | ${odl.binding.model.version} 28 | 29 | 30 | -------------------------------------------------------------------------------- /acl/acl-impl/src/test/resources/acl/standard/standard-acl-tcp.json: -------------------------------------------------------------------------------- 1 | { 2 | "acls": { 3 | "acl": [ 4 | { 5 | "name": "standard-acl", 6 | "type": "vpp-acl:vpp-acl", 7 | "tag": "tcp-tag-value", 8 | "aces": { 9 | "ace": [ 10 | { 11 | "name": "tcp-rule", 12 | "matches": { 13 | "ipv4": { 14 | "destination-ipv4-network": "192.168.2.1/24", 15 | "source-ipv4-network": "192.168.2.2/32" 16 | }, 17 | "tcp": { 18 | "source-port": { 19 | "lower-port": "1", 20 | "upper-port": "5487" 21 | }, 22 | "destination-port": { 23 | "lower-port": "87", 24 | "upper-port": "6745" 25 | }, 26 | "flags": "cwr ece urg", 27 | "vpp-acl:vpp-tcp-ace": { 28 | "vpp-acl:flags-mask": "cwr" 29 | } 30 | } 31 | }, 32 | "actions": { 33 | "forwarding": "ietf-access-control-list:accept" 34 | } 35 | } 36 | ] 37 | } 38 | } 39 | ] 40 | } 41 | } -------------------------------------------------------------------------------- /examples/docker/bgp_demo/init/io-fd-hc2vpp-integration_vpp-integration-distribution_1-18-01-SNAPSHOT-module-config: -------------------------------------------------------------------------------- 1 | // This is list of hc2vpp modules based on configuration file from /opt/honeycomb/modules 2 | // 3 | // BGP modules (disabled by default) were enabled. 4 | // Modules not used in the demo were disabled to reduce footprint. 5 | // 6 | io.fd.hc2vpp.common.integration.VppCommonModule 7 | io.fd.hc2vpp.management.VppManagementModule 8 | // io.fd.hc2vpp.lisp.LispModule 9 | // io.fd.hc2vpp.lisp.gpe.GpeModule 10 | io.fd.hc2vpp.v3po.V3poModule 11 | // io.fd.hc2vpp.iface.role.InterfaceRoleModule 12 | io.fd.hc2vpp.l3.InterfaceL3Module 13 | io.fd.hc2vpp.l3.SubInterfaceL3Module 14 | // io.fd.hc2vpp.l3.ProxyArpModule 15 | io.fd.hc2vpp.vpp.classifier.VppClassifierModule 16 | // io.fd.hc2vpp.vpp.classifier.InterfaceClassifierAclModule 17 | // io.fd.hc2vpp.vpp.classifier.SubInterfaceClassifierAclModule 18 | // io.fd.hc2vpp.nat.NatModule 19 | io.fd.hc2vpp.routing.RoutingModule 20 | // io.fd.hc2vpp.acl.AclModule 21 | // io.fd.hc2vpp.dhcp.DhcpModule 22 | // io.fd.hc2vpp.policer.PolicerModule 23 | io.fd.hc2vpp.mpls.MplsModule 24 | // io.fd.hc2vpp.vppnsh.impl.VppNshModule 25 | // io.fd.hc2vpp.vppioam.impl.VppIoamModule 26 | io.fd.hc2vpp.bgp.inet.BgpInetModule 27 | io.fd.hc2vpp.bgp.prefix.sid.BgpPrefixSidModule -------------------------------------------------------------------------------- /lisp/api/src/main/yang/eid-mapping-context@2016-08-01.yang: -------------------------------------------------------------------------------- 1 | module eid-mapping-context { 2 | yang-version 1; 3 | namespace "http://fd.io/hc2vpp/yang/eid-mapping-context"; 4 | prefix "eid-mapping-context"; 5 | 6 | import lisp {prefix "lisp";} 7 | import ietf-lisp-address-types {prefix "lisp-types";} 8 | 9 | description 10 | "This module contains mappings stored for local-mappings id to actual eid"; 11 | 12 | revision "2016-08-01" { 13 | description 14 | "Initial revision."; 15 | } 16 | 17 | container contexts { 18 | list eid-mapping-context { 19 | 20 | key "name"; 21 | 22 | leaf name { 23 | type string; 24 | } 25 | 26 | container mappings{ 27 | list mapping { 28 | 29 | key "id"; 30 | 31 | leaf id { 32 | type lisp:mapping-id; 33 | description "Id that uniquely identifies a mapping"; 34 | } 35 | 36 | container eid { 37 | uses lisp-types:lisp-address; 38 | description "EID address"; 39 | } 40 | } 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/cache/InterfaceNamesDumpManagerProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.v3po.interfacesstate.cache; 18 | 19 | import com.google.inject.Inject; 20 | import com.google.inject.Provider; 21 | import io.fd.jvpp.stats.future.FutureJVppStatsFacade; 22 | 23 | public class InterfaceNamesDumpManagerProvider implements Provider { 24 | 25 | @Inject 26 | private FutureJVppStatsFacade jvppStats; 27 | 28 | 29 | @Override 30 | public InterfaceNamesDumpManager get() { 31 | return new InterfaceNamesDumpManagerImpl(jvppStats); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /v3po/v3po2vpp/src/test/java/io/fd/hc2vpp/v3po/util/SubinterfaceUtilsTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.v3po.util; 18 | 19 | import static org.junit.Assert.assertEquals; 20 | 21 | import org.junit.Test; 22 | 23 | public class SubinterfaceUtilsTest { 24 | 25 | @Test 26 | public void testGetSubInterfaceName() throws Exception { 27 | final String superIfName = "GigabitEthernet0/9/0"; 28 | final int subIfaceId = 123; 29 | final String expectedSubIfaceName = "GigabitEthernet0/9/0.123"; 30 | assertEquals(expectedSubIfaceName, SubInterfaceUtils.getSubInterfaceName(superIfName, subIfaceId)); 31 | } 32 | } -------------------------------------------------------------------------------- /vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/ReadTimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.common.translate.util; 18 | 19 | import com.google.common.annotations.Beta; 20 | import io.fd.honeycomb.translate.read.ReadFailedException; 21 | import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; 22 | 23 | /** 24 | * Thrown when read method invocation times out. 25 | */ 26 | @Beta 27 | public class ReadTimeoutException extends ReadFailedException { 28 | 29 | public ReadTimeoutException(final InstanceIdentifier id, final Throwable cause) { 30 | super(id, cause); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/WriteTimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.common.translate.util; 18 | 19 | import com.google.common.annotations.Beta; 20 | import io.fd.honeycomb.translate.write.WriteFailedException; 21 | import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; 22 | 23 | /** 24 | * Thrown when write method invocation times out. 25 | */ 26 | @Beta 27 | public class WriteTimeoutException extends WriteFailedException { 28 | 29 | public WriteTimeoutException(final InstanceIdentifier id, final Throwable cause) { 30 | super(id, cause); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /examples/ncclient/test_copy_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2018 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # $1 config element for RPC 17 | # $2 expected running config 18 | # $3 xPath to verify config against 19 | 20 | DIR_NAME=$(dirname $0) 21 | 22 | ${DIR_NAME}/copy_config.py $1 23 | ${DIR_NAME}/get_config.py --reply_filename _actual_config.xml 24 | 25 | # fixme: find better xml comparison tool 26 | # xmldiffs does not work well when difference occurs on deep level 27 | ${DIR_NAME}/xmldiffs.py $2 _actual_config.xml $3 28 | ret_code=$? 29 | 30 | if [[ ${ret_code} == 0 ]]; then 31 | echo " successful" 32 | rm _actual_config.xml 33 | exit 0 34 | fi 35 | 36 | echo " failed" 37 | exit 1 38 | -------------------------------------------------------------------------------- /examples/ncclient/test_edit_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019 Cisco and/or its affiliates. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at: 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # $1 config element for RPC 17 | # $2 expected running config 18 | # $3 xPath to verify config against 19 | 20 | DIR_NAME=$(dirname $0) 21 | 22 | ${DIR_NAME}/edit_config.py $1 -c 23 | ${DIR_NAME}/get_config.py --reply_filename _actual_config.xml 24 | 25 | # fixme: find better xml comparison tool 26 | # xmldiffs does not work well when difference occurs on deep level 27 | ${DIR_NAME}/xmldiffs.py $2 _actual_config.xml $3 28 | ret_code=$? 29 | 30 | if [[ ${ret_code} == 0 ]]; then 31 | echo " successful" 32 | rm _actual_config.xml 33 | exit 0 34 | fi 35 | 36 | echo " failed" 37 | exit 1 38 | -------------------------------------------------------------------------------- /bgp/bgp-prefix-sid/src/main/java/io/fd/hc2vpp/bgp/prefix/sid/BgpPrefixSidWriterFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.bgp.prefix.sid; 18 | 19 | import com.google.inject.Inject; 20 | import io.fd.honeycomb.translate.bgp.RibWriter; 21 | import io.fd.honeycomb.translate.bgp.RouteWriterFactory; 22 | import io.fd.jvpp.core.future.FutureJVppCore; 23 | import javax.annotation.Nonnull; 24 | 25 | final class BgpPrefixSidWriterFactory implements RouteWriterFactory { 26 | @Inject 27 | private FutureJVppCore vppApi; 28 | 29 | @Override 30 | public void init(@Nonnull final RibWriter registry) { 31 | registry.register(new BgpPrefixSidMplsWriter(vppApi)); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /l3/impl/src/main/java/io/fd/hc2vpp/l3/ProxyArpModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.l3; 18 | 19 | import com.google.inject.AbstractModule; 20 | import com.google.inject.multibindings.Multibinder; 21 | import io.fd.hc2vpp.l3.write.factory.ProxyArpWriterFactory; 22 | import io.fd.honeycomb.translate.write.WriterFactory; 23 | 24 | public class ProxyArpModule extends AbstractModule { 25 | 26 | @Override 27 | protected void configure() { 28 | // Writers 29 | final Multibinder writerFactoryBinder = Multibinder.newSetBinder(binder(), WriterFactory.class); 30 | writerFactoryBinder.addBinding().to(ProxyArpWriterFactory.class); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /examples/ncclient/bd/config_bd.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0 6 | 7 | 0 8 | 9 | 10 | 11 | 12 | 13 | 14 | local0 15 | x:ethernetCsmacd 16 | false 17 | 18 | 19 | loop1 20 | x:loopback 21 | 22 | 00:ff:ff:ff:ff:ff 23 | 24 | 25 | test_bd 26 | 27 | 28 | 29 | 30 | 31 | test_bd 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/InetRouteWriterFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.bgp.inet; 18 | 19 | import com.google.inject.Inject; 20 | import io.fd.honeycomb.translate.bgp.RibWriter; 21 | import io.fd.honeycomb.translate.bgp.RouteWriterFactory; 22 | import io.fd.jvpp.core.future.FutureJVppCore; 23 | import javax.annotation.Nonnull; 24 | 25 | final class InetRouteWriterFactory implements RouteWriterFactory { 26 | @Inject 27 | private FutureJVppCore vppApi; 28 | 29 | @Override 30 | public void init(@Nonnull final RibWriter registry) { 31 | registry.register(new Ipv4Writer(vppApi)); 32 | registry.register(new Ipv6Writer(vppApi)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /examples/docker/bgp_demo/init/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Starts and initializes vpp. 4 | # Then starts honeycomb 5 | # 6 | 7 | NODE_ID=$1 8 | NODE_NAME=vpp$1 9 | 10 | echo "Enable tuntap interface in startup.conf" 11 | echo -e "tuntap {\n enable\n}\n" >> /etc/vpp/startup.conf 12 | 13 | /hc2vpp/vpp/start.sh & VPP_PID=$! 14 | echo "Waiting 5s for vpp to start" 15 | sleep 5 16 | VPP_VERSION=$(vppctl show version) 17 | if [ "${VPP_VERSION}" != "" ] 18 | then 19 | echo "VPP started successfully. Version:" 20 | echo "${VPP_VERSION}" 21 | else 22 | echo "VPP failed to start. Stopping initialization script." 23 | exit 1 24 | fi 25 | 26 | # Configure veth interfaces using VPP CLI 27 | # (not fully supported by hc2vpp 18.01) 28 | echo "Configuring vpp" 29 | vppctl exec /hc2vpp/bgp_demo/init/$NODE_NAME.cmd 30 | 31 | # Update address of interface BGP is listening on 32 | IP="10.12.1.${NODE_ID}" 33 | jshon -s $IP -i "bgp-binding-address" -I -F /opt/honeycomb/config/bgp.json 34 | 35 | # Set AS number 36 | AS_NUMBER=$((65000+NODE_ID)) 37 | jshon -n $AS_NUMBER -i "bgp-as-number" -I -F /opt/honeycomb/config/bgp.json 38 | 39 | # Update module configuration 40 | # Enables BGP and disables some of the modules not used in the example 41 | cp /hc2vpp/bgp_demo/init/*-module-config /opt/honeycomb/modules 42 | 43 | echo "Starting honeycomb" 44 | /hc2vpp/honeycomb/start.sh 45 | -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/context/util/ContextsReaderFactoryProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.lisp.context.util; 18 | 19 | import com.google.inject.Inject; 20 | import com.google.inject.Provider; 21 | import com.google.inject.name.Named; 22 | import io.fd.honeycomb.translate.read.ReaderFactory; 23 | import org.opendaylight.mdsal.binding.api.DataBroker; 24 | 25 | 26 | public class ContextsReaderFactoryProvider implements Provider { 27 | 28 | @Inject 29 | @Named("honeycomb-context") 30 | private DataBroker contextDataBroker; 31 | 32 | @Override 33 | public ReaderFactory get() { 34 | return new ContextsReaderFactory(contextDataBroker); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/VppConfigAttributes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.common.integration; 18 | 19 | import java.util.Optional; 20 | import net.jmob.guice.conf.core.BindConfig; 21 | import net.jmob.guice.conf.core.InjectConfig; 22 | import net.jmob.guice.conf.core.Syntax; 23 | 24 | @BindConfig(value = "jvpp", syntax = Syntax.JSON) 25 | public class VppConfigAttributes { 26 | 27 | @InjectConfig("jvpp-connection-name") 28 | public String jvppConnectionName; 29 | 30 | @InjectConfig("api-segment-prefix") 31 | public Optional apiSegmentPrefix; 32 | 33 | @InjectConfig("jvpp-request-timeout") 34 | public int jvppRequestTimeout; 35 | } 36 | -------------------------------------------------------------------------------- /srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/util/JVppRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.srv6.util; 18 | 19 | import io.fd.hc2vpp.common.translate.util.AddressTranslator; 20 | import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; 21 | import io.fd.jvpp.core.future.FutureJVppCore; 22 | 23 | public abstract class JVppRequest implements AddressTranslator, JvppReplyConsumer { 24 | 25 | private final FutureJVppCore api; 26 | 27 | protected JVppRequest(final FutureJVppCore api) { 28 | this.api = api; 29 | } 30 | 31 | protected FutureJVppCore getApi() { 32 | return api; 33 | } 34 | 35 | public void checkValid() { 36 | //noop 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /routing/routing-impl/asciidoc/Readme.adoc: -------------------------------------------------------------------------------- 1 | = routing-impl 2 | 3 | Overview of routing-impl 4 | 5 | # Supported Features 6 | 7 | Routing plugin allows to create Ipv4/6 based routes. 8 | Data are modeled by 4 models. 9 | 10 | * ietf-routing - Basic routes model, modeling routing-instances,protocols,... 11 | * ietf-ipv4-unicast-routing/ietf-ipv6-unicast-routing - Address family specific models 12 | * vpp-routing - Attributes specific to vpp implementation of routing 13 | 14 | WARNING: Specific family models has to be manualy modified to add necessary configuration, 15 | due to lack of support to handle cross-model multi-level augments(augment of augment) 16 | 17 | # Restrictions 18 | 19 | * Due to vpp implementation of routing, configuration has been restricted to single *routing-instance*. 20 | Key/name of this *routing-instace* can be modified by property *"default-routing-instance-name"* in *routing.json*. 21 | Anny attempt to configure different routing-instance will be rejected. 22 | 23 | * *Routing protocols* has been mapped to unique vrf-id's from vpp, so only single *routing-protocol* can be mapped 24 | to single *vrf-id* 25 | 26 | * Vpp by default contains pre-configured routes. Any vrf-id of this kind is mapped to 27 | protocol name with prefix specified by property *"learned-route-name-prefix"* in *routing.json*. 28 | Respective routing protocols are prefixed with value *"learned-protocol-"*. -------------------------------------------------------------------------------- /examples/docker/bgp_demo/init/io-fd-honeycomb_minimal-distribution_1-18-01-SNAPSHOT-module-config: -------------------------------------------------------------------------------- 1 | // This is list of honeycomb modules based on configuration file from /opt/honeycomb/modules 2 | // 3 | // BGP modules (disabled by default) used in the demo were enabled. 4 | // 5 | io.fd.honeycomb.infra.distro.schema.YangBindingProviderModule 6 | io.fd.honeycomb.infra.distro.schema.SchemaModule 7 | io.fd.honeycomb.infra.distro.data.ConfigAndOperationalPipelineModule 8 | io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule 9 | io.fd.honeycomb.infra.distro.initializer.InitializerPipelineModule 10 | io.fd.honeycomb.northbound.CredentialsModule 11 | io.fd.honeycomb.northbound.netconf.NetconfModule 12 | io.fd.honeycomb.northbound.netconf.NetconfReadersModule 13 | io.fd.honeycomb.northbound.restconf.RestconfModule 14 | io.fd.honeycomb.infra.distro.cfgattrs.CfgAttrsModule 15 | io.fd.honeycomb.infra.bgp.BgpModule 16 | io.fd.honeycomb.infra.bgp.BgpReadersModule 17 | io.fd.honeycomb.infra.bgp.BgpWritersModule 18 | // io.fd.honeycomb.northbound.bgp.extension.EvpnModule 19 | io.fd.honeycomb.northbound.bgp.extension.InetModule 20 | // io.fd.honeycomb.northbound.bgp.extension.L3VpnV4Module 21 | // io.fd.honeycomb.northbound.bgp.extension.L3VpnV6Module 22 | io.fd.honeycomb.northbound.bgp.extension.LabeledUnicastModule 23 | // io.fd.honeycomb.northbound.bgp.extension.LinkstateModule 24 | // io.fd.honeycomb.footprint.FootprintModule -------------------------------------------------------------------------------- /srv6/srv6-impl/src/main/java/io/fd/hc2vpp/srv6/Srv6Configuration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.srv6; 18 | 19 | public class Srv6Configuration { 20 | 21 | /** 22 | * Provides default locator length value for locator context. Since local SID is represented as IPv6 address, which 23 | * represents LOCATOR+FUNCTION. This address with total length of 128 bits is divided into these parts by defining 24 | * locator length. Because ietf-srv6-types model defines local SIds OpCode (function) as uint32, it leaves 96 bits 25 | * for the locator part. This way we can use full range of the IPv6 address without loosing any bits. 26 | */ 27 | public static final Integer DEFAULT_LOCATOR_LENGTH = 96; 28 | } 29 | -------------------------------------------------------------------------------- /examples/ncclient/interfaces/loop/edit_config_loop_interface.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | loop0 21 | x:loopback 22 | true 23 | 24 |
25 | 10.0.0.1 26 | 24 27 |
28 |
29 | 30 | 31 |
32 |
33 |
34 | -------------------------------------------------------------------------------- /vpp-common/vpp-common-integration/src/main/java/io/fd/hc2vpp/common/integration/JVppTimeoutProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.common.integration; 18 | 19 | import com.google.inject.Inject; 20 | import com.google.inject.Provider; 21 | import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; 22 | 23 | class JVppTimeoutProvider implements Provider { 24 | 25 | @Inject 26 | private VppConfigAttributes configAttributes; 27 | 28 | @Override 29 | public JVppTimeoutInit get() { 30 | JvppReplyConsumer.JvppReplyTimeoutHolder.setupTimeout(configAttributes.jvppRequestTimeout); 31 | return new JVppTimeoutInit() { 32 | }; 33 | } 34 | 35 | interface JVppTimeoutInit { 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /bgp/inet/src/main/java/io/fd/hc2vpp/bgp/inet/RouteRequestProducer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.bgp.inet; 18 | 19 | import io.fd.hc2vpp.common.translate.util.ByteDataTranslator; 20 | import io.fd.jvpp.core.dto.IpAddDelRoute; 21 | 22 | interface RouteRequestProducer extends ByteDataTranslator { 23 | int MPLS_LABEL_INVALID = 0x100000; 24 | 25 | default IpAddDelRoute ipAddDelRoute(boolean isAdd) { 26 | final IpAddDelRoute request = new IpAddDelRoute(); 27 | request.isAdd = booleanToByte(isAdd); 28 | // we create recursive route and expect hc2vpp user to add route for next hop with interface specified 29 | request.nextHopSwIfIndex = -1; 30 | request.nextHopViaLabel = MPLS_LABEL_INVALID; 31 | return request; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/util/FutureJVppAclCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.acl.util; 18 | 19 | import static com.google.common.base.Preconditions.checkNotNull; 20 | 21 | import io.fd.jvpp.acl.future.FutureJVppAclFacade; 22 | import javax.annotation.Nonnull; 23 | 24 | /** 25 | * Holds reference to jvpp acl implementation 26 | */ 27 | public abstract class FutureJVppAclCustomizer { 28 | 29 | private final FutureJVppAclFacade jVppAclFacade; 30 | 31 | public FutureJVppAclCustomizer(@Nonnull final FutureJVppAclFacade jVppAclFacade) { 32 | this.jVppAclFacade = checkNotNull(jVppAclFacade, "JVpp Acl Future api is null"); 33 | } 34 | 35 | public FutureJVppAclFacade getjVppAclFacade() { 36 | return jVppAclFacade; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/InboundAttributesBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.nat.read.ifc; 18 | 19 | import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev190527._interface.nat.attributes.nat.InboundBuilder; 20 | 21 | final class InboundAttributesBuilder implements VppAttributesBuilder { 22 | @Override 23 | public void enableNat44(final InboundBuilder builder) { 24 | builder.setNat44Support(true); 25 | } 26 | 27 | @Override 28 | public void enableNat64(final InboundBuilder builder) { 29 | builder.setNat64Support(true); 30 | } 31 | 32 | @Override 33 | public void enablePostRouting(final InboundBuilder builder) { 34 | builder.setPostRouting(true); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /nat/nat2vpp/src/main/java/io/fd/hc2vpp/nat/read/ifc/OutboundAttributesReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.nat.read.ifc; 18 | 19 | import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang._interface.nat.rev190527._interface.nat.attributes.nat.OutboundBuilder; 20 | 21 | final class OutboundAttributesReader implements VppAttributesBuilder { 22 | @Override 23 | public void enableNat44(final OutboundBuilder builder) { 24 | builder.setNat44Support(true); 25 | } 26 | 27 | @Override 28 | public void enableNat64(final OutboundBuilder builder) { 29 | builder.setNat64Support(true); 30 | } 31 | 32 | @Override 33 | public void enablePostRouting(final OutboundBuilder builder) { 34 | builder.setPostRouting(true); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/read/cache/InterfaceCacheDumpManagerProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.v3po.read.cache; 18 | 19 | import com.google.inject.Inject; 20 | import com.google.inject.Provider; 21 | import io.fd.hc2vpp.common.translate.util.NamingContext; 22 | import io.fd.jvpp.core.future.FutureJVppCore; 23 | import javax.inject.Named; 24 | 25 | public class InterfaceCacheDumpManagerProvider implements Provider { 26 | 27 | @Inject 28 | private FutureJVppCore jvpp; 29 | 30 | @Inject 31 | @Named("interface-context") 32 | private NamingContext namingContext; 33 | 34 | @Override 35 | public InterfaceCacheDumpManager get() { 36 | return new InterfaceCacheDumpManagerImpl(jvpp, namingContext); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /examples/ncclient/interfaces/tap/edit_config_tap_interface.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | tap1 21 | TAP 1 test interface 22 | 23 | tap1 24 | 25 | x:tap 26 | 27 |
28 | 10.1.0.3 29 | 24 30 |
31 |
32 |
33 |
34 |
35 | -------------------------------------------------------------------------------- /stats/stats-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | io.fd.hc2vpp.common 20 | api-parent 21 | 1.19.08-SNAPSHOT 22 | ../../common/api-parent 23 | 24 | 25 | 4.0.0 26 | io.fd.hc2vpp.stats 27 | stats-api 28 | ${project.artifactId} 29 | 1.19.08-SNAPSHOT 30 | bundle 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/FutureJVppIkev2Customizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.ipsec; 18 | 19 | import static com.google.common.base.Preconditions.checkNotNull; 20 | 21 | import io.fd.jvpp.ikev2.future.FutureJVppIkev2Facade; 22 | import javax.annotation.Nonnull; 23 | 24 | /** 25 | * Holds reference to jvpp ikev2 implementation 26 | */ 27 | public abstract class FutureJVppIkev2Customizer { 28 | 29 | private final FutureJVppIkev2Facade jVppIkev2Facade; 30 | 31 | public FutureJVppIkev2Customizer(@Nonnull final FutureJVppIkev2Facade jVppIkev2Facade) { 32 | this.jVppIkev2Facade = checkNotNull(jVppIkev2Facade, "JVpp Ikev2 Future api is null"); 33 | } 34 | 35 | public FutureJVppIkev2Facade getjVppIkev2Facade() { 36 | return jVppIkev2Facade; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lisp/lisp2vpp/src/main/java/io/fd/hc2vpp/lisp/translate/util/CheckedLispCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.lisp.translate.util; 18 | 19 | 20 | import io.fd.hc2vpp.common.translate.util.FutureJVppCustomizer; 21 | import io.fd.hc2vpp.lisp.translate.service.LispStateCheckService; 22 | import io.fd.jvpp.core.future.FutureJVppCore; 23 | import javax.annotation.Nonnull; 24 | 25 | public abstract class CheckedLispCustomizer extends FutureJVppCustomizer { 26 | 27 | protected final LispStateCheckService lispStateCheckService; 28 | 29 | public CheckedLispCustomizer(@Nonnull final FutureJVppCore futureJVppCore, 30 | @Nonnull final LispStateCheckService lispStateCheckService) { 31 | super(futureJVppCore); 32 | this.lispStateCheckService = lispStateCheckService; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /dhcp/dhcp-impl/src/test/java/io/fd/hc2vpp/dhcp/helpers/SchemaContextTestHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.dhcp.helpers; 18 | 19 | import com.google.common.collect.ImmutableSet; 20 | import io.fd.honeycomb.test.tools.annotations.InjectablesProcessor; 21 | import io.fd.honeycomb.test.tools.annotations.SchemaContextProvider; 22 | import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext; 23 | 24 | public interface SchemaContextTestHelper extends InjectablesProcessor { 25 | 26 | @SchemaContextProvider 27 | default ModuleInfoBackedContext getSchemaContext() { 28 | return provideSchemaContextFor(ImmutableSet.of( 29 | // dhcp 30 | org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.dhcp.rev180629.$YangModuleInfoImpl 31 | .getInstance() 32 | )); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /fib-management/fib-management-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | io.fd.hc2vpp.common 20 | api-parent 21 | 1.19.08-SNAPSHOT 22 | ../../common/api-parent 23 | 24 | 25 | 4.0.0 26 | io.fd.hc2vpp.fib.management 27 | fib-management-api 28 | 1.19.08-SNAPSHOT 29 | ${project.artifactId} 30 | bundle 31 | 32 | -------------------------------------------------------------------------------- /examples/ncclient/interfaces/af-packet/edit_config_af_packet_interface.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | host-vethAF 21 | VethAF host interface 22 | 23 | vethAF 24 | 25 | x:af-packet 26 | 27 |
28 | 10.2.0.2 29 | 24 30 |
31 |
32 |
33 |
34 |
35 | -------------------------------------------------------------------------------- /routing/routing-impl/src/test/java/io/fd/hc2vpp/routing/helpers/ClassifyTableTestHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.routing.helpers; 18 | 19 | 20 | import static org.mockito.Mockito.when; 21 | 22 | import io.fd.hc2vpp.vpp.classifier.context.VppClassifierContextManager; 23 | import io.fd.honeycomb.translate.MappingContext; 24 | 25 | public interface ClassifyTableTestHelper { 26 | 27 | String CLASSIFY_TABLE_NAME = "classify-table-one"; 28 | int CLASSIFY_TABLE_INDEX = 2; 29 | 30 | default void addMapping(final VppClassifierContextManager classifyManager, final String name, final int index, 31 | final MappingContext mappingContext) { 32 | when(classifyManager.containsTable(name, mappingContext)).thenReturn(true); 33 | when(classifyManager.getTableIndex(name, mappingContext)).thenReturn(index); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /fib-management/fib-management-impl/src/test/java/io/fd/hc2vpp/fib/management/helpers/SchemaContextTestHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at: 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package io.fd.hc2vpp.fib.management.helpers; 18 | 19 | import com.google.common.collect.ImmutableSet; 20 | import io.fd.honeycomb.test.tools.annotations.InjectablesProcessor; 21 | import io.fd.honeycomb.test.tools.annotations.SchemaContextProvider; 22 | import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext; 23 | import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.fib.table.management.rev180521.$YangModuleInfoImpl; 24 | 25 | public interface SchemaContextTestHelper extends InjectablesProcessor { 26 | 27 | @SchemaContextProvider 28 | default ModuleInfoBackedContext getSchemaContext() { 29 | return provideSchemaContextFor(ImmutableSet.of($YangModuleInfoImpl.getInstance())); 30 | } 31 | } 32 | --------------------------------------------------------------------------------