Skip to content

making "destination_ip_address" an optional field - #471

Open
satyamsinghKey wants to merge 2 commits into
masterfrom
dev_rocev2_2026
Open

making "destination_ip_address" an optional field#471
satyamsinghKey wants to merge 2 commits into
masterfrom
dev_rocev2_2026

Conversation

@satyamsinghKey

Copy link
Copy Markdown
Collaborator

Feature Overview

  • Brief Description:
    There can be instances where we do not want to set destination Peer for a RoCEv2 peer. In that case, keeping the "destination_ip_address" a required field doesn't makes sense. Hence removing it from the required section.

Code snippets

rocev2_1, rocev2_2 = d1.rocev2, d2.rocev2
rocev2_1_int, rocev2_2_int = rocev2_1.ipv4_interfaces.add(), rocev2_2.ipv4_interfaces.add()
rocev2_1_int.ipv4_name, rocev2_2_int.ipv4_name = ip1.name, ip2.name
rocev2_1_int.ib_mtu, rocev2_2_int.ib_mtu = 1027, 1027
rocev2_1_peer, rocev2_2_peer = rocev2_1_int.peers.add(), rocev2_2_int.peers.add()
rocev2_1_peer.name, rocev2_2_peer.name = "RoCEv2 1", "RoCEv2 2"
rocev2_1_peer.destination_ip_address = ip2.address
###Not Setting destination ip address for 2nd peer

x-include: ../../common/common.yaml#/components/schemas/Named.Object/properties/name
x-field-uid: 1
destination_ip_address:
description: |-

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an ambiguity in this change. Earlier it was required so user was forced to provide the dest IP. Now, if user does not specify, I think there is no way for an implementation to know if user actually provided it or not.
Implementation is forced to make a is_present check which we normally never do for a attribute. This seems to be a problem as per regular design. Normally optional fields are encapsulated inside an object and we check for presence or absence of the object or some enum to drive the behaviour.
e.g. enum dst_ip_mode = user_specified, auto_detected.
user_specified takes in IP , auto_detected specified how IP should be set by user / the behaviour.
Though this does break backward compatibility as designed now. Please take a look as such and what you want to do for snappi_ixn.

Anyway, there should be clear documentation on expected RoCEv2 behaviour if IP is not specified.

Same comments hold for IPv6 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants