#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Dec 4, 2013

@author: noob
"""
from api.views.jobmetainfo import create_default_kpis
from common.models import Component
from django.core.management.base import BaseCommand
import logging


class Command(BaseCommand):
    help = 'Creates default kpis for all components'

    def handle(self, *args, **options):
        components = Component.objects.all()
        for component_obj in components:
            create_default_kpis(component_obj)
