You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Adrian Cole <no...@github.com> on 2014/11/03 19:18:08 UTC

[jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Lots of inconsistencies scrubbed as a part of this, which took about 20 hours to complete.
You can merge this Pull Request by running:

  git pull https://github.com/adriancole/jclouds-labs-google adrian.auto-gce2

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-labs-google/pull/73

-- Commit Summary --

  * JCLOUDS-750 Convert GoogleComputeEngine to AutoValue + general cleanup.

-- File Changes --

    M google-compute-engine/pom.xml (5)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApi.java (10)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApiMetadata.java (3)
    A google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineFallbacks.java (30)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/binders/ForwardingRuleCreationBinder.java (4)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/binders/HttpHealthCheckCreationBinder.java (17)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/binders/InstanceBinder.java (10)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/binders/MetadataBinder.java (10)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/binders/TargetPoolChangeHealthChecksBinder.java (6)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/binders/TargetPoolChangeInstancesBinder.java (6)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/binders/TargetPoolCreationBinder.java (6)
    R google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/binders/TargetPoolMapofListofMapGenericBinder.java (35)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineService.java (25)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceAdapter.java (97)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/config/GoogleComputeEngineServiceContextModule.java (14)
    R google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/domain/InstanceInZone.java (6)
    R google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/domain/MachineTypeInZone.java (8)
    A google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/domain/NetworkAndAddressRange.java (41)
    R google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/domain/SlashEncodedIds.java (2)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/extensions/GoogleComputeEngineSecurityGroupExtension.java (122)
    R google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/CreateNetworkIfNeeded.java (59)
    R google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/FindNetworkOrCreate.java (38)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/FirewallTagNamingConvention.java (5)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/FirewallToIpPermission.java (66)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/GoogleComputeEngineImageToImage.java (32)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/InstanceInZoneToNodeMetadata.java (80)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/MachineTypeInZoneToHardware.java (26)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/NetworkToSecurityGroup.java (10)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/RegionToLocation.java (6)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/ZoneToLocation.java (6)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/options/GoogleComputeEngineTemplateOptions.java (27)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/strategy/CreateNodesWithGroupEncodedIntoNameThenAddToSet.java (53)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/config/GoogleComputeEngineHttpApiModule.java (4)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/config/GoogleComputeEngineParserModule.java (329)
    D google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/AbstractDisk.java (120)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Address.java (164)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Deprecated.java (179)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Disk.java (128)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/DiskType.java (150)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Firewall.java (366)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/ForwardingRule.java (195)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/HttpHealthCheck.java (231)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Image.java (268)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Instance.java (1176)
    D google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/InstanceTemplate.java (442)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/ListPage.java (115)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/MachineType.java (333)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Metadata.java (118)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Network.java (114)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Operation.java (552)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Project.java (148)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Quota.java (132)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Region.java (151)
    D google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Resource.java (287)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Route.java (429)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Snapshot.java (125)
    A google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Tags.java (43)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetPool.java (205)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Zone.java (317)
    D google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/internal/NetworkAndAddressRange.java (91)
    A google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/templates/InstanceTemplate.java (269)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AddressApi.java (9)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/DiskApi.java (10)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/DiskTypeApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/FirewallApi.java (10)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ForwardingRuleApi.java (37)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/GlobalOperationApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/HttpHealthCheckApi.java (42)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ImageApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/InstanceApi.java (21)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/MachineTypeApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/NetworkApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ProjectApi.java (4)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/RegionApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/RegionOperationApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/RouteApi.java (10)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/SnapshotApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/TargetPoolApi.java (61)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneOperationApi.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java (15)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java (12)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java (12)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java (29)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDiskTypes.java (32)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java (29)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java (27)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseForwardingRules.java (36)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java (25)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseHttpHealthChecks.java (33)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java (27)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java (29)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java (30)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java (27)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java (28)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java (27)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java (24)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java (30)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseTargetPools.java (29)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java (27)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java (24)
    A google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/internal/NullSafeCopies.java (39)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/options/FirewallOptions.java (74)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/options/ForwardingRuleCreationOptions.java (8)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/options/HttpHealthCheckCreationOptions.java (35)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/options/RouteOptions.java (18)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/options/TargetPoolCreationOptions.java (16)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/predicates/GlobalOperationDonePredicate.java (15)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/predicates/InstancePredicates.java (4)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/predicates/NetworkFirewallPredicates.java (124)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/predicates/RegionOperationDonePredicate.java (17)
    M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/predicates/ZoneOperationDonePredicate.java (12)
    D google-compute-engine/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata (18)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApiMetadataTest.java (6)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/binders/ForwardingRuleCreationBinderTest.java (4)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/binders/TargetPoolAddInstanceBinderTest.java (15)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/binders/TargetPoolCreationBinderTest.java (8)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceExpectTest.java (63)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/GoogleComputeEngineServiceLiveTest.java (5)
    A google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/CreateNetworkIfNeededTest.java (148)
    R google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/FindNetworkOrCreateTest.java (94)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/FirewallToIpPermissionTest.java (50)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/GoogleComputeEngineImageToImageTest.java (38)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/InstanceInZoneToNodeMetadataTest.java (58)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/compute/functions/NetworkToSecurityGroupTest.java (22)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/AddressApiExpectTest.java (26)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/AddressApiLiveTest.java (2)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/DiskApiExpectTest.java (48)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/DiskApiLiveTest.java (14)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/DiskTypeApiExpectTest.java (12)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/DiskTypeApiLiveTest.java (16)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/FirewallApiExpectTest.java (88)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/FirewallApiLiveTest.java (51)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ForwardingRuleApiExpectTest.java (59)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ForwardingRuleApiLiveTest.java (36)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/GlobalOperationApiExpectTest.java (17)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/GlobalOperationApiLiveTest.java (8)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/HttpHealthCheckApiExpectTest.java (90)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/HttpHealthCheckApiLiveTest.java (65)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ImageApiExpectTest.java (33)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ImageApiLiveTest.java (16)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiExpectTest.java (110)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiLiveTest.java (51)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/MachineTypeApiExpectTest.java (12)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/MachineTypeApiLiveTest.java (7)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiExpectTest.java (20)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiLiveTest.java (5)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ProjectApiExpectTest.java (10)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ProjectApiLiveTest.java (29)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiExpectTest.java (4)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiLiveTest.java (9)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionOperationApiExpectTest.java (47)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionOperationApiLiveTest.java (8)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiExpectTest.java (31)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiLiveTest.java (7)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiExpectTest.java (2)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiLiveTest.java (10)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/TargetPoolApiExpectTest.java (72)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/TargetPoolApiLiveTest.java (93)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ZoneApiExpectTest.java (4)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ZoneApiLiveTest.java (7)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ZoneOperationApiExpectTest.java (52)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/ZoneOperationApiLiveTest.java (8)
    D google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/functions/CreateNetworkIfNeededTest.java (132)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/BaseGoogleComputeEngineApiLiveTest.java (12)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/BaseGoogleComputeEngineExpectTest.java (29)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/BaseGoogleComputeEngineParseTest.java (8)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/BaseGoogleComputeEngineServiceContextExpectTest.java (12)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseAddressListTest.java (42)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseAddressTest.java (29)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseDiskListTest.java (31)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseDiskTest.java (29)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseDiskTypeListTest.java (51)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseDiskTypeTest.java (30)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseFirewallListTest.java (48)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseFirewallTest.java (45)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseForwardingRuleListTest.java (38)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseForwardingRuleTest.java (40)
    R google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseGlobalOperationListTest.java (22)
    A google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseGlobalOperationTest.java (62)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseHttpHealthCheckListTest.java (83)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseHttpHealthCheckTest.java (34)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseImageListTest.java (38)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseImageTest.java (39)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseInstanceListTest.java (20)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseInstanceSerialOutputTest.java (17)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseInstanceTest.java (84)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseMachineTypeListTest.java (101)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseMachineTypeTest.java (42)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseMetadataTest.java (15)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkListTest.java (20)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkTest.java (26)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseOperationTest.java (50)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseProjectTest.java (52)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseQuotaTest.java (10)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java (61)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionOperationTest.java (54)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionTest.java (51)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteListTest.java (43)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteTest.java (39)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotListTest.java (47)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotTest.java (30)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseTargetPoolListTest.java (33)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseTargetPoolTest.java (36)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseZoneListTest.java (55)
    A google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseZoneOperationTest.java (62)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseZoneTest.java (40)
    M google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/predicates/NetworkFirewallPredicatesTest.java (118)
    M google-compute-engine/src/test/resources/disk_list.json (3)
    M google-compute-engine/src/test/resources/image_get.json (4)
    M google-compute-engine/src/test/resources/instance_get.json (3)
    M google-compute-engine/src/test/resources/instance_insert.json (2)
    M google-compute-engine/src/test/resources/instance_insert_simple.json (2)
    M google-compute-engine/src/test/resources/instance_list.json (3)

-- Patch Links --

https://github.com/jclouds/jclouds-labs-google/pull/73.patch
https://github.com/jclouds/jclouds-labs-google/pull/73.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #205](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/205/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61522640

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
> +
> +import java.net.URI;
> +import java.util.List;
> +import java.util.Map;
> +
> +import org.jclouds.googlecomputeengine.domain.Instance.NetworkInterface.AccessConfig;
> +import org.jclouds.googlecomputeengine.domain.Instance.NetworkInterface.AccessConfig.Type;
> +import org.jclouds.googlecomputeengine.domain.Instance.ServiceAccount;
> +import org.jclouds.javax.annotation.Nullable;
> +
> +import com.google.common.collect.ImmutableList;
> +import com.google.common.collect.Lists;
> +import com.google.common.collect.Maps;
> +
> +/** Optional information for creating an instance. */
> +public class InstanceTemplate {

Just curious...`@AutoValue` does not work for these?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19765692

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #207](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/207/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61556923

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
>  
> -   public Builder toBuilder() {
> -      return new Builder().fromSnapshot(this);
> +   @SerializedNames({ "id", "selfLink", "name", "description", "diskSizeGb", "status", "sourceDisk", "sourceDiskId" })
> +   public static Snapshot create(String id, URI selfLink, String name, String description, int sizeGb, String status,
> +         URI sourceDisk, String sourceDiskId) {
> +      return new AutoValue_Snapshot(id, selfLink, name, description, sizeGb, status, sourceDisk, sourceDiskId);

fixed

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19772635

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
ok all good. will merge (including @danbroudy fix) on green! Thanks for the reviews.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61564331

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
> and.. done. 5200 less lines!

Yay!!!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61570813

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
> -                 .unhealthyThreshold(in.getUnhealthyThreshold().orNull())
> -                 .healthyThreshold(in.getHealthyThreshold().orNull());
> -      }
> +   /** An unhealthy VM will be marked healthy after this many consecutive successes. */
> +   public abstract int healthyThreshold();
> +
> +   @SerializedNames(
> +         { "id", "selfLink", "name", "description", "host", "requestPath", "port", "checkIntervalSec", "timeoutSec",
> +               "unhealthyThreshold", "healthyThreshold" })
> +   public static HttpHealthCheck create(String id, URI selfLink, String name, String description, String host,
> +         String requestPath, Integer port, Integer checkIntervalSec, Integer timeoutSec, Integer unhealthyThreshold,
> +         Integer healthyThreshold) {
> +      return new AutoValue_HttpHealthCheck(id, selfLink, name, description, host,
> +            requestPath != null ? requestPath : "/", port != null ? port : 80,
> +            checkIntervalSec != null ? checkIntervalSec : 5, timeoutSec != null ? timeoutSec : 5,
> +            unhealthyThreshold != null ? unhealthyThreshold : 2, healthyThreshold != null ? healthyThreshold : 2);

Worth describing these defaults in the doc anywhere?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19764673

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
> @@ -113,18 +102,15 @@ public GoogleComputeEngineServiceAdapter(GoogleComputeEngineApi api,
>                                              @Named(OPERATION_COMPLETE_TIMEOUT) Long operationCompleteCheckTimeout,
>                                              @Memoized Supplier<Map<URI, ? extends Location>> zones,
>                                              FirewallTagNamingConvention.Factory firewallTagNamingConvention) {
> -      this.api = checkNotNull(api, "google compute api");
> -      this.userProject = checkNotNull(userProject, "user project name");
> -      this.metatadaFromTemplateOptions = checkNotNull(metatadaFromTemplateOptions,
> -              "metadata from template options function");
> -      this.operationCompleteCheckInterval = checkNotNull(operationCompleteCheckInterval,
> -              "operation completed check interval");
> -      this.operationCompleteCheckTimeout = checkNotNull(operationCompleteCheckTimeout,
> -                                                        "operation completed check timeout");
> +      this.api = api;
> +      this.userProject = userProject;
> +      this.metatadaFromTemplateOptions = metatadaFromTemplateOptions;
> +      this.operationCompleteCheckInterval = operationCompleteCheckInterval;
> +      this.operationCompleteCheckTimeout = operationCompleteCheckTimeout;

No need to check for `null` here or does Guice take care of this?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19763979

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
>  
> -   public Builder toBuilder() {
> -      return new Builder().fromSnapshot(this);
> +   @SerializedNames({ "id", "selfLink", "name", "description", "diskSizeGb", "status", "sourceDisk", "sourceDiskId" })
> +   public static Snapshot create(String id, URI selfLink, String name, String description, int sizeGb, String status,
> +         URI sourceDisk, String sourceDiskId) {
> +      return new AutoValue_Snapshot(id, selfLink, name, description, sizeGb, status, sourceDisk, sourceDiskId);

Does `sizeGb` sound like the size of the snapshot, rather than the size of the disk?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19765576

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
> @@ -64,7 +64,7 @@
>     Project get(@PathParam("project") String projectName);
>  
>     /**
> -    * Sets metadata common to all instances within the specified project using the data included in the request.
> +    * Lists metadata common to all instances within the specified project using the data included in the request.

See comment above

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19765809

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1608](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1608/) 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-google/pull/73#issuecomment-61523481

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
> +import org.jclouds.javax.annotation.Nullable;
> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +
> +/** Container for network, IPv4 range and optional gateway, for creation caching */
> +@AutoValue
> +public abstract class NetworkAndAddressRange {
> +
> +   public abstract String name();
> +
> +   public abstract String rangeIPv4();
> +
> +   @Nullable public abstract String gateway();
> +
> +   @SerializedNames({ "name", "ipV4Range", "gateway" })

Should this be `rangeIPv4` or is the difference deliberate?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19764086

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
> +import org.jclouds.javax.annotation.Nullable;
> +
> +import com.google.common.collect.ImmutableList;
> +import com.google.common.collect.ImmutableMap;
> +
> +public final class NullSafeCopies {
> +
> +   public static <K, V> Map<K, V> copyOf(@Nullable Map<K, V> map) {
> +      return map != null ? ImmutableMap.copyOf(map) : ImmutableMap.<K, V>of();
> +   }
> +
> +   public static <E> List<E> copyOf(@Nullable List<E> list) {
> +      return list != null ? ImmutableList.copyOf(list) : ImmutableList.<E>of();
> +   }
> +
> +   private NullSafeCopies() {

[minor] Do we consider it useful/necessary to have an exception thrown here?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19765969

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
> @@ -64,7 +64,7 @@
>     Project get(@PathParam("project") String projectName);
>  
>     /**
> -    * Sets metadata common to all instances within the specified project using the data included in the request.
> +    * Lists metadata common to all instances within the specified project using the data included in the request.

done

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19772814

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #209](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/209/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61564568

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
@eamonnmcmanus developers of GCE thank you very much for auto!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61568133

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
>  
> -      for (Rule rule : fw.getAllowed()) {
> -         if (!rule.getPorts().isEmpty()) {
> -            for (Range<Integer> r : rule.getPorts().asRanges()) {
> -               IpPermission.Builder builder = populateBuilder(fw, rule.getIpProtocol());
> -               builder.fromPort(r.lowerEndpoint());
> -               builder.toPort(r.upperEndpoint());
> -               setBuilder.add(builder.build());
> +      for (Rule rule : fw.allowed()) {
> +         if (rule.ports() != null && !rule.ports().isEmpty()) {

[minor] Avoiding Guava here, otherwise use `nullToEmpty` or so?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19764251

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
> -                 .unhealthyThreshold(in.getUnhealthyThreshold().orNull())
> -                 .healthyThreshold(in.getHealthyThreshold().orNull());
> -      }
> +   /** An unhealthy VM will be marked healthy after this many consecutive successes. */
> +   public abstract int healthyThreshold();
> +
> +   @SerializedNames(
> +         { "id", "selfLink", "name", "description", "host", "requestPath", "port", "checkIntervalSec", "timeoutSec",
> +               "unhealthyThreshold", "healthyThreshold" })
> +   public static HttpHealthCheck create(String id, URI selfLink, String name, String description, String host,
> +         String requestPath, Integer port, Integer checkIntervalSec, Integer timeoutSec, Integer unhealthyThreshold,
> +         Integer healthyThreshold) {
> +      return new AutoValue_HttpHealthCheck(id, selfLink, name, description, host,
> +            requestPath != null ? requestPath : "/", port != null ? port : 80,
> +            checkIntervalSec != null ? checkIntervalSec : 5, timeoutSec != null ? timeoutSec : 5,
> +            unhealthyThreshold != null ? unhealthyThreshold : 2, healthyThreshold != null ? healthyThreshold : 2);

done

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19772756

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1610](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1610/) 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-google/pull/73#issuecomment-61557507

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
>  
>  import org.jclouds.googlecomputeengine.domain.Firewall;
>  import org.jclouds.net.domain.IpPermission;
>  import org.jclouds.net.domain.IpProtocol;
>  import org.testng.annotations.Test;
>  
> -import com.google.common.collect.Range;
> +import com.google.common.collect.ImmutableList;
>  
>  @Test(groups = "unit")

done

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19772919

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
> -                 .unhealthyThreshold(in.getUnhealthyThreshold().orNull())
> -                 .healthyThreshold(in.getHealthyThreshold().orNull());
> -      }
> +   /** An unhealthy VM will be marked healthy after this many consecutive successes. */
> +   public abstract int healthyThreshold();
> +
> +   @SerializedNames(
> +         { "id", "selfLink", "name", "description", "host", "requestPath", "port", "checkIntervalSec", "timeoutSec",
> +               "unhealthyThreshold", "healthyThreshold" })
> +   public static HttpHealthCheck create(String id, URI selfLink, String name, String description, String host,
> +         String requestPath, Integer port, Integer checkIntervalSec, Integer timeoutSec, Integer unhealthyThreshold,
> +         Integer healthyThreshold) {
> +      return new AutoValue_HttpHealthCheck(id, selfLink, name, description, host,
> +            requestPath != null ? requestPath : "/", port != null ? port : 80,
> +            checkIntervalSec != null ? checkIntervalSec : 5, timeoutSec != null ? timeoutSec : 5,
> +            unhealthyThreshold != null ? unhealthyThreshold : 2, healthyThreshold != null ? healthyThreshold : 2);

good question. Many defaults (especially booleans) are described in
upstream docs. I suppose we could add param javadoc to the factory method.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19768535

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #206](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/206/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61527469

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1609](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1609/) 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-google/pull/73#issuecomment-61528266

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
>  
>  import org.jclouds.googlecomputeengine.domain.Firewall;
>  import org.jclouds.net.domain.IpPermission;
>  import org.jclouds.net.domain.IpProtocol;
>  import org.testng.annotations.Test;
>  
> -import com.google.common.collect.Range;
> +import com.google.common.collect.ImmutableList;
>  
>  @Test(groups = "unit")

expect and parse tests sometimes fail with transient NPE without this.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19768717

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
> @@ -31,7 +31,7 @@
>  @Test(groups = "unit")

done

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19772892

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
> +import org.jclouds.javax.annotation.Nullable;
> +
> +import com.google.common.collect.ImmutableList;
> +import com.google.common.collect.ImmutableMap;
> +
> +public final class NullSafeCopies {
> +
> +   public static <K, V> Map<K, V> copyOf(@Nullable Map<K, V> map) {
> +      return map != null ? ImmutableMap.copyOf(map) : ImmutableMap.<K, V>of();
> +   }
> +
> +   public static <E> List<E> copyOf(@Nullable List<E> list) {
> +      return list != null ? ImmutableList.copyOf(list) : ImmutableList.<E>of();
> +   }
> +
> +   private NullSafeCopies() {

no. I don't think it is useful

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19768605

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1612](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1612/) 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-google/pull/73#issuecomment-61565121

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
More of a scan than a thorough review, but just a few minor questions from that. Seeing as this is work in progress, +1 - looks good to me

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61553247

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
>  
>  import org.jclouds.googlecomputeengine.domain.Firewall;
>  import org.jclouds.net.domain.IpPermission;
>  import org.jclouds.net.domain.IpProtocol;
>  import org.testng.annotations.Test;
>  
> -import com.google.common.collect.Range;
> +import com.google.common.collect.ImmutableList;
>  
>  @Test(groups = "unit")

Add test name? Not exactly sure under which circumstances we are doing this, actually...

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19768110

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
and.. done. 5200 less lines!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61567954

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Andrew Phillips <no...@github.com>.
> @@ -31,7 +31,7 @@
>  @Test(groups = "unit")

Add test name?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19767630

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
> +import org.jclouds.javax.annotation.Nullable;
> +import org.jclouds.json.SerializedNames;
> +
> +import com.google.auto.value.AutoValue;
> +
> +/** Container for network, IPv4 range and optional gateway, for creation caching */
> +@AutoValue
> +public abstract class NetworkAndAddressRange {
> +
> +   public abstract String name();
> +
> +   public abstract String rangeIPv4();
> +
> +   @Nullable public abstract String gateway();
> +
> +   @SerializedNames({ "name", "ipV4Range", "gateway" })

difference was deliberate since that name is used elsewhere.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19768396

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
Live test results so far

```
Results :

Failed tests: 
  InstanceApiLiveTest.testDeleteInstance:227->BaseGoogleComputeEngineApiLiveTest.assertZoneOperationDoneSucessfully:111->BaseGoogleComputeEngineApiLiveTest.waitZoneOperationDone:118->BaseGoogleComputeEngineApiLiveTest.waitOperationDone:166 » NullPointer
  GoogleComputeEngineServiceLiveTest>BaseComputeServiceLiveTest.testCreateAndRunAService:706->BaseComputeServiceLiveTest.createAndRunAServiceInGroup:723 » RunNodes
  ProjectApiLiveTest.testGetProjectWhenNotExists:61 » HttpResponse command: GET ...
  GoogleComputeEngineServiceLiveTest>BaseComputeServiceLiveTest.testAScriptExecutionAfterBootWithBasicTemplate:223 » RunNodes
  GoogleComputeEngineServiceLiveTest>BaseComputeServiceLiveTest.testConcurrentUseOfComputeServiceToCreateNodes:475 » Execution

Tests run: 121, Failures: 5, Errors: 0, Skipped: 13
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61554356

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
> @@ -113,18 +102,15 @@ public GoogleComputeEngineServiceAdapter(GoogleComputeEngineApi api,
>                                              @Named(OPERATION_COMPLETE_TIMEOUT) Long operationCompleteCheckTimeout,
>                                              @Memoized Supplier<Map<URI, ? extends Location>> zones,
>                                              FirewallTagNamingConvention.Factory firewallTagNamingConvention) {
> -      this.api = checkNotNull(api, "google compute api");
> -      this.userProject = checkNotNull(userProject, "user project name");
> -      this.metatadaFromTemplateOptions = checkNotNull(metatadaFromTemplateOptions,
> -              "metadata from template options function");
> -      this.operationCompleteCheckInterval = checkNotNull(operationCompleteCheckInterval,
> -              "operation completed check interval");
> -      this.operationCompleteCheckTimeout = checkNotNull(operationCompleteCheckTimeout,
> -                                                        "operation completed check timeout");
> +      this.api = api;
> +      this.userProject = userProject;
> +      this.metatadaFromTemplateOptions = metatadaFromTemplateOptions;
> +      this.operationCompleteCheckInterval = operationCompleteCheckInterval;
> +      this.operationCompleteCheckTimeout = operationCompleteCheckTimeout;

guice takes care of it. That's one reason I've been making ctors package
private.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19768380

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by danbroudy <no...@github.com>.
One of the live test failures is addressed in #74 which I just submitted.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61557025

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
> +
> +import java.net.URI;
> +import java.util.List;
> +import java.util.Map;
> +
> +import org.jclouds.googlecomputeengine.domain.Instance.NetworkInterface.AccessConfig;
> +import org.jclouds.googlecomputeengine.domain.Instance.NetworkInterface.AccessConfig.Type;
> +import org.jclouds.googlecomputeengine.domain.Instance.ServiceAccount;
> +import org.jclouds.javax.annotation.Nullable;
> +
> +import com.google.common.collect.ImmutableList;
> +import com.google.common.collect.Lists;
> +import com.google.common.collect.Maps;
> +
> +/** Optional information for creating an instance. */
> +public class InstanceTemplate {

AutoValue doesn't work for mutable types.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19768555

Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)

Posted by Adrian Cole <no...@github.com>.
I will run live tests again in a bit. Here were the results before this change:
```java
Failed tests: 
  GoogleComputeEngineServiceLiveTest>BaseComputeServiceLiveTest.testCreateAndRunAService:706->BaseComputeServiceLiveTest.createAndRunAServiceInGroup:723 » RunNodes
  ProjectApiLiveTest.testGetProjectWhenNotExists:62 » HttpResponse command: GET ...
  SnapshotApiLiveTest.testCreateSnapshot:53->BaseGoogleComputeEngineApiLiveTest.assertZoneOperationDoneSucessfully:122 expected [DONE] but found [PENDING]
  GoogleComputeEngineServiceLiveTest>BaseComputeServiceLiveTest.testAScriptExecutionAfterBootWithBasicTemplate:223 » RunNodes
  GoogleComputeEngineServiceLiveTest>BaseComputeServiceLiveTest.testConcurrentUseOfComputeServiceToCreateNodes:475 » Execution

Tests run: 121, Failures: 5, Errors: 0, Skipped: 16
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73#issuecomment-61522734