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

Trim down primary_path and backup_path #556

Open
Alopalao opened this issue Oct 31, 2024 · 0 comments
Open

Trim down primary_path and backup_path #556

Alopalao opened this issue Oct 31, 2024 · 0 comments

Comments

@Alopalao
Copy link

Alopalao commented Oct 31, 2024

primary_path and backup_path are treated as Path objects.
So they will have extra fields that are not necessary. This is the whole object in the DB:

    primary_path: [
      {
        id: 'c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07',
        endpoint_a: {
          id: '00:00:00:00:00:00:00:01:4',
          name: 's1-eth4',
          port_number: 4,
          mac: '76:ca:15:dd:21:42',
          switch: '00:00:00:00:00:00:00:01',
          type: 'interface',
          nni: true,
          uni: false,
          speed: 1250000000,
          metadata: {},
          lldp: true,
          active: true,
          enabled: true,
          status: 'UP',
          status_reason: [],
          link: 'c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07'
        },
        endpoint_b: {
          id: '00:00:00:00:00:00:00:03:3',
          name: 's3-eth3',
          port_number: 3,
          mac: '66:7b:b8:f6:da:6a',
          switch: '00:00:00:00:00:00:00:03',
          type: 'interface',
          nni: true,
          uni: false,
          speed: 1250000000,
          metadata: {},
          lldp: true,
          active: true,
          enabled: true,
          status: 'UP',
          status_reason: [],
          link: 'c8b55359990f89a5849813dc348d30e9e1f991bad1dcb7f82112bd35429d9b07'
        },
        metadata: { s_vlan: { tag_type: 'vlan', value: 1 } },
        active: true,
        enabled: true,
        status: 'UP',
        status_reason: []
      },
      {
        id: '4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30',
        endpoint_a: {
          id: '00:00:00:00:00:00:00:02:3',
          name: 's2-eth3',
          port_number: 3,
          mac: 'ee:04:9b:22:d3:d4',
          switch: '00:00:00:00:00:00:00:02',
          type: 'interface',
          nni: true,
          uni: false,
          speed: 1250000000,
          metadata: {},
          lldp: true,
          active: true,
          enabled: true,
          status: 'UP',
          status_reason: [],
          link: '4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30'
        },
        endpoint_b: {
          id: '00:00:00:00:00:00:00:03:2',
          name: 's3-eth2',
          port_number: 2,
          mac: '52:a2:6a:bd:28:4c',
          switch: '00:00:00:00:00:00:00:03',
          type: 'interface',
          nni: true,
          uni: false,
          speed: 1250000000,
          metadata: {},
          lldp: true,
          active: true,
          enabled: true,
          status: 'UP',
          status_reason: [],
          link: '4d42dc0852278accac7d9df15418f6d921db160b13d674029a87cef1b5f67f30'
        },
        metadata: { s_vlan: { tag_type: 'vlan', value: 1 } },
        active: true,
        enabled: true,
        status: 'UP',
        status_reason: []
      }
    ],

For example metadata is not necessary and caused some past errors.
For an EVC to have a working primary_path only the id of the endpoints are needed:

    "primary_path": [
     {"endpoint_a": {"id": "00:00:00:00:00:00:00:01:4"},
      "endpoint_b": {"id": "00:00:00:00:00:00:00:03:3"}},
     {"endpoint_a": {"id": "00:00:00:00:00:00:00:02:3"},
      "endpoint_b": {"id": "00:00:00:00:00:00:00:03:2"}}
    ]
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

No branches or pull requests

1 participant