Exemplo n.º 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))
Exemplo n.º 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))
Exemplo n.º 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
Exemplo n.º 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