383 Commits

Author SHA1 Message Date
David Glantz
dfb3ceb78d Return intent collection with details
Added backwards compatible flag to GET /intents/ to return full intent JSON.
Added GET /intents/application/{appId} to return application specifc intents.
Extended IntentService to include getIntentsByAppId(appId).
Removed hard-coded intent codec lookup in IntentWebResource.

Change-Id: I38e7b1dbd7669e654afe723f6ec3a4eb7a9af6fb
2021-11-07 09:18:19 +00:00
Andrea Campanella
8f6594c6fb [ONOS-8150][VOL-4414] Fix for NPE in rest API after app gets uninstalled
Change-Id: I1cf0b330af43be8ea2211c5831ef715c1eafdea9
(cherry picked from commit 365751943b0c5316e79fbc1201a8d7af659e5008)
2021-10-25 14:08:55 +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
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
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
Lakshya Thakur
f111f57be9 Added CSP to prevent iframe embedding of gui2 and swagger ui
Change-Id: I77c5524cbb80f8f06de5f1cba8412cfb58a36324
2020-11-27 23:47:55 +05:30
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
Andrea Campanella
0ab52ba618 [ONOS-8102] Moving get(MeterService.class) into each MetersWebResource Method to avoid startup race condition between Web resource and meter service class creation.
Change-Id: Ie1a14aeec91b54a120ccd3d14f9edc846426c857
(cherry picked from commit 6347ff4c46de1531856c3de318f73b62002fcc3c)
2020-06-10 11:57:31 +00:00
Seyeon Jeong
9ceeacb11e Add JSON decoders for Host and HostLocation
- HostsWebResource will use the Host codec in parsing JSON for create-host requests

Change-Id: If51bf3433a4ab45889a94a6d11bbd3db6b96d074
(cherry picked from commit 46d2462e4e49855b0d533035250776589fd05d88)
2020-03-31 21:22:06 +00:00
Seyeon Jeong
8188da17c1 Found a few codec inconsistencies between JSON encoders and decoders
- Fix EtherType inconsistency in coding VLAN_PUSH and MPLS_POP instructions
- Fix group id inconsistency in coding a Group instruction
- Fix Group identifiers to be treated as unsigned integers in GroupCodec
- Add a JSON decoder for FlowEntry

Change-Id: Id80b9e009550e3b71b9274adb116e5179391fa66
(cherry picked from commit 494f586853c1a87ba62f20b477e211f996baded5)
2020-03-26 19:40:46 +00:00
Charles Chan
5425aae859 Supported recently introduced fields in HostsWebResource
Change-Id: I3bc3fd272008388326041540c10e8a103b01c02c
2020-01-16 20:54:03 +00:00
Charles Chan
eb5bd49982 Added CLI and REST support for auxLocations
Change-Id: I04e78f766dcbb18bce4a2f9160d3740ec2fbd846
2020-01-09 23:34:56 +00:00
DongRyeol Cha
b1177cc1b7 Add new rest api to get ports for all devices
Currently, the onos provides a rest api to get port status.
But if we want to get port status for all devices, we need to call rest api with each device ids.

So, this changes provides a rest api to get ports for all devices.

Change-Id: Iaa123ab341890684b7f0991d8cc75d73cd76c9cb
2020-01-07 17:30:00 +00:00
Jian Li
0ad0c55c06 Bump up jackson deps version to 2.10.0 with updated snakeyaml deps
Change-Id: I7c1b11abad0872d05321869a4221b3907b2aa155
2019-12-16 22:26:21 +09:00
Rohit Singh
35fd94cfaf BER Driver Implementation
Change-Id: Ie215228ae4081ab0b984aafd757601a982ec84d2
2019-12-04 16:29:45 +00:00
Rohit Singh
16d4df99b6 cassini Modulation Driver Impl | ONOS-7979
Change-Id: Iba45f3e41fc39e63c7dc96acf5d2da248dc6bf68
2019-08-01 10:03:25 +00:00
Harshada Chaundkar
5a198b0359 REST API for obj-nextids
Change-Id: Ibad03de0a6ffa8a478037120c84edfe6722f4d9b
(cherry picked from commit 0acb326963dda08a5eef16134eca5cba84b8e75d)
2019-07-26 09:39:04 +02:00
Ravi Dewangan
5edc84aab0 useStaleLinkAge for VanishStaleLink
Also include gerrit #22247

