Ejemplo n.º 1
0
 def remove_vCenter(self, auth, id):
     try:
         dc_ents = DBSession.query(Entity).join(EntityAttribute).join(EntityType).filter(EntityAttribute.name == constants.EXTERNAL_MANAGER_ID).filter(EntityAttribute.value == id).filter(EntityType.name == constants.DATA_CENTER).all()
         print '\n\n\n\n==',
         print dc_ents
         for dc_ent in dc_ents:
             self.remove_vcenter_entities(auth, dc_ent)
         VCenter.remove_by_id(id)
     except Exception as e:
         traceback.print_exc()
         raise e
Ejemplo n.º 2
0
 def get_vcenter(self, vcenter_id):
     return VCenter.get_object_by_id(vcenter_id)