Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/example-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependency>
<groupId>com.iland.core</groupId>
<artifactId>iland-sdk</artifactId>
<version>0.9.5</version>
<version>0.9.8</version>
</dependency>
</dependencies>
<repositories>
Expand Down
23 changes: 23 additions & 0 deletions examples/example-app/src/main/java/com/ilandjavasdk/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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<ProductSectionProperty> vmProductSectionProperties =
vmResource.getProductSectionProperties(vmUuid);
final List<ProductSectionProperty> 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.
Expand Down