X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=emuvim%2Fapi%2Fzerorpcapi_DCNetwork.py;h=27527aa759a5c264343e3aa710520505038ee425;hb=a38de012a7a59661484805036eb9cce3c5cddf16;hp=83b158a57cdae2d3a762b824bc5a375c35693a98;hpb=8fbf9781aa638201aa54b3e5e7c2c7384b7ca8f7;p=osm%2Fvim-emu.git diff --git a/emuvim/api/zerorpcapi_DCNetwork.py b/emuvim/api/zerorpcapi_DCNetwork.py old mode 100644 new mode 100755 index 83b158a..27527aa --- a/emuvim/api/zerorpcapi_DCNetwork.py +++ b/emuvim/api/zerorpcapi_DCNetwork.py @@ -6,8 +6,7 @@ Distributed Cloud Emulator (dcemulator) import logging import threading import zerorpc -import site -from subprocess import Popen + logging.basicConfig(level=logging.INFO) @@ -30,13 +29,6 @@ class ZeroRpcApiEndpointDCNetwork(object): logging.debug("Created monitoring API endpoint %s(%s:%d)" % ( self.__class__.__name__, self.ip, self.port)) - # start Ryu controller with rest-API - python_install_path = site.getsitepackages()[0] - ryu_path = python_install_path + '/ryu/app/ofctl_rest.py' - ryu_cmd = 'ryu-manager' - self.ryu_process = Popen([ryu_cmd,ryu_path]) - - def connectDCNetwork(self, net): self.net = net logging.info("Connected DCNetwork to API endpoint %s(%s:%d)" % ( @@ -55,17 +47,17 @@ class ZeroRpcApiEndpointDCNetwork(object): s.run() def stop(self): - # stop ryu controller logging.info("Stop the monitoring API endpoint") - self.ryu_process.terminate() - #self.ryu_process.kill() return class DCNetworkApi(object): """ + The networking and monitoring commands need the scope of the + whole DC network to find the requested vnf. So this API is intended + to work with a DCNetwork. Just pass through the corresponding request to the - selected data center. Do not implement provisioning + selected data center network. Do not implement provisioning logic here because will will have multiple API endpoint implementations at the end. """