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>
* 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
* 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>
* 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
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.
* 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
* 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
* 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
* 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...
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.
* 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.