2611 Commits

Author SHA1 Message Date
pierventre
57f7bbb6ac [SDFAB-705] Fix GUI for the control and data plane resiliency
Additionally, fix similar issues in GUI2 and add initial
support for ports with name in GUI/GUI2.

This is also the first step towards supporting port with name widely in ONOS

Change-Id: Ib04f780bf0b7171e82a6beb69b39c0aaeb4be957
(cherry picked from commit 178046ba11ab21d94a1e818fb893931bb015734b)
2021-10-27 06:41:50 +00:00
Miguel Borges de Freitas
5b32b59b34 [OpenFlow] Save dp_desc as a device annotation
dp_desc represents the human readable description of a given datapath
and is provided by an OpenFlow switch when it connects to the controller
in the response to the OFPMP_DESC request. ONOS already has access to
this information when the OpenFlowSwitch object is constructed (accessed
via sw.datapathDescription()) but it does not save it or propagate it in
any way. dp_desc, unlike the dp_id which is "random", works like a switch
label. Accessing this information from the controller app layer is
important so that different business logic can be applied according to
the provided "marking". Thus, save the value into the Device Annotations
if available.

Change-Id: Ifaa715a0440e99ce31fdd8d4753c2e892385e33b
2021-10-14 15:11:09 +00:00
David Glantz
0a5779c775 Fix to reinstall flow rules when they are missing in FlowRuleService.
Change-Id: I1e7e0d62e27012cd090f3a72eb92eadc85afafdf
(cherry picked from commit 5c7fe3acf43bf1304038a7be55a5fd45e5805396)
2021-10-14 13:24:36 +00:00
pierventre
b885685722 [SDFAB-642][SDFAB-643] Fix device disconnection when an instance rejoins
Changes in the GDP are done to make sure the default availability is always
updated through the two step process defined in the provider and to prevent
the disconnection of the devices when an instance rejoins the cluster

Finally, the patch improves logging inside the GossipDeviceStore and improve
the stability of PiPipeconfWatchdogManager by getting rid of the timer and
timer task and by executing the event listeners inside an executor.

Change-Id: Ibc6ce711e15e86bde05dbf3b1c37d2a93516fae3
2021-10-07 22:21:51 +00:00
David Glantz
ff63198d93 Fix to prevent a NullPointerException and instead return an invalid link. Occurs when an intent's path is calculated and there are links that are not annotated with the key identified in the intent's AnnotationConstraint.
Change-Id: Iffb15b1f33c474f16bb8b097e2a6c04993add895
(cherry picked from commit 0b3d1aba7ebcb261ab5d2027dd08c0f691e3d88c)
2021-09-30 20:48:01 +00:00
pierventre
26ac1517c4 [SDFAB-542] Meters cleanup and leftovers v2
- Code clean up (unused code, unuseful comments)
- Remove deprecated internal APIs
- Prevent the ejection of the meter pollers
- Prevent the ejection of the mf pollers
- Fix unproper filter of device events
- Fix delete on store which updated existing meters with dummy value
- Fix NPE in TofinoMeterProgrammable caused by default config
- Update unit tests

Change-Id: Ib2767e3ab3cf146693e61b7e1890419c9743d521
(cherry picked from commit a770879a950d1cc985db1a659da701551700e886)
2021-09-16 16:13:33 +00:00
Wailok Shum
90b988a331 [SDFAB-557] Fix max meter in ONOS
Change-Id: I17f1b760fb4c16e3c0daa0ed0a4e54009b5e9aaf
2021-09-15 17:09:54 +08:00
pierventre
c0914ec586 [SDFAB-500][SDFAB-527] Meters cleanup and leftovers
- Improve ONOS cli enabling CRUD of p4rt trtcm
- Improve ONOS rest enabling CRUD of p4rt trtcm
- Improve MeterService with scope defined reads and integrate in cli/rest
- Add support along the stack for BYTE_PER_SEC unit
- Add support along the stack for COMMITTED and PEAK bands
- Fix several bugs in ONOS cli/rest interfaces
- Improve REST codecs
- Fix NPE in MeterDriverProvider
- Improve PiMeterTransalation by enforcing trtcm config
- Implement explicit translation of the bands
- Fix ONOS reconciliation by removing from the mirror the wrong configs
- Remove unnecessary checks in MeterEntryCodec
- Update unit tests

