Граф коммитов

28 Коммитов

Автор SHA1 Сообщение Дата
Saksham Mittal c47e538212
Fix endpoints for CNS pull model API calls to DNC (#2297)
fix endpoints for cns pull model api calls to dnc
2023-10-20 15:47:12 -07:00
aegal d52ed96a20
guard against unstructured url forwarding in CNS API's (#1192)
* remove forwarding unstructured urls

* remove forwarding unstructured urls

* addressing feedback

* fix linting issues

* update getncversion test

* fix test issue where nmagent handler returns 500

* update for linter

* address comments

* small liniter changes

* quick linting changes

* lint

* use gofumpt instead of gofmt

* ignore line count
2022-02-01 15:13:44 -08:00
Eng Zer Jun e812bc82b8
refactor: move from io/ioutil to io and os packages (#1096)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-11-17 16:31:42 -06:00
Mathew Merrick f9b65e95d2
test: add multitenancy ut's (#1018)
* multitenancy minor refactor, and add ut's
2021-09-21 09:11:58 -07:00
Evan Baker 96bec09d41
chore: appease the linter (3/?), the big gofumpt (#987)
* gofumpt -w -s .

* small addtl cleanups after gofumpt

* rerun after rebase
2021-09-02 16:33:18 -05:00
tamilmani1989 98f838ef1b
Write to intermediate file before moving to state file (#755)
* write to temp file and move to state file

* fixed memleak and other issues

* call windows replace function with MOVEFILE_WRITE_THROUGH flag

* moved few functions to platform package

* moved test files to correct dir

* addressed comments
2021-01-07 17:43:33 -08:00
vakr 7ed7e9179e Covering pull model for DNC-CNS nmAgentSupportedApis list 2020-09-29 12:16:32 -07:00
Jaeryn dd7abd1627
CNS to DNC communication in Managed DNC (#574)
* initial changes for CNS->DNC support

* Adding changes for CNS to be compatible with managed DNC (reverse communication channel)

* adding NC version validation with respective NMA

* return errors for respective NC based on orchestrator context from CNI

* add nc version check via NMA

* adding logic to SyncNodeStatus and check if NCWaitingForUpdate for CniADD and CnsAttach calls

* addressing most of ashvin's comments

* adding managed config

* fat rebase

* addressing some comments

* slight optimizations...

* adding channel mode instead of managed bool

* set err in register node so that we keep looping

* addressing ashvin's comments

* fix test

* removing swift prefix mods for mdnc

* addressing tamanoha's comments

Co-authored-by: Jaeryn <tsun.chu@microsoft.com>
2020-07-23 13:03:10 -07:00
Ashvin Deodhar aeacc60dfe
Fix the code used to get the working directory (#484)
Use os.Executable to get the directory of the exe
2020-01-30 22:34:17 -08:00
tamilmani1989 2d619b78fe
AppInsightTelemetry support for CNI (#458)
* Added AITelemetry support for CNI

* added new files

* added other configs in config file

* fixed ut

* updated disableall similar to cns

* added container name to report

* addressed review comments

* addressed review comments

* added check for azure environment

* added log

* close log handle in unit test

* addressed review comments

* addressed review comments

* fixed a condition

* keep the netagent channel for logs

* fixed error

* addressed review comments
2020-01-14 14:53:24 -08:00
Ashvin Deodhar cd236e1f59
Publish/Unpublish Network Containers via CNS (#430)
Expose 2 APIs to publish and unpublish network containers from CNS.
a. PublishNetworkContainer
b. UnpublishNetworkContainer

DNC calls CNS to publish and unpublish the network containers.
2019-11-13 18:07:36 -08:00
tamilmani1989 e0605e90f6
added application insights telemetry package to send metrics and logs (#421)
* added application insights telemetry package to send metrics and logs to appinsights

* moved a function common to both packages
acquired a lock before writing to file

* added read write lock as per chandan comment. Addressed jaeryn comments

* fixed telemetry unit test

* defined interface and added appinsights package as vendor to acn

* added vendor package.go(appinsights)

* dependencies of appinsights

* added AI dependencies

* updated unit tests

* addressed review comments
2019-10-16 13:08:42 -07:00
tamilmani1989 59969fec20
Fix for CNI lock timedout issue. (#382)
* Fix for CNI lock timedout issue.

* removed duplicate log

* addressed review comments
2019-07-31 11:40:51 -07:00
tamilmani1989 a75fbe77b3 Set dns server on azure bridge for ubuntu version >= 17 (#345)
* configure dns server on azure bridge for ubuntu versions > 18. Moved hns related apis from platform package to hsnclient package

* read dns server from interface instead of file and fixed few issues

* renturn error on fail to configure dns

* added unitest and fixed an issue in ReadFileByLines method

* added a UT

* addressed comments and added few tests to get code coverage

* confiure dns for ubuntu17 also

* corrected typo error of filename
2019-04-30 16:27:48 -07:00
tamilmani1989 a11d5104a0
Config support for Telemetry service (#317)
* 1. Start telemetry service as separate process for all components cns/networkmonitor
2. Added telemetry config through which we can configure reportTohost interval
3. Added unit tests for changes

* added new files for telemetry testing

* added tests for invalid cases

* updated with dummy subid
2019-03-25 14:12:32 -07:00
Tamilmani Manoharan 8bdc193f0c removed blank line 2019-02-05 15:28:39 -08:00
Tamilmani Manoharan bff9bed007 addressed review comments and modified unit tests 2019-02-05 15:14:44 -08:00
Tamilmani Manoharan 4055fa9f51 Added support for CNI telmetry report to mds 2019-02-01 16:24:45 -08:00
jaer-tsun 45914be23d
Adding telemetry report functions for DNC. (#216)
* Adding telemetry report functions for DNC.

* Addressing Yongli's suggestions.

* commit to switch branches

* Adding some changes to npm due to telemetry change.

* Modifying tests for interface reports...
2018-08-16 14:12:58 -07:00
tamilmani1989 147c4388c8 Multitenancy Support for Linux (#156)
This PR adds the following capabilities
1. Support to create and connect containers to different Azure Vnets. Every VlanId corresponds to a different Azure Vnet.
2. SNAT support for containers to reach Internet using the container's host IP as the SNAT address.

Both the above options are controlled by the config parameters in Azure CNI.
2018-07-06 11:45:47 -07:00
Sushant Sharma c69ab4e8e4
Add APIs in CNS to support multitenancy (#106)
* APIs to support multitenancy in Azure. 

* Add support to create, update, and delete network containers (adapters) in windows hosts

* Add API to query host for programmed version of a container

* Add API to retrieve interface given a container ID

* Add support for custom log directory.
2018-03-28 15:03:58 -07:00
tamilmani1989 2009917134 Added support for cnm reboot scenario (#98)
* Added support cnm reboot scenario

* Addressed review comments
2018-02-22 11:22:47 -08:00
Tamilmani Manoharan 1669082f90 Moved xmldocument structure to common directory 2017-12-12 10:45:53 -08:00
Onur Filiz 437f7876d7 Added license notice to all source files 2017-02-12 02:03:39 -08:00
Onur Filiz 789819e76d Moved OS-specific logic to platform package 2017-01-20 16:21:41 -08:00
Onur Filiz f17e20ac90 Updated network and address managers to ignore stale persisted state from previous boots 2016-12-16 18:03:03 -08:00
Onur Filiz deb2a6d291 Updated package references with new repo name 2016-10-06 14:40:29 -07:00
Onur Filiz 78f8d0d54b Add NetApi to base plugin 2016-09-21 15:37:35 -07:00