def get_instance_list(self, identity): from service.monitoring import _core_instances_for # Retrieve the core that could have an impact.. core_instances = _core_instances_for( identity, self.counting_behavior.start_date) # Convert Core Models --> Allocation/core Models alloc_instances = [AllocInstance.from_core( inst, self.counting_behavior.start_date) for inst in core_instances] return alloc_instances
def get_instance_list(self, identity): from service.monitoring import _core_instances_for # Retrieve the core that could have an impact.. core_instances = _core_instances_for(identity, self.counting_behavior.start_date) # Convert Core Models --> Allocation/core Models alloc_instances = [ AllocInstance.from_core(inst, self.counting_behavior.start_date) for inst in core_instances ] return alloc_instances
def get_instance_list(self, identity): from service.monitoring import _core_instances_for # Retrieve the core that could have an impact.. core_instances = _core_instances_for(identity, self.counting_behavior.start_date) # Convert Core Models --> Allocation/core Models alloc_instances = [] for inst in core_instances: try: alloc_instances.append( AllocInstance.from_core(inst, self.counting_behavior.start_date)) except Exception as exc: logger.exception(exc) return alloc_instances
def get_instance_list(self, identity): from service.monitoring import _core_instances_for # Retrieve the core that could have an impact.. core_instances = _core_instances_for( identity, self.counting_behavior.start_date) # Convert Core Models --> Allocation/core Models alloc_instances = [] for inst in core_instances: try: alloc_instances.append( AllocInstance.from_core(inst, self.counting_behavior.start_date) ) except Exception as exc: logger.exception(exc) return alloc_instances
def get_instance_list(self, identity, limit_instances=[], limit_history=[]): from service.monitoring import _core_instances_for # Retrieve the core that could have an impact.. core_instances = _core_instances_for( identity, self.counting_behavior.start_date) # Convert Core Models --> Allocation/core Models alloc_instances = [] for inst in core_instances: if limit_instances and inst.provider_alias not in limit_instances: continue try: alloc_instances.append( AllocInstance.from_core( inst, self.counting_behavior.start_date, limit_history=limit_history ) ) except Exception as exc: logger.exception("Instance %s could not be counted: %s" % (inst, exc)) return alloc_instances