This code has some gnarly string-matching to detect "not found" errors returned by hcsshim. Hcsshim at some point changed this error to lowercase;6d67a30859It looks like we ran into that problem in integration tests, which was fixed inc530c9cbb0when updating hcsshim, however, it was only fixed in tests, and hiding the actual issue in our code. It looks like hcsshim has some utilities to detect error-types, such as the IsElementNotFoundError function in hcn, which is the newer API that also wraps the "HNS" service;d9a4231b9d/hcn/hcnerrors.go (L75-L77)But unfortunately, the hns API used by us, does not return typed errors, and returns HNS errors as a untyped formatted string. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
libnetwork - networking for containers
Libnetwork provides a native Go implementation for connecting containers
The goal of libnetwork is to deliver a robust Container Network Model that provides a consistent programming interface and the required network abstractions for applications.
Design
Please refer to the design for more information.
Using libnetwork
There are many networking solutions available to suit a broad range of use-cases. libnetwork uses a driver / plugin model to support all of these solutions while abstracting the complexity of the driver implementations by exposing a simple and consistent Network Model to users.
Contributing
Want to hack on libnetwork? Docker's contributions guidelines apply.
Copyright and license
Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.