// TODO: The HTTP operator API does not provide a way to pull down the sandbox
// paths of tasks that are not currently running. Once I work around this I will implement
// a way to search across all agents from a root path like /<agentid>/<framework>/<executor>/<containerid>/...
The HTTP operator API does not provide a way to pull down the sandbox
paths of tasks that are not currently running. Once I work around this I will implement
a way to search across all agents from a root path like /////
// TODO : The HTTP operator API does not provide a way to pull down the sandbox // paths of tasks that are not currently running . Once I work around this I will implement // a way to search across all agents from a root path like / <agentid > / <framework > / <executor > / <containerid > / ...
func (_ List) Init(profile config.ProfileFn) func(*cli.Cmd) {
	return func(cmd *cli.Cmd) {
		cmd.Spec = "[OPTIONS] ID PATH"
		var (
			agentID  = cmd.StringArg("ID", "", "AgentID")
			filePath = cmd.StringArg("PATH", "", "path to list")
			relative = cmd.BoolOpt("relative", true, "Display the relative sandbox path")
			hostname = cmd.StringOpt("master", "", "Mesos master")
		)
		cmd.Action = func() {
			msgs, err := filter.Find(profile().With(config.Master(*hostname)), filter.Criteria{Target: filter.FILES, AgentID: *agentID, FilePath: *filePath})
			failOnErr(err)
			table := uitable.New()
			table.AddRow("UID", "GID", "MODE", "MODIFIED", "SIZE", "PATH")
			for _, info := range filter.AsFileInfos(msgs) {
				path := info.Path
				if *relative {
					split := strings.Split(path, "/")
					if len(split) > 0 {
						path = split[len(split)-1]
					}
				}
				table.AddRow(*info.UID, *info.GID, *info.Mode, "TODO", fmt.Sprintf("%d", info.Size()), path)
			}
			fmt.Println(table)
		}
	}
}
func ( _ List ) Init ( profile config . ProfileFn ) func ( * cli . Cmd ) { return func ( cmd * cli . Cmd ) { cmd . Spec = " " var ( agentID = cmd . StringArg ( " " , " " , " " ) filePath = cmd . StringArg ( " " , " " , " " ) relative = cmd . BoolOpt ( " " , true , " " ) hostname = cmd . StringOpt ( " " , " " , " " ) ) cmd . Action = func ( ) { msgs , err := filter . Find ( profile ( ) . With ( config . Master ( * hostname ) ) , filter . Criteria { Target : filter . FILES , AgentID : * agentID , FilePath : * filePath } ) failOnErr ( err ) table := uitable . New ( ) table . AddRow ( " " , " " , " " , " " , " " , " " ) for _ , info := range filter . AsFileInfos ( msgs ) { path := info . Path if * relative { split := strings . Split ( path , " " ) if len ( split ) > 0 { path = split [ len ( split ) - 1 ] } } table . AddRow ( * info . UID , * info . GID , * info . Mode , " " , fmt . Sprintf ( " " , info . Size ( ) ) , path ) } fmt . Println ( table ) } } }
The HTTP operator API does not provide a way to pull down the sandbox
paths of tasks that are not currently running.
The HTTP operator API does not provide a way to pull down the sandbox paths of tasks that are not currently running .