Build VPP startup configuration file
[yardstick.git] / yardstick / network_services / traffic_profile / prox_irq.py
1 # Copyright (c) 2016-2018 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 """ Fixed traffic profile definitions """
16
17 import logging
18 import time
19
20 from yardstick.network_services.traffic_profile.prox_profile import ProxProfile
21
22 LOG = logging.getLogger(__name__)
23
24
25 class ProxIrqProfile(ProxProfile):
26     """
27     This profile adds a single stream at the beginning of the traffic session
28     """
29
30     def __init__(self, tp_config):
31         super(ProxIrqProfile, self).__init__(tp_config)
32
33     def init(self, queue):
34         self.queue = queue
35         self.queue.cancel_join_thread()
36
37     def execute_traffic(self, traffic_generator):
38         LOG.debug("Prox_IRQ Execute Traffic....")
39         time.sleep(5)
40
41     def is_ended(self):
42         return False
43
44     def run_test(self):
45         """Run the test
46         """
47
48         LOG.info("Prox_IRQ ....")