netconf.git
11 months agoEliminate NormalizedNodeFactory 88/107088/2
Robert Varga [Wed, 26 Jul 2023 16:09:18 +0000 (18:09 +0200)]
Eliminate NormalizedNodeFactory

The only user is ReadDataTransactionUtil, which can easily perform the
same function, without the need to go through
FutureCallbackTx.addCallback().

Change-Id: Ie2bb31b45565d2225933bc0026a765b8c2851763
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoReduce use of FutureCallbackTx.addCallback() 87/107087/1
Robert Varga [Wed, 26 Jul 2023 15:55:53 +0000 (17:55 +0200)]
Reduce use of FutureCallbackTx.addCallback()

Do not use addCallback() for checking the existence of data. This
inlines the synchronous call and allows it to be be further composed.

Change-Id: I6ea04ff197ae24626fc5ffb409902d1b13dd664d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use FluentFuture in RestconfStrategy 84/107084/1
Robert Varga [Wed, 26 Jul 2023 15:08:59 +0000 (17:08 +0200)]
Do not use FluentFuture in RestconfStrategy

We are not using the transform(), do not wrap the futures we are using.

Change-Id: Iaf061e2d9a0feb867373265d33afd200d8beab48
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse switch expressions in NetconfRestconfStrategy 83/107083/1
Robert Varga [Wed, 26 Jul 2023 15:01:07 +0000 (17:01 +0200)]
Use switch expressions in NetconfRestconfStrategy

We are switching on a well-established enum, use switch expressions to
eliminate never-taken paths.

Change-Id: I1f5aaca2b8a8b683b41570ef4c0eb314688082d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use ParserIdentifier for Point parsing 82/107082/3
Robert Varga [Wed, 26 Jul 2023 12:45:40 +0000 (14:45 +0200)]
Do not use ParserIdentifier for Point parsing

YangInstanceIdentifierDeserializer provides a much more direct access to
the path, use that to improve structure and eliminate nullness warnings.

Change-Id: I3e63be7870603d2a882ff36e5774cf7a00c71c2b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoClean up dataChangeStreamEntry() 81/107081/2
Robert Varga [Wed, 26 Jul 2023 12:21:04 +0000 (14:21 +0200)]
Clean up dataChangeStreamEntry()

Use DataSchemaContext instead of transcoding the YangInstanceIdentifier
to and from String.

Change-Id: I9b7a952c0567ec24ad1f15710ddaad7a9c835b4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoImprove notificationStreamEntry() 80/107080/3
Robert Varga [Wed, 26 Jul 2023 12:03:15 +0000 (14:03 +0200)]
Improve notificationStreamEntry()

Pass down EffectiveModelContext, so that we can locate the notification
more quickly.

Change-Id: I31ac32bae8267cb258ee3ca0dbccf5a3ccbb594d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoMove restconfStateStreamPath() 79/107079/2
Robert Varga [Wed, 26 Jul 2023 11:55:49 +0000 (13:55 +0200)]
Move restconfStateStreamPath()

RestconfStateStreams is a more natural place for these utility methods,
move them there.

Change-Id: Ibf68e1a6e3b1e5bf48f8b38c492200684784c180
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoMove RestconfMappingNodeUtil 77/107077/1
Robert Varga [Wed, 26 Jul 2023 11:39:59 +0000 (13:39 +0200)]
Move RestconfMappingNodeUtil

RestconfMappingNodeUtil contains only utilities for creating
ietf-restconf-monitoring's streams content. Move it and assign better
names all around.

Change-Id: I57ce249aa1a425337bfbc9deb3c0407c38d2c590
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoMove createYangNotifiStream() 76/107076/1
Robert Varga [Wed, 26 Jul 2023 10:48:19 +0000 (12:48 +0200)]
Move createYangNotifiStream()

This method has a single caller, which can provide proper context,
allowing use to simplify the task of creating the stream name.

Change-Id: Ib03450988c93913d737e094ac5b67a596d8784c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoClean up parseNotificationStreamName() 75/107075/1
Robert Varga [Wed, 26 Jul 2023 09:34:03 +0000 (11:34 +0200)]
Clean up parseNotificationStreamName()

Do not convert the enumeration to a String for comparison purposes.

Change-Id: I6c9eb92835cc3004fa2e57f16583aae1c8c8fb09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd RFC6243 reference 74/107074/1
Robert Varga [Wed, 26 Jul 2023 00:27:40 +0000 (02:27 +0200)]
Add RFC6243 reference

Add a link to back the copied text.

Change-Id: I43880108d894cd9c2911f6e032a8a21bb2d84fe1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdvertise ChangedLeafNodesOnlyParam 73/107073/1
Robert Varga [Wed, 26 Jul 2023 00:18:35 +0000 (02:18 +0200)]
Advertise ChangedLeafNodesOnlyParam

Update CapabilitiesWriter to advertise ChangedLeafNodesOnlyParam as
supported.

JIRA: NETCONF-1100
Change-Id: I98cd364a54dbfd009b2231d763a1e20309e1a7aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUpdate RFC links 72/107072/1
Robert Varga [Tue, 25 Jul 2023 23:59:12 +0000 (01:59 +0200)]
Update RFC links

Use rfc-editor.org links instead of datatracker.ietf.org for published
RFCs.

