Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
- /** -* Specifies the name for the virtual machine. The name must be unique -* within Windows Azure. -*/ - private final String roleName; + /** Specifies the name for the virtual machine. The name must be unique within Windows Azure. */ Actually this is not true. Hosted Services name are unique in Azure (they're used for DNS) but VM role names are only unique inside the hosted/cloud service they're deployed in. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19132594
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
- /** -* Specifies the name for the virtual machine. The name must be unique -* within Windows Azure. -*/ - private final String roleName; + /** Specifies the name for the virtual machine. The name must be unique within Windows Azure. */ Thanks! There are a lot of copy paste problems along with the bitrot. I have one more structural change then hope to update the api to latest and fine toothed comb. If you see any more things like this either send a pull request or make a comment. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19151524
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
} - @Override - public int hashCode() { - return Objects.hashCode(name); + // TODO: Remove from here down with @AutoValue. + private Disk(String name, String location, String affinityGroup, String description, OSType os, URI mediaLink, + Integer logicalSizeInGB, Attachment attachedTo, String sourceImage) { + this.name = checkNotNull(name, name); + this.location = location; + this.affinityGroup = affinityGroup; + this.description = description; + this.os = os; + this.mediaLink = mediaLink; + this.logicalSizeInGB = checkNotNull(logicalSizeInGB, logicalSizeInGB of %s, name); This is listed above as `@Nullable`? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19098188
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
} - } else if (equalsOrSuffix(qName, Url)) { - final String url = currentOrNull(currentText); - if (url != null) { -builder.deploymentURL(URI.create(url)); + } else if (qName.equals(RoleName)) { + virtualMachineName = currentOrNull(currentText); Just checking that `RoleName` is indeed the VM name here..? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19098505
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
- } else if (equalsOrSuffix(qName, ServiceName)) { - builder.name(currentOrNull(currentText)); + if (qName.equals(DateCreated)) { +created = dateService.iso8601SecondsDateParse(currentOrNull(currentText)); + } else if (qName.equals(DateLastModified)) { +lastModified = dateService.iso8601SecondsDateParse(currentOrNull(currentText)); + } else if (qName.equals(Status)) { +String statusText = currentOrNull(currentText); +if (statusText != null) { + status = status(statusText); +} + } else if (qName.equals(Name)) { +propertyName = currentOrNull(currentText); + } else if (qName.equals(Value)) { +extendedProperties.put(propertyName, currentOrNull(currentText)); +propertyName = null; [minor] Curious why this is here but not for `Name` just above? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19098644
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
} - } else if (equalsOrSuffix(qName, Url)) { - final String url = currentOrNull(currentText); - if (url != null) { -builder.deploymentURL(URI.create(url)); + } else if (qName.equals(RoleName)) { + virtualMachineName = currentOrNull(currentText); comments and documentation eluded to that. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19098682
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
/** * @see a href=http://msdn.microsoft.com/en-us/library/jj157191; api/a */ -public class ImageHandler extends ParseSax.HandlerForGeneratedRequestWithResultImage { +final class ImageHandler extends ParseSax.HandlerForGeneratedRequestWithResultImage { + private String name; + private String location; + private String affinityGroup; + private String label; + private String category; + private String description; + private OSType os; + private URI mediaLink; + private Integer logicalSizeInGB; + private final ListString eula = Lists.newArrayList(); [minor] I noticed you're using `ImmutableList.Builder` elsewhere for this? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19098733
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
/** * @see a href=http://msdn.microsoft.com/en-us/library/gg441293; api/a */ -public class LocationHandler extends ParseSax.HandlerForGeneratedRequestWithResultLocation { +final class LocationHandler extends ParseSax.HandlerForGeneratedRequestWithResultLocation { + private String name; + private String displayName; + private final ListString availableServices = Lists.newArrayList(); [minor] Same question as above about array lists vs. `ImmutableList.Builder` here? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19098795
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
/** * @see a href=http://msdn.microsoft.com/en-us/library/jj157191; api/a */ -public class ImageHandler extends ParseSax.HandlerForGeneratedRequestWithResultImage { +final class ImageHandler extends ParseSax.HandlerForGeneratedRequestWithResultImage { + private String name; + private String location; + private String affinityGroup; + private String label; + private String category; + private String description; + private OSType os; + private URI mediaLink; + private Integer logicalSizeInGB; + private final ListString eula = Lists.newArrayList(); using immutable for throw-away handlers. this one is used in a loop. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19098816
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
- } else if (equalsOrSuffix(qName, ServiceName)) { - builder.name(currentOrNull(currentText)); + if (qName.equals(DateCreated)) { +created = dateService.iso8601SecondsDateParse(currentOrNull(currentText)); + } else if (qName.equals(DateLastModified)) { +lastModified = dateService.iso8601SecondsDateParse(currentOrNull(currentText)); + } else if (qName.equals(Status)) { +String statusText = currentOrNull(currentText); +if (statusText != null) { + status = status(statusText); +} + } else if (qName.equals(Name)) { +propertyName = currentOrNull(currentText); + } else if (qName.equals(Value)) { +extendedProperties.put(propertyName, currentOrNull(currentText)); +propertyName = null; propertyValue comes after propertyName, and propertyName is needed to put that into the map. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19098953
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
Only one comment that might need to be looked at now (a field marked `@Nullable` but with a `checkNotNull`) - the rest can all be ignored and/or handled later, if desired. +1 - looks good to me! Thanks for more cleanup, @adriancole! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92#issuecomment-59804663
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
} - @Override - public int hashCode() { - return Objects.hashCode(name); + // TODO: Remove from here down with @AutoValue. + private Disk(String name, String location, String affinityGroup, String description, OSType os, URI mediaLink, + Integer logicalSizeInGB, Attachment attachedTo, String sourceImage) { + this.name = checkNotNull(name, name); + this.location = location; + this.affinityGroup = affinityGroup; + this.description = description; + this.os = os; + this.mediaLink = mediaLink; + this.logicalSizeInGB = checkNotNull(logicalSizeInGB, logicalSizeInGB of %s, name); nullable was wrong. fixed --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92/files#r19099082
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
[jclouds-labs-pull-requests #325](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/325/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92#issuecomment-59805936
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
[jclouds » jclouds-labs #1719](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs/1719/) SUCCESS This pull request looks good [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92#issuecomment-59807564
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
+1 btw, what are we waiting on before using autovalue? A specific issue or feature? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92#issuecomment-59810657
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
@ccustine there's a snapshot published to sonatype, but no stable version. Since we use our own Nullable annotation, auto-value 1.0-rc1 can't work, but anything after Feb will :) --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92#issuecomment-59828480
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
Closed #92. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92#event-181125888
Re: [jclouds-labs] Cleanup round 1 of azurecompute: Output value types. (#92)
merged into master. will do 1.8.x once 1.8.1 is cut. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/92#issuecomment-59829753