cleanup monitoring commands
authorstevenvanrossem <steven.vanrossem@intec.ugent.be>
Fri, 20 May 2016 07:27:01 +0000 (09:27 +0200)
committerstevenvanrossem <steven.vanrossem@intec.ugent.be>
Fri, 20 May 2016 07:27:01 +0000 (09:27 +0200)
setup_cli_only.py [deleted file]
src/emuvim/api/zerorpc/compute.py
src/emuvim/cli/compute.py
src/emuvim/cli/son_emu_cli.py

diff --git a/setup_cli_only.py b/setup_cli_only.py
deleted file mode 100755 (executable)
index 6ab0777..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-from setuptools import setup, find_packages
-
-setup(name='emuvim',
-      version='0.0.1',
-      license='Apache 2.0',
-      description='emuvim is a VIM for the SONATA platform',
-      url='http://github.com/sonata-emu',
-      author_email='sonata-dev@sonata-nfv.eu',
-      package_dir={'': 'src'},
-      # packages=find_packages('emuvim', exclude=['*.test', '*.test.*', 'test.*', 'test']),
-      packages=find_packages('src'),
-      install_requires=[
-          'urllib3',
-          'zerorpc',
-          'tabulate',
-          'argparse',
-          'requests'
-      ],
-      zip_safe=False,
-      entry_points={
-          'console_scripts': [
-              'son-emu-cli=emuvim.cli.son_emu_cli:main',
-          ],
-      },
-      setup_requires=['pytest-runner'],
-      tests_require=['pytest'],
-)
index 63786fa..a08c118 100755 (executable)
@@ -119,12 +119,13 @@ class MultiDatacenterApi(object):
             return ex.message
 
     @zerorpc.stream
-    def compute_profile(self, dc_label, compute_name, image, kwargs):
+    def compute_profile(self, dc_label, compute_name, kwargs):
         # note: zerorpc does not support keyword arguments
 
         ## VIM/dummy gatekeeper's tasks:
         # start vnf
-        vnf_status = self.compute_action_start( dc_label, compute_name, image,
+        vnf_status = self.compute_action_start( dc_label, compute_name,
+                                  kwargs.get('image'),
                                   kwargs.get('network'),
                                   kwargs.get('command'))
         # start traffic source (with fixed ip addres, no use for now...)
index c096475..4869a17 100755 (executable)
@@ -86,15 +86,14 @@ class ZeroRpcClient(object):
         params = self._create_dict(
             network=nw_list,
             command=args.get("docker_command"),
+            image=args.get("image"),
             input=args.get("input"),
             output=args.get("output"))
 
         for output in self.c.compute_profile(
             args.get("datacenter"),
             args.get("name"),
-            args.get("image"),
-            params
-            ):
+            params):
             print(output + '\n')
 
         #pp.pprint(r)
index 195fe06..842d0a1 100755 (executable)
@@ -20,7 +20,7 @@ from emuvim.cli import monitor
 
 def main():
     if len(sys.argv) < 2:
-        print "Usage: son-emu-cli <toolname> <arguments>"
+        print("Usage: son-emu-cli <toolname> <arguments>")
         exit(0)
     if sys.argv[1] == "compute":
         compute.main(sys.argv[2:])