/
service_state_dumper.go
36 lines (33 loc) · 1.13 KB
/
service_state_dumper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// +build all qos
/*
* Copyright 2020 The Magma Authors.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package integration
import "fmt"
func dumpPipelinedState(tr *TestRunner) {
fmt.Println("******************* Dumping Pipelined State *******************")
cmdList := [][]string{
{"pipelined_cli.py", "debug", "qos"},
{"pipelined_cli.py", "debug", "display_flows"},
}
cmdOutputList, err := tr.RunCommandInContainer("pipelined", cmdList)
if err != nil {
fmt.Printf("error dumping pipelined state %v", err)
return
}
for _, cmdOutput := range cmdOutputList {
fmt.Printf("command : \n%v\n", cmdOutput.cmd)
fmt.Printf("output : \n%v\n", cmdOutput.output)
fmt.Printf("error : \n%v\n", cmdOutput.err)
fmt.Printf("\n\n")
}
}