Change-Id: Ie9c36a32cea540292703bd7d4c63c3b3af885354
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDisconnect CreateStreamUtil from NormalizedNodePayload 71/107071/4
Robert Varga [Tue, 25 Jul 2023 22:57:11 +0000 (00:57 +0200)]
Disconnect CreateStreamUtil from NormalizedNodePayload

CreateStreamUtil really implements RPCs and as such it does not require
all the context provided by NormalizedNodePayload. Refactor its methods
to properly mirror RPC invocations.

Change-Id: I4500af63387c316fa7a6d0b42be563450895404a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoTighten createDataChangeNotifiStream() 70/107070/1
Robert Varga [Tue, 25 Jul 2023 22:40:41 +0000 (00:40 +0200)]
Tighten createDataChangeNotifiStream()

Use explicit NodeIdentifiers for the data we expect from the sole
caller. This makes it much more obvious as to what is going on.

Change-Id: Iabfce27030811def343d977a3500696face5b18a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoTighten RPC dispatch 69/107069/3
Robert Varga [Tue, 25 Jul 2023 22:09:58 +0000 (00:09 +0200)]
Tighten RPC dispatch

We have simple RPC dispatch, make sure we tighten the contracts to
conver exactly the RPCs we support.

Change-Id: I26b684f2d363f1a0b72982a43d5cdb4d80bc2f10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoTie RestconfStreamsSubscriptionServiceImpl to its model 67/107067/2
Robert Varga [Tue, 25 Jul 2023 17:41:17 +0000 (19:41 +0200)]
Tie RestconfStreamsSubscriptionServiceImpl to its model

The implementation here is tied to subscribe-to-notification.yang,
make sure we have a strong connection to the model.

Change-Id: Ia1fc08b37a483d6ae69580c90da30687a4f779f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoHide getRestconfStrategy() 66/107066/2
Robert Varga [Tue, 25 Jul 2023 17:23:15 +0000 (19:23 +0200)]
Hide getRestconfStrategy()

This method does not touch shared state, hence it should not be
synchronized. It really is a private detail, visible for testing only.

Change-Id: I41a765a7f7aa8b5dcda6e9d57fc4f065f760fbf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoInline checkItemExists() 64/107064/3
Robert Varga [Tue, 25 Jul 2023 16:52:43 +0000 (18:52 +0200)]
Inline checkItemExists()

This method is used only from MdsalRestconfTransaction, inline it there
in a much simpler form. This makes the flow clearer and eliminates a
user of FutureCallbackTx.

Change-Id: I2f00d0266991d5a7dc0ff8cc9b58b3b26a268d2d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoClean up checkListAndOrderedType() 65/107065/3
Robert Varga [Tue, 25 Jul 2023 17:01:43 +0000 (19:01 +0200)]
Clean up checkListAndOrderedType()

Use instanceof patterns and use a single exception throw site.

Change-Id: I99fdea1d38262d2ed850169bd15d6973168328ed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoClean up FutureCallbackTx 63/107063/2
Robert Varga [Tue, 25 Jul 2023 16:38:14 +0000 (18:38 +0200)]
Clean up FutureCallbackTx

Use instanceof patterns to reduce casting.

Change-Id: If1bceafaeaf348f5b234b4c78007d8bf7fbfb87a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRemove RestconfConstants.SLASH_SPLITTER 61/107061/3
Robert Varga [Tue, 25 Jul 2023 16:12:43 +0000 (18:12 +0200)]
Remove RestconfConstants.SLASH_SPLITTER

This is a utility, used independently by two components. Eliminate it by
copying it to their respective users.

Change-Id: I43a7d103396e35f22d1a0873317856b7191203b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoMove RestconfConstants.MOUNT 60/107060/3
Robert Varga [Tue, 25 Jul 2023 16:09:09 +0000 (18:09 +0200)]
Move RestconfConstants.MOUNT

This constant is only used in ParserIdentifier, move it there.

Change-Id: I8caba44e532168e34e640f231d2379c57f3b9a5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoExternal service integration support for ssh transport. 85/106785/6
Ruslan Kashapov [Mon, 3 Jul 2023 10:51:41 +0000 (13:51 +0300)]
External service integration support for ssh transport.

Existing authentication service expected to be used
for ssh authentication when server is running in karaf.

JIRA: NETCONF-590
Change-Id: I1c6df46ee165a78f7bdd87bd7597ae8f35f75715
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoMake NetconfMessage methods final 64/106964/2
Robert Varga [Fri, 21 Jul 2023 16:30:58 +0000 (18:30 +0200)]
Make NetconfMessage methods final

The toString() and getDocument() methods should not be overridden, make
sure that is the case.

Change-Id: I44a1484ebec9475b4616407bc9975151d041873f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoSplit out CapabilitiesWriter 09/103209/13
Robert Varga [Fri, 11 Nov 2022 00:10:36 +0000 (01:10 +0100)]
Split out CapabilitiesWriter

Maintaining ietf-restconf-monitoring capabilities is a separate task
not done by any other component (unlike ietf-yang-library). Separate it
out.