Change-Id: Ifd8079172a096bef0edf89daca97395c2d35a5ce
2019-06-27 02:48:48 +00:00
Jordan Halterman
b81fdc1168 Optimize filtering flow rule counts by state
Change-Id: I1e1d80b8e618743ee449162a081cf42e71c99abf
2019-03-06 17:59:20 -08:00
Ray Milkey
584fa13df8 REST specific provider is not ancillary, it should be a primary
Change-Id: I19f7076085709a79019c5b73ae361e819ff92ef7
2019-03-06 23:41:58 +00:00
Harshada Chaundkar
4f62a1ea78 Potential Null Pointer Exception fix for Cpman, Groups , Flows and Mastership API
Change-Id: I5720152a66855dd2f9f20b01da8e2dc6ee24fa7f
2019-02-21 08:06:55 +00:00
macauley_cheng
c4b6b41efe This api will register hostPorvider, if something wrong like no ipAddress or location specified, it will cause HostProviderRegistry say hostprovider already registered
Change-Id: I43c0551e140ebc4de45759b28e42de7eb71824c6
2019-02-18 17:47:07 +00:00
Arjun E K
fb5843ef4c fix for service not found error
Change-Id: I92091b5932e2ecefb074861085015393b8d1b61d
(cherry picked from commit cab2869c3115bcbe11f310c8b7dfdf44c76c6e5b)
2019-02-18 16:14:09 +00:00
Ray Milkey
47f09c5674 Remove deprecated FlowRuleExtPayLoad API
Change-Id: Id20e1e296670f8cc94b23c3fd2272a1c2de3990e
2019-02-13 23:17:40 +00:00
Harshada Chaundkar
1a098eb4c3 PacketProcessorWebResource cannot find PacketService when it become instantiated; changed debug logs to trace in FPMManager
Change-Id: I57f39c730bc4101d21dc1c6d7b6387a42c2afb31
(cherry picked from commit 0d7cf74b85729c4346ae53b441793c24af0a3102)
2019-01-22 18:44:13 +00:00
Arjun E K
53a2008eef code modificationss with respect to #20641
Change-Id: Ib6e13458e54e5a1bca578113358913461c237735
2018-12-19 16:57:24 +00:00
Thomas Vachuska
bd8ddfe228 Refactoring audit subsystem to clean-up and eliminate back-dependency from core to CLI; still needs additional work.
Change-Id: I93c04c94f27b7b89c582b359eebe125458a573a7
2018-12-14 14:47:17 -08:00
arjunek1992
f6353d4fc8 ONOS audit REST API support
Change-Id: Ic2910785f1f16fe5e36b33c1a73f44539cd8fbea
2018-12-07 21:13:07 +00:00
Thomas Vachuska
52f2cd1520 Detangling incubator: virtual nets, tunnels, resource labels, oh my
- virtual networking moved to /apps/virtual; with CLI & REST API
- tunnels and labels moved to /apps/tunnel; with CLI & REST API; UI disabled for now
- protobuf/models moved to /core/protobuf/models
- defunct grpc/rpc registry stuff left under /graveyard
- compile dependencies on /incubator moved to respective modules for compilation
- run-time dependencies will need to be re-tested for dependent apps

- /graveyard will be removed in not-too-distant future

