Skip to content

CMLDEV-1266: Fix virl2_client and server endpoint drift#234

Open
vprysiaz wants to merge 5 commits into
devfrom
CMLDEV-1266-fix-pcl-and-server-apis-drift
Open

CMLDEV-1266: Fix virl2_client and server endpoint drift#234
vprysiaz wants to merge 5 commits into
devfrom
CMLDEV-1266-fix-pcl-and-server-apis-drift

Conversation

@vprysiaz
Copy link
Copy Markdown
Collaborator

@vprysiaz vprysiaz commented Jun 1, 2026

  • use PUT instead of GET for labs/{lab_id}/bootstrap API
  • removed dict annotation for licensing:update_features
  • removed "{lab}/links/{id}/state" from Link._URL_TEMPLATES

- use PUT instead of GET for labs/{lab_id}/bootstrap API
- removed dict annotation for licensing:update_features
- removed "{lab}/links/{id}/state" from Link._URL_TEMPLATES
"link": "{lab}/links/{id}",
"check_if_converged": "{lab}/links/{id}/check_if_converged",
"state": "{lab}/links/{id}/state",
"start": "{lab}/links/{id}/state/start",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Bug (Pre-existing) - Confidence: 95%] H4 from CMLDEV-1266 is not addressed in this PR. pcap_packet is still pcap/{id}/packets/{packet_id} (line 55) but production pcapdemux and the CML UI use singular /packet/{packet_id} (golang/pkg/pcapdemux/router.go:19). get_capture_packet() will 404 against a real deployment.

Suggested fix:

"pcap_packet": "pcap/{id}/packet/{packet_id}",

Comment thread virl2_client/models/licensing.py Outdated
def update_features(self, features: list[dict[str, int]]) -> None:
"""Update licensing feature's explicit count in reservation mode.

:param features: Feature names to counts, or list of such mappings.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Nit (New) - Confidence: 90%] Docstring still says "Feature names to counts, or list of such mappings" after the signature was tightened to list[dict[str, int]] only. Update :param features: to describe the list shape.

@tmikuska
Copy link
Copy Markdown
Collaborator

tmikuska commented Jun 1, 2026

AI-Assisted Code Review Summary

This review was performed by an LLM; verify line numbers, suggested code, and protocol claims before acting on them.

Linked Jira: CMLDEV-1266

Paired server PR: simple #4320

Scope check

H3 bootstrap GET→PUT, H5 update_features list-only typing, M7 sample_lab_id placeholder, and L5 dead "state" template are covered. H4 PCAP single-packet path is missing from this diff.

Critical (must fix)

  • virl2_client/models/link.py ~55pcap_packet still pcap/{id}/packets/{packet_id}. Production pcapdemux (golang/pkg/pcapdemux/router.go) and the CML UI use singular /packet/{packet_id}. Change to pcap/{id}/packet/{packet_id}. (See inline.)

Minor (negligible / nits)

  • virl2_client/models/licensing.py ~220 — Docstring still documents dict input after signature was tightened. (See inline.)

Things done well

  • build_configurations() PUT matches server PUT /labs/{lab_id}/bootstrap.
  • Licensing and sample-lab naming aligned with server paths.
  • Dead link URL template removed.

Land this PR (with H4 fix) before merging simple #4320 submodule bump.

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.

2 participants