import inspect
import re
-import multivimbroker.pub.exceptions as exceptions
+import multivimbroker.pub.exceptions as exceptions
from multivimbroker.pub.msapi.extsys import get_vim_by_id
+
+
def fun_name():
return inspect.stack()[1][3]
+# Which headers are hop-by-hop headers by default
+HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate',
+ 'proxy-authorization', 'te', 'trailers',
+ 'transfer-encoding', 'upgrade']
-# Which headers are hop-by-hop headers by default
-HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
def getHeadersKeys(response):
hopbyhop = HOP_BY_HOP
- hopbyhop.extend([x.strip() for x in response.get('connection', '').split(',')])
+ hopbyhop.extend([x.strip()
+ for x in response.get('connection', '').split(',')])
return [header for header in response.keys() if header not in hopbyhop]
-
def findMultivimDriver(vim=None):
if vim and vim["type"] == "openstack":
elif vim and vim["type"] == "vmware":
multivimdriver = "multivim-vio"
else:
- raise exceptions.NotFound("Not support VIM type")
- return multivimdriver
-
+ raise exceptions.NotFound("Not support VIM type")
+ return multivimdriver
-def getMultivimDriver(vimid,full_path=""):
+def getMultivimDriver(vimid, full_path=""):
multivim = "multivim"
vim = get_vim_by_id(vimid)