-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFreneticEnvironment.py
More file actions
42 lines (31 loc) · 1.48 KB
/
Copy pathFreneticEnvironment.py
File metadata and controls
42 lines (31 loc) · 1.48 KB
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
41
42
import sys
from Environment import Environment
from FreneticApplicationRunner import FreneticApplicationRunner
from FreneticController import FreneticController
class FreneticEnvironment(Environment):
def __init__(self, configFilePath):
self.controllerName = "frenetic"
self.mainConfigFile = configFilePath
self.readConfigFile()
def stopApplication(self):
print "stopping application"
self.apprunner.stopApp()
def startController(self):
print "running controller"
self.freneticcontroller = FreneticController()
self.freneticcontroller.runController(self.dictionary)
def startApplication(self,applicationName):
print "running application"
self.apprunner = FreneticApplicationRunner(self.dictionary, Environment.testBedHomePath)
self.apprunner.runApp(applicationName, self.dictionary, Environment.testBedHomePath)
def stopController(self):
print "stopping controller"
self.freneticcontroller.stopController()
def setTestBedHome(self, testBedHomePath='/home/vagrant/python/Master---Thesis/'):
Environment.testBedHomePath = testBedHomePath
def additionalConfigFile(self, configFilePath=None, configFileName = None):
if configFilePath==None or configFileName == None:
raise Exception('Please provide file path and name')
else:
print "reading additional config file"
Environment.configFiles[configFileName] = configFilePath