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

20 Коммитов

Автор SHA1 Сообщение Дата
Paul Yu be2dcc0324
Start two CNS servers with different handlers (#2650)
* start two cns servers

* fix linter issues

* fix linter issue

* enhance echo server log

* fix Quang's comments

* gofumpt cns service.go

* fix defaultAPIServerAddress

* run servers asynchoronsly

* add server_test.go

* fix UT test

* enhance log

* fix log issue

* fix an issue

* add a check for defaultAPIServerURL

* fix GetOption func

* enhance comments

* fix defaultAPI URL to 127.0.0.1

* fix restapi method in echo server

* remove unnecessary log info

* fix comment1

* fix comments

* add context to control echo server

* fix TM's comments

* do not enable local server if user specifies cnsurl by -c option

* add -p port check when getting nodeURL

* fix comments and use -p select from customer to start local server

* fix a case when customer does not provide -p option

* fix the issue if customer also does not provide -p and -c option

* add UTs to launch server with different combinations

* fix linter issue for UTs

* fix UT linter issues

* UT needs to stop service

* remove duplicated test case

* comments fix

* fix linter issue

* fix Tim's comments

* fix comments

* fix linter issue

* handle type assertion

* Adding cnsURL and cnsPort options to test server

The startService function is a mistake that has been perpetuated through
time and needs to be removed. As a consequence of its existence, it
requires mixing concerns in all tests and stands in the way of
refactoring.

The addition of two type assertion checks caused this function to break,
because the corresponding options were not set in the Service's
configuration. This is a problem in itself--there's no reason the
options should be pulled out of a map[string]interface{}. Given this, we
can just set these two options in startService, committing sins to
offset the ones in service.(*HTTPRestService).Service.Options.

---------

Signed-off-by: Paul Yu <129891899+paulyufan2@users.noreply.github.com>
Co-authored-by: Tim Raymond <traymond@microsoft.com>
2024-04-29 23:16:58 +00: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 b63e52328c
disable cleaning up hns network and state files from windows cni (#879)
* disable cleaning up hns network and state files from windows cni

* fixed uts

* fixed ut

* remove the ut which is not needed anymore

* addressed comments

* updated same pattern for cnm

* added comments

* addressed comments
2021-07-21 09:37:48 -07:00
Ali Egal 44706cc6a7 reorder a test 2020-08-10 14:31:25 -07:00
jaer-tsun 136f03caf7 Cns telemetry (#275)
Adds telemetry capability for CNS.
2018-12-12 10:45:48 -08:00
jaer-tsun 431ac08469 Enable Circleci (#220)
Enable CircleCi
2018-08-14 12:08:48 -07:00
tamilmani1989 2584d9964c Exposed IPAM API path and structures as public
* Modified files which are using those variables
2017-06-29 12:11:45 -07:00
Onur Filiz b305ca8ba6 Improve CNM tests 2017-06-15 11:03:30 -07:00
tamilmani1989 127ec6d945 Add support for releasing addresses by ID 2017-06-12 16:36:21 -07:00
tamilmani1989 80c5bd8a55 Add address IDs to CNM IPAM plugin (#63) 2017-06-09 16:14:03 -07:00
tamilmani1989 fb1d76fc18 Add GetPoolInfo to retrieve additional information about address pools (#62) 2017-06-08 18:37:21 -07:00
Onur Filiz 223cb03242 Updated IPAM to return the VNET gateway address for libnetwork gateway requests 2017-05-04 19:59:21 -07:00
Onur Filiz 60c540a02e Added support for custom API server URLs to CNM plugins 2017-05-02 18:39:32 -07:00
Onur Filiz ecb5bea89b Changed libnetwork plugin socket name to azure-vnet 2017-02-28 13:14:48 -08:00
Onur Filiz 437f7876d7 Added license notice to all source files 2017-02-12 02:03:39 -08:00
Onur Filiz 6373b2b467 Added support for sharing the same listener between CNM net and IPAM plugins 2016-12-15 15:10:06 -08:00
Onur Filiz 2d12f8bdbf Fixed CNM IPAM tests 2016-12-06 11:49:17 -08:00
Onur Filiz 0ef945eb56 Added ability to pass cmd-line options to IPAM 2016-12-06 11:17:47 -08:00
Onur Filiz 8a9e48265c Moved CNM specific logic to CNM package 2016-11-30 17:56:49 -08:00
Onur Filiz 97c3f241d8 Moved CNM specific logic to CNM package 2016-11-28 17:13:34 -08:00