-
Notifications
You must be signed in to change notification settings - Fork 260
CNS to DNC communication in Managed DNC #574
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7df26c1
initial changes for CNS->DNC support
jaer-tsun 4abaabc
Adding changes for CNS to be compatible with managed DNC (reverse com…
jaer-tsun c0d8137
adding NC version validation with respective NMA
083a0ee
return errors for respective NC based on orchestrator context from CNI
1d70dbd
add nc version check via NMA
ef4c62d
adding logic to SyncNodeStatus and check if NCWaitingForUpdate for Cn…
1da8183
addressing most of ashvin's comments
1af39e5
adding managed config
1a9372e
fat rebase
5084325
addressing some comments
048c6bd
slight optimizations...
3666fe4
adding channel mode instead of managed bool
945410d
set err in register node so that we keep looping
aba2db4
addressing ashvin's comments
35ff6df
Merge branch 'master' of https://github.com/Azure/azure-container-net…
e4beffa
fix test
1827cde
removing swift prefix mods for mdnc
d3c82e8
addressing tamanoha's comments
78c07a4
synced latest from master
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 |
|---|---|---|
|
|
@@ -9,6 +9,17 @@ import ( | |
| "github.com/Azure/azure-container-networking/common" | ||
| ) | ||
|
|
||
| const ( | ||
| WireserverIP = "168.63.129.16" | ||
| ) | ||
|
|
||
| // NMANetworkContainerResponse - NMAgent response. | ||
| type NMANetworkContainerResponse struct { | ||
| ResponseCode string `json:"httpStatusCode"` | ||
| NetworkContainerID string `json:"networkContainerId"` | ||
| Version string `json:"version"` | ||
| } | ||
|
|
||
| // JoinNetwork joins the given network | ||
| func JoinNetwork( | ||
| networkID string, | ||
|
|
@@ -62,3 +73,16 @@ func UnpublishNetworkContainer( | |
|
|
||
| return response, err | ||
| } | ||
|
|
||
| // GetNetworkContainerVersion :- Retrieves NC version from NMAgent | ||
| func GetNetworkContainerVersion( | ||
| networkContainerID, | ||
jaer-tsun marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| getNetworkContainerVersionURL string) (*http.Response, error) { | ||
| logger.Printf("[NMAgentClient] GetNetworkContainerVersion NC: %s", networkContainerID) | ||
|
|
||
| response, err := common.GetHttpClient().Get(getNetworkContainerVersionURL) | ||
|
Member
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. common.GetHttpClient()- can this function return nil?
Contributor
Author
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. it's init at start |
||
|
|
||
| logger.Printf("[NMAgentClient][Response] GetNetworkContainerVersion NC: %s. Response: %+v. Error: %v", | ||
| networkContainerID, response, err) | ||
| return response, err | ||
| } | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.