It will follow a 2nd patch to complete SDFAB-527

Change-Id: I855235b17f60cb1d39f5b9a042c1015105a8a269
2021-09-10 10:22:18 +00:00
pierventre
3b39bd8562 [SDFAB-500][SDFAB-499] Implement user defined index mode for the meter service
- Introduce a boolean to control the meter service modes
- User defined mode does not provide any coordination to the apps
- Only one mode can be active at time
- In addition some sanity checks are peformed by the meter service
- Update existing unit tests and add new ones to test the new behaviors
- Initial clean up of the meters subsystems

Change-Id: I61500b794f27e94abd11637c84bce0dbb2e073f3
2021-09-02 10:50:26 +00:00
Wailok Shum
6d42cff6bc [SDFAB-354] Improve P4RTMeterProgrammable
Change-Id: I65a325f90a49853c6c4a1cfb8212a016a8ec2b2d
2021-08-24 01:33:04 +08:00
Wailok Shum
79919528c8 [SDFAB-355] Revisit MeterService and north abstractions
Change-Id: I685cb90d53f8aa61017ecda9fa7ff842e58e2940
2021-08-24 01:31:51 +08:00
Daniele Moro
08c9e7f71c [SDFAB-357] Backport slicing in fabric and add support for QFI in PDR and fabric
Change-Id: Ieb10140dc0029a0cbf59ddfbb77f64f9a8c7379e
(cherry picked from commit 411f6f7f461db6491d627c2cb31642bdd6e7c8d8)
2021-08-16 16:21:36 +02:00
Daniele Moro
06aac70fd2 [SDFAB-359] Purge all objective for a given application ID
Change-Id: I51847b0be890deacec5caddc18d52bcd2993959a
(cherry picked from commit 607fd0b70e4553226d0937d36de9cde655f2eb62)
2021-08-06 15:01:17 +00:00
Daniele Moro
43ac289464 [SDFAB-359] Allow purging flows, groups and meters by device and application ID
Change-Id: I5e507d230789979ac997dbc99697fa0483363f70
(cherry picked from commit cfd774018c0ed926873b1e171c106217cb2ac568)
2021-08-06 14:13:38 +00:00
Wailok Shum
9664209358 [SDFAB-356] Extend P4RuntimeMeterProgrammable and Codecs to support reset scenario
Change-Id: Ifad0b296568d3f78b2aa792fa63f2f81fa80ebae
2021-08-06 17:28:50 +08:00
Wailok Shum
6a24935592 [SDFAB-384] Modify the MeterStore APIs
Change-Id: I2b612bee1c6addc10a0126fe28880e8076735bfa
2021-08-04 20:22:04 +00:00
Wailok Shum
f013a7852b [SDFAB-352][SDFAB-353] Retrieve MeterFeatures from the P4RT southbound, Extend MeterProviderService and revisit MeterStore
Change-Id: If0dae53643988cb551ff5020abd792cb6d33ff6b
2021-08-05 00:32:55 +08:00
Yi Tseng
29b4f22e8b Add truncate instruction and support it with PI framework
To support truncate by P4Runtime clone/mirror session, we need to pass the
truncate size/length from ONOS northbound to the southbound.
As discussed in the SDFabric syncup, we decide to pass this information via
the instruction in group bucket so applications or pipeliners can simply
reuse current APIs.

Change-Id: I15cc822b7c8008b6b9f8b02f3f399769ae396ef0
(cherry picked from commit 9f94a13bf5695996708eedc17166b5b09308147f)
2021-08-02 20:27:20 +00:00
Daniele Moro
0d8aef5cab [SDFAB-287] Let send packet out throw UpfProgrammableException
Change-Id: Ibdc092dcb24c5e44c5315ef055470f1f5ba671e3
(cherry picked from commit 6a7cb471d32a6c237addf5ef0680c62c2614dcd4)
2021-07-20 15:59:03 +00:00
Daniele Moro
668b3d9b61 [SDFAB-287] Remove and query only upf-related flow entries
In FabricUpfProgrammable, make sure to get and remove only flow entries generated
for the specific device ID and by the UpfProgrammable driver behaviour. Otherwise,
we might remove or get entries from different devices or insert by different driver
behaviour.
Also, add a way to check if a flow rule has been created by a UPF programmable behvaiour.

