This repository was archived by the owner on Mar 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Add Arion gateway #748
Merged
Merged
Add Arion gateway #748
Changes from all commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
04cbb1e
Update router manager api
DavidLiu506 4c100e5
Update code
DavidLiu506 e38bcf9
Update code
DavidLiu506 067a988
Update router manager
DavidLiu506 dd5dafd
Update router manager
DavidLiu506 aa76562
Merge router manager service api code
DavidLiu506 8ae37db
Fix getVpcRouteTables
DavidLiu506 f0462ae
Fix getVpcRouteTable
DavidLiu506 976883f
Update RouterController
DavidLiu506 ef7a2d2
Update code
DavidLiu506 670dcc6
Update code
DavidLiu506 59a65f0
Update code
DavidLiu506 1178f61
pull alcor code
DavidLiu506 5a98d10
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 e4e0792
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
DavidLiu506 ae15be0
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 9c88b19
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 9be2bb9
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 733872a
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
DavidLiu506 b3154ae
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 e2bed17
Merge branch 'master' of https://github.com/DavidLiu506/alcor
DavidLiu506 7c5013e
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 ac7acf8
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
DavidLiu506 bcc0716
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 c499d9c
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 329e216
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
DavidLiu506 43435bd
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 9b51767
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
DavidLiu506 2f68edb
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 a6b1122
Merge branch 'master' of https://github.com/DavidLiu506/alcor
DavidLiu506 5dd29ef
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 59d0f9b
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 3d350a7
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
DavidLiu506 dbf2aaf
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 3499f7d
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
DavidLiu506 c11e915
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 22cc3af
Merge branch 'master' of https://github.com/futurewei-cloud/alcor
DavidLiu506 38d0798
Merge branch 'futurewei-cloud:master' into master
DavidLiu506 4a62be1
Add consistent hash
DavidLiu506 7be13f8
Add consistent hash
DavidLiu506 8c3b223
Merge pull request #1 from DavidLiu506/gateway
DavidLiu506 6b798e0
Update code
DavidLiu506 260565a
Merge branch 'master' of https://github.com/DavidLiu506/alcor
DavidLiu506 fabd939
Revert "Update code"
DavidLiu506 ac01902
Update code
DavidLiu506 053d5ab
Revert "Update code"
DavidLiu506 ebbeefa
Update code
DavidLiu506 c1beae4
Update code
DavidLiu506 ce0ad7a
Update code
DavidLiu506 f518986
Update code
DavidLiu506 3fba144
Update code
DavidLiu506 aa43fc6
Update code
DavidLiu506 da6ed64
Update code
DavidLiu506 276b205
Merge branch 'master' of https://github.com/futurewei-cloud/alcor int…
DavidLiu506 85a9b3e
Merge branch 'master' of https://github.com/DavidLiu506/alcor into al…
DavidLiu506 5741f07
Add arion watch service for arion wing
DavidLiu506 ad57f7b
Update code
DavidLiu506 bea71bb
Update code
DavidLiu506 df7f8e7
Update code
DavidLiu506 5936c4b
Update code
DavidLiu506 45cb7e2
Update code
DavidLiu506 24896a8
Update code
DavidLiu506 243c799
Update code
DavidLiu506 5ba0d9a
Update code
DavidLiu506 79832ef
Update code
DavidLiu506 b067987
Update code
DavidLiu506 e4793c5
Update code
DavidLiu506 7122cc8
Update code
DavidLiu506 ba723d5
Update code
DavidLiu506 3d233c9
Update code
DavidLiu506 f2213d5
Update code
DavidLiu506 b2f22d8
Update code
DavidLiu506 92ad98a
Update code
DavidLiu506 85f8dce
Update code
DavidLiu506 f09eb24
Update code
DavidLiu506 ada7d09
Update code
DavidLiu506 0d784fa
Update code
DavidLiu506 378b557
Update code
DavidLiu506 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -43,6 +43,9 @@ message NeighborConfiguration { | |
| NeighborType neighbor_type = 1; | ||
| string subnet_id = 2; | ||
| string ip_address = 3; | ||
| string arion_group = 4; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DavidLiu506 Let us discuss this. Hopefully we could reuse Alcor basic data structure to support Arion. |
||
| uint32 tunnel_id = 5; | ||
| string mac_address = 6; | ||
| } | ||
|
|
||
| message AllowAddressPair { | ||
|
|
||
This file contains hidden or 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
101 changes: 101 additions & 0 deletions
101
.../data_plane_manager/src/main/java/com/futurewei/alcor/dataplane/cache/ArionWingCache.java
This file contains hidden or 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,101 @@ | ||
| /* | ||
| MIT License | ||
| Copyright(c) 2020 Futurewei Cloud | ||
|
|
||
| Permission is hereby granted, | ||
| free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, | ||
| including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons | ||
| to whom the Software is furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| */ | ||
| package com.futurewei.alcor.dataplane.cache; | ||
|
|
||
| import com.futurewei.alcor.common.db.CacheException; | ||
| import com.futurewei.alcor.common.db.CacheFactory; | ||
| import com.futurewei.alcor.common.db.ICache; | ||
| import com.futurewei.alcor.common.stats.DurationStatistics; | ||
| import com.futurewei.alcor.dataplane.entity.ArionGroup; | ||
| import com.futurewei.alcor.dataplane.entity.ArionWing; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import org.springframework.context.annotation.ComponentScan; | ||
| import org.springframework.stereotype.Repository; | ||
|
|
||
| import java.util.Collection; | ||
| import java.util.Map; | ||
| import java.util.Set; | ||
|
|
||
| @Repository | ||
| @ComponentScan(value="com.futurewei.alcor.common.db") | ||
| public class ArionWingCache { | ||
|
|
||
| // arionWingCache store Arion wing meta data. key is Arion Wing hash code and value is Arion wing meta data. | ||
| private ICache<String, ArionWing> arionWingCache; | ||
|
|
||
| // arionWingGroupCache store Arion group meta data. key is Arion wing group name, value is Arion group meta data. | ||
| private ICache<String, ArionGroup> arionWingGroupCache; | ||
| private CacheFactory cacheFactory; | ||
|
|
||
| @Autowired | ||
| public ArionWingCache(CacheFactory cacheFactory) { | ||
| this.cacheFactory = cacheFactory; | ||
| arionWingCache = cacheFactory.getCache(ArionWing.class); | ||
| arionWingGroupCache = cacheFactory.getCache(ArionGroup.class); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public ArionWing getArionWing (String resourceId) throws CacheException { | ||
| return arionWingCache.get(resourceId); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public Collection<ArionWing> getArionWings () throws CacheException { | ||
| return arionWingCache.getAll().values(); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public Map<String, ArionWing> getAllSubnetPorts(Map<String, Object[]> queryParams) throws CacheException { | ||
| return arionWingCache.getAll(queryParams); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public Collection<ArionWing> getArionWings (Set<String> keys) throws CacheException { | ||
| return arionWingCache.getAll(keys).values(); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public void insertArionWing (ArionWing arionWing) throws CacheException { | ||
| arionWingCache.put(String.valueOf(arionWing.hashCode()), arionWing); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public void deleteArionWing (String resourceId) throws CacheException { | ||
| arionWingCache.remove(resourceId); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public Object getArionGroup (String resourceId) throws CacheException { | ||
| return arionWingGroupCache.get(resourceId); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public void insertArionGroup (String resourceId) throws CacheException { | ||
| System.out.println("Insert arion group: " + resourceId); | ||
| arionWingGroupCache.put(resourceId, new ArionGroup(resourceId)); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public void deleteArionGroup (String resourceId) throws CacheException { | ||
| arionWingGroupCache.remove(resourceId); | ||
| } | ||
|
|
||
| @DurationStatistics | ||
| public Map<String, ArionGroup> getAllArionGroup () throws CacheException { | ||
| return arionWingGroupCache.getAll(); | ||
| } | ||
|
|
||
| } |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a port id or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the port number for the in-band operation. Say,
port_inband_operation=1234, then when ACA receives this Gateway State, it creates a UDP server at this port(1234) to receive the OAM packet sent by an Arion Wing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zzxgzgz thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zzxgzgz based on the new design, the OAM packet is sent by a local OAM agent, not the Arion Wing, right?