Removing vmware ovf converter tool from RO. Moved to Devops in ChangeID# 6238 40/6240/1
authorkasar <pkasar@vmware.com>
Wed, 30 May 2018 14:47:08 +0000 (07:47 -0700)
committerkasar <pkasar@vmware.com>
Wed, 30 May 2018 14:47:26 +0000 (07:47 -0700)
Change-Id: I5f40f9209b3d636390af7b95d03fdd4f55f63077
Signed-off-by: kasar <pkasar@vmware.com>
osm_ro/vmware_utils/OVF_converter/config/disk_controller.yaml [deleted file]
osm_ro/vmware_utils/OVF_converter/config/os_type.yaml [deleted file]
osm_ro/vmware_utils/OVF_converter/format_converter/__init__.py [deleted file]
osm_ro/vmware_utils/OVF_converter/format_converter/command_progress.py [deleted file]
osm_ro/vmware_utils/OVF_converter/format_converter/converter.py [deleted file]
osm_ro/vmware_utils/OVF_converter/format_converter/ovf_converter_cli.py [deleted file]
osm_ro/vmware_utils/OVF_converter/install.sh [deleted file]
osm_ro/vmware_utils/OVF_converter/ovf_template/template.xml [deleted file]
osm_ro/vmware_utils/OVF_converter/readme.txt [deleted file]

