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

Update Port to datamodel 2.0.0 spec #102

Closed
sajith opened this issue Aug 8, 2023 · 5 comments · Fixed by #121
Closed

Update Port to datamodel 2.0.0 spec #102

sajith opened this issue Aug 8, 2023 · 5 comments · Fixed by #121
Assignees
Labels
enhancement New feature or request

Comments

@sajith
Copy link
Member

sajith commented Aug 8, 2023

According to datamodel 2.0.0 draft spec, a port could be described (almost) like so:

{
    "id": "urn:sdx:port:amlight.net:s3:s3-eth4",
    "name": "s3-eth4",
    "node": "urn:sdx:node:amlight.net:s3",
    "type": "100GE",
    "mtu": 9000,
    "status": "up",
    "state": "enabled",
    "nni": "",
    "services": {
        "l2vpn-ptp": {
            "vlan_range": [[1,4000]]
        },
        "l2vpn-ptmp": {
            "vlan_range": [[1,1000], [2000,3000]]
        }
    },
    "private": ["state", "mtu"]
}

Issue #81 and PR #88 added the capability to parse/validate this. As a follow-up, Port has to carry services attribute.

@sajith sajith self-assigned this Aug 8, 2023
@sajith sajith changed the title Update port for datamodel 2.0.0 spec Update Port to datamodel 2.0.0 spec Aug 8, 2023
@sajith
Copy link
Member Author

sajith commented Aug 16, 2023

I believe that implementing this depends on #92.

@sajith
Copy link
Member Author

sajith commented Aug 18, 2023

Also depends on #95.

@italovalcy
Copy link
Contributor

Hi @sajith, awesome you catched this! Like you mentioned, it would be nice if we can leverage the services vlan_range attribute instead of label_range (which is not even defined on the data model spec). Thanks for documenting this issue!

@italovalcy
Copy link
Contributor

Another one I just found: Port.short_name is not defined on the Data model spec. I think we should remove this attribute, unless you see an use case for it.

@YufengXin
Copy link
Collaborator

Related to the issue in sdx-controller regarding user specified vlan in connection request:
atlanticwave-sdx/sdx-controller#232

  1. the port.services.vlan_range has been implemented in the parser.
  2. the port.vlan_range is still being used to accommodate existing available unittest. Maybe we should repurpose/rename this for user specified vlan in connection request. @italovalcy

-> consolidate between these two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
3 participants