(client *master.MasterClient)
| 280 | } |
| 281 | |
| 282 | func newCmdFlashNodeHTTPInactiveDisk(client *master.MasterClient) *cobra.Command { |
| 283 | return &cobra.Command{ |
| 284 | Use: "httpInactiveDisk" + _flashnodeAddr + " [dataPath]", |
| 285 | Short: "inactive the disk in flashnode", |
| 286 | Args: cobra.MinimumNArgs(2), |
| 287 | RunE: func(_ *cobra.Command, args []string) (err error) { |
| 288 | addr := args[0] |
| 289 | // check flashnode whether exist |
| 290 | _, err = client.NodeAPI().GetFlashNode(addr) |
| 291 | if err != nil { |
| 292 | return |
| 293 | } |
| 294 | dataPath := args[1] |
| 295 | if err = httpclient.New().Addr(addr2Prof(addr)).FlashNode().InactiveDisk(dataPath); err == nil { |
| 296 | stdoutlnf("%s inactives dataPath(%s) [OK]", addr, dataPath) |
| 297 | } |
| 298 | return |
| 299 | }, |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | func showFlashNodesView(flashNodeViewInfos []*proto.FlashNodeViewInfo, showStat bool, groupStats map[uint64]string, tbl table) table { |
| 304 | sort.Slice(flashNodeViewInfos, func(i, j int) bool { |
no test coverage detected