Move ODP helper functions out to their own package
This commit is contained in:
1 parent
76db732f1b
commit
682133a56a
2 files changed
+5
-4
No files matched your search
@@ -1,4 +1,4 @@
|
|||||||
package router
|
package odp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
+4
-3
@@ -16,6 +16,7 @@ import (
|
|||||||
|
|
||||||
. "github.com/weaveworks/weave/common"
|
. "github.com/weaveworks/weave/common"
|
||||||
"github.com/weaveworks/weave/common/docker"
|
"github.com/weaveworks/weave/common/docker"
|
||||||
|
"github.com/weaveworks/weave/common/odp"
|
||||||
"github.com/weaveworks/weave/ipam"
|
"github.com/weaveworks/weave/ipam"
|
||||||
"github.com/weaveworks/weave/mesh"
|
"github.com/weaveworks/weave/mesh"
|
||||||
"github.com/weaveworks/weave/nameserver"
|
"github.com/weaveworks/weave/nameserver"
|
||||||
@@ -120,7 +121,7 @@ func main() {
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|
||||||
case createDatapath:
|
case createDatapath:
|
||||||
err, odp_supported := weave.CreateDatapath(datapathName)
|
err, odp_supported := odp.CreateDatapath(datapathName)
|
||||||
if !odp_supported {
|
if !odp_supported {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Log.Error(err)
|
Log.Error(err)
|
||||||
@@ -136,11 +137,11 @@ func main() {
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|
||||||
case deleteDatapath:
|
case deleteDatapath:
|
||||||
checkFatal(weave.DeleteDatapath(datapathName))
|
checkFatal(odp.DeleteDatapath(datapathName))
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|
||||||
case addDatapathInterface != "":
|
case addDatapathInterface != "":
|
||||||
checkFatal(weave.AddDatapathInterface(datapathName, addDatapathInterface))
|
checkFatal(odp.AddDatapathInterface(datapathName, addDatapathInterface))
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user