nacx commented on this pull request.

Thanks for the fixes. Just some minor comments and it will be ready to be 
merged!

> +```
+git clone https://github.com/jclouds/jclouds-examples.git
+cd jclouds-examples/dimensiondata/
+```
+
+To download all dependencies, run:
+
+```
+mvn dependency:copy-dependencies "-DoutputDirectory=./lib"
+```
+
+If you also want to download the source jars, run:
+
+```
+mvn dependency:copy-dependencies "-DoutputDirectory=./lib" 
"-Dclassifier=sources"
+```

This looks too complicated. Given that you already have an assembly that 
produces a jar with all required dependencies, the build and run instructions 
should simply be:
```bash
mvn package
java -jar target/dimensiondata-cloudcontrol-examples-jar-with-dependencies.jar 
<apiEndpoint> <username> <password>
```

> +import org.jclouds.dimensiondata.cloudcontrol.domain.Server;
+import org.jclouds.dimensiondata.cloudcontrol.domain.TagKey;
+import org.jclouds.dimensiondata.cloudcontrol.domain.Vlan;
+import org.jclouds.dimensiondata.cloudcontrol.options.DatacenterIdListFilters;
+import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
+import org.jclouds.rest.ApiContext;
+
+import static org.jclouds.examples.dimensiondata.cloudcontrol.WaitForUtils.*;
+
+/**
+ * This class will attempt to delete the assets created in 
org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer:
+ * <ul>
+ * <li>Server</li>
+ * <li>Vlan</li>
+ * <li>Network Domain</li>
+ * <li>Tag Key</li>

End tag `</ul>`

> +         *
+         * Internally the Dimension Data CloudControl Provider will use the 
org.jclouds.dimensiondata.cloudcontrol.features.AccountApi
+         * to lookup the organization identifier so that it is used as part of 
the requests.
+         *
+         */
+        String endpoint = args[0];
+        String username = args[1];
+        String password = args[2];
+        ApiContext<DimensionDataCloudControlApi> ctx = null;
+        try
+        {
+            ctx = 
ContextBuilder.newBuilder(DIMENSIONDATA_CLOUDCONTROL_PROVIDER)
+                    .endpoint(endpoint)
+                    .credentials(username, password)
+                    .modules(ImmutableSet.of(new SLF4JLoggingModule()))
+                    .build();

[minor] You could also use try-with-resources to save the finally block:

```java
try (ApiContext<DimensionDataCloudControlApi> ctx =
   ContextBuilder.newBuilder(DIMENSIONDATA_CLOUDCONTROL_PROVIDER)
      .endpoint(endpoint)
      .credentials(username, password)
      .modules(ImmutableSet.of(new SLF4JLoggingModule()))
      .build())
{
...
}
```

> +import 
> org.jclouds.dimensiondata.cloudcontrol.options.DatacenterIdListFilters;
+import org.jclouds.logging.Logger;
+import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
+import org.jclouds.rest.ApiContext;
+
+import static org.jclouds.examples.dimensiondata.cloudcontrol.WaitForUtils.*;
+
+/**
+ * This example shows how a Network Domain and all of it's associated assets 
are removed.
+ * Takes 4 Program Arguments:
+ * <ul>
+ * <ol>1 Endpoint URL</ol>
+ * <ol>2 Usernamme</ol>
+ * <ol>3 Password</ol>
+ * <ol>4 Network Domain Id</ol>
+ * </ul>

This should be
```html
<ol>
<li></li>
<li></li>
</ol>
```

> @@ -21,7 +21,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.jclouds.examples</groupId>
   <artifactId>jclouds-examples</artifactId>
-  <version>2.1.0</version>
+  <version>2.2.0-SNAPSHOT</version>

Even if dimension data (in labs) uses the snapshot, keep this version as-is, 
please.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/94#pullrequestreview-163681162

Reply via email to