1244dbd599c951aa5076e969e26f02d4d2dfc6e9
[nepi.git] / test / lib / mock / execute.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 from constants import TESTBED_ID
5 from nepi.core import testbed_impl
6
7 class TestbedInstance(testbed_impl.TestbedInstance):
8     def __init__(self, testbed_version):
9         super(TestbedInstance, self).__init__(TESTBED_ID, testbed_version)
10
11     def do_setup(self):
12         pass
13
14     def do_configure(self):
15         pass
16
17     def set(self, time, guid, name, value):
18         super(TestbedInstance, self).set(time, guid, name, value)
19
20     def get(self, time, guid, name):
21         return True 
22
23     def action(self, time, guid, action):
24         raise NotImplementedError
25
26     def trace(self, guid, trace_id):
27         return """PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
28
29 --- 10.0.0.2 ping statistics ---
30 1 packets transmitted, 1 received, 0% packet loss, time 0ms
31 """
32
33     def shutdown(self):
34             pass
35