Example #1
0
 def execute(self, ns):
     """
     Implementation of 'raid list' command.
     """
     for r in raid.get_raids(ns):
         members = raid.get_raid_members(ns, r)
         yield (r.ElementName, r.Level, len(members))
Example #2
0
 def execute(self, ns):
     """
     Implementation of 'raid list' command.
     """
     for r in raid.get_raids(ns):
         members = raid.get_raid_members(ns, r)
         yield (r.ElementName, r.Level, len(members))
Example #3
0
 def execute(self, ns, devices=None):
     """
     Implementation of 'raid show' command.
     """
     if not devices:
         devices = raid.get_raids(ns)
     for r in devices:
         r = str2device(ns, r)
         cmd = fcmd.NewTableCommand(title=r.DeviceID)
         yield cmd
         for line in show.raid_show(ns, r, self.app.config.human_friendly):
             yield line
Example #4
0
 def execute(self, ns, devices=None):
     """
     Implementation of 'raid show' command.
     """
     if not devices:
         devices = raid.get_raids(ns)
     for r in devices:
         r = str2device(ns, r)
         cmd = fcmd.NewTableCommand(title=r.DeviceID)
         yield cmd
         for line in show.raid_show(ns, r, self.app.config.human_friendly):
             yield line