Patchwork [1/7] wic: Add '--sourceparams' partition option

login
register
mail settings
Submitter tom.zanussi@linux.intel.com
Date Aug. 12, 2014, 1:35 a.m.
Message ID <e3fcfa6ac6fbbcf83a82a3e7a730f87626aea615.1407806939.git.tom.zanussi@linux.intel.com>
Download mbox | patch
Permalink /patch/77931/
State Accepted
Commit 3c90ee9bc242a623cc0a09de59e7d20ac5bd061a
Headers show

Comments

tom.zanussi@linux.intel.com - Aug. 12, 2014, 1:35 a.m.
To go along with '--source' as a way to parameterize source plugins.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/lib/wic/kickstart/custom_commands/partition.py | 6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 24f523a..3920adb 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -47,6 +47,7 @@  class Wic_PartData(Mic_PartData):
         Mic_PartData.__init__(self, *args, **kwargs)
         self.deleteRemovedAttrs()
         self.source = kwargs.get("source", None)
+        self.sourceparams = kwargs.get("sourceparams", None)
         self.rootfs = kwargs.get("rootfs-dir", None)
         self.source_file = ""
         self.size = 0
@@ -56,6 +57,8 @@  class Wic_PartData(Mic_PartData):
 
         if self.source:
             retval += " --source=%s" % self.source
+            if self.sourceparams:
+                retval += " --sourceparams=%s" % self.sourceparams
             if self.rootfs:
                 retval += " --rootfs-dir=%s" % self.rootfs
 
@@ -490,6 +493,9 @@  class Wic_Partition(Mic_Partition):
         # and calculate partition size
         op.add_option("--source", type="string", action="store",
                       dest="source", default=None)
+        # comma-separated list of param=value pairs
+        op.add_option("--sourceparams", type="string", action="store",
+                      dest="sourceparams", default=None)
         # use specified rootfs path to fill the partition
         op.add_option("--rootfs-dir", type="string", action="store",
                       dest="rootfs", default=None)