JIRA: NETCONF-668
Change-Id: Icc0e7bbf4bc0c9ecdac385b7ce311ea49868b9c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC8639 model 50/107050/1
Robert Varga [Tue, 25 Jul 2023 14:40:15 +0000 (16:40 +0200)]
Add Automatic-Module-Name to RFC8639 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: I876205b01cf6ee7ee2da669cf682308ba9879ea6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC8526 model 47/107047/1
Robert Varga [Tue, 25 Jul 2023 14:11:04 +0000 (16:11 +0200)]
Add Automatic-Module-Name to RFC8526 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: Idfad9b00561fc04a6baebca786fc310f016ce2ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC8341 model 46/107046/1
Robert Varga [Tue, 25 Jul 2023 13:55:47 +0000 (15:55 +0200)]
Add Automatic-Module-Name to RFC8341 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: Ic23039068b0cea4b9f735dda2642d5f6b85c277c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC8040 model 45/107045/1
Robert Varga [Tue, 25 Jul 2023 13:53:21 +0000 (15:53 +0200)]
Add Automatic-Module-Name to RFC8040 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: I42e36eb7fd569a9d56f93ecb0f221a4e767d800c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC7407 model 44/107044/1
Robert Varga [Tue, 25 Jul 2023 13:43:52 +0000 (15:43 +0200)]
Add Automatic-Module-Name to RFC7407 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: I9e6b4146576deb79e6aebc5ce334b482c62b29aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC6470 model 40/107040/1
Robert Varga [Tue, 25 Jul 2023 12:51:50 +0000 (14:51 +0200)]
Add Automatic-Module-Name to RFC6470 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: I9a8156e758e61d04073d9f55e8905cebc7c43eae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC6243 model 39/107039/1
Robert Varga [Tue, 25 Jul 2023 12:48:29 +0000 (14:48 +0200)]
Add Automatic-Module-Name to RFC6243 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: I0baab487a3640b55b2b29486cc998fdd26d320d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC6022 model 38/107038/1
Robert Varga [Tue, 25 Jul 2023 12:48:17 +0000 (14:48 +0200)]
Add Automatic-Module-Name to RFC6022 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: Ia4c857bedb21ab07e1437ee21d9052dc5f6319d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRemove fillDoc 62/106462/15
Oleksandr Zharov [Tue, 13 Jun 2023 11:23:50 +0000 (13:23 +0200)]
Remove fillDoc

Removed fillDoc method - we no longed need it to be separate method.

JIRA: NETCONF-1052
Change-Id: I5f62ed182f7dba9f3394cdf5cfe4e132aba10840
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
11 months agoOpenApi: Make version and title required 72/106972/1
Ivan Hrasko [Mon, 24 Jul 2023 07:26:54 +0000 (09:26 +0200)]
OpenApi: Make version and title required

Version and title are required by OpenApi spec in Info object.
Check if both are present in Info compact constructor.

JIRA: NETCONF-1052
Change-Id: Id9bd2e43c95b587152d1f423a3b304bb953ef652
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoRemove Info builder 61/106461/14
Oleksandr Zharov [Tue, 13 Jun 2023 11:11:36 +0000 (13:11 +0200)]
Remove Info builder

Currently Info.Builder used only once and it is also redundant.
Removing it now in prepare for followup patches.

JIRA: NETCONF-1052
Change-Id: I978b7d067fd007114b0f22a4f5ffb98b3ab18c5b
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
11 months agoEliminate DefinitionGenerator#putIfNonNull 93/106893/4
Matej Sramcik [Wed, 12 Jul 2023 13:02:03 +0000 (15:02 +0200)]
Eliminate DefinitionGenerator#putIfNonNull

Method putIfNonNull(ObjectNode, String, String) is used only once,
so is inlined.

JIRA: NETCONF-1080
Change-Id: I1a9fe96ca4b37bbfe1fc46ee9d697d316591c31c
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
11 months agoEliminate appendPathKeyValue() in restconf-openapi 14/106914/3
Šimon Ukuš [Thu, 13 Jul 2023 06:39:03 +0000 (08:39 +0200)]
Eliminate appendPathKeyValue() in restconf-openapi

The protected abstract void appendPathKeyValue method has just one,
single-line implementation, and only one usage.

This change eliminates the method.

JIRA: NETCONF-1084
Change-Id: If45cd7ae2ae2d2a11c5da787397f22e20de2dbc8
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
11 months agoRefactor creating unique parameter name 98/106598/14
Yaroslav Lastivka [Wed, 21 Jun 2023 12:37:15 +0000 (15:37 +0300)]
Refactor creating unique parameter name

Create set containing already existing parameter names and use
simple while loop instead of nested for loops.

JIRA: NETCONF-1060
Change-Id: I34359182cfc1690947cf8ddd4ead297d4039e619
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoFix MountPointOpenApiTest 19/106919/1
Ivan Hrasko [Thu, 13 Jul 2023 14:57:39 +0000 (16:57 +0200)]
Fix MountPointOpenApiTest

MountPointOpenApi#getMountPointApi signature has been changed
and no more accepts Optional. Reflect this change in tests.

Change-Id: Idd967bf1602766377d05d61ec50a62626b5d18f6
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoRefactor getSortedModules method 16/106916/3
Ivan Hrasko [Thu, 13 Jul 2023 11:09:47 +0000 (13:09 +0200)]
Refactor getSortedModules method

Refactor BaseYangOpenApiGenerator#getSortedModules method to take into
account that Module cannot be null and we can simply use
Collections#addAll method.

Change-Id: Ib08effd03b1bca58c512d0b186fa2f8fab02f5a3
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoOpenApi: Do not use ArrayNode to store parameters 34/106634/14
Yaroslav Lastivka [Thu, 22 Jun 2023 08:37:04 +0000 (11:37 +0300)]
OpenApi: Do not use ArrayNode to store parameters

We are using ArrayNode to store parameters. We use it only as a
List which stores parameter objects.

Record Parameter has been created. ArrayNode parameters has been
replaced with List<Parameter> inside Operation.
OperationBuilder#getTypeParentNode has been eliminated.

JIRA: NETCONF-1056
Change-Id: I941e89f78e4b9a82d577a2c96f16a82c261b8a4d
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoAdd tests that verify authentication feature 23/106723/13
Matej Sramcik [Tue, 27 Jun 2023 14:51:14 +0000 (16:51 +0200)]
Add tests that verify authentication feature

Add tests to  check if securitySchemes and security elements are present.

JIRA: NETCONF-1064
Change-Id: I949ff9ee51cdab607aab88c7e0d208c2ec1b9af7
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
11 months agoEliminate code duplication in doc creation 56/106256/11
Šimon Ukuš [Thu, 8 Jun 2023 11:52:40 +0000 (13:52 +0200)]
Eliminate code duplication in doc creation

New methods were created during elimination of Optionals
as method parameters which introduced some code duplicities.

This change takes this duplication and moves it into a separate method.

JIRA: NETCONF-998
Change-Id: I176a6454f1814627613849659829de760e8fd818
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoIntroduce overloaded buildResponse methods 44/106244/10
Šimon Ukuš [Thu, 8 Jun 2023 11:44:28 +0000 (13:44 +0200)]
Introduce overloaded buildResponse methods

Remove the use of Optional as method parameter.
Separate the logic into two methods.

JIRA: NETCONF-998
Change-Id: I0c30b9ba17cc52876dd10c624424a1cbd8aef6d6
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoSimplify element count processing, remove Optional 39/106239/10
Šimon Ukuš [Thu, 8 Jun 2023 11:38:05 +0000 (13:38 +0200)]
Simplify element count processing, remove Optional

Modified how ElementCountConstraint is handled during leaf-list node
processing by taking advantage of the method that depends
on the presence of the Optional value.

JIRA: NETCONF-998
Change-Id: Icde783e392beb3972397d7b4400780a1a89c8154
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
11 months agoRemove Optional for deviceName parameter 37/106237/15
Šimon Ukuš [Thu, 8 Jun 2023 10:57:29 +0000 (12:57 +0200)]
Remove Optional for deviceName parameter

This change modifies deviceName handling by replacing
Optional with null-value logic and adding nullable annotations.

JIRA: NETCONF-998
Change-Id: I5fe3a0bb164baaaed793e2bc0da20e16146e5438
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoReplace Optional range with separate methods 36/106236/15
Šimon Ukuš [Tue, 30 May 2023 07:09:25 +0000 (09:09 +0200)]
Replace Optional range with separate methods

The logic was divided into two methods: one for range-based
doc creation and the other for non-range doc creation,
eliminating the use of Optional<Range<Integer>>.

JIRA: NETCONF-998
Change-Id: I521813b87e08d28b6d1071e006b2b2f85f438437
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoOpenApi: Broken parameters logic 83/106583/12
Yaroslav Lastivka [Wed, 21 Jun 2023 09:26:45 +0000 (12:26 +0300)]
OpenApi: Broken parameters logic

Logic of numbering for path parameters is broken.

Added additional nested loop for double checking
unique parameter's name.

Implemented Unit tests for validation new logic.

JIRA: NETCONF-1060
Change-Id: I8e36bd6d8dc932e9b032f3d9947a81ee2a93d010
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoReduce XML nodes from OpenApi 42/106142/16
Peter Suna [Wed, 24 May 2023 10:35:49 +0000 (12:35 +0200)]
Reduce XML nodes from OpenApi

OpenAPI uses XML nodes to determine the namespace,
but it is not necessary for every element. It is only required
in the first node and the augmented element.

JIRA: NETCONF-1036
Change-Id: Iec1586c2197f91fc7ef6d88980b704b33114ffb0
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoRemove TestData and move fields to user 73/106673/4
Šimon Ukuš [Mon, 26 Jun 2023 11:29:11 +0000 (13:29 +0200)]
Remove TestData and move fields to user

The sole purpose of TestData was to hold constants
of ReadDataTransactionUtilTest.

This change moves all the constants to the ReadDataTransactionUtilTest
and removes the TestData.

JIRA: NETCONF-1063
Change-Id: I3104c33a2f2b5284b99ea52c93e4504c6df42b33
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
11 months agoCreate test for custom base path verification 96/106396/14
Šimon Ukuš [Wed, 7 Jun 2023 10:42:40 +0000 (12:42 +0200)]
Create test for custom base path verification

This patch introduces test that verifies the openapi paths
for modular basePath.

