Ejemplo n.º 1
0
def topology_parents(id_):
    topl = topology.get(id_)
    UserError.check(topl is not None,
                    UserError.ENTITY_DOES_NOT_EXIST,
                    message="entity doesn't exist.",
                    data={
                        "class_name": hierarchy.ClassName.TOPOLOGY,
                        "id_": id_
                    })
    return [(hierarchy.ClassName.USER, perm.user) for perm in topl.permissions]
Ejemplo n.º 2
0
def modifyTaskRun(top_id, mods):
	for mod in mods:
		top = topology.get(top_id)
		mod.run(top)
Ejemplo n.º 3
0
def topology_exists(id_):
	try:
		return (topology.get(id_) is not None)
	except:
		return False
Ejemplo n.º 4
0
def topology_exists(id_):
    try:
        return (topology.get(id_) is not None)
    except:
        return False
Ejemplo n.º 5
0
def topology_parents(id_):
	topl = topology.get(id_)
	UserError.check(topl is not None, UserError.ENTITY_DOES_NOT_EXIST, message="entity doesn't exist.",
	                data={"class_name": hierarchy.ClassName.TOPOLOGY, "id_": id_})
	return [(hierarchy.ClassName.USER, perm.user) for perm in topl.permissions]