def parse_args():
    modes={
        'space':    {
            'help'  : 'Disk space',
            'label' : 'disk_space',
        },
        'time2connect': {
            'help'  : 'Connect time only',
            'label' : 'connect time'
        }
    }
    p=CheckOptions(modes, usage = "usage: %prog -H hostname -U user -P password --space")
    return p.parse_args()
 def parse_args(self):
     options=CheckOptions.parse_args(self)
     if not options.table:
         self.error('Table is a required option.')
     return options
 def extend_required_group(self,group):
     CheckOptions.extend_required_group(self,group)
     group.add_option('-T', '--table', help='Specify the table to check', default=None)
 def parse_args(self):
     options = CheckOptions.parse_args(self)
     if not options.table:
         self.error('Table is a required option.')
     return options
 def extend_required_group(self, group):
     CheckOptions.extend_required_group(self, group)
     group.add_option('-T',
                      '--table',
                      help='Specify the table to check',
                      default=None)
def parse_args():
    global MODES
    p = CheckOptions(
        MODES, usage="usage: %prog -H hostname -U user -P password --mode")
    return p.parse_args()
def parse_args():
    global MODES
    p=CheckOptions(MODES, usage = "usage: %prog -H hostname -U user -P password --mode")
    return p.parse_args()