Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/components/simplescan.py: 92%

13 statements  

« prev     ^ index     » next       coverage.py v7.6.4, created at 2024-11-14 02:13 +0000

1#!/usr/bin/env python 

2# -*- coding: utf-8 -*- 

3from daiquiri.core import require_control 

4from daiquiri.core.components import Component, ComponentResource, actor 

5 

6import logging 

7 

8logger = logging.getLogger(__name__) 

9 

10 

11class ScanResource(ComponentResource): 

12 @require_control 

13 @actor("scan", enqueue=True) 

14 def post(self, *args, **kwargs): 

15 return kwargs 

16 

17 

18class Simplescan(Component): 

19 _actors = ["scan"] 

20 

21 def setup(self): 

22 self.register_actor_route(ScanResource, "")