Change-Id: I7a66885154963fdba8e69f10e187560a1662ad33
(cherry picked from commit d5e3fcbf73f53470a8940630243f439edc1fa549)
2021-07-16 18:12:47 +00:00
Daniele Moro
d900fe4a87 Add support for one shot action profile programming in PI
A P4 table annotated with @oneshot annotation can be programmed
only with the action profile action set. For these kind of tables
we don't issue read request for action profile groups and members.

Change-Id: I7b6a743f4f4df4190f17d958ebb4807aca5feda5
2021-07-01 17:34:35 +00:00
Daniele Moro
f8517cae65 [SDFAB-188] Remove buffer drainer from UpfProgrammable
Change-Id: Id10d8b41d203b4af99867d169255a63fe99b25a0
(cherry picked from commit ac94678fb6204b76f44feef3e6098b18c84359bd)
2021-06-25 13:19:29 +00:00
Daniele Moro
5e66f98ebb [SDFAB-187] Add UpfProgrammable interface in ONOS core
Change-Id: Icef23a14015bb0ebe33ebe57eadecaaadc8eebd3
2021-06-16 22:41:02 +00:00
Andrea Campanella
5bdbe43567 [VOL-4055][ONOS-8138] Adding annotations to meter to allow passing of associated information
This patch allows for adding key value elements in the meter request and in the meter generated from it.
An example is:
Annotations annotations = DefaultAnnotations.builder().set("MeterForDeviceType", "olt").build();
DefaultMeterRequest.builder().withAnnotations(annotations)
Generates:
 DefaultMeter{device=of:00000a0a0a0a0a0b, cellId=2, appId=org.opencord.olt, unit=KB_PER_SEC, isBurst=true, state=ADDED, bands=[DefaultBand{rate=100000, burst-size=5000, type=DROP, drop-precedence=null}, DefaultBand{rate=100000, burst-size=5000, type=DROP, drop-precedence=null}, DefaultBand{rate=100000, burst-size=0, type=DROP, drop-precedence=null}], annotations={MeterForDeviceType=olt}}

Change-Id: Ifaded96ebeb7956bc60cdf311180c984c3ba954e
2021-05-19 13:05:50 +02:00
Daniele Moro
7aa13e6898 Allows to specify matches, action parameters as strings in PI
Some PI elements can encode in their value a string (e.g., when
a P4Runtime translation is used), for this reason we allow users
to specify matches and action parameters as strings.
From southbound, during decode, we interpret the elements as
string if the P4 model suggests that.

Change-Id: I5884de1500437ab647abc200d65de442e23bd1a8
2021-05-18 12:51:24 +00:00
Thomas Vachuska
a5e986d31c Added ability to configure GUI traffic refresh rate
Change-Id: Iceb1196a20c16f09218218da2e095fbe9644bb04
2021-04-06 21:31:11 +00:00
Jordan Halterman
f17d173959 [AETHER-75] Add command to force snapshot of Raft partitions.
Change-Id: I1e79967e3dcbf353749b6a1e524ce71c763ca588
2021-04-06 20:12:55 +02:00
pier
4fcb4b2ed1 [AETHER-72] Add bulk update to ConsistentMultimap
Change-Id: I61e9f0c2ed5ab368777c64b6fb4aa2c8dd31d081
2021-04-06 17:13:58 +02:00
Yi Tseng
83a640ada3 Add INT watchlist config
- add "watchSubnets" to the netcfg of INT app

