aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts/dummy.py
blob: 36e8854e8815a97ff0b28cef9e41db78d3446dce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
##############################################################################
# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

from yardstick.benchmark.contexts.base import Context


class DummyContext(Context):
    """Class that handle dummy info.

    This class is also used to test the abstract class Context because it
    provides a minimal concrete implementation of a subclass.
    """

    __context_type__ = "Dummy"

    def deploy(self):
        """Don't need to deploy"""
        pass

    def undeploy(self):
        """Don't need to undeploy"""
        pass

    def _get_server(self, attr_name):
        return None

    def _get_network(self, attr_name):
        return None

    def _get_physical_nodes(self):
        return None

    def _get_physical_node_for_server(self, server_name):
        return None