Skip to content

Commit

Permalink
Merge pull request #10 from shiftky/suppress_pager_output
Browse files Browse the repository at this point in the history
Suppress pager output
  • Loading branch information
Yuki KIRII authored Oct 2, 2017
2 parents ba81a9f + c5283d5 commit be289a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/tmsh/cmd/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ func showPoolInfo(pool *tmsh.Pool) {
fmt.Println(" Monitor Rule :", pool.MonitorRule)
fmt.Println(" Availability State :", pool.AvailabilityState)
fmt.Println(" Enabled State :", pool.EnabledState)
fmt.Println(" Status Reason :", pool.StatusReason)
fmt.Println(" Status Reason :", pool.StatusReason, "\n")

if pool.ActiveMemberCount > 0 {
fmt.Println("\nPool Members")
fmt.Println("Pool Members")
for _, member := range pool.PoolMembers {
fmt.Println(" #", member.Name, "("+member.Addr+":"+strconv.Itoa(member.Port)+")")
fmt.Println(" Monitor Rule :", member.MonitorRule)
Expand Down
11 changes: 9 additions & 2 deletions tmsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ func NewSession(host, port, user, password string) (*BigIP, error) {
}
}

return &BigIP{
bigip := &BigIP{
host: host,
user: user,
sshconn: sshconn,
}, nil
}

// Suppress pager output
if _, err := bigip.ExecuteCommand("modify cli preference pager disabled display-threshold 0"); err != nil {
return nil, err
}

return bigip, nil
}

func (bigip *BigIP) ExecuteCommand(cmd string) (string, error) {
Expand Down

0 comments on commit be289a9

Please sign in to comment.