|
|
@ -425,9 +425,9 @@ class ACIModule(object):
|
|
|
|
''' Build an APIC filter based on obj_class and key-value pairs '''
|
|
|
|
''' Build an APIC filter based on obj_class and key-value pairs '''
|
|
|
|
accepted_params = dict((k, v) for (k, v) in params.items() if v is not None)
|
|
|
|
accepted_params = dict((k, v) for (k, v) in params.items() if v is not None)
|
|
|
|
if len(accepted_params) == 1:
|
|
|
|
if len(accepted_params) == 1:
|
|
|
|
return ','.join('eq({0}.{1}, "{2}")'.format(obj_class, k, v) for (k, v) in accepted_params.items())
|
|
|
|
return ','.join('eq({0}.{1},"{2}")'.format(obj_class, k, v) for (k, v) in accepted_params.items())
|
|
|
|
elif len(accepted_params) > 1:
|
|
|
|
elif len(accepted_params) > 1:
|
|
|
|
return 'and(' + ','.join(['eq({0}.{1}, "{2}")'.format(obj_class, k, v) for (k, v) in accepted_params.items()]) + ')'
|
|
|
|
return 'and(' + ','.join(['eq({0}.{1},"{2}")'.format(obj_class, k, v) for (k, v) in accepted_params.items()]) + ')'
|
|
|
|
|
|
|
|
|
|
|
|
def construct_url(self, root_class, subclass_1=None, subclass_2=None, subclass_3=None, child_classes=None):
|
|
|
|
def construct_url(self, root_class, subclass_1=None, subclass_2=None, subclass_3=None, child_classes=None):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|