diff --git a/examples/example-app/pom.xml b/examples/example-app/pom.xml index 7d5e201..6584633 100644 --- a/examples/example-app/pom.xml +++ b/examples/example-app/pom.xml @@ -14,7 +14,7 @@ com.iland.core iland-sdk - 0.9.5 + 0.9.8 diff --git a/examples/example-app/src/main/java/com/ilandjavasdk/app/App.java b/examples/example-app/src/main/java/com/ilandjavasdk/app/App.java index 6374328..0635f93 100644 --- a/examples/example-app/src/main/java/com/ilandjavasdk/app/App.java +++ b/examples/example-app/src/main/java/com/ilandjavasdk/app/App.java @@ -24,6 +24,7 @@ import com.iland.core.api.task.CoreTask; import com.iland.core.api.vcd.CatalogUploadVappTemplateSpec; import com.iland.core.api.vcd.FenceMode; +import com.iland.core.api.vcd.ProductSectionProperty; import com.iland.core.api.vcd.User; import com.iland.core.api.vcd.Vapp; import com.iland.core.api.vcd.VappSpec; @@ -113,6 +114,7 @@ public static void main(String[] args) { login(); final User user = userResource.getUser(property.getUsername()); getUsersInventoryAndPrintAllEntities(user); + printVmAndVappTemplateProductSections(); if (!catalogUuid.isEmpty() && !vdcUuid.isEmpty() && !vappTemplate.isEmpty() && !networkUuid.isEmpty()) { final String vappUuid = createVapp(); @@ -192,6 +194,27 @@ private static void getUsersInventoryAndPrintAllEntities(final User user) { } } + /** + * Get the product section properties for a given vapp template and vm and prints them out. + * + */ + private static void printVmAndVappTemplateProductSections() { + final String vappTemplateUuid = ""; + final String vmUuid = ""; + final List vmProductSectionProperties = + vmResource.getProductSectionProperties(vmUuid); + final List vappTemplateResourceProductSectionProperties = + vappTemplateResource.getProductSectionProperties(vappTemplateUuid); + for (final ProductSectionProperty productSectionProperty : vmProductSectionProperties) { + System.out.println("key: " + productSectionProperty.getKey() + " value: " + + productSectionProperty.getValue()); + } + for (final ProductSectionProperty productSectionProperty : vappTemplateResourceProductSectionProperties) { + System.out.println("key: " + productSectionProperty.getKey() + " value: " + + productSectionProperty.getValue()); + } + } + /** * This function creates a vApp based on the entities we found from * transversing the user's inventory in the previous method.