You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by GitBox <gi...@apache.org> on 2021/12/28 13:12:55 UTC

[GitHub] [mesos] andreaspeters commented on a change in pull request #416: ADD: Task inspect function to the mesos-cli.

andreaspeters commented on a change in pull request #416:
URL: https://github.com/apache/mesos/pull/416#discussion_r775901840



##########
File path: src/python/cli_new/lib/cli/plugins/task/main.py
##########
@@ -143,3 +148,25 @@ def list(self, argv):
                                .format(error=exception))
 
         print(str(table))
+
+    def inspect(self, argv):
+        """
+        Show the low-level information of the task.
+        """
+        try:
+            master = self.config.master()
+        except Exception as exception:
+            raise CLIException("Unable to get leading master address: {error}"
+                               .format(error=exception))
+
+        data = get_tasks(master, self.config)
+        try:
+            for task in data:
+                if task["id"] != argv["<task_id>"]:
+                    continue
+
+                print(json.dumps(task, indent=4))
+
+        except Exception as exception:

Review comment:
       U are right, should not throw failures. :-) 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@mesos.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org