def generate_data(self, data): for service in data['services'].values(): for env in data['envs'].values(): CIRelationFactory.create( parent=service, child=env, type=CI_RELATION_TYPES.CONTAINS, )
def generate_data(self, data): business = BusinessLineFactory(name='IT') profit_center = ProfitCenterFactory(name='Default profit center') CIRelationFactory.create( parent=business, child=profit_center, type=CI_RELATION_TYPES.CONTAINS, ) for service in data['services'].values(): CIRelationFactory.create( parent=profit_center, child=service, type=CI_RELATION_TYPES.CONTAINS, )