Add support for Python 3
[yardstick.git] / yardstick / benchmark / contexts / dummy.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 from __future__ import absolute_import
11 import logging
12
13 from yardstick.benchmark.contexts.base import Context
14
15
16 LOG = logging.getLogger(__name__)
17
18
19 class DummyContext(Context):
20     '''Class that handle dummy info'''
21
22     __context_type__ = "Dummy"
23
24     def __init__(self):
25         super(self.__class__, self).__init__()
26
27     def init(self, attrs):
28         pass
29
30     def deploy(self):
31         '''don't need to deploy'''
32         pass
33
34     def undeploy(self):
35         '''don't need to undeploy'''
36         pass
37
38     def _get_server(self, attr_name):
39         return None