Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)
@andreaturli pushed 1 commit. 6e1cb02 fix Device domain object -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/345/files/f47db434033f1ac3a8caea5b76873fa401362858..6e1cb028264d86cb56c0b56908328db6c0848fe6
Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)
I've found that they have changed the createDevice and createSsh API that now returns domain objects rather than URI, so even easier! -- 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/345#issuecomment-274273372
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
Thanks @justinThompson great start! As you are adding `HealthCheckApi` and `SubnetApi` could you also add the `*ExpectTest`s for those APIs, along the `*LiveTest`s ? It could be interesting to know that the style of those `ExpectTest` is actually deprecated as jclouds is adopting a (simpler) pattern -- see this [example](https://github.com/jclouds/jclouds/blob/master/providers/digitalocean2/src/test/java/org/jclouds/digitalocean2/features/DropletApiMockTest.java) to get the idea. It would be great if you could write the unit tests for SubnetApi and HealthCheckApi with the new style, but `*ExpectTest` would be good as well! --- I've tested the live test with `mvn clean install -Plive` from elb module and I can see those errors ``` Starting test testList(org.jclouds.elb.features.LoadBalancerApiLiveTest) Starting test testDescribePolicies(org.jclouds.elb.features.PolicyApiLiveTest) Starting test testListInstanceStates(org.jclouds.elb.features.InstanceApiLiveTest) [TestNG] Test testList(org.jclouds.elb.features.LoadBalancerApiLiveTest) succeeded: 1139ms Test suite progress: tests succeeded: 1, failed: 0, skipped: 0. [TestNG] Test testListInstanceStates(org.jclouds.elb.features.InstanceApiLiveTest) succeeded: 1139ms Test suite progress: tests succeeded: 2, failed: 0, skipped: 0. Starting test testListWithOptions(org.jclouds.elb.features.LoadBalancerApiLiveTest) Starting test testConfigureHealthCheck(org.jclouds.elb.features.HealthCheckApiLiveTest) [TestNG] Test testDescribePolicies(org.jclouds.elb.features.PolicyApiLiveTest) failed. Test suite progress: tests succeeded: 2, failed: 1, skipped: 0. Starting test testDescribePolicyTypes(org.jclouds.elb.features.PolicyApiLiveTest) [TestNG] Test testConfigureHealthCheck(org.jclouds.elb.features.HealthCheckApiLiveTest) succeeded: 635ms Test suite progress: tests succeeded: 3, failed: 1, skipped: 0. [TestNG] Test testDescribePolicyTypes(org.jclouds.elb.features.PolicyApiLiveTest) failed. Test suite progress: tests succeeded: 3, failed: 2, skipped: 0. [TestNG] Test testListWithOptions(org.jclouds.elb.features.LoadBalancerApiLiveTest) succeeded: 2268ms Test suite progress: tests succeeded: 4, failed: 2, skipped: 0. Starting test testLoadBalanceNodesMatching(org.jclouds.elb.loadbalancer.ELBLoadBalancerServiceLiveTest) [TestNG] Test testLoadBalanceNodesMatching(org.jclouds.elb.loadbalancer.ELBLoadBalancerServiceLiveTest) failed. Test suite progress: tests succeeded: 4, failed: 3, skipped: 0. [TestNG] Test testDestroyLoadBalancers(org.jclouds.elb.loadbalancer.ELBLoadBalancerServiceLiveTest) skipped. Test suite progress: tests succeeded: 4, failed: 3, skipped: 1. Tests run: 8, Failures: 3, Errors: 0, Skipped: 1, Time elapsed: 79.132 sec <<< FAILURE! - in TestSuite testDescribePolicies(org.jclouds.elb.features.PolicyApiLiveTest) Time elapsed: 0.107 sec <<< FAILURE! java.lang.RuntimeException: request: POST https://elasticloadbalancing.us-east-1.amazonaws.com/ HTTP/1.1; response: HTTP/1.1 200 OK; cause: java.lang.RuntimeException: request: POST https://elasticloadbalancing.us-east-1.amazonaws.com/ HTTP/1.1; cause: java.lang.NullPointerException: key at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229) at org.jclouds.elb.domain.Policy$Builder.attribute(Policy.java:75) at org.jclouds.elb.xml.PolicyHandler.endElement(PolicyHandler.java:65) at org.jclouds.elb.xml.DescribeLoadBalancerPoliciesResultHandler.endElement(DescribeLoadBalancerPoliciesResultHandler.java:87) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at org.jclouds.http.functions.ParseSax.doParse(ParseSax.java:140) at org.jclouds.http.functions.ParseSax.parse(ParseSax.java:129) at org.jclouds.http.functions.ParseSax.apply(ParseSax.java:83) at org.jclouds.http.functions.ParseSax.appl
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
andreaturli commented on this pull request. > +import javax.inject.Named; +import javax.ws.rs.FormParam; +import javax.ws.rs.POST; +import javax.ws.rs.Path; + +import org.jclouds.aws.filters.FormSigner; +import org.jclouds.elb.binders.BindSubnetIdsToIndexedFormParams; +import org.jclouds.elb.xml.MemberResultHandler; +import org.jclouds.rest.annotations.BinderParam; +import org.jclouds.rest.annotations.FormParams; +import org.jclouds.rest.annotations.RequestFilters; +import org.jclouds.rest.annotations.VirtualHost; +import org.jclouds.rest.annotations.XMLResponseParser; + +/** + * Provides access to Amazon ELB via the Query API please update the javadoc > +import org.jclouds.rest.annotations.RequestFilters; +import org.jclouds.rest.annotations.VirtualHost; +import org.jclouds.rest.annotations.XMLResponseParser; + +/** + * Provides access to Amazon ELB via the Query API + * + * + * @see http://docs.amazonwebservices.com/ElasticLoadBalancing/latest/APIReference"; + * >doc + */ +@RequestFilters(FormSigner.class) +@VirtualHost +public interface SubnetApi { + + remove line > + @Path("/") + @XMLResponseParser(MemberResultHandler.class) + @FormParams(keys = ACTION, values = "AttachLoadBalancerToSubnets") + Set attachLoadBalancerToSubnets( + @FormParam("LoadBalancerName") String loadBalancerName, + @BinderParam(BindSubnetIdsToIndexedFormParams.class) Iterable subnetNames); + + @Named("DetachLoadBalancerFromSubnets") + @POST + @Path("/") + @XMLResponseParser(MemberResultHandler.class) + @FormParams(keys = ACTION, values = "DetachLoadBalancerFromSubnets") + Set detachLoadBalancerFromSubnets( + @FormParam("LoadBalancerName") String loadBalancerName, + @BinderParam(BindSubnetIdsToIndexedFormParams.class) Iterable subnetNames); + remove line > @@ -16,7 +16,7 @@ */ package org.jclouds.elb.features; -import static com.google.common.base.Preconditions.checkNotNull; +import static org.assertj.core.util.Preconditions.checkNotNull; why this import? > + @AfterClass + @Override + protected void tearDown() { + super.tearDown(); + if (api.getLoadBalancerApi().get("test") != null) { + api.getLoadBalancerApi().delete("test"); + } + } + + @Test + protected void testConfigureHealthCheck() { + final Set result = api().attachLoadBalancerToSubnets(loadBalancer.getName(), loadBalancer.getSubnets()); + } + + private void checkHealthCheck(HealthCheck healthCheck) { +// checkNotNull(healthCheck.getHealthyThreshold(), "Description cannot be null for InstanceState"); remove commented code or re-enable those lines if needed, thanks > @@ -27,7 +27,7 @@ import org.jclouds.aws.filters.FormSigner; import org.jclouds.elb.binders.BindAvailabilityZonesToIndexedFormParams; -import org.jclouds.elb.xml.AvailabilityZonesResultHandler; +import org.jclouds.elb.xml.MemberResultHandler; why have you renamed this handler? > +package org.jclouds.elb.features; + +import java.util.Set; + +import org.jclouds.elb.domain.HealthCheck; +import org.jclouds.elb.domain.Listener; +import org.jclouds.elb.domain.LoadBalancer; +import org.jclouds.elb.domain.Protocol; +import org.jclouds.elb.internal.BaseELBApiLiveTest; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import com.google.common.collect.ImmutableList; + +@Test(groups = "live", testName = "HealthCheckApiLiveTest") set `testName` to `SubnetApiLiveTest` > + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.elb.features; + +import org.jclouds.elb.internal.BaseELBApiLiveTest; +import org.testng.annotations.Test; + +@Test(groups = "live", testName = "SubnetApiLiveTest") +public class SubnetApiLiveTest extends BaseELBApiLiveTest { I think you wan to add 2 test methods for the 2 public methods of SubnetApi, as-is it doesn't look really useful. -- 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-aws/pull/70#pullrequestreview-17813810
Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)
@andreaturli pushed 1 commit. b634495 add mock and live tests for device api actions -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/345/files/6e1cb028264d86cb56c0b56908328db6c0848fe6..b6344958cae8d54fae211316800d85ae5d13ae8f
Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)
@andreaturli pushed 1 commit. 3d7946f fix checkstyle -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/345/files/b6344958cae8d54fae211316800d85ae5d13ae8f..3d7946fde99e45efbab1788daf9d0b4e629bb5b4
Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)
squashing and merging -- 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/345#issuecomment-274751245
Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)
Closed #345. -- 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/345#event-934203490
Re: [jclouds/jclouds-labs] add remaining features to support the abstraction (#345)
Merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/f749c88e) -- 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/345#issuecomment-274756356
[jclouds/jclouds-labs] add compute functions (#346)
- fix Device and PaginatedCollection You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-labs/pull/346 -- Commit Summary -- * add compute functions -- File Changes -- A packet/src/main/java/org/jclouds/packet/compute/functions/DeviceStateToStatus.java (45) A packet/src/main/java/org/jclouds/packet/compute/functions/DeviceToNodeMetadata.java (118) A packet/src/main/java/org/jclouds/packet/compute/functions/FacilityToLocation.java (55) A packet/src/main/java/org/jclouds/packet/compute/functions/OperatingSystemToImage.java (54) A packet/src/main/java/org/jclouds/packet/compute/functions/PlanToHardware.java (86) M packet/src/main/java/org/jclouds/packet/domain/Device.java (2) M packet/src/main/java/org/jclouds/packet/domain/internal/PaginatedCollection.java (10) -- Patch Links -- https://github.com/jclouds/jclouds-labs/pull/346.patch https://github.com/jclouds/jclouds-labs/pull/346.diff -- 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/346
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
thanks @justinThompson maybe I was unclear, but you don't need both expect tests and mock tests are they are supposed to tests the same things. As you wrote *MockTests, keep just them ;) -- 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-aws/pull/70#issuecomment-274948808
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
andreaturli commented on this pull request. > @@ -27,7 +27,7 @@ import org.jclouds.aws.filters.FormSigner; import org.jclouds.elb.binders.BindAvailabilityZonesToIndexedFormParams; -import org.jclouds.elb.xml.AvailabilityZonesResultHandler; +import org.jclouds.elb.xml.MemberResultHandler; nice, thanks -- 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-aws/pull/70
Re: [jclouds/jclouds-labs] add compute functions (#346)
@andreaturli pushed 1 commit. 3825f9a improve DeviceToNodeMetadata -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/346/files/d1074295696a9bac88a3a6e9bb1c7581e295ae40..3825f9aea216c127fb948e586a2291c0177af269
Re: [jclouds/jclouds-labs] Vagrant provider (#160)
YAY! congrats @neykov! Thanks @nacx for the great review! -- 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/160#issuecomment-275069296
Re: [jclouds/jclouds-labs] add compute functions (#346)
andreaturli commented on this pull request. > + +private final JustProvider justProvider; + +// allow us to lazy discover the provider of a resource +@Inject +FacilityToLocation(JustProvider justProvider) { +this.justProvider = justProvider; +} + +@Override +public Location apply(final Facility facility) { +final LocationBuilder builder = new LocationBuilder(); +builder.id(facility.code()); +builder.description(facility.name()); +builder.parent(getOnlyElement(justProvider.get())); +builder.scope(LocationScope.REGION); it'd be a bit tricky as the API returns https://github.com/jclouds/jclouds-labs/blob/master/packet/src/test/resources/facilities.json and it is not straightforward to get the correct ISO-3166 from the `name` and/or `code` I think -- 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/346
Re: [jclouds/jclouds-labs] add compute functions (#346)
andreaturli commented on this pull request. > + +private final JustProvider justProvider; + +// allow us to lazy discover the provider of a resource +@Inject +FacilityToLocation(JustProvider justProvider) { +this.justProvider = justProvider; +} + +@Override +public Location apply(final Facility facility) { +final LocationBuilder builder = new LocationBuilder(); +builder.id(facility.code()); +builder.description(facility.name()); +builder.parent(getOnlyElement(justProvider.get())); +builder.scope(LocationScope.REGION); I think the docs is not in sync: there is no `state` in the live json object :( -- 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/346
Re: [jclouds/jclouds-labs] add compute functions (#346)
@andreaturli pushed 1 commit. fefb62e address @nacx comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/346/files/d186e2f5d3282cfb59aca10bd78aa9a8fa5795d6..fefb62e837e009843945763635a8c668b7ff3cb7
Re: [jclouds/jclouds-labs] add compute functions (#346)
squashing and merging -- 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/346#issuecomment-275130509
Re: [jclouds/jclouds-labs] add compute functions (#346)
merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/a91ff3bd) -- 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/346#issuecomment-275139640
Re: [jclouds/jclouds-labs] add compute functions (#346)
Closed #346. -- 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/346#event-936315783
Re: [jclouds/jclouds-labs] JCLOUDS-1231: Implement the SecurityGroupExtension in ARM (#347)
andreaturli commented on this pull request. lgtm, some minor comments > @@ -114,7 +103,7 @@ public static Properties defaultProperties() { properties.put(API_VERSION_PREFIX + PublicIPAddressApi.class.getSimpleName(), "2015-06-15"); properties.put(API_VERSION_PREFIX + ResourceGroupApi.class.getSimpleName(), "2015-01-01"); properties.put(API_VERSION_PREFIX + ResourceProviderApi.class.getSimpleName(), "2015-01-01"); - properties.put(API_VERSION_PREFIX + StorageAccountApi.class.getSimpleName(), STORAGE_API_VERSION); + properties.put(API_VERSION_PREFIX + StorageAccountApi.class.getSimpleName(), "2015-06-15"); we should decide at some point if we want to use the latest version of all of them or just use them randomly :D > } - public void deleteResourceGroupIfEmpty(String group) { - if (api.getVirtualMachineApi(group).list().isEmpty() -&& api.getStorageAccountApi(group).list().isEmpty() + public boolean deleteResourceGroupIfEmpty(String group) { + boolean deleted = false; + if (api.getVirtualMachineApi(group).list().isEmpty() && api.getStorageAccountApi(group).list().isEmpty() those api calls are really expensive, I'll try to replace them in a subsequent PR >RegionAndId regionAndId = RegionAndId.fromSlashEncoded(id); - String group = locationToResourceGroupName.apply(regionAndId.region()); - + ResourceGroup resourceGroup = resourceGroupMap.getUnchecked(regionAndId.region()); + String group = resourceGroup.name(); [minor] could you name it `resourceGroupName` >final RegionAndId regionAndId = > RegionAndId.fromSlashEncoded(cloneTemplate.getSourceNodeId()); - final String group = locationToResourceGroupName.apply(regionAndId.region()); + ResourceGroup resourceGroup = resourceGroupMap.getUnchecked(regionAndId.region()); + final String group = resourceGroup.name(); [minor] maybe `resourceGroupName`? > + AzureComputeSecurityGroupExtension(AzureComputeApi api, @Memoized > Supplier> locations, + Function groupConverter, + SecurityGroupAvailablePredicateFactory securityRuleAvailable, + @Named(TIMEOUT_RESOURCE_DELETED) Predicate resourceDeleted, + LoadingCache resourceGroupMap) { + this.api = api; + this.locations = locations; + this.securityGroupConverter = groupConverter; + this.securityGroupAvailable = securityRuleAvailable; + this.resourceDeleted = resourceDeleted; + this.resourceGroupMap = resourceGroupMap; + } + + @Override + public Set listSecurityGroups() { + return ImmutableSet.copyOf(concat(transform(locations.get(), new Function>() { why immutableSet? > + VirtualMachine vm = > api.getVirtualMachineApi(resourceGroup.name()).get(regionAndId.id()); + List networkInterfacesIdReferences = vm.properties().networkProfile().networkInterfaces(); + List networkGroups = new ArrayList(); + + for (IdReference networkInterfaceCardIdReference : networkInterfacesIdReferences) { + String nicName = Iterables.getLast(Splitter.on("/").split(networkInterfaceCardIdReference.id())); + NetworkInterfaceCard card = api.getNetworkInterfaceCardApi(resourceGroup.name()).get(nicName); + if (card != null && card.properties().networkSecurityGroup() != null) { +String secGroupName = Iterables.getLast(Splitter.on("/").split( + card.properties().networkSecurityGroup().id())); +NetworkSecurityGroup group = api.getNetworkSecurityGroupApi(resourceGroup.name()).get(secGroupName); +networkGroups.add(group); + } + } + + return ImmutableSet.copyOf(transform(filter(networkGroups, notNull()), securityGroupConverter)); why immutableSet? > + final RegionAndId regionAndId = > RegionAndId.fromSlashEncoded(group.getId()); + ResourceGroup resourceGroup = resourceGroupMap.getUnchecked(regionAndId.region()); + + NetworkSecurityGroupApi groupApi = api.getNetworkSecurityGroupApi(resourceGroup.name()); + NetworkSecurityGroup networkSecurityGroup = groupApi.get(regionAndId.id()); + + if (networkSecurityGroup == null) { + throw new IllegalArgumentException("Security group " + group.getName() + " was not found"); + } + + NetworkSecurityRuleApi ruleApi = api.getNetworkSecurityRuleApi(resourceGroup.name(), networkSecurityGroup.name()); + int nextPriority = getRuleStartingPriority(networkSecurityGroup); + + for (String ipRange : ipRanges) { + NetworkSecurityRuleProperties properties = NetworkSecurityRuleProperties.builder() + .protocol(Protocol.fromValue(protocol.name())) // please remove `//` -- 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/347#pullrequestreview-18640274
Re: [jclouds/jclouds-labs] JCLODUS-1229: Enable the rate limit module by default (#348)
lgtm! -- 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/348#issuecomment-275435492
Re: [jclouds/jclouds-labs] JCLOUDS-1231: Implement the SecurityGroupExtension in ARM (#347)
+1 @nacx, please merge it! -- 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/347#issuecomment-275449554
[jclouds/jclouds-labs] [azurecompute-arm] performance improvements misc (#351)
- improve cleanup performances: by using resourceGroupApi.resources - improve list images performance: by avoiding to get image details /cc @nacx You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-labs/pull/351 -- Commit Summary -- * [azurecompute-arm] performance improvements misc -- File Changes -- M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/AzureComputeServiceAdapter.java (33) M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/compute/strategy/CleanupResources.java (17) A azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Identity.java (34) A azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/domain/Resource.java (59) M azurecompute-arm/src/main/java/org/jclouds/azurecompute/arm/features/ResourceGroupApi.java (14) M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceGroupApiLiveTest.java (11) M azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/ResourceGroupApiMockTest.java (37) A azurecompute-arm/src/test/resources/resourcegroup-resources.json (46) -- Patch Links -- https://github.com/jclouds/jclouds-labs/pull/351.patch https://github.com/jclouds/jclouds-labs/pull/351.diff -- 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/351
Re: [jclouds/jclouds-labs] [azurecompute-arm] performance improvements misc (#351)
andreaturli commented on this pull request. > @@ -76,12 +78,20 @@ @Nullable ResourceGroup get(@PathParam("name") String name); + @Named("resourcegroup:resources") + @GET + @Path("/{name}/resources") + @SelectJson("value") + @Fallback(EmptyListOnNotFoundOr404.class) + @Nullable right! -- 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/351
Re: [jclouds/jclouds-labs] [azurecompute-arm] performance improvements misc (#351)
andreaturli commented on this pull request. > + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.azurecompute.arm.domain; + +import org.jclouds.json.SerializedNames; + +import com.google.auto.value.AutoValue; + +@AutoValue +public abstract class Identity { not really, I will make it an inner class -- 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/351
Re: [jclouds/jclouds-labs] [azurecompute-arm] performance improvements misc (#351)
I think it makes sense, I will revert that second commit -- 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/351#issuecomment-275663815
Re: [jclouds/jclouds-labs] [azurecompute-arm] performance improvements misc (#351)
rebuild 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-labs/pull/351#issuecomment-275674731
Re: [jclouds/jclouds-labs] [azurecompute-arm] performance improvements misc (#351)
@nacx is it ok? -- 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/351#issuecomment-275683932
Re: [jclouds/jclouds-labs] [azurecompute-arm] performance improvements misc (#351)
andreaturli commented on this pull request. > - family = > OsFamily.fromValue(image.versionProperties().osDiskImage().operatingSystem().toUpperCase()); +if (OsFamily.UNRECOGNIZED == family) { +// && +//} image.versionProperties() != null +// && image.versionProperties().osDiskImage() != null +// && image.versionProperties().osDiskImage().operatingSystem() != null) { + + + + +// Version versionDetails = osImageApi.getVersion(publisherName, offer.name(), sku.name(), version.name()); +// VMImage vmImage = VMImage.azureImage().publisher(publisherName).offer(offer.name()).sku(sku.name()) +// .version(versionDetails.name()).location(location).versionProperties(versionDetails.properties()) +//.build(); + +// family = OsFamily.fromValue(image.versionProperties().osDiskImage().operatingSystem().toUpperCase()); } // only 64bit OS images are supported by Azure ARM ops -- 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/351
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
@justinThompson are all the liveTests passing now? -- 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-aws/pull/70#issuecomment-275695173
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
do you want that to be available on 2.0.x branch as well? -- 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-aws/pull/70#issuecomment-275729163
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
thanks @justinThompson, merging! -- 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-aws/pull/70#issuecomment-275728804
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
Closed #70. -- 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-aws/pull/70#event-939662456
Re: [jclouds/jclouds-labs-aws] Health check and Subnet API (#70)
merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs-aws/commit/e248c37d) and back-ported to [2.0.x](http://git-wip-us.apache.org/repos/asf/jclouds-labs-aws/commit/42b13e12) Very good, @justinThompson ! -- 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-aws/pull/70#issuecomment-275730036
[jclouds/jclouds-labs] Feature/packet 5 (#354)
/cc @nacx unit and live tests are ok ``` --- T E S T S --- Running TestSuite Configuring TestNG with: TestNG652Configurator Starting test testOfApiContains(org.jclouds.packet.compute.PacketComputeProviderMetadataTest) Starting test testWithId(org.jclouds.packet.compute.PacketComputeProviderMetadataTest) Starting test testTransformableToContains(org.jclouds.packet.compute.PacketComputeProviderMetadataTest) Starting test testAllContains(org.jclouds.packet.compute.PacketComputeProviderMetadataTest) [pool-1-thread-1] Test testAllContains(org.jclouds.packet.compute.PacketComputeProviderMetadataTest) succeeded: 9ms Test suite progress: tests succeeded: 1, failed: 0, skipped: 0. [pool-1-thread-4] Test testWithId(org.jclouds.packet.compute.PacketComputeProviderMetadataTest) succeeded: 13ms Test suite progress: tests succeeded: 2, failed: 0, skipped: 0. [pool-1-thread-2] Test testOfApiContains(org.jclouds.packet.compute.PacketComputeProviderMetadataTest) succeeded: 13ms Test suite progress: tests succeeded: 3, failed: 0, skipped: 0. [pool-1-thread-3] Test testTransformableToContains(org.jclouds.packet.compute.PacketComputeProviderMetadataTest) succeeded: 13ms Test suite progress: tests succeeded: 4, failed: 0, skipped: 0. Jan 29, 2017 4:30:32 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 execute INFO: MockWebServer[52568] starting to accept connections Starting test testActionPowerOff(org.jclouds.packet.features.DeviceApiMockTest) Jan 29, 2017 4:30:32 PM com.squareup.okhttp.mockwebserver.MockWebServer$3 processOneRequest INFO: MockWebServer[52568] received request: POST /devices/deviceId/actions HTTP/1.1 and responded: HTTP/1.1 200 OK [pool-2-thread-1] Test testActionPowerOff(org.jclouds.packet.features.DeviceApiMockTest) succeeded: 78ms Test suite progress: tests succeeded: 5, failed: 0, skipped: 0. Jan 29, 2017 4:30:32 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 acceptConnections INFO: MockWebServer[52568] done accepting connections: Socket closed Jan 29, 2017 4:30:32 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 execute INFO: MockWebServer[52570] starting to accept connections Starting test testActionPowerOn(org.jclouds.packet.features.DeviceApiMockTest) [pool-2-thread-1] Test testActionPowerOn(org.jclouds.packet.features.DeviceApiMockTest) succeeded: 5ms Test suite progress: tests succeeded: 6, failed: 0, skipped: 0. Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$3 processOneRequest INFO: MockWebServer[52570] received request: POST /devices/deviceId/actions HTTP/1.1 and responded: HTTP/1.1 200 OK Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 acceptConnections INFO: MockWebServer[52570] done accepting connections: Socket closed Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 execute INFO: MockWebServer[52572] starting to accept connections Starting test testActionReboot(org.jclouds.packet.features.DeviceApiMockTest) [pool-2-thread-1] Test testActionReboot(org.jclouds.packet.features.DeviceApiMockTest) succeeded: 6ms Test suite progress: tests succeeded: 7, failed: 0, skipped: 0. Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$3 processOneRequest INFO: MockWebServer[52572] received request: POST /devices/deviceId/actions HTTP/1.1 and responded: HTTP/1.1 200 OK Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 acceptConnections INFO: MockWebServer[52572] done accepting connections: Socket closed Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 execute INFO: MockWebServer[52574] starting to accept connections Starting test testCreateDevice(org.jclouds.packet.features.DeviceApiMockTest) Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$3 processOneRequest INFO: MockWebServer[52574] received request: POST /projects/93907f48-adfe-43ed-ad89-0e6e83721a54/devices HTTP/1.1 and responded: HTTP/1.1 200 OK [pool-2-thread-1] Test testCreateDevice(org.jclouds.packet.features.DeviceApiMockTest) succeeded: 66ms Test suite progress: tests succeeded: 8, failed: 0, skipped: 0. Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 acceptConnections INFO: MockWebServer[52574] done accepting connections: Socket closed Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$2 execute INFO: MockWebServer[52576] starting to accept connections Starting test testDeleteDevice(org.jclouds.packet.features.DeviceApiMockTest) Jan 29, 2017 4:30:33 PM com.squareup.okhttp.mockwebserver.MockWebServer$3 processOneRequest INFO: MockWebServer[52576] received request: DELETE /devices/1 HTTP/1.1 and responded: HTTP/1.1 204 No Content [pool-2-thread-1] Test testDeleteDevice(org.jclouds.packet.features.DeviceApiMockTest) succeeded: 13ms Test suite progress: tests succeeded: 9, failed:
Re: [jclouds/jclouds-karaf] [DO NOT MERGE] Improvements/feature (#92)
andreaturli commented on this pull request. > @@ -52,38 +52,56 @@ limitations under the License. mvn:org.apache.jclouds.api/atmos/${jclouds.version} not sure I follow your suggestion, is this for line 52? -- 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-karaf/pull/92
Re: [jclouds/jclouds-karaf] [DO NOT MERGE] Improvements/feature (#92)
andreaturli commented on this pull request. > @@ -110,7 +110,6 @@ limitations under the License. jclouds-compute jclouds-api-atmos jclouds-api-byon -jclouds-api-cloudsigma2 I will try to add `super-features`, currently I'm struggling with docker and bouncycastle deps. cannot write a good feature for `jclouds-docker` yet -- 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-karaf/pull/92
Re: [jclouds/jclouds-karaf] [DO NOT MERGE] Improvements/feature (#92)
@andreaturli pushed 3 commits. 8477274 add feature-labs.xml file 609e664 wip 0a37d2e wip -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/44bec200d1c6241c3b042217df78e09529ef61a2..0a37d2e7740cf242a61fe19193755f39d8df9123
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
andreaturli commented on this pull request. > + } + } + + @Override + public void testOptionToNotBlock() throws Exception { + // Packet ComputeService implementation has to block until the node + // is provisioned, to be able to return it. + } + + @Override + protected void checkUserMetadataContains(NodeMetadata node, ImmutableMap userMetadata) { + // The Packet API does not return the user data + } + + @Override + public void testAScriptExecutionAfterBootWithBasicTemplate() throws Exception { I've seen an inconsistency across images, in particular "hostname" command on `centOS 7` returns the short name while on `Ubuntu 16` it returns the fqdn. Using "hostname -s" seems to be safer. Not sure it is a problem of this provider or something useful for at jcloud core level -- 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/354
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
@andreaturli pushed 1 commit. 50ff3c8 address review comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/354/files/0de7a600118cd3b9970a98efd6c62658f85e6970..50ff3c871b43ced16f848fc0dacc9cf8a64ab06c
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
andreaturli commented on this pull request. > + } + } + + @Override + public void testOptionToNotBlock() throws Exception { + // Packet ComputeService implementation has to block until the node + // is provisioned, to be able to return it. + } + + @Override + protected void checkUserMetadataContains(NodeMetadata node, ImmutableMap userMetadata) { + // The Packet API does not return the user data + } + + @Override + public void testAScriptExecutionAfterBootWithBasicTemplate() throws Exception { I will open a PR for that against jclouds/jclouds, and I will remove the overridden test after it get accepted. is it ok? -- 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/354
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
latest push has still, unit and live tests fine ``` Results : Tests run: 53, Failures: 0, Errors: 0, Skipped: 0 ``` thanks @nacx for the suggestion about not passing creds and for removing waitOn device, easier impl -- 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/354#issuecomment-276169177
[jclouds/jclouds] change hostname command to get the short form (#1056)
You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds/pull/1056 -- Commit Summary -- * change hostname command to get the short form -- File Changes -- M compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java (12) -- Patch Links -- https://github.com/jclouds/jclouds/pull/1056.patch https://github.com/jclouds/jclouds/pull/1056.diff -- 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/pull/1056
Re: [jclouds/jclouds] change hostname command to get the short form (#1056)
merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/4c2151a3) and [2.0.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/10a585e5) -- 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/pull/1056#issuecomment-276313909
Re: [jclouds/jclouds] change hostname command to get the short form (#1056)
thanks @nacx -- 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/pull/1056#issuecomment-276313955
Re: [jclouds/jclouds] change hostname command to get the short form (#1056)
Closed #1056. -- 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/pull/1056#event-942719844
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
good question, @nacx! >From what I got, Packet has 2 types of SSH keys: Project and Personal Keys. Any new servers you deploy to projects you are a collaborator on will have your project and personal SSH keys, if defined. Now if no SSH keys are defined in your account, jclouds will [generate on].(https://github.com/andreaturli/jclouds-labs/blob/bd358d7a11a3deca349e9def13eac20d3acf5f61/packet/src/main/java/org/jclouds/packet/compute/strategy/CreateSshKeysThenCreateNodes.java#L99-L99) and it will add it to the device by default. That works fine, probably `listNodes` doesn't work correctly as creds are not configured in [DeviceToNodemetadata](https://github.com/andreaturli/jclouds-labs/blob/0de7a600118cd3b9970a98efd6c62658f85e6970/packet/src/main/java/org/jclouds/packet/compute/functions/DeviceToNodeMetadata.java) function: the `Device` object references all the ssh key allowed to access the device, so in principle we can add as `credentials` one of them. Problem is that jclouds is deleting that key in the callback configured at [CreateSshKeysThenCreateNodes](https://github.com/andreaturli/jclouds-labs/blob/bd358d7a11a3deca349e9def13eac20d3acf5f61/packet/src/main/java/org/jclouds/packet/compute/strategy/CreateSshKeysThenCreateNodes.java#L197-L197) What do you think @nacx ? -- 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/354#issuecomment-276321217
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
@andreaturli pushed 1 commit. 1af6d96 remove overriden live test as it is now pushed up to jclouds/jclouds -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/354/files/bd358d7a11a3deca349e9def13eac20d3acf5f61..1af6d96ce4f41dffe1a66fee06795ae176c9b2f4
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
@andreaturli pushed 1 commit. 8b94bee remove useless test -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/354/files/d55fffe18221be7a559e513becc07ad0637d2f7b..8b94bee913ee5f14a8417b433a9c85ac9205afcc
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
andreaturli commented on this pull request. > @@ -59,6 +48,14 @@ protected Module getSshModule() { return new SshjSshClientModule(); } + public void testMyListNodes() throws Exception { + for (ComputeMetadata node : client.listNodes()) { + assert node.getProviderId() != null : node; + assert node.getLocation() != null : node; + assertEquals(node.getType(), ComputeType.NODE); + } + } sorry, removing it -- 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/354
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
@andreaturli pushed 1 commit. d55fffe improve comments on the adapter -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-labs/pull/354/files/1af6d96ce4f41dffe1a66fee06795ae176c9b2f4..d55fffe18221be7a559e513becc07ad0637d2f7b
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
added the comment to adapter? good to merge? -- 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/354#issuecomment-276357302
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
squashing and merging -- 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/354#issuecomment-276384651
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
Closed #354. -- 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/354#event-943174558
Re: [jclouds/jclouds-labs] Feature/packet 5 (#354)
merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/99697600) -- 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/354#issuecomment-276385182
Re: [jclouds/jclouds-site] Added Packet and Vagrant (#194)
+1 -- 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-site/pull/194#issuecomment-276503644
Re: [jclouds/jclouds-labs] Add Load Balancer APIs (#356)
andreaturli commented on this pull request. it's a pretty big PR! I've looked at the implementation and it looks sensible Few minor comments. Can you please share the mock and live tests results? > + private final AzureComputeApi api; + private final LoadingCache resourceGroupMap; + + @Inject + TemplateToAvailabilitySet(AzureComputeApi api, LoadingCache resourceGroupMap) { + this.api = api; + this.resourceGroupMap = resourceGroupMap; + } + + @Nullable + @Override + public AvailabilitySet apply(final Template input) { + checkArgument(input.getOptions() instanceof AzureTemplateOptions, "An AzureTemplateOptions object is required"); + AzureTemplateOptions options = input.getOptions().as(AzureTemplateOptions.class); + + AvailabilitySet as = null; [minor] can yo rename it `availabilitySet`? > +import com.google.common.base.Function; +import com.google.common.cache.LoadingCache; + +@Singleton +public class TemplateToAvailabilitySet implements Function { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + protected Logger logger = Logger.NULL; + + private final AzureComputeApi api; + private final LoadingCache resourceGroupMap; + + @Inject + TemplateToAvailabilitySet(AzureComputeApi api, LoadingCache resourceGroupMap) { + this.api = api; I'd prefer not to inject `api` in functions as I've seen very funny problems as the developer can forget that the function is actually using api calls. I've seen it is only use for validation, maybe it can happen outside the function? > @@ -217,6 +223,14 @@ private void configureSecurityGroupForOptions(String > group, String resourceGroup options.securityGroups(securityGroupId); } } + + private void configureAvailabilitySetForTemplate(Template template) { + AvailabilitySet as = templateToAvailabilitySet.apply(template); [minor] better name? :) -- 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/356#pullrequestreview-19823053
Re: [jclouds/jclouds-labs] Add Load Balancer APIs (#356)
andreaturli commented on this pull request. > } - protected URI deleteResourceGroup(String resourceGroupName) { - return api.getResourceGroupApi().delete(resourceGroupName); + protected void deleteResourceGroup(final String resourceGroupName) { + URI uri = api.getResourceGroupApi().delete(resourceGroupName); +1 -- 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/356#pullrequestreview-19826599
Re: [jclouds/jclouds-labs] Add Load Balancer APIs (#356)
andreaturli commented on this pull request. > +import com.google.common.base.Function; +import com.google.common.cache.LoadingCache; + +@Singleton +public class TemplateToAvailabilitySet implements Function { + + @Resource + @Named(ComputeServiceConstants.COMPUTE_LOGGER) + protected Logger logger = Logger.NULL; + + private final AzureComputeApi api; + private final LoadingCache resourceGroupMap; + + @Inject + TemplateToAvailabilitySet(AzureComputeApi api, LoadingCache resourceGroupMap) { + this.api = api; I've seen in other jclouds providers some problems in re-using those kind of functions that can become harmful as you may not realize that you are calling listSecurityGroups API for every single firewall rule, but it is obviously not a problem of the function interface per se, but of its usage. -- 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/356
Re: [jclouds/jclouds-labs] Add Load Balancer APIs (#356)
excellent @nacx lgtm Thanks! -- 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/356#issuecomment-277215550
[jclouds/jclouds] [JCLOUDS-1233] bump jax-rs version (#1057)
/cc @nacx and @neykov You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds/pull/1057 -- Commit Summary -- * [JCLOUDS-1233] bump jax-rs version -- File Changes -- M core/pom.xml (4) -- Patch Links -- https://github.com/jclouds/jclouds/pull/1057.patch https://github.com/jclouds/jclouds/pull/1057.diff -- 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/pull/1057
Re: [jclouds/jclouds] [JCLOUDS-1233] bump jax-rs version (#1057)
agreed changed to `2.1.0`, also testing jclouds-labs-* with the new jclouds/jclouds -- 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/pull/1057#issuecomment-277255917
Re: [jclouds/jclouds] [JCLOUDS-1233] bump jax-rs version (#1057)
tested successfully `mvn clean install` with jclouds-labs, jclouds-labs-aws, jclouds-labs-google jclouds-labs-openstack seems to have building problems independent of that PR -- 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/pull/1057#issuecomment-277354924
Re: [jclouds/jclouds] [JCLOUDS-1233] bump jax-rs version (#1057)
thanks @zack-shoylev my fork was not in sync, sorry about that -- 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/pull/1057#issuecomment-277435074
[jclouds/jclouds] update import packages for netty (#1058)
You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds/pull/1058 -- Commit Summary -- * update import packages for netty -- File Changes -- M drivers/netty/pom.xml (2) -- Patch Links -- https://github.com/jclouds/jclouds/pull/1058.patch https://github.com/jclouds/jclouds/pull/1058.diff -- 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/pull/1058
Re: [jclouds/jclouds-karaf] [DO NOT MERGE] Improvements/feature (#92)
@andreaturli pushed 4 commits. 0d5f154 add drivers features 74294c9 add allcompute and allblobstore feature a22532c add FeatureLabsInstallationTest - wip 0303bad fix FeatureLabsInstallationTest -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/94d2d53220bffe13bc00789c672418c4f965a0ea..0303badf39d88b82292ab27b9876b9d7c4c138ee
Re: [jclouds/jclouds-karaf] [DO NOT MERGE] Improvements/feature (#92)
@andreaturli pushed 1 commit. eaee0b4 add providers -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/0303badf39d88b82292ab27b9876b9d7c4c138ee..eaee0b4a3575f7761bd39d79b93927fdd7426334
Re: [jclouds/jclouds-karaf] [DO NOT MERGE] Improvements/feature (#92)
@andreaturli pushed 1 commit. 21b7fc7 bump karaf version in itests -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/eaee0b4a3575f7761bd39d79b93927fdd7426334..21b7fc7e0444d914cce02907b75a2b01c7bd86ac
Re: [jclouds/jclouds] update import packages for netty (#1058)
I'm creating a `feature`for netty driver in jclouds-karaf (`mvn:io.netty/netty/3.5.9.Final`) and it doesn't seem to export `org.jboss.netty*` - changing the import solves the problem -- 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/pull/1058#issuecomment-277640174
Re: [jclouds/jclouds] update import packages for netty (#1058)
Closed #1058. -- 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/pull/1058#event-950184068
Re: [jclouds/jclouds] update import packages for netty (#1058)
I've re-tested with the current version and it seems to work. Closing the PR, though. Sorry for the noise, @nacx especially OSGi is interesting ... -- 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/pull/1058#issuecomment-277663067
Re: [jclouds/jclouds-karaf] [DO NOT MERGE] Improvements/feature (#92)
@andreaturli pushed 1 commit. 3896a3f fix karaf-maven-plugin -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/425dd892d3efc7f67a7d7b30e43c8b0fae519adf..3896a3fac4e477d55636ad7a4998b9897c8c2b2b
Re: [jclouds/jclouds] update import packages for netty (#1058)
Reopened #1058. -- 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/pull/1058#event-950310375
Re: [jclouds/jclouds-karaf] [DO NOT MERGE] Improvements/feature (#92)
andreaturli commented on this pull request. > @@ -52,38 +52,56 @@ limitations under the License. mvn:org.apache.jclouds.api/atmos/${jclouds.version} @neykov you mean I can remove `resolver='(obr)'` for all the features? -- 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-karaf/pull/92
Re: [jclouds/jclouds] update import packages for netty (#1058)
merged at [master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/4ae2d208) and [2.0.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/663123a9) thanks @nacx for reviewing it! -- 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/pull/1058#issuecomment-277729788
Re: [jclouds/jclouds] update import packages for netty (#1058)
Closed #1058. -- 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/pull/1058#event-950558068
Re: [jclouds/jclouds-karaf] Improvements to feature (#92)
andreaturli commented on this pull request. > jclouds-compute -mvn:org.apache.jclouds.api/oauth/${jclouds.version} -mvn:org.apache.jclouds.common/googlecloud/${jclouds.version} - mvn:org.apache.jclouds.provider/google-compute-engine/${jclouds.version} +jclouds-driver-bouncycastle + +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/1.1.3_2 +mvn:com.jcraft/jsch.agentproxy.core/0.0.9 +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch-agentproxy-sshj/0.0.9_1 + + +mvn:net.i2p.crypto/eddsa/0.1.0 + +file:///Users/andrea/git/andreaturli/sshj/build/libs/sshj-0.19.2-dev.24+edfb069.jar waiting for the new sshj release 0.9.2 -- 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-karaf/pull/92#pullrequestreview-20308457
Re: [jclouds/jclouds-karaf] [DO NOT MERGE YET] Improvements to feature (#92)
@andreaturli pushed 1 commit. 2da7683 re-add jclouds-guice used by jclouds-cli -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/3896a3fac4e477d55636ad7a4998b9897c8c2b2b..2da76832a22dfc51bc84cd3f2f4024f8aafe2992
[jclouds/jclouds-karaf] fix netty dependency (#96)
/cc @nacx You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds-karaf/pull/96 -- Commit Summary -- * fix netty dependency -- File Changes -- M pom.xml (2) -- Patch Links -- https://github.com/jclouds/jclouds-karaf/pull/96.patch https://github.com/jclouds/jclouds-karaf/pull/96.diff -- 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-karaf/pull/96
Re: [jclouds/jclouds-karaf] fix netty dependency (#96)
Reopened #96. -- 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-karaf/pull/96#event-950755630
Re: [jclouds/jclouds-karaf] fix netty dependency (#96)
rebuild 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-karaf/pull/96#issuecomment-277762744
Re: [jclouds/jclouds-karaf] fix netty dependency (#96)
Closed #96. -- 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-karaf/pull/96#event-950755593
Re: [jclouds/jclouds-karaf] fix netty dependency (#96)
@nacx I think the build is fix now -- 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-karaf/pull/96#issuecomment-22437
Re: [jclouds/jclouds] Fix O(n^2) response time for "list-security-groups" on openstack-nova. (#1059)
andreaturli commented on this pull request. Thanks @geomacy very useful! I've only some minor comments now but I've not run testa yet. I'll do ASAP and add my further comments. > @@ -135,8 +136,9 @@ public NovaSecurityGroupExtension(NovaApi api, } Set groupNames = instance.getSecurityGroupNames(); - Set rawGroups = - sgApi.get().list().filter(nameIn(groupNames)).transform(groupToGroupInRegion(region)).toSet(); + final FluentIterable allGroups = sgApi.get().list(); + Set rawGroups = + allGroups.filter(nameIn(groupNames)).transform(groupToGroupInRegion(allGroups, region)).toSet(); [minor] do you need allGroups variable or the fluentIterable can transform and filter and finally transform again? > @@ -153,7 +155,8 @@ public SecurityGroup getSecurityGroupById(String id) { return null; } - SecurityGroupInRegion rawGroup = new SecurityGroupInRegion(sgApi.get().get(groupId), region); + final FluentIterable allGroups = sgApi.get().list(); Remember jclouds uses 3-spaces indentation > - return builder.build(); - } + See https://issues.apache.org/jira/browse/JCLOUDS-1234. Great commenti! > @@ -29,4 +39,18 @@ public NovaSecurityGroupExtensionLiveTest() { provider = "openstack-nova"; } +@Test(groups = { "integration", "live" }, singleThreaded = true) +public void testListSecurityGroups() throws RunNodesException, InterruptedException, ExecutionException { +skipIfSecurityGroupsNotSupported(); + +ComputeService computeService = view.getComputeService(); +Optional securityGroupExtension = computeService.getSecurityGroupExtension(); +assertTrue(securityGroupExtension.isPresent(), "security extension was not present"); + +Set groups = securityGroupExtension.get().listSecurityGroups(); +System.out.println(groups.size()); +for (SecurityGroup group : groups) { +System.out.println(group); Use assertions instead of sout, 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/pull/1059#pullrequestreview-20351826
Re: [jclouds/jclouds] Fix O(n^2) response time for "list-security-groups" on openstack-nova. (#1059)
Exemplar PR description and jira tracking, btw -- impressive work @geomacy -- 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/pull/1059#issuecomment-277795103
Re: [jclouds/jclouds-labs] Cleanup orphaned availability sets (#358)
andreaturli approved this pull request. -- 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/358#pullrequestreview-20360165
Re: [jclouds/jclouds-karaf] fix netty dependency (#96)
merged at [master](https://git1-us-west.apache.org/repos/asf?p=jclouds-karaf.git;a=commit;h=34e42d6e) and [2.0.x](http://git-wip-us.apache.org/repos/asf/jclouds-karaf/commit/e5f42e6d) -- 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-karaf/pull/96#issuecomment-277811379
Re: [jclouds/jclouds-karaf] fix netty dependency (#96)
Closed #96. -- 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-karaf/pull/96#event-951023357
Re: [jclouds/jclouds-karaf] [DO NOT MERGE YET] Improvements to feature (#92)
andreaturli commented on this pull request. > + private static final String FEATURES_XML = "features.xml"; + + @Inject + FeaturesService featuresService; + + static File getFeaturesFile() throws URISyntaxException { + String featuresXml = System.getProperty(FEATURES_XML); + Assert.assertNotNull(featuresXml); + File featuresFile = new File(featuresXml); + Assert.assertNotNull(featuresFile.exists()); + return featuresFile; + } + + @Test + public void testJcloudsFeature() throws Exception { + featuresService.addRepository(getFeaturesFile().toURI()); I think it's a good idea -- 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-karaf/pull/92
Re: [jclouds/jclouds-karaf] [DO NOT MERGE YET] Improvements to feature (#92)
andreaturli commented on this pull request. > + dependency='true'>mvn:org.apache.jclouds.common/googlecloud/${jclouds.version} + mvn:org.apache.jclouds.labs/google-cloud-storage/${jclouds.version} + + + +jclouds-compute +mvn:org.apache.jclouds.labs/packet/${jclouds.version} + + + +jclouds-compute +mvn:name.neykov/vagrant-java-bindings/${vagrant-java-bindings.version} +mvn:org.apache.jclouds.labs/vagrant/${jclouds.version} + + + actually, I don't know how to split `feature.xml` into 2 files `{feature,feature-labs}.xml`, do I need to create another maven module called `feature-labs` maybe? -- 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-karaf/pull/92
Re: [jclouds/jclouds-karaf] [DO NOT MERGE YET] Improvements to feature (#92)
@andreaturli pushed 1 commit. cce3847 use setUp() -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/2da76832a22dfc51bc84cd3f2f4024f8aafe2992..cce384781721d6b62a669afb6e542d9a671f69d7
Re: [jclouds/jclouds-karaf] [DO NOT MERGE YET] Improvements to feature (#92)
@andreaturli pushed 1 commit. b729de9 marked ServiceTest as Ignore -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/cce384781721d6b62a669afb6e542d9a671f69d7..b729de9b8955d16a71c59f8ca04c83441b2ce99d
Re: [jclouds/jclouds] Fix O(n^2) response time for "list-security-groups" on openstack-nova. (#1059)
Fair points @geomacy I'm in favor of keeping the implementation as-is which already optimize a lot! if further optimizations will be required we could always revisit it again using @nacx suggestions as starting point. Wdyt? -- 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/pull/1059#issuecomment-278684828
Re: [jclouds/jclouds-labs] Checks existence of node before getting SecurityGroups and Images (#360)
andreaturli commented on this pull request. > @@ -123,6 +123,9 @@ ResourceGroup resourceGroup = resourceGroupMap.getUnchecked(regionAndId.region()); VirtualMachine vm = api.getVirtualMachineApi(resourceGroup.name()).get(regionAndId.id()); Can you use checkNotNull, maybe? > @@ -68,6 +68,9 @@ public Image apply(ResourceDefinition input) { ResourceGroup resourceGroup = resourceGroupMap.getUnchecked(regionAndId.region()); VirtualMachine vm = api.getVirtualMachineApi(resourceGroup.name()).get(regionAndId.id()); + if (vm == null) { Same as above -- 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/360#pullrequestreview-21102418
[jclouds/jclouds] bump sshj version to 0.20.0 (#1060)
- this version contains some new features and bug fixes especially useful for OSGi (see https://github.com/hierynomus/sshj/issues/300 for more details), in fact I've tested `jclouds-karaf` with this version and it works as well. /cc @nacx You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds/pull/1060 -- Commit Summary -- * bump sshj version to 0.20.0 -- File Changes -- M drivers/sshj/pom.xml (2) -- Patch Links -- https://github.com/jclouds/jclouds/pull/1060.patch https://github.com/jclouds/jclouds/pull/1060.diff -- 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/pull/1060
Re: [jclouds/jclouds] bump sshj version to 0.20.0 (#1060)
I'm trying to address all hose relevant questions in the big still 'DO NOT MERGE' PR for jclouds-karaf -- 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/pull/1060#issuecomment-278971641
Re: [jclouds/jclouds] bump sshj version to 0.20.0 (#1060)
in particular, sshj requires ``` org.bouncycastle:bcprov-jdk15on:1.51 org.bouncycastle:bcpkix-jdk15on:1.51 com.jcraft:jzlib:1.1.3 net.i2p.crypto:eddsa:0.1.0 ``` at compile time, so for bouncycastle jclouds is good. I've created an OSGi feature for `bouncycastle` driver which looks like the following: ``` jclouds mvn:org.bouncycastle/bcprov-ext-jdk15on/${bcprov.version} mvn:org.bouncycastle/bcpkix-jdk15on/${bcprov.version} mvn:org.apache.jclouds.driver/jclouds-bouncycastle/${jclouds.version} ``` and another for `sshj`: ``` jclouds-compute jclouds-driver-bouncycastle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jzlib/1.1.3_2 mvn:com.jcraft/jsch.agentproxy.core/0.0.9 mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch-agentproxy-sshj/0.0.9_1 mvn:net.i2p.crypto/eddsa/0.1.0 mvn:com.hierynomus/sshj/0.20.0 mvn:org.apache.jclouds.driver/jclouds-sshj/${jclouds.version} ``` which work in karaf -- 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/pull/1060#issuecomment-278976820
Re: [jclouds/jclouds-karaf] [DO NOT MERGE YET] Improvements to feature (#92)
@andreaturli pushed 2 commits. 899110d use sshj 0.20.0 e91e490 re-add bundle jsch-agentproxy-jsch -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds-karaf/pull/92/files/b729de9b8955d16a71c59f8ca04c83441b2ce99d..e91e490cda687f9fdc2742e9ed52e4098745d2bc
Re: [jclouds/jclouds] Fix O(n^2) response time for "list-security-groups" on openstack-nova. (#1059)
@geomacy can you please squash (and rebase if needed) the 3 commits into one? Also do you need this commit ported to `2.0.x` as well? -- 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/pull/1059#issuecomment-279359323