-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
272 changed files
with
10,711 additions
and
11,830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: tag | ||
author: snikitin | ||
changes: | ||
- tagDatabase: | ||
tag: 011-add-lag-classes | ||
|
||
- changeSet: | ||
id: add_lag_logical_port_class | ||
author: snikitin | ||
changes: | ||
- sql: "CREATE CLASS comprises IF NOT EXISTS EXTENDS E" | ||
- sql: "CREATE CLASS lag_logical_port IF NOT EXISTS EXTENDS V" | ||
- sql: "CREATE PROPERTY lag_logical_port.switch_id IF NOT EXISTS STRING" | ||
- sql: "CREATE PROPERTY lag_logical_port.logical_port_number IF NOT EXISTS INTEGER" | ||
- sql: "CREATE INDEX lag_logical_port.switch_id NOTUNIQUE_HASH_INDEX" | ||
- sql: "CREATE INDEX lag_logical_port_unique on lag_logical_port (switch_id, logical_port_number) UNIQUE_HASH_INDEX" | ||
rollback: | ||
- sql: "DELETE VERTEX lag_logical_port" | ||
- sql: "DROP INDEX lag_logical_port.switch_id" | ||
- sql: "DROP INDEX lag_logical_port_unique" | ||
- sql: "DROP CLASS lag_logical_port IF EXISTS" | ||
- sql: "DROP CLASS comprises IF EXISTS" | ||
- changeSet: | ||
id: add_physical_port_class | ||
author: snikitin | ||
changes: | ||
- sql: "CREATE CLASS physical_port IF NOT EXISTS EXTENDS V" | ||
- sql: "CREATE PROPERTY physical_port.switch_id IF NOT EXISTS STRING" | ||
- sql: "CREATE PROPERTY physical_port.port_number IF NOT EXISTS INTEGER" | ||
- sql: "CREATE INDEX physical_port.switch_id NOTUNIQUE_HASH_INDEX" | ||
- sql: "CREATE INDEX physical_port_unique on physical_port (switch_id, port_number) UNIQUE_HASH_INDEX" | ||
rollback: | ||
- sql: "DELETE VERTEX physical_port" | ||
- sql: "DROP INDEX physical_port.switch_id" | ||
- sql: "DROP INDEX physical_port_unique" | ||
- sql: "DROP CLASS physical_port IF EXISTS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# LAG for ports | ||
|
||
## Overview | ||
|
||
Link aggregation provides ability to combine multiple physical connections into one logical connection to improve resiliency. Link aggregation group (LAG) is a group of ports associated with the logical port on the switch. | ||
|
||
## API | ||
|
||
* Get existing LAG logical ports on the switch `GET /v2/switches/{switch_id}/lags`. Response example: | ||
~~~ | ||
[ | ||
{ | ||
"logical_port_number": 2001, | ||
"port_numbers": [1, 2, 3] | ||
}, | ||
... | ||
] | ||
~~~ | ||
|
||
* Create LAG logical port on the switch `POST /v2/switches/{switch_id}/lags` with body: | ||
~~~ | ||
{ | ||
"port_numbers": [1, 2, 3] | ||
} | ||
~~~ | ||
Response example: | ||
~~~ | ||
{ | ||
"logical_port_number": 2001, | ||
"port_numbers": [1, 2, 3] | ||
} | ||
~~~ | ||
|
||
* Delete LAG logical port on the switch `DELETE /v2/switches/{switch_id}/lags/{logical_port_number}`. | ||
|
||
|
||
## Details | ||
All logical port related commands are sent to the switches using gRPC speaker. | ||
|
||
Open-kilda calculate logical port number using the following rule: 2000 + min of the physical ports number in the LAG. It is not allowed to have one physical port in two LAGs so this rule will provide unique logical port number for any correct port configuration. LAG logical port configuration should be validated before any create operation to avoid inconsistency. | ||
|
||
Currently, open-kilda doesn't have any port related information representation in database. We need to save LAG logical port configuration into database to have ability to restore configuration on the switch. Information about LAGs stored as a separate models in order to provide minimal impact on already existing data structures. | ||
|
||
![domain-model](./domain-model.png) | ||
|
||
Open-kilda uses a switch-port pair to represent a flow endpoint. LAG ports created in this way may be used as a flow endpoint on one or both flow sides to provide flow resiliency. | ||
|
||
## Additional changes | ||
|
||
During switch/flow validate and sync LAG ports configuration should be checked and installed if required. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@startuml | ||
|
||
title LAGs Domain Model | ||
|
||
class LagLogicalPort { | ||
switch_id | ||
logical_port_number | ||
== | ||
physicalPorts() : PhysicalPort[] | ||
__ | ||
unique constraint on switch_id+logical_port_number | ||
} | ||
|
||
class PhysicalPort { | ||
switch_id | ||
port_number | ||
-- | ||
unique constraint on switch_id+port_number | ||
} | ||
|
||
LagLogicalPort o--> PhysicalPort | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
...opology/src/main/java/org/openkilda/wfm/topology/utils/KeyValueKafkaRecordTranslator.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.