You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port DeleteNetworkContainer and SetOrchestratorType from DNC (Azure#1454)
* Add DeleteNetworkContainer method to CNS Client DNC needs to delete network containers using CNS, and it currently does so through raw HTTP requests. This instead makes this an official operation within the CNS client so that it can be used there instead. * Remove return value from DeleteNetworkContainer The return value from DeleteNetworkContainer was basically unused in DeleteNetworkContainer, since it only contains a CNSResponse type which can only ever be a successful response. Given this, it's sufficient to just return no error as a signifier of success. * Add SetOrchestratorType endpoint to cns client DNC uses SetOrchestratorType currently by making straight HTTP requests to the CNS backend. Since we should have one client only, this moves these endpoints into the CNS client so that it can be consumed in DNC. * Fix two linter issues In one instance the linter had a false positive on an error that doesn't really need to be wrapped. The other was a good suggestion since it helps readers of the test understand what is going on. * Add CreateNetworkContainer endpoint to client Turns out DNC uses a few more endpoints than it would seem. This adds a CreateNetworkContainer method to encapsulate the /network/createorupdatenetworkcontainer endpoint. * Add a PublishNetworkContainer to CNS client Publishing network containers via CNS is something that DNC does directly through an HTTP client. Given how common this is, it makes sense to adopt this into the CNS client so that DNC can use the client instead. * Fix placeholder error message This was just used in testing and was forgotten. * Add context to DeleteNetworkContainer Everything involving the network should take a context parameter. * Fix PublishNetworkContainer return type The PublishNetworkContainer endpoint returns a wrapping type around the cns.Response. This updates the tests and the endpoint to reflect that. * Add UnpublishNC to CNS Client Unpublishing NCs is accomplished by DNC currently by directly making HTTP calls. This adds that functionality to the client so the client can be used instead.
0 commit comments