summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-10-08 15:34:48 +0200
committerJan Pokorný <jpokorny@redhat.com>2014-10-08 16:43:55 +0200
commita6f68a917728a7b2e56fc684b0351b5fae74edea (patch)
tree480b4f2d180385888163d95474ef2a0d633c9ea8 /commands
parentffef72407627bebb85d81c3b30ffe911808ce5d6 (diff)
downloadclufter-a6f68a917728a7b2e56fc684b0351b5fae74edea.tar.gz
clufter-a6f68a917728a7b2e56fc684b0351b5fae74edea.tar.xz
clufter-a6f68a917728a7b2e56fc684b0351b5fae74edea.zip
commands/cluster_artefacts: new command/cluster.conf analysis
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'commands')
-rw-r--r--commands/cluster_artefacts.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/commands/cluster_artefacts.py b/commands/cluster_artefacts.py
new file mode 100644
index 0000000..8a30b68
--- /dev/null
+++ b/commands/cluster_artefacts.py
@@ -0,0 +1,27 @@
+# -*- coding: UTF-8 -*-
+# Copyright 2014 Red Hat, Inc.
+# Part of clufter project
+# Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt)
+"""cluster-artefacts command"""
+__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
+
+from ..command import Command
+from ..protocol import protocols
+
+
+@Command.deco('ccs-artefacts')
+def ccs_artefacts(cmd_ctxt,
+ input="/etc/cluster/cluster.conf",
+ output="cman-artefacts-{ccs-artefacts.in.hash}.conf"):
+ """Output artefacts referenced in the config. in CVS format
+
+ Options:
+ input input CMAN-based cluster configuration file
+ output output file with collected artefacts (files, etc.)
+ """
+
+ file_proto = protocols.plugins['file'].ensure_proto
+ return (
+ file_proto(input),
+ file_proto(output),
+ )