Ejemplo n.º 1
0
def find_location(module, title, failsafe=False):
    loc = Location(name=title.split('/')[-1]).search(
        set(), {'search': 'title="{}"'.format(title)})
    return handle_find_response(module,
                                loc,
                                message="No location found for %s" % title,
                                failsafe=failsafe)
def find_location(module, name, failsafe=False):
    loc = Location(name=name).search(set(),
                                     {'search': 'name="{}"'.format(name)})
    return handle_find_response(module,
                                loc,
                                message="No location found for %s" % name,
                                failsafe=failsafe)