diff --git a/osm_ro/vmware_utils/OVF_converter/config/disk_controller.yaml b/osm_ro/vmware_utils/OVF_converter/config/disk_controller.yaml
deleted file mode 100644 (file)
index b090232..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-##\r
-# Copyright 2016-2017 VMware Inc.\r
-# This file is part of ETSI OSM\r
-# All Rights Reserved.\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License"); you may\r
-# not use this file except in compliance with the License. You may obtain\r
-# a copy of the License at\r
-#\r
-#         http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r
-# License for the specific language governing permissions and limitations\r
-# under the License.\r
-#\r
-# For those usages not covered by the Apache License, Version 2.0 please\r
-# contact:  osslegalrouting@vmware.com\r
-##\r
\r
----\r
-SATA Controller:\r
-  ResourceType: 20\r
-  ResourceSubTypes: ["vmware.sata.ahci"]\r
-IDE Controller:\r
-  ResourceType: 5\r
-SCSI Controller:\r
-  ResourceType: 6\r
-  ResourceSubTypes: ["VirtualSCSI", "lsilogic", "buslogic", "lsilogicsas"]
\ No newline at end of file
diff --git a/osm_ro/vmware_utils/OVF_converter/config/os_type.yaml b/osm_ro/vmware_utils/OVF_converter/config/os_type.yaml
deleted file mode 100644 (file)
index 385cd7b..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-##\r
-# Copyright 2016-2017 VMware Inc.\r
-# This file is part of ETSI OSM\r
-# All Rights Reserved.\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License"); you may\r
-# not use this file except in compliance with the License. You may obtain\r
-# a copy of the License at\r
-#\r
-#         http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT\r
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r
-# License for the specific language governing permissions and limitations\r
-# under the License.\r
-#\r
-# For those usages not covered by the Apache License, Version 2.0 please\r
-# contact:  osslegalrouting@vmware.com\r
-##\r
-\r
----\r
-'0': Unknown\r
-'1': Other (32-bit)\r
-'2': MACOS\r
-'3': ATTUNIX\r
-'4': DGUX\r
-'5': DECNT\r
-'6': Tru64 UNIX\r
-'7': OpenVMS\r
-'8': HPUX\r
-'9': AIX\r
-'10': MVS\r
-'11': OS400\r
-'12': OS/2\r
-'13': JavaVM\r
-'14': MSDOS\r
-'15': WIN3x\r
-'16': WIN95\r
-'17': WIN98\r
-'18': WINNT\r
-'19': WINCE\r
-'20': NCR3000\r
-'21': NetWare\r
-'22': OSF\r
-'23': DC/OS\r
-'24': Reliant UNIX\r
-'25': SCO UnixWare\r
-'26': SCO OpenServer\r
-'27': Sequent\r
-'28': IRIX\r
-'29': Solaris\r
-'30': SunOS\r
-'31': U6000\r
-'32': ASERIES\r
-'33': HP NonStop OS\r
-'34': HP NonStop OSS\r
-'35': BS2000\r
-'36': LINUX\r
-'37': Lynx\r
-'38': XENIX\r
-'39': VM\r
-'40': Interactive UNIX\r
-'41': BSDUNIX\r
-'42': FreeBSD\r
-'43': NetBSD\r
-'44': GNU Hurd\r
-'45': OS9\r
-'46': MACH Kernel\r
-'47': Inferno\r
-'48': QNX\r
-'49': EPOC\r
-'50': IxWorks\r
-'51': VxWorks\r
-'52': MiNT\r
-'53': BeOS\r
-'54': HP MPE\r
-'55': NextStep\r
-'56': PalmPilot\r
-'57': Rhapsody\r
-'58': Windows 2000\r
-'59': Dedicated\r
-'60': OS/390\r
-'61': VSE\r
-'62': TPF\r
-'63': Windows (R) Me\r
-'64': Caldera Open UNIX\r
-'65': OpenBSD\r
-'66': Not Applicable\r
-'67': Windows XP\r
-'68': z/OS\r
-'69': Microsoft Windows Server 2003\r
-'70': Microsoft Windows Server 2003 64-Bit\r
-'71': Windows XP 64-Bit\r
-'72': Windows XP Embedded\r
-'73': Windows Vista\r
-'74': Windows Vista 64-Bit\r
-'75': Windows Embedded for Point of Service\r
-'76': Microsoft Windows Server 2008\r
-'77': Microsoft Windows Server 2008 64-Bit\r
-'78': FreeBSD 64-Bit\r
-'79': RedHat Enterprise Linux\r
-'80': RedHat Enterprise Linux 64-Bit\r
-'81': Solaris 64-Bit\r
-'82': SUSE\r
-'83': SUSE 64-Bit\r
-'84': SLES\r
-'85': SLES 64-Bit\r
-'86': Novell OES\r
-'87': Novell Linux Desktop\r
-'88': Sun Java Desktop System\r
-'89': Mandriva\r
-'90': Mandriva 64-Bit\r
-'91': TurboLinux\r
-'92': TurboLinux 64-Bit\r
-'93': Ubuntu\r
-'94': Ubuntu 64-Bit\r
-'95': Debian\r
-'96': Debian 64-Bit\r
-'97': Linux 2.4.x\r
-'98': Linux 2.4.x 64-Bit\r
-'99': Linux 2.6.x\r
-'100': Linux 2.6.x 64-Bit\r
-'101': Linux 64-Bit\r
-'102': Other 64-Bit\r
-'103': Microsoft Windows Server 2008 R2\r
-'104': VMware ESXi\r
-'105': Microsoft Windows 7\r
-'106': CentOS 32-bit\r
-'107': CentOS 64-bit\r
-'108': Oracle Linux 32-bit\r
-'109': Oracle Linux 64-bit\r
-'110': eComStation 32-bitx\r
-'111': Microsoft Windows Server 2011\r
-'113': Microsoft Windows Server 2012\r
-'114': Microsoft Windows 8\r
-'115': Microsoft Windows 8 64-bit\r
-'116': Microsoft Windows Server 2012 R2\r
diff --git a/osm_ro/vmware_utils/OVF_converter/format_converter/__init__.py b/osm_ro/vmware_utils/OVF_converter/format_converter/__init__.py
deleted file mode 100644 (file)
index db9e016..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-##
-# Copyright 2016-2017 VMware Inc.
-# This file is part of ETSI OSM
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# For those usages not covered by the Apache License, Version 2.0 please
-# contact:  osslegalrouting@vmware.com
-##
diff --git a/osm_ro/vmware_utils/OVF_converter/format_converter/command_progress.py b/osm_ro/vmware_utils/OVF_converter/format_converter/command_progress.py
deleted file mode 100644 (file)
index cbfb737..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-##
-# Copyright 2016-2017 VMware Inc.
-# This file is part of ETSI OSM
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# For those usages not covered by the Apache License, Version 2.0 please
-# contact:  osslegalrouting@vmware.com
-##
-
-import threading
-import sys
-
-class RepeatingTimer(threading._Timer):
-    """ Class to run thread parally """
-    def run(self):
-        """ Method to run thread """
-        while True:
-            self.finished.wait(self.interval)
-            if self.finished.is_set():
-                return
-            else:
-                self.function(*self.args, **self.kwargs)
-
-
-class CommandProgressbar(object):
-    """ Class to show progressbar while waiting fro command output """
-
-    def __init__(self):
-        self.timer = None
-
-    def __show_progressbar(self):
-        """
-            Private method to show progressbar while waiting for command to complete
-            Args  : None
-            Return : None
-        """
-        print '\b.',
-        sys.stdout.flush()
-
-    def start_progressbar(self):
-        """
-            Method to start progressbar thread
-            Args  : None
-            Return : None
-        """
-        self.timer = RepeatingTimer(1.0, self.__show_progressbar)
-        self.timer.daemon = True # Allows program to exit if only the thread is alive
-        self.timer.start()
-
-    def stop_progressbar(self):
-        """
-            Method to stop progressbar thread
-            Args  : None
-            Return : None
-        """
-        self.timer.cancel()
diff --git a/osm_ro/vmware_utils/OVF_converter/format_converter/converter.py b/osm_ro/vmware_utils/OVF_converter/format_converter/converter.py
deleted file mode 100644 (file)
index 3c647a9..0000000
+++ /dev/null
@@ -1,569 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-##
-# Copyright 2016-2017 VMware Inc.
-# This file is part of ETSI OSM
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# For those usages not covered by the Apache License, Version 2.0 please
-# contact:  osslegalrouting@vmware.com
-##
-
-import logging
-import os
-import subprocess
-import yaml
-from lxml import etree as ET
-from command_progress import CommandProgressbar
-
-#file paths
-MODULE_DIR = os.path.dirname(__file__)
-OVF_TEMPLATE_PATH = os.path.join(os.path.dirname(MODULE_DIR),
-                                "ovf_template/template.xml")
-OS_INFO_FILE_PATH = os.path.join(os.path.dirname(MODULE_DIR), 
-                                "config/os_type.yaml")
-DISK_CONTROLLER_INFO_FILE_PATH = os.path.join(os.path.dirname(MODULE_DIR),
-                                              "config/disk_controller.yaml")
-
-
-#Set logger
-LOG_FILE = os.path.join(os.path.dirname(MODULE_DIR),"logs/ovf_converter.log")
-logger = logging.getLogger(__name__)
-hdlr = logging.FileHandler(LOG_FILE)
-formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
-hdlr.setFormatter(formatter)
-logger.addHandler(hdlr)
-logger.setLevel(10)
-
-__version__ = "1.0"
-__description__ = "initial Release"
-
-def get_version(*args, **kwargs):
-    """ get version of this application"""
-    version = str(__version__ ) +" - "+ str( __description__ )
-    return version
-
-#converter class
-class OVFConverter(object):
-    """ Class to convert input image into OVF format """
-
-    def __init__(self, source_img_path, output_location=None, output_ovf_name=None,
-                    memory=None, cpu=None, disk=None, os_type=None,
-                    disk_controller=None,
-                    options={'subformat':'streamOptimized'}):
-        """
-            Constructor to initialize object of class OVFConverter
-            Args:
-            source_img_path - absolute path to source image which will get convert into ovf
-            output_location - location where created OVF will be kept. This location
-                              should have write access. If not given file will get
-                              created at source location  (optional)
-            output_ovf_name - name of output ovf.If not given source image name will 
-                              be used (optional)
-            memory -          required memory for VM in MB (optional)
-            cpu -             required number of virtual cpus for VM (optional)
-            disk -            required size of disk for VM in GB (optional)
-            os_type-          required operating system type as specified in user document
-                                (default os type other 32 bit) (optional)
-            disk_controller - required disk controller type
-                                (default controller SCSI with lsilogicsas)
-                                (SATA, IDE, Paravirtual, Buslogic, Lsilogic, Lsilogicsas) (optional)
-            options - subformat option for OVF  (optional)
-
-            Returns:
-                Nothing.
-        """
-        self.logger = logger
-        self.ovf_template_path = OVF_TEMPLATE_PATH
-
-        self.source_img_path = source_img_path
-        file_location, file_extension = os.path.splitext(self.source_img_path)
-        self.source_img_location = os.path.dirname(self.source_img_path)
-        self.source_format = file_extension[1:]
-        self.source_img_filename = os.path.basename(self.source_img_path).split('.')[0]
-
-        self.output_format = "ovf"
-        self.output_ovf_name = output_ovf_name.split('.')[0] if output_ovf_name else self.source_img_filename
-        self.output_location = output_location if output_location else self.source_img_location
-        self.output_ovf_name_ext = self.output_ovf_name + "." + self.output_format
-        self.output_path = os.path.join(self.output_location , self.output_ovf_name_ext )
-
-        self.output_diskimage_format = "vmdk"
-        self.output_diskimage_name = self.source_img_filename + "."+ self.output_diskimage_format
-        self.output_diskimage_path = os.path.join(self.output_location,  self.output_diskimage_name)
-
-
-        self.logger.info("Input parameters to Converter: \n ovf_template_path = {}, \n source_img_path = {}, \n"\
-                    "source_img_location ={} , \n source_format = {}, \n source_img_filename = {}".format(
-                                                        self.ovf_template_path,
-                                                        self.source_img_path, self.source_img_location,
-                                                        self.source_format, self.source_img_filename ))
-
-        self.logger.info("Output parameters to Converter: \n output_format = {}, \n output_ovf_name = {}, \n"\
-                    "output_location ={} , \n output_path = {}, \n output_diskimage_name = {} , \n"\
-                    " output_diskimage_path = {} ".format(self.output_format, self.output_ovf_name,
-                                                    self.output_location, self.output_path,
-                                                    self.output_diskimage_name,self.output_diskimage_path ))
-
-
-        self.disk_capacity = 1
-        self.disk_populated_size = 0
-
-        self.vm_name = self.output_ovf_name
-        self.memory = str(memory) if memory is not None else None
-        self.cpu = str(cpu) if cpu is not None else None
-        self.os_type=str(os_type).strip() if os_type else None
-
-        if self.os_type:
-            self.osID , self.osType = self.__get_osType()
-            if self.osID is None or self.osType is None:
-               error_msg = "ERROR: Invalid input can not find OS type {} ".format(self.os_type)
-               self.__raise_exception(error_msg)
-
-        self.disk_controller = str(disk_controller).strip() if disk_controller else None
-
-        if self.disk_controller:
-            self.disk_controller_info = self.__get_diskcontroller()
-
-            if not self.disk_controller_info:
-                error_msg = "ERROR: Invalid input can not find Disk Controller {} ".format(self.disk_controller)
-                self.__raise_exception(error_msg)
-
-        if disk is not None:
-            #convert disk size from GB to bytes
-            self.disk_size = int(disk) * 1024 * 1024 * 1024
-        else:
-            self.disk_size = None
-
-        self.logger.info("Other input parameters to Converter: \n vm_name = {}, \n memory = {}, \n"\
-                    "disk_size ={} \n os type = {} \n disk controller = {}".format(
-                                self.vm_name, self.memory, self.disk_size, self.os_type, self.disk_controller
-                                ))
-
-        #check access for read input location and write output location return none if no access
-        if not os.access(self.source_img_path, os.F_OK):
-            error_msg = "ERROR: Source image file {} not present".format(self.source_img_path)
-            self.__raise_exception(error_msg, exception_type="IO")
-
-        elif not os.access(self.source_img_path, os.R_OK):
-            error_msg = "ERROR: Cannot read source image file {}".format(self.source_img_path)
-            self.__raise_exception(error_msg, exception_type="IO")
-
-        if not os.access(self.output_location, os.W_OK):
-            error_msg = "ERROR: Not have write access to location {} to write output OVF ".format(self.source_img_path)
-            self.__raise_exception(error_msg, exception_type="IO")
-
-    def __get_image_info(self):
-        """ 
-            Private method to get information about source imager.
-            Args  : None
-            Return : True on success else False
-        """
-        try:
-            print("Getting source image information")
-            command = "qemu-img info \t " + self.source_img_path
-            output, error, returncode= self.__execute_command(command)
-
-            if error or returncode:
-                self.logger.error("ERROR: Error occurred while getting information about source image : {} \n "\
-                                  "return code : {} ".format(error, returncode))
-                return False
-
-            elif output:
-                self.logger.info("Get Image Info Output : {} \n ".format(output))
-                split_output = output.split("\n")
-                for line in split_output:
-                    line = line.strip()
-                    if "virtual size" in line:
-                        virtual_size_info = line.split(":")[1].split()
-                        if len(virtual_size_info) == 3 and virtual_size_info[2].strip(")") == "bytes":
-                            self.disk_capacity  = int(virtual_size_info[1].strip("("))
-                        else:
-                            self.disk_capacity  = self.__convert_size(virtual_size_info[0])
-
-                    elif "disk size" in line:
-                        size = line.split(":")[1].split()[0]
-                        self.disk_populated_size = self.__convert_size(size)
-                    elif "file format" in line:
-                        self.source_format = line.split(":")[1]
-
-                self.logger.info("Updated source image virtual disk capacity : {} ,"\
-                                 "Updated source image populated size: {}".format(self.disk_capacity,
-                                                                    self.disk_populated_size))
-                return True
-        except Exception as exp:
-            error_msg = "ERROR: Error occurred while getting information about source image : {}".format(exp)
-            self.logger.error(error_msg)
-            print(error_msg)
-            return False
-
-    def __convert_image(self):
-        """ 
-            Private method to convert source disk image into .vmdk disk image.
-            Args  : None
-            Return : True on success else False
-        """
-
-        print("Converting source disk image to .vmdk ")
-
-        progress = CommandProgressbar()
-        progress.start_progressbar()
-
-        command = "qemu-img convert -f "+ self.source_format +" -O " + self.output_diskimage_format + \
-                " -o subformat=streamOptimized " + self.source_img_path + "\t" + self.output_diskimage_path
-
-        output, error , returncode = self.__execute_command(command)
-
-        progress.stop_progressbar()
-
-        if error or returncode :
-            error_msg = "ERROR: Error occurred while converting source disk image into vmdk : {} \n "\
-                                  "return code : {} ".format(error, returncode)
-            self.logger.error(error_msg)
-            print(error_msg)
-            return False
-        else:
-            if os.path.isfile(self.output_diskimage_path):
-                self.logger.info("Successfully converted source image {} into {} \n "\
-                                  "return code : {} ".format(self.source_img_path,
-                                                        self.output_diskimage_path,
-                                                        returncode))
-                result = self.__make_image_bootable()
-                if result:
-                    self.logger.info("Made {} bootable".format(self.output_diskimage_path))
-                    return True
-                else:
-                    self.logger.error("Cannot make {} bootable".format(self.output_diskimage_path))
-                    print("ERROR: Fail to convert source image into .vmdk")
-                    return False
-            else:
-                self.logger.error("Converted vmdk disk file {} is not present \n ".format(
-                                                    self.output_diskimage_path))
-                print("Fail to convert source image into .vmdk")
-                return False
-
-    def __make_image_bootable(self):
-        """ 
-            Private method to make source disk image bootable.
-            Args  : None
-            Return : True on success else False
-        """
-        command = "printf '\x03' | dd conv=notrunc of="+ self.output_diskimage_path + "\t bs=1 seek=$((0x4))"
-        output, error, returncode = self.__execute_command(command)
-
-        if error and returncode :
-            error_msg = "ERROR:Error occurred while making source disk image bootable : {} \n "\
-                                  "return code : {} ".format(error, returncode)
-            self.logger.error(error_msg)
-            print(error_msg)
-            return False
-        else:
-            self.logger.info("Make Image Bootable Output : {} ".format(output))
-            return True
-
-
-    def __edit_ovf_template(self):
-        """ 
-            Private method to create new OVF file by editing OVF template
-            Args  : None
-            Return : True on success else False
-        """
-        try:
-            print("\nCreating OVF")
-            #Read OVF template file
-            OVF_tree = ET.parse(self.ovf_template_path)
-            root = OVF_tree.getroot()
-
-            #Collect namespaces
-            nsmap = {k:v for k,v in root.nsmap.iteritems() if k}
-            nsmap["xmlns"]= "http://schemas.dmtf.org/ovf/envelope/1"
-
-            #Edit OVF template
-            references = root.find('xmlns:References',nsmap)
-            if references is not None:
-                file_tag = references.find('xmlns:File', nsmap)
-                if file_tag is not None:
-                    file_tag.attrib['{'+nsmap['ovf']+'}href'] = self.output_diskimage_name
-
-            disksection = root.find('xmlns:DiskSection',nsmap)
-            if disksection is not None:
-                diak_tag = disksection.find('xmlns:Disk', nsmap)
-                if diak_tag is not None:
-                    if self.disk_size and self.disk_size > self.disk_capacity:
-                        self.disk_capacity = self.disk_size
-                    diak_tag.attrib['{'+nsmap['ovf']+'}capacity'] = str(self.disk_capacity)
-                    diak_tag.attrib['{'+nsmap['ovf']+'}populatedSize'] = str(self.disk_populated_size)
-
-            virtuasystem = root.find('xmlns:VirtualSystem',nsmap)
-            if virtuasystem is not None:
-                name_tag = virtuasystem.find('xmlns:Name', nsmap)
-                if name_tag is not None:
-                    name_tag.text = self.vm_name
-
-                if self.os_type is not None:
-                    operatingSystemSection = virtuasystem.find('xmlns:OperatingSystemSection', nsmap)
-                    if self.osID and self.osType:
-                        operatingSystemSection.attrib['{'+nsmap['ovf']+'}id'] = self.osID
-                        os_discription_tag = operatingSystemSection.find('xmlns:Description', nsmap)
-                        os_discription_tag.text = self.osType
-
-                virtualHardwareSection = virtuasystem.find('xmlns:VirtualHardwareSection', nsmap)
-                system = virtualHardwareSection.find('xmlns:System', nsmap)
-                virtualSystemIdentifier = system.find('vssd:VirtualSystemIdentifier', nsmap)
-                if virtualSystemIdentifier is not None:
-                    virtualSystemIdentifier.text = self.vm_name
-
-                if self.memory is not None or self.cpu is not None or self.disk_controller is not None:
-                    for item in virtualHardwareSection.iterfind('xmlns:Item',nsmap):
-                        description = item.find("rasd:Description",nsmap)
-
-                        if self.cpu is not None:
-                            if description is not None and description.text == "Number of Virtual CPUs":
-                                cpu_item = item.find("rasd:VirtualQuantity", nsmap)
-                                name_item = item.find("rasd:ElementName", nsmap)
-                                if cpu_item is not None:
-                                    cpu_item.text = self.cpu
-                                    name_item.text = self.cpu+" virtual CPU(s)"
-
-                        if self.memory is not None:
-                            if description is not None and description.text == "Memory Size":
-                                mem_item = item.find("rasd:VirtualQuantity", nsmap)
-                                name_item = item.find("rasd:ElementName", nsmap)
-                                if mem_item is not None:
-                                    mem_item.text = self.memory
-                                    name_item.text = self.memory + " MB of memory"
-
-                        if self.disk_controller is not None:
-                            if description is not None and description.text == "SCSI Controller":
-                                if self.disk_controller_info is not None:
-                                    name_item = item.find("rasd:ElementName", nsmap)
-                                    name_item.text = str(self.disk_controller_info["controllerName"])+"0"
-
-                                    resource_type = item.find("rasd:ResourceType", nsmap)
-                                    resource_type.text = self.disk_controller_info["resourceType"]
-
-                                    description.text = self.disk_controller_info["controllerName"]
-                                    resource_subtype = item.find("rasd:ResourceSubType", nsmap)
-                                    if self.disk_controller_info["controllerName"] == "IDE Controller":
-                                        #Remove resource subtype item
-                                        resource_subtype.getparent().remove(resource_subtype)
-                                    if "resourceSubType" in  self.disk_controller_info:
-                                        resource_subtype.text = self.disk_controller_info["resourceSubType"]
-
-                #Save output OVF
-            OVF_tree.write(self.output_path, xml_declaration=True,encoding='utf-8',
-               method="xml" )
-
-            if os.path.isfile(self.output_path):
-                logger.info("Successfully written output OVF at {}".format(self.output_path))
-                print("Output OVF is at :  {}".format(self.output_path))
-                return self.output_path
-            else:
-                error_msg = "ERROR: Error occurred while creating OVF file"
-                print(error_msg)
-                return False
-
-        except Exception as exp:
-            error_msg = "ERROR: Error occurred while editing OVF template : {}".format(exp)
-            self.logger.error(error_msg)
-            print(error_msg)
-            return False
-
-
-    def __convert_size(self,size):
-        """ 
-            Private method to convert disk size from GB,MB to bytes.
-            Args :
-                size  : disk size with prefix 'G' for GB and 'M' for MB
-            Return :  disk size in bytes
-        """
-        byte_size= 0
-        try:
-            if not size:
-                self.logger.error("No size {} to convert in bytes".format(size))
-            else:
-                size = str(size)
-                disk_size = float(size[:-1])
-                input_type = size[-1].strip()
-
-                self.logger.info("Disk size : {} , size type : {} ".format(disk_size,input_type))
-
-                if input_type == "G":
-                    byte_size = disk_size * 1024 * 1024 *1024
-                elif input_type == "M":
-                    byte_size = disk_size * 1024 * 1024
-
-                self.logger.info("Disk size in bytes: {} ".format(byte_size))
-
-            return int(byte_size)
-
-        except Exception as exp:
-            error_msg = "ERROR:Error occurred while converting disk size in bytes : {}".format(exp)
-            self.logger.error(error_msg)
-            print(error_msg)
-            return False
-
-    def __get_osType(self):
-        """ 
-            Private method to get OS ID and Type
-            Args :
-                None
-            Return :
-                osID : OS ID
-                osType: OS Type
-        """
-        osID = None
-        osType = None
-        os_info = self.__read_yaml_file(OS_INFO_FILE_PATH)
-        try:
-            if self.os_type and os_info:
-                for os_id , os_type in os_info.iteritems():
-                    if self.os_type.lower() == os_type.lower():
-                        osID = os_id
-                        osType = os_type
-                        break
-        except Exception as exp:
-            error_msg = "ERROR:Error occurred while getting OS details : {}".format(exp)
-            self.logger.error(error_msg)
-            print(error_msg)
-
-        return osID, osType
-
-
-    def __get_diskcontroller(self):
-        """ 
-            Private method to get details of Disk Controller
-            Args :
-                None
-            Return :
-                disk_controller : dict with details of Disk Controller
-        """
-        disk_controller = {}
-        scsi_subtype = None
-        if self.disk_controller.lower() in ["paravirtual", "lsilogic", "buslogic", "lsilogicsas"]:
-            scsi_subtype = self.disk_controller
-            self.disk_controller = "SCSI"
-
-        disk_controller_info = self.__read_yaml_file(DISK_CONTROLLER_INFO_FILE_PATH)
-        try:
-            if self.disk_controller and disk_controller_info:
-                for key , value in disk_controller_info.iteritems():
-                    if self.disk_controller.lower() in key.lower():
-                        disk_controller['controllerName'] = key
-                        disk_controller['resourceType'] = str(value["ResourceType"])
-                        resourceSubTypes = value["ResourceSubTypes"] if "ResourceSubTypes" in value else None
-                        if key == "SATA Controller":
-                            disk_controller["resourceSubType"] = resourceSubTypes[0]
-                        elif key == "SCSI Controller":
-                            if scsi_subtype:
-                                if scsi_subtype.lower() == "paravirtual":
-                                    scsi_subtype = "VirtualSCSI"
-                                for subtype in resourceSubTypes:
-                                    if scsi_subtype.lower() == subtype.lower():
-                                        disk_controller["resourceSubType"] = subtype
-                                        break
-                                else:
-                                    error_msg = "ERROR: Invalid inputs can not "\
-                                    "find SCSI subtype {}".format(scsi_subtype)
-                                    self.__raise_exception(error_msg)
-
-        except KeyError as exp:
-            error_msg = "ERROR:Error occurred while getting Disk Controller details : {}".format(exp)
-            self.logger.error(error_msg)
-            print(error_msg)
-
-        return disk_controller
-
-    def __read_yaml_file(self, file_path):
-        """ 
-            Private method to execute command
-            Args :
-                command  : command to execute
-            Return :
-                Dict of yaml data
-        """
-        with open(file_path) as data_file:    
-            data = yaml.load(data_file)
-        return data
-
-    def __raise_exception(self, error_msg , exception_type="Generic"):
-        """ 
-            Private method to execute command
-            Args :
-                command  : command to execute
-            Return :
-               None
-        """
-        if error_msg:
-            self.logger.debug(error_msg)
-            print(error_msg)
-            if exception_type == "Generic":
-                raise Exception(error_msg)
-            elif exception_type == "IO":
-                raise Exception(error_msg)
-
-    def __execute_command(self, command):
-        """ 
-            Private method to execute command
-            Args :
-                command  : command to execute
-            Return :
-                stdout : output of command
-                stderr: error occurred while executing command if any
-                returncode : return code of command execution
-        """
-        try:
-            self.logger.info("Execute command: {} ".format(command))
-
-            proc = subprocess.Popen(command , stdout = subprocess.PIPE, stdin = subprocess.PIPE,
-                                             stderr = subprocess.PIPE,shell=True)
-            stdout, stderr = proc.communicate()
-            returncode = proc.returncode
-
-        except Exception as exp:
-            self.logger.error("Error {} occurred while executing command {} ".format(exp,command))
-
-        return  stdout, stderr , returncode
-
-
-    def create_ovf(self):
-        """ 
-            Method to convert source image into OVF
-            Args : None
-            Return : True on success else False
-        """
-        #check output format
-        if self.source_format == self.output_format:
-            self.logger.info("Source format is OVF. No need to convert: {} ")
-            return self.source_img_path
-
-        #Get source img properties
-        img_info = self.__get_image_info()
-        if img_info:
-
-            #Create vmdk disk image
-            disk_img = self.__convert_image()
-            if disk_img:
-
-                #Edit OVF tempalte
-                ovf_path = self.__edit_ovf_template()
-                return ovf_path
-        else:
-            self.logger.error("Error in getting image information cannot convert image")
-            raise Exception("Error in getting image information cannot convert image")
-            return False
-
diff --git a/osm_ro/vmware_utils/OVF_converter/format_converter/ovf_converter_cli.py b/osm_ro/vmware_utils/OVF_converter/format_converter/ovf_converter_cli.py
deleted file mode 100644 (file)
index 209c05d..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-##
-# Copyright 2016-2017 VMware Inc.
-# This file is part of ETSI OSM
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# For those usages not covered by the Apache License, Version 2.0 please
-# contact:  osslegalrouting@vmware.com
-##
-
-import argparse
-from converter import OVFConverter , get_version
-
-def execute_cli():
-
-    """
-        Method to parse CLI arguments and execute commands accordingly
-        Args : None
-        Return : None
-    """
-    parser = argparse.ArgumentParser(description='OVF converter to convert .qcow2 or raw image into OVF')
-
-    parser.add_argument("-v","--version", action="version", version=str(get_version()),
-                            help="shows version of OVF Converter tool")
-
-    parser.add_argument("path", action="store",
-                            help=" absolute path to source image which will get convert into ovf")
-
-    parser.add_argument("-o", "--output_location", action="store",
-                            help="location where created OVF will be kept. This location "\
-                                  "should have write access. If not given file will get "\
-                                  "created at source location  (optional)")
-
-    parser.add_argument("-n","--ovf_name", action="store",
-                            help="name of output ovf file. If not given source image name will "\
-                            " be used (optional)")
-
-    parser.add_argument("-m","--memory", action="store",
-                            help="required memory for VM in MB (default 1 GB)(optional)")
-
-    parser.add_argument("-c","--cpu", action="store",
-                            help="required number of virtual cpus for VM (default 1 cpu) (optional)")
-
-    parser.add_argument("-d","--disk", action="store",
-                            help="required size of disk for VM in GB "\
-                            "(default as in source disk img) (optional)")
-
-    parser.add_argument("-s","--osType", action="store",
-                            help="required operating system type as specified "\
-                            "in user document (default os type other 32 bit) (optional)")
-
-    parser.add_argument("-dc","--disk_Controller", action="store",
-                            help="required disk controller type "\
-                            " (default controller SCSI with lsilogicsas) "\
-                            "(SATA, IDE, Paravirtual, Buslogic, Lsilogic, Lsilogicsas) (optional)")
-
-    args = parser.parse_args()
-
-    if args.path:
-        con = OVFConverter(args.path,
-                           output_location=args.output_location,
-                           output_ovf_name=args.ovf_name,
-                           memory=args.memory,
-                           cpu=args.cpu,
-                           disk=args.disk,
-                           os_type=args.osType,
-                           disk_controller=args.disk_Controller,
-                           )
-
-        print("#### Start OVF conversion  ####")
-        con.create_ovf()
-        print("#### Completed OVF conversion  ####")
-
-
-if __name__ == "__main__":
-    execute_cli()
-
diff --git a/osm_ro/vmware_utils/OVF_converter/install.sh b/osm_ro/vmware_utils/OVF_converter/install.sh
deleted file mode 100755 (executable)
index 7b184c8..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/env bash
-
-##
-# Copyright 2016-2017 VMware Inc.
-# This file is part of ETSI OSM
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# For those usages not covered by the Apache License, Version 2.0 please
-# contact:  osslegalrouting@vmware.com
-##
-
-echo '
- #################################################################
- #####             Installing Require Packages             #####
- #################################################################'
-
-# Paths to copy application files
-Install_dir="/usr/local/bin"
-App_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-App_CLI_path="${App_dir}/format_converter/ovf_converter_cli.py"
-Install_CLI_path="${Install_dir}/OVF_converter/format_converter/ovf_converter_cli.py"
-Logs_Folder="${Install_dir}/OVF_converter/logs"
-Log_Path="${Install_dir}/OVF_converter/logs/ovf_converter.log"
-
-#Function to install packages using apt-get
-function install_packages(){
-      [ -x /usr/bin/apt-get ] && apt-get install -y $*
-       
-       #check properly installed
-       for PACKAGE in $*
-       do
-           PACKAGE_INSTALLED="no"
-           [ -x /usr/bin/apt-get ] && dpkg -l $PACKAGE            &>> /dev/null && PACKAGE_INSTALLED="yes"
-           if [ "$PACKAGE_INSTALLED" = "no" ]
-           then
-               echo "failed to install package '$PACKAGE'. Revise network connectivity and try again" >&2
-               exit 1
-          fi
-       done
-   }
-  
-apt-get update  # To get the latest package lists
-install_packages "libxml2-dev libxslt-dev python-dev python-pip python-lxml python-yaml"
-install_packages "qemu-utils"
-
-#apt-get install <package name> -y
-
-#Move OVF Converter to usr/bin
-cp -R "${App_dir}"   "${Install_dir}"
-
-#Create logs folder and file
-mkdir "${Logs_Folder}"
-touch "${Log_Path}"
-
-#Change permission
-chmod -R 777 $Install_CLI_path
-chmod -R 777 $Log_Path
-
-touch "${Install_dir}/ovf_converter"
-echo  "#!/bin/sh" > "${Install_dir}/ovf_converter"
-echo  "python ${Install_CLI_path} \"\$@\"" >> "${Install_dir}/ovf_converter"
-chmod a+x "${Install_dir}/ovf_converter"
-
-echo ' 
- #################################################################
- #####             Done                                #####
- #################################################################'
diff --git a/osm_ro/vmware_utils/OVF_converter/ovf_template/template.xml b/osm_ro/vmware_utils/OVF_converter/ovf_template/template.xml
deleted file mode 100644 (file)
index 5cbb328..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<Envelope xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
-  <References>\r
-     <File ovf:href="disk_img_filename.vmdk" ovf:id="file1" />\r
-  </References>\r
-   <DiskSection>\r
-    <Info>Virtual disk information</Info>\r
-    <Disk ovf:capacity="1" ovf:capacityAllocationUnits="byte" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="0"/>\r
-  </DiskSection>\r
-  \r
-  <NetworkSection>\r
-       <Info>List of logical networks used in the package</Info> \r
- </NetworkSection>\r
-       \r
- <VirtualSystem ovf:id="vm">\r
-    <Info>A virtual machine</Info>\r
-    <Name>Virtual machine name</Name>\r
-    \r
-    <OperatingSystemSection ovf:id="1">\r
-      <Info>The kind of installed guest operating system</Info>\r
-      <Description>Other (32-bit)</Description>\r
-    </OperatingSystemSection>\r
-\r
-    <VirtualHardwareSection>\r
-      <Info>Virtual hardware requirements</Info>\r
-      <System>\r
-               <vssd:ElementName>Virtual Hardware Family</vssd:ElementName>\r
-               <vssd:InstanceID>0</vssd:InstanceID>\r
-               <vssd:VirtualSystemIdentifier>Test1</vssd:VirtualSystemIdentifier>\r
-               <vssd:VirtualSystemType>vmx-7</vssd:VirtualSystemType>\r
-         </System>\r
-           \r
-      <Item>\r
-        <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>\r
-        <rasd:Description>Number of Virtual CPUs</rasd:Description>\r
-        <rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>\r
-        <rasd:InstanceID>1</rasd:InstanceID>\r
-        <rasd:ResourceType>3</rasd:ResourceType>\r
-        <rasd:VirtualQuantity>1</rasd:VirtualQuantity>\r
-      </Item>\r
-      <Item>\r
-        <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>\r
-        <rasd:Description>Memory Size</rasd:Description>\r
-        <rasd:ElementName>1GB of memory</rasd:ElementName>\r
-        <rasd:InstanceID>2</rasd:InstanceID>\r
-        <rasd:ResourceType>4</rasd:ResourceType>\r
-        <rasd:VirtualQuantity>1024</rasd:VirtualQuantity>\r
-      </Item>\r
-      <Item>\r
-        <rasd:Address>0</rasd:Address>\r
-        <rasd:Description>SCSI Controller</rasd:Description>\r
-        <rasd:ElementName>scsiController0</rasd:ElementName>\r
-        <rasd:InstanceID>3</rasd:InstanceID>\r
-        <rasd:ResourceSubType>lsilogicsas</rasd:ResourceSubType>\r
-        <rasd:ResourceType>6</rasd:ResourceType>\r
-      </Item>\r
-      <Item>\r
-        <rasd:AddressOnParent>0</rasd:AddressOnParent>\r
-        <rasd:ElementName>disk0</rasd:ElementName>\r
-        <rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>\r
-        <rasd:InstanceID>4</rasd:InstanceID>\r
-        <rasd:Parent>3</rasd:Parent>\r
-        <rasd:ResourceType>17</rasd:ResourceType>\r
-      </Item>\r
-      <Item ovf:required="false">\r
-        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>\r
-        <rasd:ElementName>video</rasd:ElementName>\r
-        <rasd:InstanceID>5</rasd:InstanceID>\r
-        <rasd:ResourceType>24</rasd:ResourceType>\r
-      </Item>\r
-      <Item ovf:required="false">\r
-        <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>\r
-        <rasd:ElementName>vmci</rasd:ElementName>\r
-        <rasd:InstanceID>6</rasd:InstanceID>\r
-        <rasd:ResourceSubType>vmware.vmci</rasd:ResourceSubType>\r
-        <rasd:ResourceType>1</rasd:ResourceType>\r
-      </Item>\r
-      <vmw:Config ovf:required="false" vmw:key="cpuHotAddEnabled" vmw:value="true"/>\r
-      <vmw:Config ovf:required="false" vmw:key="powerOpInfo.powerOffType" vmw:value="soft"/>\r
-      <vmw:Config ovf:required="false" vmw:key="powerOpInfo.resetType" vmw:value="soft"/>\r
-      <vmw:Config ovf:required="false" vmw:key="powerOpInfo.suspendType" vmw:value="soft"/>\r
-      <vmw:Config ovf:required="false" vmw:key="tools.syncTimeWithHost" vmw:value="true"/>\r
-      <vmw:Config ovf:required="false" vmw:key="tools.toolsUpgradePolicy" vmw:value="upgradeAtPowerCycle"/>\r
-    </VirtualHardwareSection>\r
-               \r
-  </VirtualSystem>\r
-</Envelope>
\ No newline at end of file
diff --git a/osm_ro/vmware_utils/OVF_converter/readme.txt b/osm_ro/vmware_utils/OVF_converter/readme.txt
deleted file mode 100644 (file)
index 0e6117b..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-##
-# Copyright 2016-2017 VMware Inc.
-# This file is part of ETSI OSM
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# For those usages not covered by the Apache License, Version 2.0 please
-# contact:  osslegalrouting@vmware.com
-##
-
-This README file explains how to use OVF Converter Tool to generate OVF file from .qcow2, .img (raw) disk images.
-
-CONTENTS OF THIS FILE
-=====================
-This readme file contains the following sections:
-
-o Introduction
-o Tool Requirements
-o Installation
-o Usage
-o Trouble shooting
-o Release History
-
-
-Introduction
-==================
-OVF Converter Tool is a Command Line Interface (CLI) basically designed to generate OVF files from disk image such as .qcow2, and .img (raw format) which are other than .vmdk. 
-Given a path to .qcow2 image this tool can generate .vmdk and .ovf files.
-User can optionally specify name and location of ovf file. Also, one can use command line options to give disk size (GB), memory (MB), number of cpus, OS type, disk controller required for VM which will get deployed using generated OVF.
-Generated OVF file can be used to deploy VM in Vmware vSphere or vCloud Director.
-
-Note- Currently this tool supports only Ubuntu platform.
-
-
-Tool Requirements
-==================
-
-This tool requires the following software package:
-o      apt-get package manager
-o      qemu-utils
-o      python 2.7
-o      python-lxml
-o      libxml2-dev 
-o      libxslt-dev 
-o      python-dev 
-o      python-pip
-        
-Install.sh script in this folder will install all of these
-software packages.
-
-
-Installation
-==================
-User needs root privileges to install OVF Generator Tool.
-Follow below setups for installation of OVF Converter Tool.
-1. Make install.sh script in this folder executable by running below command
-   chmod a+x install.sh
-2. Run install.sh script as:
-   ./install.sh
-   
-   Sample output -
-               #################################################################
-               #####             Installing Require Packages             #####
-               #################################################################
-               Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
-               Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
-               Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
-               Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
-               Fetched 306 kB in 1s (286 kB/s)
-               Reading package lists... Done
-               Reading package lists... Done
-               Building dependency tree
-               Reading state information... Done
-               Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
-               libxslt1-dev is already the newest version (1.1.28-2.1).
-               python-dev is already the newest version (2.7.11-1).
-               python-lxml is already the newest version (3.5.0-1build1).
-               libxml2-dev is already the newest version (2.9.3+dfsg1-1ubuntu0.1).
-
-               t version (1:2.5+dfsg-5ubuntu10.6).
-               0 upgraded, 0 newly installed, 0 to remove and 72 not upgraded.
-
-               #################################################################
-               #####             Done                                #####
-               #################################################################
-               root@ubuntu:/home/vmware/OVF_converter#
-               root@ubuntu:/home/vmware/OVF_converter#
-     
-3. Now tool is installed at /usr/local/bin and available for all users
-4. User can access commands of OVF Generator Tool as:
-    ovf_converter path [output location] [ovf name][memory][cpu][disk][ostype][disk_controller]
-
-
-Usage
-===================
-o      Get version of tool as:
-
-       Command -      ovf_converter -v
-       Sample output -
-                               root@ubuntu:/home/vmware/OVF_converter# ovf_converter -v
-                               1.0 - Initial Realse
-                               root@ubuntu:/home/vmware/OVF_converter#
-
-o      See all command line options of tool as:
-       Command -       ovf_converter -h
-       Sample output -
-                               root@ubuntu:/home/vmware/OVF_converter#
-                               root@ubuntu:/home/vmware/OVF_converter# ovf_converter -h
-                               Usage: ovf_converter_cli.py [-h] [-v] [-o OUTPUT_LOCATION] [-n OVF_NAME]
-                            [-m MEMORY] [-c CPU] [-d DISK] [-s OSTYPE]
-                            [-dc DISK_CONTROLLER]
-                            path
-
-                               OVF converter to convert .qcow2 or raw image into OVF
-                               
-                               positional arguments:
-                                 path                  absolute path to source image which will get convert
-                                                       into ovf
-                               
-                               optional arguments:
-                                 -h, --help            show this help message and exit
-                                 -v, --version         shows version of OVF Converter tool
-                                 -o OUTPUT_LOCATION, --output_location OUTPUT_LOCATION
-                                                       location where created OVF will be kept. This location
-                                                       should have write access. If not given file will get
-                                                       created at source location (optional)
-                                 -n OVF_NAME, --ovf_name OVF_NAME
-                                                       name of output ovf file. If not given source image
-                                                       name will be used (optional)
-                                 -m MEMORY, --memory MEMORY
-                                                       required memory for VM in MB (default 1 GB)(optional)
-                                 -c CPU, --cpu CPU     required number of virtual cpus for VM (default 1 cpu)
-                                                       (optional)
-                                 -d DISK, --disk DISK  required size of disk for VM in GB (default as
-                                                       in source disk img) (optional)
-                                 -s OSTYPE, --osType OSTYPE
-                                                       required operating system type as specified in user
-                                                       document (default os type other 32 bit) (optional)
-                                 -dc DISK_CONTROLLER, --disk_Controller DISK_CONTROLLER
-                                                       required disk controller type (default controller SCSI
-                                                       with lsilogicsas) (SATA, IDE, Paravirtual, Buslogic,
-                                                       lsilogic, lsilogicsas) (optional)
-
-                                 
-o      Create OVF file from qcow2 or raw disk image as:
-       Command -     ovf_converter /home/vmware/centos_ovf/CentOS-7-x86_64-GenericCloud-1503.qcow2 -n centos_qcow2.ovf -m 2048 -c 4 -d 10 -s "Centos 32-bit" -dc "SATA"
-       Sample output -
-                               root@ubuntu:/home/vmware/OVF_converter# ovf_converter /home/vmware/centos_ovf/CentOS-7-x86_64-GenericCloud-1503.qcow2 -n centos_qcow2.ovf -m 2048 -c 4 -d 10
-                               #### Start OVF conversion ####
-                               Getting source image information
-                               Converting source disk image to .vmdk                                                                         
-                               .....................................................
-                               Creating OVF
-                               Output OVF is at:  /home/vmware/centos_ovf/centos_qcow2.ovf
-                               #### Completed OVF conversion ####
-
-
-Trouble shooting
-==================
-After installation of tool logs will get created at /usr/local/bin/OVF_converter/logs/ovf_converter.log file.
-User can use these logs for debugging or trouble shooting.
-
-
-Release History
-===============
-
-Version 1.0
--------------
-
-Initial release