JIRA: NETCONF-1021
Change-Id: I6c5bf49f2c2e0b34a37636886c2848ac904ca0a3
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoChange hard-coded actions path 94/106394/10
Šimon Ukuš [Wed, 7 Jun 2023 10:29:47 +0000 (12:29 +0200)]
Change hard-coded actions path

There was an assumption about the basePath ('rests') when creating
path for POST method for actions. The path was incorrect if instead of
the default basePath a custom one was used.

This patch fixes the path creation while not making any assumptions
about the basePath. The path is resolved when needed.

JIRA: NETCONF-1021
Change-Id: I4b4a7f8f69626874d9c9821205d7c726dfe90919
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
11 months agoBump versions to 7.0.0-SNAPSHOT 57/106857/1
Ivan Hrasko [Mon, 10 Jul 2023 14:31:41 +0000 (16:31 +0200)]
Bump versions to 7.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I26c0f3c5b0e65bb0204b345d695e9666b8aa0a26
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
11 months agoFix device data update failure after successful connection 33/106833/7
Sangwook Ha [Wed, 5 Jul 2023 21:59:55 +0000 (14:59 -0700)]
Fix device data update failure after successful connection

NetconfNodeHandler does not propagate successful connection to its
delegate (RemoteDeviceHandler). Make sure that it's notified so that
the device data is updated accordingly.

JIRA: NETCONF-1074
Change-Id: Id32996c11d0a63812d439ad386472c059255cf4e
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUpdate draft-ietf-client-server models 20/106820/3
Robert Varga [Wed, 5 Jul 2023 17:00:15 +0000 (19:00 +0200)]
Update draft-ietf-client-server models

There is a new drop for drafts, updating the modules we are packaging.
Update them. This aligns the revisions with the models used in
netconf-{client,server}.

Since this requires some code changes, code is cleaned up to eliminate
most of the warnings and take advantage of BindingMap.

JIRA: NETCONF-1073
Change-Id: I5c610d852ab504050cb258c6b42bc6e32e5b19e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
11 months agoChange default keyword to example 46/106546/6
tobias.pobocik [Tue, 20 Jun 2023 08:43:43 +0000 (10:43 +0200)]
Change default keyword to example

In many cases we misuse default swagger property to set an example
value. Instead, use example property as specified in:
https://swagger.io/docs/specification/adding-examples/

Also, adjust the existing tests to match the changes.

JIRA: NETCONF-999
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
Change-Id: Ic1d168b119e4b2226b1fa46c0bf86629ebd990d1

11 months agoConvert restconf-api to a JPMS module 26/106826/2
Robert Varga [Wed, 5 Jul 2023 20:24:24 +0000 (22:24 +0200)]
Convert restconf-api to a JPMS module

This is a simple artifact, make sure it is a proper module. While we are
here, also remove @Beta annotations and seal class hierarchies.

Change-Id: I972fe27f25a84f1f04c261bfed76add59da61fa0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoClean up ApiPathParser.URL_FACTORY 25/106825/1
Robert Varga [Wed, 5 Jul 2023 20:33:53 +0000 (22:33 +0200)]
Clean up ApiPathParser.URL_FACTORY

Use a switch expression and guarantee a @NonNull result.

Change-Id: I8a53c1b358f739aa8f4efeb9d36641a3039145cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse HexFormat instead of custom code 24/106824/1
Robert Varga [Wed, 5 Jul 2023 20:29:51 +0000 (22:29 +0200)]
Use HexFormat instead of custom code

JDK17+ ships with HexFormat, which renders some of our code superfluous.
Migrate over while retaining compatibility.

Change-Id: I608ab71ad0406974a56d60c63de12a198a85d922
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoClean up ReadDataTransactionUtil 22/106822/2
Robert Varga [Wed, 5 Jul 2023 19:28:42 +0000 (21:28 +0200)]
Clean up ReadDataTransactionUtil

Couple of improvements:
- do not rebuild LeafNodes and LeafSetEntryNodes
- use instanceof patterns to eliminate part of the casting
- eliminate use of ImmutableNodes' methods.
- perform strict System(Map,LeafSet) checks

Change-Id: If49ab99f9a1f82d210261173f631a5f18b2ce84f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoFix deprecation warnings in restconf-nb 21/106821/1
Robert Varga [Wed, 5 Jul 2023 19:11:33 +0000 (21:11 +0200)]
Fix deprecation warnings in restconf-nb

NormalizedNode and YangInstanceIdentifier have both new methods, switch
to using those.

Change-Id: If84f273fcb32a3ed2b876ec62209f660ac767482
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUpdate constructors, remove Optional, add non-null 35/106235/12
Šimon Ukuš [Tue, 30 May 2023 06:36:31 +0000 (08:36 +0200)]
Update constructors, remove Optional, add non-null

It is not advised to use Optional in constructors.
Remove Optionals with DOMSchemaService in constructors.

Add non-null annotations with requireNonNull check to avoid NPE,
since DOMSchemaService is being used.
The same applies to custom basePath

JIRA: NETCONF-998
Change-Id: I2b02be7438355b5ca0e75a3dc54bb7e5f2a675ab
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
11 months agoConvert transport-api into a JPMS module 19/106819/1
Robert Varga [Wed, 5 Jul 2023 16:55:32 +0000 (18:55 +0200)]
Convert transport-api into a JPMS module

