Change-Id: I3f504273444b31e06094feceea9ef413a53c6db9
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
class vimconnector(vimconn.vimconnector):
def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None,
log_level="DEBUG", config={}, persistent_info={}):
class vimconnector(vimconn.vimconnector):
def __init__(self, uuid, name, tenant_id, tenant_name, url, url_admin=None, user=None, passwd=None,
log_level="DEBUG", config={}, persistent_info={}):
a= self._remove_extra_items(d, schema['items'])
if a is not None: deleted.append(a)
elif type(data) is dict:
a= self._remove_extra_items(d, schema['items'])
if a is not None: deleted.append(a)
elif type(data) is dict:
for k in data.keys():
if 'properties' not in schema or k not in schema['properties'].keys():
for k in data.keys():
if 'properties' not in schema or k not in schema['properties'].keys():
deleted.append(k)
else:
a = self._remove_extra_items(data[k], schema['properties'][k])
if a is not None: deleted.append({k:a})
deleted.append(k)
else:
a = self._remove_extra_items(data[k], schema['properties'][k])
if a is not None: deleted.append({k:a})
+ for k in to_delete:
+ del data[k]
if len(deleted) == 0: return None
elif len(deleted) == 1: return deleted[0]
else: return deleted
if len(deleted) == 0: return None
elif len(deleted) == 1: return deleted[0]
else: return deleted