brmanager.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package brmanager
  2. import (
  3. "github.com/docker/docker/libnetwork/driverapi"
  4. "github.com/docker/docker/libnetwork/scope"
  5. "github.com/docker/docker/libnetwork/types"
  6. )
  7. const networkType = "bridge"
  8. type driver struct{}
  9. // Register registers a new instance of the bridge manager driver with r.
  10. func Register(r driverapi.Registerer) error {
  11. return r.RegisterDriver(networkType, &driver{}, driverapi.Capability{
  12. DataScope: scope.Local,
  13. ConnectivityScope: scope.Local,
  14. })
  15. }
  16. func (d *driver) NetworkAllocate(id string, option map[string]string, ipV4Data, ipV6Data []driverapi.IPAMData) (map[string]string, error) {
  17. return nil, types.NotImplementedErrorf("not implemented")
  18. }
  19. func (d *driver) NetworkFree(id string) error {
  20. return types.NotImplementedErrorf("not implemented")
  21. }
  22. func (d *driver) CreateNetwork(id string, option map[string]interface{}, nInfo driverapi.NetworkInfo, ipV4Data, ipV6Data []driverapi.IPAMData) error {
  23. return types.NotImplementedErrorf("not implemented")
  24. }
  25. func (d *driver) EventNotify(etype driverapi.EventType, nid, tableName, key string, value []byte) {
  26. }
  27. func (d *driver) DecodeTableEntry(tablename string, key string, value []byte) (string, map[string]string) {
  28. return "", nil
  29. }
  30. func (d *driver) DeleteNetwork(nid string) error {
  31. return types.NotImplementedErrorf("not implemented")
  32. }
  33. func (d *driver) CreateEndpoint(nid, eid string, ifInfo driverapi.InterfaceInfo, epOptions map[string]interface{}) error {
  34. return types.NotImplementedErrorf("not implemented")
  35. }
  36. func (d *driver) DeleteEndpoint(nid, eid string) error {
  37. return types.NotImplementedErrorf("not implemented")
  38. }
  39. func (d *driver) EndpointOperInfo(nid, eid string) (map[string]interface{}, error) {
  40. return nil, types.NotImplementedErrorf("not implemented")
  41. }
  42. func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo, options map[string]interface{}) error {
  43. return types.NotImplementedErrorf("not implemented")
  44. }
  45. func (d *driver) Leave(nid, eid string) error {
  46. return types.NotImplementedErrorf("not implemented")
  47. }
  48. func (d *driver) Type() string {
  49. return networkType
  50. }
  51. func (d *driver) IsBuiltIn() bool {
  52. return true
  53. }
  54. func (d *driver) ProgramExternalConnectivity(nid, eid string, options map[string]interface{}) error {
  55. return types.NotImplementedErrorf("not implemented")
  56. }
  57. func (d *driver) RevokeExternalConnectivity(nid, eid string) error {
  58. return types.NotImplementedErrorf("not implemented")
  59. }