This is a simple APi. Fix its dependencies and convert it to a proper
module.

Change-Id: I65cf64e461ea8f3751318bdcea07b9776488842b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoConvert netconf-dom-api to a JPMS module 18/106818/1
Robert Varga [Wed, 5 Jul 2023 16:13:57 +0000 (18:13 +0200)]
Convert netconf-dom-api to a JPMS module

This is a simple artifact, convert it to a module and fix its
dependencies to eliminate warnings.

Change-Id: I320a15d9a7227b95b7ba1ed7476bef0e66873808
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoConvert netconf-api into a module 17/106817/2
Robert Varga [Wed, 5 Jul 2023 16:03:57 +0000 (18:03 +0200)]
Convert netconf-api into a module

This is a simplistic module, convert it to JPMS. Also correct dependency
declarations to fix warnings.

Change-Id: I84549eb24ed5c1977ef23b8c0432d8cab6fc8ad4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoAdd Automatic-Module-Name to RFC6241 model 16/106816/1
Robert Varga [Wed, 5 Jul 2023 15:54:05 +0000 (17:54 +0200)]
Add Automatic-Module-Name to RFC6241 model

This is a standard model and hence we use the usual module naming from
MD-SAL.

Change-Id: I2b879df166f1c15729687075edb17c2a58fc171d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoBump versions to 6.0.1-SNAPSHOT 14/106814/1
Robert Varga [Wed, 5 Jul 2023 14:26:31 +0000 (16:26 +0200)]
Bump versions to 6.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I906433322e159b633475244b3673eeae70e1644c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRemove blueprint from netconf-topology-singleton 06/106806/3
Robert Varga [Tue, 4 Jul 2023 18:37:57 +0000 (20:37 +0200)]
Remove blueprint from netconf-topology-singleton

We have only a single configuration knob. Convert that to OSGi Config
Admin and allow it to be manually controller. Then convert
NetconfTopologyManager to an OSGi DS Component and a
javax.inject.Singleton.

JIRA: NETCONF-1072
Change-Id: I802b51bc15ab0eb406d94471336aed34399b9cc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRemove NetconfTopologySingletonService 05/106805/2
Robert Varga [Tue, 4 Jul 2023 17:48:52 +0000 (19:48 +0200)]
Remove NetconfTopologySingletonService

This service is not used anywhere and it does not provide anything.
Remove it.

Change-Id: I00c91673b942d63804f6b4aa5d6805e5a8221d9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDrop unused services 04/106804/2
Robert Varga [Tue, 4 Jul 2023 17:31:02 +0000 (19:31 +0200)]
Drop unused services

NetconfTopologyManager does not use DOMActionProviderService nor
DOMRpcProviderService. Drop them from dependencies.

Change-Id: If94076805de7672462cc0844030828921c993d55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoReduce casts in NetconfNodeActor 03/106803/2
Robert Varga [Tue, 4 Jul 2023 17:15:53 +0000 (19:15 +0200)]
Reduce casts in NetconfNodeActor

We have 5 individual explicit casts here -- use instanceof pattern to
remove them.

Change-Id: I1162d51ee52c6b9302cc822d2d259d91c7842b1d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoReuse NetconfTopologySetup 02/106802/2
Robert Varga [Tue, 4 Jul 2023 17:01:14 +0000 (19:01 +0200)]
Reuse NetconfTopologySetup

NetconfTopologySetup pretty much all the context we need, there is just
no point in passing down individual services.

JIRA: NETCONF-1039
Change-Id: I21ec0fad9e267df06e5eb4dab11d2962feb2eee4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse simple Executor in NetconfDevice 01/106801/3
Robert Varga [Tue, 4 Jul 2023 16:34:00 +0000 (18:34 +0200)]
Use simple Executor in NetconfDevice

Passing down ListenableExecutorService ends up being interesting, as it
is not clear what the actual lifecycle is. Luckily we can get by using a
simple Executor with Futures.submit(), which essentially performs the
same task.

This makes it clear that the service is not touched by anyone in the
stack and we can use any old Executor -- to the point of using
directExecutor() in NetconfDeviceTest.

Change-Id: I31fcfcb7b303046935392bffd6d50c8f83ec33a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use AbstractNetconfTopology in netconf-topology-singleton 00/106800/3
Robert Varga [Tue, 4 Jul 2023 16:13:47 +0000 (18:13 +0200)]
Do not use AbstractNetconfTopology in netconf-topology-singleton

An AbstractNetconfTopology is meant to represent the entire topology,
do not misuse it to track single nodes.

JIRA: NETCONF-1039
Change-Id: If4e98f2b59bf92e90beed40df09e52fe8bacd7d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoSplit out NetconfClientConfigurationBuilderFactory 99/106799/2
Robert Varga [Tue, 4 Jul 2023 14:28:38 +0000 (16:28 +0200)]
Split out NetconfClientConfigurationBuilderFactory

The task of creating a client configuration is independent of the actual
topology implementation. Rather that requiring a full-blown
AbstractNetconfTopology to accomplish this, split it out into a
self-contained component.

This component is then injected into topologies instead of its
constituent services -- which paves the way to expose NetconfNodeHandler
at a later point in time.

This also allows us to move a few tests from netconf-topology-impl to
netconf-topology-spi.

