예제 #1
0
 def take_action(self, parsed_args):
     repository = Escli._es.snapshot.get_repository(
         repository=parsed_args.repository,
         format="json").get(parsed_args.repository)
     json_formatter = JSONFormatter(repository)
     return json_formatter.to_show_one(lines=[
         ('type'),
         ('settings'),
     ])
예제 #2
0
    def take_action(self, parsed_args):
        self.snapshot = Escli._es.snapshot.get(
            repository=parsed_args.repository,
            snapshot=parsed_args.snapshot,
            format="json").get('snapshots')[0]

        self.transform()

        json_formatter = JSONFormatter(self.snapshot)
        return json_formatter.to_show_one(lines=[
            ('snapshot'),
            ('uuid', 'UUID'),
            ('version_id'),
            ('version'),
            ('indices'),
            ('state'),
            ('start_time'),
            ('end_time'),
            ('duration_in_millis', 'Duration (ms)'),
            ('failures'),
            ('total_shards'),
            ('failed_shards'),
            ('successful_shards'),
        ])