Upload the contribution of vstf as bottleneck network framework.
[bottlenecks.git] / vstf / vstf / agent / perf / affctl.py
diff --git a/vstf/vstf/agent/perf/affctl.py b/vstf/vstf/agent/perf/affctl.py
new file mode 100755 (executable)
index 0000000..e9b9692
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+# -*- coding: utf8 -*-
+# author: wly
+# date: 2015/11/26
+# see license for license details
+
+from vstf.common.utils import check_call, call, check_output
+
+
+def affctl_load(policy):
+    cmd = "affctl load %s" % policy
+    return check_call(cmd, shell=True)
+
+
+def affctl_list():
+    cmd = "affctl list"
+    return check_output(cmd, shell=True)
+