def register_components(self, component_manager): if self._enabled is True: sut = component_manager.get_unique_class_for_entity(self._entity) add_cans(sut, ['ansibletestnode']) logger.debug('Adding can ansibletestnode to {entity}'.format(entity=self._entity)) else: logger.debug('{entity} is not ansibletestnode'.format(entity=self._entity))
def register_components(self, component_manager): if self.is_active: sut = component_manager.get_unique_class_for_entity(self.entity) add_cans(sut, ['power_meter']) @requires(sut='Sut', can=['power_meter']) @requires(messagebus='MessageBus') @component(name=K2_POWER_METER_COMPONENT, can=['power_meter']) def Dummy(sut, messagebus): return PowerMeter(messagebus, sut.entity, DUMMY_POWER_METER_ENDPOINT)
def register_components(self, component_manager): if self.is_active: sut = component_manager.get_unique_class_for_entity(self.entity) add_cans(sut, ['power', 'gude']) @requires(sut='Sut', can=['gude', 'power']) @requires(messagebus='MessageBus') @component(name=K2_POWER_COMPONENT, can=['gude', 'power']) def Gude(sut, messagebus): return PowerSwitch(messagebus, sut.entity, GUDE_POWER_SWITCH_ENDPOINT)
def register_components(self, component_manager): if self._enabled is True: sut = component_manager.get_unique_class_for_entity(self._entity) add_cans(sut, ['telnet']) add_properties( sut, 'telnet', { 'port': self._port, 'timeout': self._timeout, 'prompt': self._prompt, })
def register_components(self, component_manager): if self._enabled is True: sut = component_manager.get_unique_class_for_entity(self._entity) add_cans(sut, ['docker'])