Change-Id: I0a0b995c635487edcf95a352f50dd162186b0b39
2018-11-13 22:14:50 +00:00
Ray Milkey
a218d43062 Merge branch 'master' into merge
Change-Id: Id77bb2de77dd288404c83e331b076aaf9aafacc5
2018-10-30 12:44:55 -07:00
Jordan Halterman
2ac98b92e4 Remove unsupported onos-form-cluster scripts
Change-Id: Idb9dcf8efd8f9dc83bc2d0b8afee80fbe573fba1
2018-10-29 22:26:11 +00:00
Ray Milkey
956bb1691a Merge remote-tracking branch 'origin/master' into dev-karaf-4.2.1
Change-Id: If611105632e508cb17352c6f5b1cbcfd85f716d1
2018-10-26 10:53:44 -07:00
柯志勇10068695
0ae31468d3 MeterRequest may be null, if meterRequest is null, the implementation of meterService.withdraw(meterRequest, tmpMeter.id()) will cause an exception.
Change-Id: I2e2cec49c88521041c2cdf37e40644aa36c16862
2018-10-24 09:55:48 +00:00
Ray Milkey
0b18b72872 Merge branch 'master' into merge
Change-Id: I163ecf699b554e33f4db938c66b73c9911e51135
2018-10-16 13:19:15 -07:00
rsahot036
4df80f1796 REST API support for packet-processors
Change-Id: Id723a3f62e584f3325e8a2017c98c18e919168f6
2018-10-16 10:05:57 -04:00
Ray Milkey
d84f89ba3d [WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
2018-09-28 11:20:57 -07:00
psneha
f31ac6ff9f Added one more Component Config REST API; for specified component and variable.
Change-Id: I810aa90636c55c8b05c146780ad28c307cefff33
2018-08-21 12:17:32 +00:00
jaegonkim
0ed6443127 [ONOS-7626] FlowsWebResource cannot find FlowRuleService when it become instantiated
Change-Id: I71589395e300db1a04131f3ac4f6861b3fdebd0d
2018-08-13 11:09:09 -07:00
Thomas Vachuska
67484d9008 Added RBAC for REST APIs.
- admin role required for POST, PUT, DELETE & PATCH
- viewer role required for all other requests
- cleaned up all web.xml files for consistency and correctness

Change-Id: I33bad5cec0fb0f4285eed84173025b0a107b5aec
2018-07-17 12:10:00 -07:00
rsahot036
2c2c6cc3e0 Adding get flow by table REST api, fixing exceptions in dhcp
Change-Id: Idc07992a91c79f594c998b2d78b980036077c0ad
2018-06-27 17:56:22 +00:00
Saurav Das
137f27f0e7 Bugfix in routing logic to avoid null groups; Improvement in group handling.
Two main changes for the bug-fix:
    - avoid doing a full-reroute in the event of link failure as this will leave behind stale state in stores
      if event has been preceded by mastership change leading to the nuking of the ecmpSpg for one of the
      link's devices; instead do a rehash
    - when full-reroute is attempted, do it only once, with a complete nuke of the next-obj store

Improvement in group handling allows for a max number of retries for a group that failed to be added.
Earlier behavior was to try only once, and if it fails, it gets removed from the group-store. Now it
is removed after a couple of retries - so total 3 attempts to program the group.

Change-Id: I54ca8203cef779463522b01353540d12f8be3c91
2018-06-20 17:48:32 +00:00
rsahot036
0f9564d673 Adding new REST api to fetch pending flows only
Change-Id: Idbc84e776934fb8dedd719b1a23be294615c286c
2018-04-30 21:34:40 +00:00
Thomas Vachuska
7ef2671288 Adding new REST API resource to obtain system level summary.
Change-Id: Ia3ce18a50a56aa19d07b594990d3136a7ef07706
2018-04-26 00:06:55 +00:00
Jonathan Hart
471bcbb4fd Add REST API to change administrative state of a port.
Change-Id: Ib0f2fc9e0a2d8126288784d5da78367037638625
2018-04-24 19:51:58 +00:00
Ray Milkey
1657032c03 Fix handling of several error cases in the application REST API
Change-Id: I5a18374834b01e7b79b8f874356bf5f76168b66e
2018-04-17 10:26:54 -07:00
Jonghwan Hyun
2c95acfde8 Support double-tagged host
Change-Id: Ie4041a0b5159e7a8b3a9ed82b55ce3c26b520a3b
2018-04-09 23:17:44 +00:00
Ray Milkey
957bb37377 ONOS-7577 - REST API to add and remove buckets from a group
Change-Id: I95bad8db7baf6231ffb0c077d9e5d8243da64fd4
2018-04-06 00:38:22 +00:00
Frank Wang
d7e3b4bc9d [ONOS-7051] Support for P4Runtime meters
Change-Id: Id71374af65aeb84b71636b4ec230dc6001a77a8b
2018-04-04 00:35:08 +00:00
Thomas Vachuska
a10137c0fc Fixing residual ON.Lab references.
Change-Id: Ic54a281ce67e49236c7aeb536729d3900dd9433d
2018-04-04 00:02:22 +00:00
Ray Milkey
86ee5e8711 Upgrade fasterXML libraries for OS-9
Upgrade fasterXML to version 2.9.5 to address security vulnerability
Wrap calls to treeRead(InputStream) to handle new behavior of null streams

Change-Id: Id199cfacd0cf9e5371dc33de9f1e058c2e72eaa5
2018-04-03 16:49:03 +00:00