Add check-datapath to weaveutil

The utility is used to check whether a datapath can be created.
This commit is contained in:
Martynas Pumputis authored and Matthias Radestock committed 2016-06-20 03:20:46 +01:00
1 parent b00e7d088e
commit 24d9a00f47
3 files changed
+15 -2

No files matched your search

+13
View File
@@ -31,6 +31,19 @@ func deleteDatapath(args []string) error {
return odp.DeleteDatapath(args[0])
}
// Checks whether a datapath can be created by actually creating and destroying it
func checkDatapath(args []string) error {
if len(args) != 1 {
cmdUsage("check-datapath", "<datapath>")
}
if err := createDatapath(args); err != nil {
return err
}
return odp.DeleteDatapath(args[0])
}
func addDatapathInterface(args []string) error {
if len(args) != 2 {
cmdUsage("add-datapath-interface", "<datapath> <interface>")