File ova.patch of Package open-ovf
Index: open-ovf-0.1/py/scripts/ova
===================================================================
--- open-ovf-0.1.orig/py/scripts/ova
+++ open-ovf-0.1/py/scripts/ova
@@ -36,7 +36,7 @@ from ovf.OvfFile import OvfFile
from ovf import OvfPlatform
from ovf import OvfProperty
from ovf.OvfReferencedFile import OvfReferencedFile
-from ovf.OvfSet import OvfSet
+from ovf.OvfSet import *
from ovf.OvfManifest import writeManifestFromReferencedFilesList
from ovf import OvfTransport
from ovf.env import PlatformSection
@@ -105,7 +105,7 @@ def packOva(options, args):
# Base the output file name on the ovf file name
outFile = os.path.splitext(options.ovfFile)[0] + '.ova'
- ovfSet = OvfSet(options.ovfFile)
+ ovfSet = OvfSet(outFile, "w", FORMAT_TAR)
if options.noManifest == False:
manifestFile = options.manifestFile
@@ -141,7 +141,7 @@ def unpackOva(options, args):
@param args : target directory path to extract the appliance archive file
"""
if options.ovfFile != None and os.path.isfile(options.ovfFile):
- ovaSet = OvfSet(options.ovfFile, "r")
+ ovaSet = OvfSet(options.ovfFile, "r", FORMAT_TAR)
if not os.path.isdir(options.targetDir):
os.mkdir(options.targetDir)
ovaSet.writeAsDir(options.targetDir)
@@ -610,7 +610,7 @@ COMMANDS = {
"manifest" :
{
'function' : makeManifest,
- 'help' : "Create a manifest file with SHA-1 sum for each " +
+ 'help' : "Create a manifest file with SHA-1 sum for each "
"referenced file",
'args' : (
{
@@ -640,7 +640,7 @@ COMMANDS = {
"pack" :
{
'function' : packOva,
- 'help' : "Packs a set of files comprising a virtual appliance into " +
+ 'help' : "Packs a set of files comprising a virtual appliance into "
"a single file in the tar format",
'args' : (
{
@@ -690,7 +690,7 @@ COMMANDS = {
"runtime" :
{
"function" : run,
- "help" : "Deploy the virtual systems of an OVF file as " +
+ "help" : "Deploy the virtual systems of an OVF file as "
"libvirt domains",
"args" : (
{
@@ -732,8 +732,8 @@ COMMANDS = {
'flags' : ['-z', '--no-value'],
'parms' : {'dest' : 'noValue', 'action' : "store_true",
'default' : False,
- 'help' : "With no-prompt, values without defaults " +\
- "are listed but left unset"}
+ 'help' : "With no-prompt, values without defaults "
+ "are listed but left unset"}
},
{
'flags' : ['-i', '--id'],
@@ -770,14 +770,14 @@ COMMANDS = {
{
'flags' : ['-t', '--format'],
'parms' : {'dest' : 'format', 'default' : 'iso',
- 'help' : "Transport format. Valid values: 'iso'." +\
+ 'help' : "Transport format. Valid values: 'iso'. "
"Default is 'iso'."}
},
{
'flags' : ['-o', '--outfile'],
'parms': {'dest' : 'outFile', 'default' : None,
- 'help' : "Output file. All environment files will be" +\
- " put on a single iso with this name."}
+ 'help' : "Output file. All environment files will be "
+ "put on a single iso with this name."}
}
),