From: stevenvanrossem Date: Fri, 20 May 2016 07:27:01 +0000 (+0200) Subject: cleanup monitoring commands X-Git-Tag: v3.1~119^2~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=bb084ef93676350f459428b35c9a7478d5cbfae4;p=osm%2Fvim-emu.git cleanup monitoring commands --- diff --git a/setup_cli_only.py b/setup_cli_only.py deleted file mode 100755 index 6ab0777..0000000 --- a/setup_cli_only.py +++ /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'], -) diff --git a/src/emuvim/api/zerorpc/compute.py b/src/emuvim/api/zerorpc/compute.py index 63786fa..a08c118 100755 --- a/src/emuvim/api/zerorpc/compute.py +++ b/src/emuvim/api/zerorpc/compute.py @@ -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...) diff --git a/src/emuvim/cli/compute.py b/src/emuvim/cli/compute.py index c096475..4869a17 100755 --- a/src/emuvim/cli/compute.py +++ b/src/emuvim/cli/compute.py @@ -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) diff --git a/src/emuvim/cli/son_emu_cli.py b/src/emuvim/cli/son_emu_cli.py index 195fe06..842d0a1 100755 --- a/src/emuvim/cli/son_emu_cli.py +++ b/src/emuvim/cli/son_emu_cli.py @@ -20,7 +20,7 @@ from emuvim.cli import monitor def main(): if len(sys.argv) < 2: - print "Usage: son-emu-cli " + print("Usage: son-emu-cli ") exit(0) if sys.argv[1] == "compute": compute.main(sys.argv[2:])