Example #1
0
 def handle(self, *args, **options):
     interactive = not options['remote']
     run_chain(
         options,
         'splunk',
         interactive=interactive,
     )
Example #2
0
 def handle(self, *args, **options):
     interactive = not options['remote']
     options['queue'] = 'zabbix'
     role_ids = VentureRole.objects.filter(
         roleintegration__type=IntegrationType.zabbix
     ).exclude(device=None).values_list('id', flat=True)
     if not role_ids:
         print('No venture roles configured for Zabbix integration.',
               file=sys.stderr)
         sys.exit(1)
     for role_id in role_ids:
         run_chain(
             {'uid': role_id}, 'zabbix', interactive=interactive,
         )
 def handle(self, *args, **options):
     specified_option = False
     interactive = not options['remote']
     for chain_name in get_cmdb_plugins():
         if not options.get(chain_name):
             continue
         logger.debug('Executing %s chain .' % chain_name)
         run_chain(
             {'queue': chain_name}, chain_name, interactive=interactive,
         )
         logger.debug('Finished executing %s chain.' % chain_name)
         specified_option = True
     if not specified_option:
         print('Please specify option. ')
Example #4
0
 def handle(self, *args, **options):
     interactive = not options['remote']
     options['queue'] = 'zabbix'
     role_ids = VentureRole.objects.filter(
         roleintegration__type=IntegrationType.zabbix).exclude(
             device=None).values_list('id', flat=True)
     if not role_ids:
         print('No venture roles configured for Zabbix integration.',
               file=sys.stderr)
         sys.exit(1)
     for role_id in role_ids:
         run_chain(
             {'uid': role_id},
             'zabbix',
             interactive=interactive,
         )
Example #5
0
 def handle(self, *args, **options):
     specified_option = False
     interactive = not options['remote']
     for chain_name in get_cmdb_plugins():
         if not options.get(chain_name):
             continue
         logger.debug('Executing %s chain .' % chain_name)
         run_chain(
             {'queue': chain_name},
             chain_name,
             interactive=interactive,
         )
         logger.debug('Finished executing %s chain.' % chain_name)
         specified_option = True
     if not specified_option:
         print('Please specify option. ')
Example #6
0
 def handle(self, *args, **options):
     specified_option = False
     interactive = not options['remote']
     cutoff_date = (
         options['days'] and
         datetime.datetime.now() - datetime.timedelta(days=options['days'])
     )
     for chain_name in get_cmdb_plugins():
         if not options.get(chain_name):
             continue
         logger.debug('Executing %s chain .' % chain_name)
         run_chain(
             {'queue': chain_name, 'cutoff_date': cutoff_date},
             chain_name,
             interactive=interactive,
         )
         logger.debug('Finished executing %s chain.' % chain_name)
         specified_option = True
     if not specified_option:
         print('Please specify option. ')
Example #7
0
 def handle(self, *args, **options):
     interactive = not options['remote']
     run_chain(
         options, 'splunk', interactive=interactive,
     )
Example #8
0
 def handle(self, *args, **options):
     interactive = not options['remote']
     run_chain({}, 'openstack', interactive=interactive)
Example #9
0
def commit_hook(request):
    run_chain({'queue': 'cmdb_git'}, 'cmdb_git')
    return {'status': 'Queued.'}
Example #10
0
 def handle(self, *args, **options):
     interactive = not options['remote']
     run_chain({}, 'openstack', interactive=interactive)