small update network cli
authorstevenvanrossem <steven.vanrossem@intec.ugent.be>
Wed, 17 Feb 2016 11:03:26 +0000 (12:03 +0100)
committerstevenvanrossem <steven.vanrossem@intec.ugent.be>
Wed, 17 Feb 2016 11:03:26 +0000 (12:03 +0100)
emuvim/cli/network.py
emuvim/dcemulator/net.py

index fd7851a..8d4219b 100755 (executable)
@@ -57,8 +57,6 @@ parser.add_argument(
     help="vnf name of the destination of the chain")\r
 \r
 def main(argv):\r
-    print "This is the son-emu network CLI."\r
-    print "Arguments: %s" % str(argv)\r
     args = vars(parser.parse_args(argv))\r
     c = ZeroRpcClient()\r
     c.execute_command(args)\r
index e0d524e..f3c7a68 100755 (executable)
@@ -148,10 +148,10 @@ class DCNetwork(Dockernet):
             next_node = self.getNodeByName(next_hop)
 
             if next_hop == vnf_dst_name:
-                return 0
+                return "path added between {0} and {1}".format(vnf_src_name, vnf_dst_name)
             elif not isinstance( next_node, OVSSwitch ):
-                logging.info("Next node: {0} is not a switch".format(next_hop1))
-                return 0
+                logging.info("Next node: {0} is not a switch".format(next_hop))
+                return "Next node: {0} is not a switch".format(next_hop)
 
 
             switch_inport = self.DCNetwork_graph[current_hop][next_hop]['dst_port']
@@ -177,4 +177,4 @@ class DCNetwork(Dockernet):
 
             current_hop = next_hop
 
-        return 1
\ No newline at end of file
+        return "destination node: {0} not reached".format(vnf_dst_name)
\ No newline at end of file