Fixing Python3 72/8272/2
authorbeierl <mbeierl@vmware.com>
Fri, 29 Nov 2019 19:03:21 +0000 (14:03 -0500)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 29 Nov 2019 21:35:55 +0000 (22:35 +0100)
Syntax was still python2 only.

Change-Id: Ie378662686ddf49c0a31cd46ea0e660cc00c7604
Signed-off-by: beierl <mbeierl@vmware.com>
tools/OVF_converter/converter.py
tools/OVF_converter/ovf_template/template.xml

index 5f31ed3..8c68947 100644 (file)
@@ -464,7 +464,7 @@ class OVFConverter(object):
         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():
+                for key, value in disk_controller_info.items():
                     if self.disk_controller.lower() in key.lower():
                         disk_controller['controllerName'] = key
                         disk_controller['resourceType'] = str(value["ResourceType"])
index a963582..6382cef 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
  Copyright 2016-2019 VMware Inc.
  This file is part of ETSI OSM
@@ -18,7 +19,6 @@
  For those usages not covered by the Apache License, Version 2.0 please
  contact:  osslegalrouting@vmware.com
 -->
-<?xml version="1.0" encoding="UTF-8"?>
 <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">
   <References>
      <File ovf:href="disk_img_filename.vmdk" ovf:id="file1" />
@@ -30,9 +30,9 @@
 
   <NetworkSection>
     <Info>List of logical networks used in the package</Info>
- </NetworkSection>
 </NetworkSection>
 
- <VirtualSystem ovf:id="vm">
 <VirtualSystem ovf:id="vm">
     <Info>A virtual machine</Info>
     <Name>Virtual machine name</Name>