return the floating ip of IDS VM for the created tap point

parent 2853e8c0
......@@ -27,9 +27,12 @@ def get_nova_credentials_v2():
d['project_id'] = cfg.OS_TENANT_NAME
return d
def sendOK(start_response):
def sendOK(start_response, msg=None):
start_response("200 OK", [('Content-type', 'text/plain')])
return ['OK']
if msg is None:
return ['OK']
else
return [msg]
def sendError(start_response):
start_response("404 Not Found", [('Content-type',
......@@ -155,6 +158,9 @@ def actionIDS(start_response, cmd, name, vlan, tunid, switchid=None, ryuip=None,
r = requests.get(computeurl)
print r.status_code
if cmd ="add":
floating_ip = ids.addresses['test-net-1'][1]['addr']
return sendOK(start_response, floating_ip);
return sendOK(start_response);
def start_controller_server(port):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment