X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Flinux%2Fns3%2Fccn%2Fns3ccncatdceapplication.py;fp=src%2Fnepi%2Fresources%2Flinux%2Fns3%2Fccn%2Fns3ccncatdceapplication.py;h=0000000000000000000000000000000000000000;hb=941fd7f54114b824fa26563d389a7ae07426fe14;hp=99698489576dfc7ec4606b466413382defc7043f;hpb=7bdd35bc0d846e6ae89bdc8aaa2e919bbac25096;p=nepi.git diff --git a/src/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.py b/src/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.py deleted file mode 100644 index 99698489..00000000 --- a/src/nepi/resources/linux/ns3/ccn/ns3ccncatdceapplication.py +++ /dev/null @@ -1,63 +0,0 @@ -# -# NEPI, a framework to manage network experiments -# 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 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 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Author: Alina Quereilhac - -from nepi.execution.attribute import Attribute, Flags, Types -from nepi.execution.resource import clsinit_copy, ResourceState -from nepi.resources.linux.ns3.ccn.ns3ccndceapplication import LinuxNS3CCNDceApplication - -@clsinit_copy -class LinuxNS3DceCCNCat(LinuxNS3CCNDceApplication): - _rtype = "linux::ns3::dce::CCNCat" - - @classmethod - def _register_attributes(cls): - content_name = Attribute("contentName", - "Content name for the requested content object. ", - flags = Flags.Design) - - cls._register_attribute(content_name) - - def _instantiate_object(self): - if not self.get("binary"): - self.set("binary", "ccncat") - - if self.get("contentName"): - self.set("arguments", self.get("contentName")) - - self.set("stdinFile", "") - - super(LinuxNS3DceCCNCat, self)._instantiate_object() - - @property - def _arguments(self): - args = ["-v", "add"] - - if self.get("uri"): - args.append(self.get("uri")) - if self.get("protocol"): - args.append(self.get("protocol")) - if self.get("host"): - args.append(self.get("host")) - if self.get("port"): - args.append(self.get("port")) - if self.get("ip"): - args.append(self.get("ip")) - - return ";".join(args) - -