DaanHoogland commented on a change in pull request #5825:
URL: https://github.com/apache/cloudstack/pull/5825#discussion_r782239028
##########
File path: api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java
##########
@@ -392,9 +398,11 @@
"5. Customer may also use the Software under the terms of this
Agreement to deliver hosted information technology services to Customer
affiliates, subject to payment of the required license fee(s).\n" +
"6. If the Software is subject to Cisco's Smart Licensing program,
Cisco will be able to assess if Customer is using the Software within the
limits and entitlements paid for by Customer. If the Smart Licensing program is
applicable, Customer will be required to enter into a separate terms of service
agreement relating to Smart Licensing.</License>\n" +
"</EulaSection>\n" +
- "</VirtualSystem>";
+ "</VirtualSystem>" +
+ "</Envelope>";
private String productSectionWithCategories =
+ "<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\">" +
Review comment:
and ...
##########
File path: api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java
##########
@@ -27,13 +27,13 @@
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
-import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;
import java.util.List;
public class OVFHelperTest {
private String ovfFileProductSection =
+ "<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\">" +
Review comment:
you could put those schema definitions on the `<ProductSection>` itself.
##########
File path: api/src/main/java/com/cloud/agent/api/storage/OVFHelper.java
##########
@@ -208,11 +148,11 @@ protected OVFPropertyTO createOVFPropertyFromNode(Node
node, int index, String c
continue;
}
if (child.getNodeName().equalsIgnoreCase("Category") ||
-
child.getNodeName().equalsIgnoreCase("ovf:Category")) {
+ child.getNodeName().endsWith(":Category")) {
Review comment:
bit of a short cut, but it'll work
##########
File path: api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java
##########
@@ -44,9 +44,11 @@
"<Label>User data to be made available inside the
instance</Label>" +
"<Description>This allows to pass any text to the appliance.
The value should be encoded in base64</Description>" +
"</Property>" +
- "</ProductSection>";
+ "</ProductSection>" +
+ "</Envelope>";
private String ovfFileDeploymentOptionsSection =
+ "<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\">" +
Review comment:
same here
##########
File path: api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java
##########
@@ -61,9 +63,11 @@
" <Label>2 Gbps (ASAv30)</Label>\n" +
" <Description>Use this option to deploy an ASAv with
a maximum throughput of 2 Gbps (uses 4 vCPUs and 8 GB of
memory).</Description>\n" +
" </Configuration>\n" +
- " </DeploymentOptionSection>";
+ " </DeploymentOptionSection>" +
+ "</Envelope>";
private String ovfFileVirtualHardwareSection =
+ "<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\">" +
Review comment:
and here
##########
File path: api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java
##########
@@ -267,9 +271,11 @@
" </Item>\n" +
" <vmw:ExtraConfig vmw:key=\"monitor_control.pseudo_perfctr\"
vmw:value=\"TRUE\"></vmw:ExtraConfig>\n" +
" </VirtualHardwareSection>\n" +
- "</VirtualSystem>";
+ "</VirtualSystem>" +
+ "</Envelope>";
private String eulaSections =
+ "<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\">" +
Review comment:
and here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]