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 AMHandler for AL2S to Support the Modify Operation #143

Open
zlion opened this issue Jun 29, 2024 · 2 comments
Open

Update AMHandler for AL2S to Support the Modify Operation #143

zlion opened this issue Jun 29, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@zlion
Copy link
Contributor

zlion commented Jun 29, 2024

The AL2S handler need to support the "modify" operation.

@zlion zlion added the enhancement New feature or request label Jun 29, 2024
@zlion zlion self-assigned this Jun 29, 2024
@zlion
Copy link
Contributor Author

zlion commented Jun 29, 2024

Designs for "modify" operation:

  1. Perform "Diff" functions the original sliver and modified sliver to identify differences. It results to three categories of connections: to be deleted, to be added and to be updated.
  2. Use VirtualNetwork APIs "Delete" and "Post" to remove and add connections as we've done for "add" and "delete" operations.
  3. Use VirtualNetwork API "Put" to update existing connections. It is supposed to have better performance than the operation chain of "delete" and "add". Some tests need to be run to verify "Put" operation.

@zlion
Copy link
Contributor Author

zlion commented Jul 2, 2024

Have done tests that use the "Put" virtualnetwork API to update an existing connection and "GET" to get the result.

The items to be updated are:

  1. local IP: 192.168.5.2/24 --> 192.168.6.2/24
  2. Peer IP: 192.168.5.1/24 --> 192.168.6.1/24
  3. Bandwidth: 50 Mbps --> 100 Mbps
  4. VLAN tag: 130 --> 140

The result shows

  1. IPs are changed as expected
  2. Bandwidth does not change
  3. VLAN changed

The question is why the "bandwidth" does not change?

Run "PUT" to update.

curl -X 'PUT' \
  'https://api.ns.internet2.edu/v1/virtualnetworks/l3connections/c7e9da2c-bc62-4256-9347-24a26a7ef605?notify=true' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJ0e....' \
  -H 'Content-Type: application/json' \
  -d '{
  "virtualL3ConnectionId": "c7e9da2c-bc62-4256-9347-24a26a7ef605",
  "virtualRouterId": "44fd35d5-a4f3-472c-a921-6dc56db78adc",
  "interfaceId": "400172fc-46c6-4134-8ea0-6e3d39c47ccb",
  "remoteName": "AWS",
  "name": 10732,
  "notes": "",
  "displayPosition": 1,
  "encapsulationType": "DOT1Q",
  "vlanOuterId": 140,
  "vlanInnerId": 0,
  "subintId": 140,
  "ipv6PrefixLength": null,
  "localIPv6": null,
  "remoteIPv6": null,
  "bgpStatusIPv6": "UNKNOWN",
  "ipv4PrefixLength": 24,
  "localIPv4": "192.168.6.2",
  "remoteIPv4": "192.168.6.1",
  "bgpStatusIPv4": "UNKNOWN",
  "localASN": 55038,
  "remoteASN": 64512,
  "authnType": "MD5",
  "authnConfig": {
    "md5": "0x....x"
  },
  "mtu": 1500,
  "bfdEnable": false,
  "gtsmEnable": false,
  "cloudConnectionType": "AWS",
  "cloudConnectionConfig": {
    "ownerAccountId": "xxxxxx"
  },
  "maxBandwidth": 100,
  "authoringState": "LIVE",
  "provisioningState": "PROVISIONED",
  "provisioningDetails": "[2024-06-29T12:37:01+00:00] [AWS] [PROVISIONED]\n[2024-06-29T12:37:11+00:00] [NSO] [PROVISIONED]",
  "gnocdbInterfaceId": "",
  "display": "VNL3C-10732",
  "actions": [
    "vl3c_create",
    "vl3c_delete",
    "vl3c_retrieve",
    "vl3c_update"
  ]
}'

Run "GET" to get the updated connection.

{
  "virtualL3ConnectionId": "c7e9da2c-bc62-4256-9347-24a26a7ef605",
  "virtualRouterId": "44fd35d5-a4f3-472c-a921-6dc56db78adc",
  "interfaceId": "400172fc-46c6-4134-8ea0-6e3d39c47ccb",
  "remoteName": "AWS",
  "name": 10732,
  "notes": "",
  "displayPosition": 1,
  "encapsulationType": "DOT1Q",
  "vlanOuterId": 140,
  "vlanInnerId": 0,
  "subintId": 140,
  "ipv6PrefixLength": null,
  "localIPv6": null,
  "remoteIPv6": null,
  "bgpStatusIPv6": "UNKNOWN",
  "ipv4PrefixLength": 24,
  "localIPv4": "192.168.6.2",
  "remoteIPv4": "192.168.6.1",
  "bgpStatusIPv4": "UNKNOWN",
  "localASN": 55038,
  "remoteASN": 64512,
  "authnType": "MD5",
  "authnConfig": {
    "md5": "0x....x"
  },
  "mtu": 1500,
  "bfdEnable": false,
  "gtsmEnable": false,
  "cloudConnectionType": "AWS",
  "cloudConnectionConfig": {
    "ownerAccountId": "xxxxxx"
  },
  "maxBandwidth": 50,
  "authoringState": "LIVE",
  "provisioningState": "PROVISIONED",
  "provisioningDetails": "[2024-06-29T12:37:01+00:00] [AWS] [PROVISIONED]\n[2024-06-29T12:37:11+00:00] [NSO] [PROVISIONED]",
  "gnocdbInterfaceId": "",
  "display": "VNL3C-10732",
  "actions": [
    "vl3c_create",
    "vl3c_delete",
    "vl3c_retrieve",
    "vl3c_update"
  ]
}

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
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant