예제 #1
0
 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))
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
 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,
             })
예제 #5
0
 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'])