def create_fields(self): self.register(ipfield.IpField('server'), True) self.fields['server'].indexed=True self.register(corefields.CharField('device', 25), True) self.register(corefields.IntegerField('network_up'), True) self.register(corefields.IntegerField('network_down'), True) self.register(datefield.DateField('date'))
def __init__(self, connection): super().__init__(connection) self.register(IpField('ip'), True) self.fields['ip'].indexed=True self.register(corefields.DoubleField('bytes_sent')) self.register(corefields.DoubleField('bytes_recv')) self.register(corefields.IntegerField('errin')) self.register(corefields.IntegerField('errout')) self.register(corefields.IntegerField('dropin')) self.register(corefields.IntegerField('dropout')) self.register(corefields.BooleanField('last_updated')) self.register(DateField('date'))
def __init__(self, connection): super().__init__(connection) self.connection = connection self.register(corefields.CharField('name_task'), True) self.register(corefields.CharField('description_task'), True) self.register(corefields.CharField('codename_task')) self.register( ArrayField('files', ArrayField('', corefields.CharField('')))) self.register( ArrayField('commands_to_execute', ArrayField('', corefields.CharField('')))) self.register(ArrayField('delete_files', corefields.CharField(''))) self.register( ArrayField('delete_directories', corefields.CharField(''))) self.register(corefields.BooleanField('error')) self.register(corefields.BooleanField('status')) self.register(corefields.CharField('url_return')) self.register(IpField('server')) self.register(corefields.TextField('where_sql_server')) self.fields['where_sql_server'].escape = True self.register(corefields.IntegerField('num_servers')) self.register(corefields.CharField('user')) self.register(corefields.CharField('password')) self.register(corefields.CharField('path')) self.register(corefields.BooleanField('one_time')) self.register(corefields.CharField('version')) self.register(corefields.CharField('post_func')) self.register(corefields.CharField('pre_func')) self.register(corefields.CharField('error_func')) self.register(DictField('extra_data', corefields.CharField(''))) self.error = False self.txt_error = ''
def __init__(self, connection): super().__init__(connection) self.register(IpField('ip'), True) self.fields['ip'].indexed=True self.register(corefields.IntegerField('num_cpu')) self.register(corefields.DoubleField('idle')) self.register(corefields.BooleanField('last_updated')) self.register(DateField('date')) self.register(corefields.ForeignKeyField('server_id', Server(connection), size=11, required=False, identifier_field='id', named_field="hostname", select_fields=['actual_idle', 'date']))
def create_fields(self): self.register(corefields.CharField('task')) self.register(corefields.CharField('uuid')) self.register(corefields.BooleanField('status')) self.register(corefields.TextField('info')) self.register(corefields.IntegerField('pid'))
def __init__(self, connection): super().__init__(connection) self.register(corefields.CharField('hostname'), True) self.register(LonelyIpField('ip'), True) self.fields['ip'].unique=True self.fields['ip'].indexed=True self.register(corefields.BooleanField('status')) self.register(corefields.BooleanField('monitoring')) self.register(corefields.CharField('os_codename'), True) self.register(corefields.IntegerField('num_updates')) self.register(corefields.DoubleField('actual_idle')) self.register(LastUpdatedField('date'))