+++ /dev/null
-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'],
-)
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...)
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)
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:])