Change-Id: I271d9c27692c8969999ece32f8aa08b4392216e0
(cherry picked from commit 906febe058507758b67f7074bb1139e3c6170b52)
2021-04-05 00:31:06 +00:00
Thomas Vachuska
2b4de873e4 Added mechanism for apps to easily add their own custom link/node/host highlighting wihout having to create a new UI extensions
Change-Id: Iefa21d76190c60db79a4b07a8b22e301d29fe58e
2021-04-02 07:12:47 +00:00
Thomas Vachuska
f06f5d676c [AETHER-1212] Added means to configure host links to appear as 'wireless'
Setting the host "uiType" to 'cellphone' will make the links "wireless"
and appear as dashed lines.
Additionally, a new annotation "connectionType" was added for hosts,
which when set to "wireless" will make links change appearance for any
type of hosts.


Change-Id: Iad87eb5c180b0a9175108c1179d9d28ae906e924
2021-03-10 22:30:38 +00:00
Daniele Moro
2375917830 Add support for arbitrary bitwidth packet metadata
This patch is related to #24172

Change-Id: I29fc82bd3944b7fc9f58021df56cadd209cac190
2021-03-01 17:57:36 +00:00
Daniele Moro
c6f2f7f3c5 Add Optional match fields support to PI subsystem
Change-Id: Ic458f59cab98340e40c04a0ad060d3c725ac5dbb
2021-02-05 19:03:05 +01:00
pierventre
ca0c0d0880 [AETHER-539] Fix for flowId computation
This patch includes:
- New methods in the PortNumber to take into account the port name
- PortCriterion uses the new toString method to avoid mismatch
  in the flowId computation
- The original toString() method is left unchanged to avoid
  disply issues of the ports with names

Change-Id: I392281b5eee160227886f9738fae97f237b1b04f
2021-01-23 21:12:21 +01:00
pierventre
69329170ad [AETHER-1104] Calculate PiPipeconf fingerprint in a deterministic way
New master after taking over a switch was pushing again the pipeline
and all the flows and groups. This was happening because DefaultPiPipeconf
fingerprint was not calculated in a deterministic way across the cluster.

This patch introduces the following changes:
- Implements toString method in each abstraction representing a pipeline
- Hashes the p4Info file to generate a consistent hash of the pipeline model
- Uses a sorted collection to generate a consistent hash of the extensions

Change-Id: I792283b0a9b821284add36b3aba52843f33527c3
2021-01-21 21:55:24 +01:00
pierventre
5a936f5c8b [AETHER-599] Implement FabricPipelineTraceable
Core changes supporting fabric traceable implementation.
Includes minor fixes to the OFDPA traceable unit tests

Change-Id: I2f0d1172022a8fc725df9e96526092c59ddc0e0b
2020-12-30 19:20:32 +00:00
Daniele Moro
5c82b0fb37 Support arbitrary bit width action parameter and match field
This commit goes into the direction of supporting user-defined types in P4Runtime.
The modification is focusing on supporting fields and params with arbitrary bit width, that is the
case of using a String with the p4runtime_translation annotation on the user-defined type.

Change-Id: I7db7a6d97211378ff78ab4f1b3734a0bec4558e6
2020-12-15 17:50:10 +00:00
Jian Li
a56dea6ecd Support to enable multicast snooping of ovsdb through bridge desc
Change-Id: Ia14e67ab3a5a734a8a0eaa0b7bdda2fc9429c905
2020-12-12 10:21:02 +09:00
Thomas Vachuska
901774120a Added ability to configure or programmatically inject default maximum number of paths when computing topology using default methods.
Change-Id: Ic0c17f2e40c7334b325c0dd799f781ec65c889d6
2020-11-16 18:37:46 +00:00
alessio
225e2b0f3a Extend EncapsulationConstraint to include a suggested value of the Identifier.
The suggested identifier is used on each link, if available.
In case it is not available on one or more links, the identifier is selected with the active policy.

Patch 2: addressed comments by Pier.

Patch 3: addressed comments by Pier.

Tested with VLAN ids and MPLS labels.

Change-Id: Icdf901ef8d0786b2061d6be4db511cb89d26ddfd
2020-11-05 14:48:24 +00:00
alessio
0af65230b9 [ODTN] Interface of a new driver behavior for checking internal connectivity in a device.
This would be used mostly for optical devices which typically have many connectivity constraints.

The patch also includes a CLI command to using driver behavior and an empty driver implementation.

patch 1: first draft: behaviour, CLI, empty driver, xml.

