示例#1
0
文件: cmdb.py 项目: 4i60r/ralph
 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,
             )
示例#2
0
 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,
             )
示例#3
0
文件: cmdb.py 项目: 4i60r/ralph
 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,
         )
示例#4
0
 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,
         )