nacx requested changes on this pull request.
Just a couple more comments. Most tests seem to be failing due to the change of
the version in the VM api.
> @@ -76,12 +83,50 @@ public AzureTemplateOptions availabilitySet(String
> availabilitySetName) {
return this;
}
+ public AzureTemplateOptions dataDisks(List<Map<String, String>>
dataDisksAsMap) {
What is the purpose of keeping the Map version?
> - toString.add("availabilitySet", availabilitySet);
- toString.add("availabilitySetName", availabilitySetName);
- return toString;
+ public int hashCode() {
+ int result = super.hashCode();
+ result = 31 * result + (virtualNetworkName != null ?
virtualNetworkName.hashCode() : 0);
+ result = 31 * result + (subnetId != null ? subnetId.hashCode() : 0);
+ result = 31 * result + (blob != null ? blob.hashCode() : 0);
+ result = 31 * result + (availabilitySet != null ?
availabilitySet.hashCode() : 0);
+ result = 31 * result + (availabilitySetName != null ?
availabilitySetName.hashCode() : 0);
+ result = 31 * result + (dataDisks != null ? dataDisks.hashCode() : 0);
+ return result;
+ }
+
+ @Override
+ public String toString() {
Better override the `string()` method instead. Otherwise you won't get the
fields from the superclass.
>
- return StorageProfile.create(imageReference, osDisk,
ImmutableList.<DataDisk> of());
+ private OSDisk createOSDisk(Image image) {
+ OsFamily osFamily = image.getOperatingSystem().getFamily();
+ String osType = osFamily == OsFamily.WINDOWS ? "Windows" : "Linux";
+ return OSDisk.builder()
+ .osType(osType)
+ .caching(DataDisk.CachingTypes.READ_WRITE.toString())
+ .createOption("FromImage")
Better use the enum? `CreateOptions.FROM_IMAGE.toString()`
--
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-labs/pull/372#pullrequestreview-32021291