patch 2,3,4,6: checkstyle.

patch 5: comments by Andrea.

Change-Id: Ia1573a9f14b49c39c96fa3351ccc37988f1526ec
2020-10-28 17:41:17 +00:00
Yi Tseng
d14f1a3f22 Support install IntIntents to device with postcard mode
Include the following changes:
 - INT application now can install reuls/configs to the device based on the
   Int intent telemetry mode and the functionality supported by device.
 - Add "Telemetry Mode" option to INT app GUI

Change-Id: I1a9938b076030497a3b2984abe66fed09c190c7d
2020-10-23 01:09:40 -07:00
pierventre
b58e9c9c02 [AETHER-38] Extract pipeline-dependent code from current T3 implementation
- Exposes some ofdpa specific tables and types
- Introduces a new driver behavior PipelineTraceable
- OfdpaPipelineTraceable is the first implementation of the
  new driver behavior
- New abstractions are introduced to encapsulate the input/output
  of the traceables processing
- Implements some basic unit tests for Ofdpa implementation

Change-Id: I89d3fdeda445983ec7ebfa9ebb78afb1c6d3fd8f
2020-10-16 08:21:14 +02:00
Yi Tseng
c4f90a5f8a
Small INT app and UI improvements
[INT App]
 - Load INT report config when activate the app
 - Remove config listener and config factory from app when deactivate
 - Check INT intent map before remove a INT intent
 - Add more check to check the input from frontend UI
 - Change log level of UI message handler from info to debug

[GUI1]
 - Reformat CSS code
 - Remove '$scope.sendIntConfigString' which breaks the UI
 - Fix regular expression that matches IP prefix
 - Remove "required" attribute from all field
 - Add additional check to prevent sending invalid input to backend
 - Use 'let' instead of 'var' to limit the scope of variable
 - Make INT button aligned with other elements
 - Show message if any field is invalid

[GUI2]
 - Remove INT collector config panel
 - Reformat HTML code
 - Fix regular expression which matches the IP prefix

[API]
 - Add default value '0' for all fields in INT device config
 - Skip checking the metadata types when building the IntObjective since
   some pipeline won't need it

Change-Id: I3f37c3fd385bf4df067393717e1afc5fe58cb8b0
2020-10-05 12:43:10 -07:00
Thomas Vachuska
4f0252c34d Cleaned up docs/external; deprecated docs/internal
Change-Id: Iebaebe67c22dd1fa03fc1d4960aa5c8eaf75d714
2020-09-28 11:15:45 -07:00
pierventre
442200542a Immutability for getMeters APIs
Change-Id: Iaf908766aa360e84e82306e398fff56c9593d8f1
2020-09-28 18:07:27 +02:00
souvikdas95
c94223a751 Add support for ARP_TPA, ARP_THA Set Field Instructions
Signed-off-by: souvikdas95 <souvikdas95@yahoo.co.in>
Change-Id: I9fe44d8ece8dd268bff4ec4befc31a8ea24ac9aa
2020-09-23 18:04:34 +00:00
Yi Tseng
da70796c9b Add netcfg for INT
Use network config subsystem to handle such configs

Change-Id: I8ec14d31c30e3d1d8cd2c703d8db5535bb8b5cd4
(cherry picked from commit 0f1ffd162f0a8fd2a12ac26f12b54519064c4a3b)
2020-09-23 05:06:43 +00:00
Yi Tseng
b7b79af970 Add builder function to IntObjective
Change-Id: Ief782b264b618d18174a476febe5960cfb28583f
2020-09-17 20:26:24 +00:00
Charles Chan
416ef14b9b [VOL-2950][VOL-3110][AETHER-457] Fix a bug in component readiness check
The existing code checks for onos-core-net only due to the bug

In addition, this patch introduces a new REST API to check health of given app.
Active in app status only indicates that the app has been activated.
This new API will look deeper and make sure all OSGi features, bundles and components of given app are all ready.

Change-Id: If91326ba9cffdbe25821eeaaa092ec9d2ab952ea
(cherry picked from commit 5bdaf106e4b30208d6acee6ad5bf1d58c9057d66)
2020-08-12 00:05:43 +00:00