> + > + final RoleParam roleParam = RoleParam.builder() > + .roleName(name) > + > .roleSize(RoleSize.Type.fromString(template.getHardware().getName())) > + .osVirtualHardDiskParam(osParam) > + .windowsConfigurationSet(winConfig) > + .build(); > + > + params = DeploymentParams.builder() > + .name(name).roleParam(roleParam) > + .virtualNetworkName(virtualNetworkName) > + .externalEndpoints(externalEndpoints) > + .subnetName(subnetName) > + .reservedIpName(reservedIPAddress) > + .build(); > + }
All code here is duplicated. Extract it all out of the conditionals and put only the configuration set in it. You're using builders, so there's no problem on doing that. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs/pull/175/files#r31916088