code: func getSwitchesCmd(params *Parameters) *subcommands.Command {
  	return &subcommands.Command{
  		UsageLine: "get-switches [-name <name>]... [-rack <rack>]... [-dc <datacenter>]...",
  		ShortDesc: "retrieves switches",
  		LongDesc:  "Retrieves switches matching the given names, racks and dcs, or all switches if names, racks, and dcs are omitted.\n\nExample to get all switches:\ncrimson get-switches\nExample to get the switch of rack xx1:\ncrimson get-switches -rack xx1",
  		CommandRun: func() subcommands.CommandRun {
  			cmd := &GetSwitchesCmd{}
  			cmd.Initialize(params)
  			cmd.Flags.Var(flag.StringSlice(&cmd.req.Names), "name", "Name of a switch to filter by. Can be specified multiple times.")
  			cmd.Flags.Var(flag.StringSlice(&cmd.req.Racks), "rack", "Name of a rack to filter by. Can be specified multiple times.")
  			cmd.Flags.Var(flag.StringSlice(&cmd.req.Datacenters), "dc", "Name of a datacenter to filter by. Can be specified multiple times.")
  			return cmd
  		},
  	}
  }
docs: // getSwitchesCmd returns a command to get switches.