(c *stdapi.Context)
| 558 | } |
| 559 | |
| 560 | func (s *Server) InstanceList(c *stdapi.Context) error { |
| 561 | if err := s.hook("InstanceListValidate", c); err != nil { |
| 562 | return err |
| 563 | } |
| 564 | |
| 565 | v, err := s.provider(c).WithContext(c.Context()).InstanceList() |
| 566 | if err != nil { |
| 567 | return err |
| 568 | } |
| 569 | |
| 570 | if vs, ok := interface{}(v).(Sortable); ok { |
| 571 | sort.Slice(v, vs.Less) |
| 572 | } |
| 573 | |
| 574 | return c.RenderJSON(v) |
| 575 | } |
| 576 | |
| 577 | func (s *Server) InstanceShell(c *stdapi.Context) error { |
| 578 | if err := s.hook("InstanceShellValidate", c); err != nil { |
nothing calls this directly
no test coverage detected