def constraint_query(self, **kwargs): if "ruletype" not in kwargs: kwargs["ruletype"] = ["mlsconstrain"] results = se.ConstraintQuery(self, **kwargs).results() return sorted(results)
if args.classquery or args.all: q = setools.ObjClassQuery(p) if isinstance(args.classquery, str): q.name = args.classquery components.append(("Classes", q, lambda x: x.statement())) if args.commonquery or args.all: q = setools.CommonQuery(p) if isinstance(args.commonquery, str): q.name = args.commonquery components.append(("Commons", q, lambda x: x.statement())) if args.constraintquery or args.all: q = setools.ConstraintQuery(p, ruletype=["constrain", "mlsconstrain"]) if isinstance(args.constraintquery, str): q.tclass = [args.constraintquery] components.append(("Constraints", q, lambda x: x.statement())) if args.fsusequery or args.all: q = setools.FSUseQuery(p) if isinstance(args.fsusequery, str): q.fs = args.fsusequery components.append(("Fs_use", q, lambda x: x.statement())) if args.genfsconquery or args.all: q = setools.GenfsconQuery(p) if isinstance(args.genfsconquery, str):