Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inclusion of CPDP convergence OTG model #390

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open

Conversation

indraniBh
Copy link
Contributor

@indraniBh indraniBh commented Sep 27, 2024

Issue: #390

Redocly View:
ReDoc Interactive Demo (redocly.github.io)

Objectives:

  • Modify events with relevant parameters to enable control-plane and data-plane configuration
  • Inclusion of control-plane and data-plane convergence metrics

Modified Existing Fields:

New Fields Inclusions:

  • Monitor
    • get_metrics/convergence/flow_name

Sample Code Snippet:

# new config
config = api.config()

# configure control-plane and data-plane events
config.events.cp_events.enable = True
config.events.dp_events.enable = True
config.events.dp_events.rx_rate_threshold = 90 

// skipping other config snippets
# configure flow properties
flw, = config.flows.flow(name='flw')
# enable flow metrics
flw.metrics.enable = True
// skipping other flow config snippets

# push configuration
api.set_config(config)

# start all protocols
control_state = api.control_state()
control_state.protocol.all.state = control_state.protocol.all.START
api.set_control_state(control_state)

# start transmitting configured flows
control_state = api.control_state()
control_state.traffic.choice = control_state.traffic.FLOW_TRANSMIT
control_state.traffic.flow_transmit.state = control_state.traffic.flow_transmit.START  # noqa
api.set_control_state(control_state)

# withdraw routes from primary path
 control_state = api.control_state()
 control_state.protocol.route.names = [rx2_rr.name, rx3_rr.name]
 control_state.protocol.route.state = control_state.route.WITHDRAW
 api.set_control_state(control_state)

# create a query for convergence metrics
req = api.metrics_request()
req.convergence.flow_names = [flw.name]

api.get_metrics(req)

@indraniBh indraniBh self-assigned this Sep 27, 2024
@indraniBh
Copy link
Contributor Author

Initial structure added.
TBD:
metric_group in convergence metrics

@arkajyoti-cloud

Copy link
Contributor

@apratimmukherjee apratimmukherjee left a comment

Choose a reason for hiding this comment

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

In the main Conversation need to add some info on what to look for redocli .. i.e new global events in set_config and convergence request response in metrics.
Should have at minimum snippets ( maybe snappi-python makes more sense for this ) for a) enabling convergence stats , b) example convergence metrics request and possible prints of events and convergence metric for a flow ( if full example is tough to add initially )

event/event.yaml Outdated Show resolved Hide resolved
event/event.yaml Outdated Show resolved Hide resolved
event/event.yaml Outdated Show resolved Hide resolved
event/event.yaml Outdated Show resolved Hide resolved
event/event.yaml Outdated Show resolved Hide resolved
x-field-uid: 3
end_timestamp_ns:
description: |-
The time in nanoseconds at which the event ended
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need discussion.

result/metrics.yaml Outdated Show resolved Hide resolved
result/metrics.yaml Outdated Show resolved Hide resolved
result/metrics.yaml Outdated Show resolved Hide resolved
result/metrics.yaml Outdated Show resolved Hide resolved
apratimmukherjee

This comment was marked as off-topic.

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.

4 participants