JIRA: NETCONF-1039
Change-Id: I9b92b662d6daf3106c26cbc6e470325bc5153348
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRework NETCONF client reconnection 86/106786/8
Robert Varga [Mon, 3 Jul 2023 08:32:23 +0000 (10:32 +0200)]
Rework NETCONF client reconnection

This patch reworks the way establishing a connection works: we only have
createClient(), which returns a simple future. The logic for
reconnecting the client is now owned by each individual app.

This affects only netconf-topology implementations, which share common
code here in NetconfConnectorDTO and AbstractNetconfTopology. This is
re-shuffled into NetconfNodeHandler, which now encapsulates all the
state as well as the logic to issue reconnects.

JIRA: NETCONF-1070
Change-Id: I8f175329ab2826e46c95dee59c408e71bf453ccf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoConvert yanglib to OSGi DS 19/103919/18
OleksandrZharov [Wed, 4 Jan 2023 09:05:07 +0000 (10:05 +0100)]
Convert yanglib to OSGi DS

This is a rather simple component, convert it to OSGi DS, along with
configuration in Config Admin. This means we are removing an initial
configuration XML and replacing it with defaults in
ObjectClassDefinition.

Further changes entail:
- renaming WebInitialized to JaxRsYangLib to make it clear the component
  is a JAX-RS specific thing
- fixing up pom.xml dependency declarations to eliminate maven warnings

Finally we update the documetation to make sure we do not have stale
references.

JIRA: NETCONF-772
Change-Id: I1ef32510c7acf134d8d548003fc607e2800d235e
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRemove NetconfTopology 90/106790/4
Robert Varga [Mon, 3 Jul 2023 20:01:44 +0000 (22:01 +0200)]
Remove NetconfTopology

Align Node lifecycle with its users, keeping configuration updates
internal to AbstractNetconfTopology. Also hide NetconfConnectorDTO.

JIRA: NETCONF-1069
Change-Id: If8a1821171d5e52ba84cd317a01588a3f69c5bd6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoMigrate users of YangInstanceIdentifier.empty() 91/106791/2
Robert Varga [Mon, 3 Jul 2023 20:13:00 +0000 (22:13 +0200)]
Migrate users of YangInstanceIdentifier.empty()

Use YangInstanceIdentifier.of() instead, fixing a ton of deprecation
warnings.

Change-Id: I2aabb0ad4647d76ef8a3037180039cd394c386f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRequire maximum chunk size to be specified 22/101922/10
Robert Varga [Fri, 29 Jul 2022 16:32:03 +0000 (18:32 +0200)]
Require maximum chunk size to be specified

The default incoming chunk size is controlled by session negotiator,
make sure to co-locate the tuneable value there and remove deprecated
constructors for both NetconfChunkAggregator and
AbstractNetconfSessionNegotiator.

Change-Id: Iab489e35e18905c33a747a52c1698ece4e51d3ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse released aaa versions 83/106783/1
Robert Varga [Sun, 2 Jul 2023 16:04:16 +0000 (18:04 +0200)]
Use released aaa versions

Use properly-released versions.

Change-Id: Ic479e0e55d7069cd90568addd4185caf70864d8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse controller released artifacts 80/106780/1
Robert Varga [Sun, 2 Jul 2023 11:25:16 +0000 (13:25 +0200)]
Use controller released artifacts

Ditch snapshots, use the properly-released version.

Change-Id: I849ec6f3d2d577bbd51e22d5d2122c2f39492bca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoUse released mdsal version 70/106770/1
Robert Varga [Fri, 30 Jun 2023 09:35:50 +0000 (11:35 +0200)]
Use released mdsal version

Use properly-release artifacts for mdsal-12.0.0.

Change-Id: I76deb9a3f0f5140c8614ae95e022c77382f28659
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoConvert ReadDataParams to Java record 27/106327/12
OleksandrZharov [Wed, 31 May 2023 14:43:48 +0000 (16:43 +0200)]
Convert ReadDataParams to Java record

Refactored ReadDataParams into Java record.

Now we are sure we conform to requirements specified in
org.opendaylight.yangtools.concepts.Immutable.

JIRA: NETCONF-1044
Change-Id: Ib9f667d53f48cbe2b7602c1bc68f063237c9fad3
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoRemove tagged field from ReadDataParams 00/106500/3
Ivan Hrasko [Thu, 15 Jun 2023 15:14:20 +0000 (17:14 +0200)]
Remove tagged field from ReadDataParams

Remove unneeded tagged field from ReadDataParams as suggested by FIXME.
This means we pass through the selected mode.

JIRA: NETCONF-1044
Change-Id: Ia64ed6b1de3daefb3d38caa234c7c6eaa48f8f59
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoBump upstreams 98/106698/1
Robert Varga [Mon, 26 Jun 2023 15:39:44 +0000 (17:39 +0200)]
Bump upstreams

Adopt:
- odlparent-13.0.3
- infrautils-6.0.1
- yangtools-11.0.1

Change-Id: I3ccaf8efed88081c9c7c158537303c9ad37ef2a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoFix yanglib data merge 19/106619/4
Ruslan Kashapov [Thu, 22 Jun 2023 08:19:30 +0000 (11:19 +0300)]
Fix yanglib data merge

Explicit definition of ordered mapping node causes
incompatibility with schema based unordered mapping node
generated out of Binding object and yanglib data merge
failure as result.

+ Minor code cleanup

JIRA: NETCONF-1065
Change-Id: I23865e1d543819ae60c1160183986c27595dc999
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
12 months agoAdd ietf-netconf-client/sever yang models 36/106436/7
Ruslan Kashapov [Fri, 9 Jun 2023 09:33:37 +0000 (12:33 +0300)]
Add ietf-netconf-client/sever yang models

Added models: ietf-netconf-client, ietf-netconf-server,
ietf-x509-cert-to-name (new rfc7407 module)

JIRA: NETCONF-590
Change-Id: I7e4880339c599bce6932bd952283129e341adac1
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
12 months agoChange schema for GET XML example 81/106581/3
Šimon Ukuš [Wed, 21 Jun 2023 10:17:03 +0000 (12:17 +0200)]
Change schema for GET XML example

The XML example for GET request in OpenApi UI was different
to the one being actually returned. This patch changes the schema
used for that example, making it consistent with what is actually
returned in the response.

JIRA: NETCONF-1059
Change-Id: Ie2d128b6de43d705c93d509c287cabcbc719e591
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
12 months agoYanglib to return content-type application/yang by default 11/106611/4
Ruslan Kashapov [Thu, 22 Jun 2023 08:19:30 +0000 (11:19 +0300)]
Yanglib to return content-type application/yang by default

Dedicated content-type for yang defined in RFC-6020

JIRA: NETCONF-973
Change-Id: I34920f4b0341a74077387cffc04b2e2f37b5c4fb
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
12 months agoFixup for upstream API changes 32/106632/1
Robert Varga [Mon, 19 Jun 2023 12:03:25 +0000 (14:03 +0200)]
Fixup for upstream API changes

Both yangtools and mdsal have changed API details. This patch fixes them
up.

Change-Id: Id57b7054a4a3e8bffa1e5300b48f21fa0a38a6df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoBump upstreams 33/106533/19
Robert Varga [Mon, 19 Jun 2023 12:03:25 +0000 (14:03 +0200)]
Bump upstreams

Adopt:
- odlparent-13.0.1
- infrautils-6.0.0
- yangtools-11.0.0-SNAPSHOT
- mdsal-12.0.0-SNAPSHOT
- controller-8.0.0-SNAPSHOT
- aaa-0.18.0-SNAPSHOT

Handling of AugmentationIdentifier/AugmentationNode has been removed,
as this indirection is no longer present in yang-data-api.

The handling of PathArguments for the purposes of
{Netconf,Writer}FieldsTranslator has been updated, as yangtools no
longer provide wildcard PathArguments.

Also the handling of DTCLs is updated, so that we serializer changed
nodes in the same namespace first and then proceed to emit other
namespaces in lexical order.

JIRA: NETCONF-841
Change-Id: I6e8b9e834a33711387495e2cae52371ac456553d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 months agoAnnotate all serialVersionUID with @Serial 80/106580/2
Šimon Ukuš [Wed, 21 Jun 2023 09:47:40 +0000 (11:47 +0200)]
Annotate all serialVersionUID with @Serial

There are multiple occurrences of serialVersionUID
throughout the project. This change add missing
@Serial annotations

JIRA: NETCONF-1062
Change-Id: Ic3d1399f37dcba9fbfa377e8d7425dbaf089d3ab
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
12 months agoRemove unrequired testcase from mandatory field 00/106600/3
Peter Suna [Wed, 21 Jun 2023 16:20:23 +0000 (18:20 +0200)]
Remove unrequired testcase from mandatory field

The required field can only be obtained from the schema node.
Checking the inner field is unnecessary.

JIRA: NETCONF-976
Change-Id: I297a6216311c652e7fd460c6efd9cf42a1512add
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
12 months agoOpenApi: Add parameters into actions 84/105884/24
Yaroslav Lastivka [Wed, 10 May 2023 11:01:09 +0000 (14:01 +0300)]
OpenApi: Add parameters into actions

Some devices using actions have invalid swagger URLs
generated. The problem is that we do not generate parameters
for actions.

Implemented logic for adding “pathParameters” to path parameters
for actions.

JIRA: NETCONF-860
Change-Id: If01af731770029fb8f7529312417a3ea46fd5841
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
12 months agoAdd slash symbol into actions request 99/106599/3
Yaroslav Lastivka [Wed, 21 Jun 2023 16:07:03 +0000 (19:07 +0300)]
Add slash symbol into actions request

Some BBF yang devices using actions have invalid swagger URLs generated

Added additional slash symbol before "rests/operations".

JIRA: NETCONF-860
Change-Id: I92c5f67f2f360759d43564870fc248688dfc6caf
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
12 months agoOpenApi: Eliminate setRequiredIfNotEmpty method 03/106403/8
Yaroslav Lastivka [Wed, 7 Jun 2023 13:31:02 +0000 (16:31 +0300)]
OpenApi: Eliminate setRequiredIfNotEmpty method

SetRequiredIfNotEmpty method has been replaced with ternary operator.

JIRA: NETCONF-1053
Change-Id: I3665d181dc5f6160c7a58d0e6dee0aabe5f15e19
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>