1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/server/server_experimental_unix.go
Alessandro Boch 4d648f924a Vendoring libnetwork 3e31cead05cba8ec20241630d051e6d73765b3a2
+ Fix a couple of bugs introduced by previous vendoring:
  - in bitseq which prevents to use experimental overlay networking
  - in docker service ls cli o/p
+ Add missing http subrouter for newly introduced sandboxes
+ Fix fragmentation issue on vxlan header addition for overlay network driver
+ Remove libnetwork test code utilities from vendoring

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-08 07:36:35 -07:00

22 lines
1,001 B
Go

// +build experimental,!windows
package server
func (s *Server) registerSubRouter() {
httpHandler := s.daemon.NetworkAPIRouter()
subrouter := s.router.PathPrefix("/v{version:[0-9.]+}/networks").Subrouter()
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
subrouter = s.router.PathPrefix("/networks").Subrouter()
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
subrouter = s.router.PathPrefix("/v{version:[0-9.]+}/services").Subrouter()
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
subrouter = s.router.PathPrefix("/services").Subrouter()
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
subrouter = s.router.PathPrefix("/v{version:[0-9.]+}/sandboxes").Subrouter()
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
subrouter = s.router.PathPrefix("/sandboxes").Subrouter()
subrouter.Methods("GET", "POST", "PUT", "DELETE").HandlerFunc(httpHandler)
}