# Copyright (C) 2014 INRIA
#
# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation;
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@clsinit_copy
class LinuxNetNSEmulation(LinuxApplication, NetNSEmulation):
- _rtype = "LinuxNetNSEmulation"
+ _rtype = "linux::netns::Emulation"
@classmethod
def _register_attributes(cls):
self.set_ready()
+ def do_start(self):
+ """ Starts execution execution
+
+ """
+ self.info("Starting")
+
+ if self.state == ResourceState.READY:
+ self.set_started()
+ else:
+ msg = " Failed to execute command '%s'" % command
+ self.error(msg, out, err)
+ raise RuntimeError(msg)
+
+ def do_stop(self):
+ """ Stops simulation execution
+
+ """
+ if self.state == ResourceState.STARTED:
+ self.set_stopped()
+
def do_release(self):
self.info("Releasing resource")
@property
def _dependencies(self):
if self.node.use_rpm:
- return ( " python python-devel mercurial unzip bridge-utils iproute")
+ return (" python python-devel mercurial unzip bridge-utils iproute")
elif self.node.use_deb:
- return ( " python python-dev mercurial unzip bridge-utils iproute")
+ return (" python python-dev mercurial unzip bridge-utils iproute")
return ""
@property