Jenkins build is back to stable : jclouds-labs #41

2019-04-01 Thread Apache Jenkins Server
See 



Jenkins build became unstable: jclouds-labs #40

2019-04-01 Thread Apache Jenkins Server
See 




[jira] [Commented] (JCLOUDS-1492) Dimension Data Feature API Predicates are not usable

2019-04-01 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16806999#comment-16806999
 ] 

ASF subversion and git services commented on JCLOUDS-1492:
--

Commit 550ede9c5dbf5d302ca25c57c3492aa945ff67c9 in jclouds-labs's branch 
refs/heads/2.1.x from Trevor Flanagan
[ https://gitbox.apache.org/repos/asf?p=jclouds-labs.git;h=550ede9 ]

JCLOUDS-1492 Dimension Data Feature API Predicates are not usable (#1)


> Dimension Data Feature API Predicates are not usable
> 
>
> Key: JCLOUDS-1492
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1492
> Project: jclouds
>  Issue Type: Bug
>Reporter: Trevor Flanagan
>Priority: Major
>  Labels: dimensiondata
> Fix For: 2.2.0, 2.1.3
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> The predicates exposed in 
> [https://github.com/apache/jclouds-labs/blob/master/dimensiondata/src/main/java/org/jclouds/dimensiondata/cloudcontrol/features/ServerApi.java#L183-L197]
>  and other Feature API are not working as expected.
> The issue is that where an interface is marked with {{@Delegate}} anything 
> that exists inside is considered as something that will be invoked over HTTP. 
> In the case of the Predicates these are not the case. The following error 
> occurs when a call to 
> {{api.getNetworkApi().networkDomainNormalPredicate().apply(networkDomainId);}}
>  is made.
> {code:java}
> Exception in thread "main" java.lang.IllegalStateException: Optional.get() 
> cannot be called on an absent value
> at com.google.common.base.Absent.get(Absent.java:47)
> at 
> org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:227)
> at 
> org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:137)
> at 
> org.jclouds.rest.internal.InvokeHttpMethod.toCommand(InvokeHttpMethod.java:189)
> at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:85)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
> at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy56.networkDomainNormalPredicate(Unknown Source)
> at 
> org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer.deployNetworkDomain(DeployNetworkDomainVlanAndServer.java:148)
> at 
> org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer.main(DeployNetworkDomainVlanAndServer.java:78){code}
> The fix is to move the Predicates into 
> {{org.jclouds.dimensiondata.cloudcontrol.DimensionDataCloudControlApi}} and 
> remove them from the API classes.
> {code:java}
> public interface DimensionDataCloudControlApi extends Closeable {
>@Delegate
>AccountApi getAccountApi();
>@Delegate
>InfrastructureApi getInfrastructureApi();
>@Delegate
>ServerImageApi getServerImageApi();
>@Delegate
>NetworkApi getNetworkApi();
>@Delegate
>ServerApi getServerApi();
>@Delegate
>TagApi getTagApi();
>@Delegate
>CustomerImageApi getCustomerImageApi();
>@Provides
>@Named(VLAN_DELETED_PREDICATE)
>Predicate vlanDeletedPredicate();
>@Provides
>@Named(NETWORK_DOMAIN_DELETED_PREDICATE)
>Predicate networkDomainDeletedPredicate();
>@Provides
>@Named(NETWORK_DOMAIN_NORMAL_PREDICATE)
>Predicate networkDomainNormalPredicate();
>@Provides
>@Named(VLAN_NORMAL_PREDICATE)
>Predicate vlanNormalPredicate();
>@Provides
>@Named(SERVER_STOPPED_PREDICATE)
>Predicate serverStoppedPredicate();
>@Provides
>@Named(SERVER_DELETED_PREDICATE)
>Predicate serverDeletedPredicate();
>@Provides
>@Named(SERVER_STARTED_PREDICATE)
>Predicate serverStartedPredicate();
>@Provides
>@Named(SERVER_NORMAL_PREDICATE)
>Predicate serverNormalPredicate();
> }
> {code}
> Fix also requires a change to the 
> https://github.com/apache/jclouds-examples/tree/master/dimensiondata



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [jclouds-labs] nacx commented on issue #1: JCLOUDS-1492 Dimension Data Feature API Predicates are not usable

2019-04-01 Thread GitBox
nacx commented on issue #1: JCLOUDS-1492 Dimension Data Feature API Predicates 
are not usable
URL: https://github.com/apache/jclouds-labs/pull/1#issuecomment-478665494
 
 
   Cherry-picked to 2.1.x too. Thanks!


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Resolved] (JCLOUDS-1492) Dimension Data Feature API Predicates are not usable

2019-04-01 Thread Ignasi Barrera (JIRA)


 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignasi Barrera resolved JCLOUDS-1492.
-
   Resolution: Fixed
Fix Version/s: 2.1.3
   2.2.0

> Dimension Data Feature API Predicates are not usable
> 
>
> Key: JCLOUDS-1492
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1492
> Project: jclouds
>  Issue Type: Bug
>Reporter: Trevor Flanagan
>Priority: Major
>  Labels: dimensiondata
> Fix For: 2.2.0, 2.1.3
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> The predicates exposed in 
> [https://github.com/apache/jclouds-labs/blob/master/dimensiondata/src/main/java/org/jclouds/dimensiondata/cloudcontrol/features/ServerApi.java#L183-L197]
>  and other Feature API are not working as expected.
> The issue is that where an interface is marked with {{@Delegate}} anything 
> that exists inside is considered as something that will be invoked over HTTP. 
> In the case of the Predicates these are not the case. The following error 
> occurs when a call to 
> {{api.getNetworkApi().networkDomainNormalPredicate().apply(networkDomainId);}}
>  is made.
> {code:java}
> Exception in thread "main" java.lang.IllegalStateException: Optional.get() 
> cannot be called on an absent value
> at com.google.common.base.Absent.get(Absent.java:47)
> at 
> org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:227)
> at 
> org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:137)
> at 
> org.jclouds.rest.internal.InvokeHttpMethod.toCommand(InvokeHttpMethod.java:189)
> at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:85)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
> at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy56.networkDomainNormalPredicate(Unknown Source)
> at 
> org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer.deployNetworkDomain(DeployNetworkDomainVlanAndServer.java:148)
> at 
> org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer.main(DeployNetworkDomainVlanAndServer.java:78){code}
> The fix is to move the Predicates into 
> {{org.jclouds.dimensiondata.cloudcontrol.DimensionDataCloudControlApi}} and 
> remove them from the API classes.
> {code:java}
> public interface DimensionDataCloudControlApi extends Closeable {
>@Delegate
>AccountApi getAccountApi();
>@Delegate
>InfrastructureApi getInfrastructureApi();
>@Delegate
>ServerImageApi getServerImageApi();
>@Delegate
>NetworkApi getNetworkApi();
>@Delegate
>ServerApi getServerApi();
>@Delegate
>TagApi getTagApi();
>@Delegate
>CustomerImageApi getCustomerImageApi();
>@Provides
>@Named(VLAN_DELETED_PREDICATE)
>Predicate vlanDeletedPredicate();
>@Provides
>@Named(NETWORK_DOMAIN_DELETED_PREDICATE)
>Predicate networkDomainDeletedPredicate();
>@Provides
>@Named(NETWORK_DOMAIN_NORMAL_PREDICATE)
>Predicate networkDomainNormalPredicate();
>@Provides
>@Named(VLAN_NORMAL_PREDICATE)
>Predicate vlanNormalPredicate();
>@Provides
>@Named(SERVER_STOPPED_PREDICATE)
>Predicate serverStoppedPredicate();
>@Provides
>@Named(SERVER_DELETED_PREDICATE)
>Predicate serverDeletedPredicate();
>@Provides
>@Named(SERVER_STARTED_PREDICATE)
>Predicate serverStartedPredicate();
>@Provides
>@Named(SERVER_NORMAL_PREDICATE)
>Predicate serverNormalPredicate();
> }
> {code}
> Fix also requires a change to the 
> https://github.com/apache/jclouds-examples/tree/master/dimensiondata



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (JCLOUDS-1492) Dimension Data Feature API Predicates are not usable

2019-04-01 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16806997#comment-16806997
 ] 

ASF subversion and git services commented on JCLOUDS-1492:
--

Commit ca189727078dcae38cbe0227e3f86a67899f8e54 in jclouds-site's branch 
refs/heads/master from Trevor Flanagan
[ https://gitbox.apache.org/repos/asf?p=jclouds-site.git;h=ca18972 ]

JCLOUDS-1492 Dimension Data Feature API Predicates are not usable (#6)



> Dimension Data Feature API Predicates are not usable
> 
>
> Key: JCLOUDS-1492
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1492
> Project: jclouds
>  Issue Type: Bug
>Reporter: Trevor Flanagan
>Priority: Major
>  Labels: dimensiondata
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> The predicates exposed in 
> [https://github.com/apache/jclouds-labs/blob/master/dimensiondata/src/main/java/org/jclouds/dimensiondata/cloudcontrol/features/ServerApi.java#L183-L197]
>  and other Feature API are not working as expected.
> The issue is that where an interface is marked with {{@Delegate}} anything 
> that exists inside is considered as something that will be invoked over HTTP. 
> In the case of the Predicates these are not the case. The following error 
> occurs when a call to 
> {{api.getNetworkApi().networkDomainNormalPredicate().apply(networkDomainId);}}
>  is made.
> {code:java}
> Exception in thread "main" java.lang.IllegalStateException: Optional.get() 
> cannot be called on an absent value
> at com.google.common.base.Absent.get(Absent.java:47)
> at 
> org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:227)
> at 
> org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:137)
> at 
> org.jclouds.rest.internal.InvokeHttpMethod.toCommand(InvokeHttpMethod.java:189)
> at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:85)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
> at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy56.networkDomainNormalPredicate(Unknown Source)
> at 
> org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer.deployNetworkDomain(DeployNetworkDomainVlanAndServer.java:148)
> at 
> org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer.main(DeployNetworkDomainVlanAndServer.java:78){code}
> The fix is to move the Predicates into 
> {{org.jclouds.dimensiondata.cloudcontrol.DimensionDataCloudControlApi}} and 
> remove them from the API classes.
> {code:java}
> public interface DimensionDataCloudControlApi extends Closeable {
>@Delegate
>AccountApi getAccountApi();
>@Delegate
>InfrastructureApi getInfrastructureApi();
>@Delegate
>ServerImageApi getServerImageApi();
>@Delegate
>NetworkApi getNetworkApi();
>@Delegate
>ServerApi getServerApi();
>@Delegate
>TagApi getTagApi();
>@Delegate
>CustomerImageApi getCustomerImageApi();
>@Provides
>@Named(VLAN_DELETED_PREDICATE)
>Predicate vlanDeletedPredicate();
>@Provides
>@Named(NETWORK_DOMAIN_DELETED_PREDICATE)
>Predicate networkDomainDeletedPredicate();
>@Provides
>@Named(NETWORK_DOMAIN_NORMAL_PREDICATE)
>Predicate networkDomainNormalPredicate();
>@Provides
>@Named(VLAN_NORMAL_PREDICATE)
>Predicate vlanNormalPredicate();
>@Provides
>@Named(SERVER_STOPPED_PREDICATE)
>Predicate serverStoppedPredicate();
>@Provides
>@Named(SERVER_DELETED_PREDICATE)
>Predicate serverDeletedPredicate();
>@Provides
>@Named(SERVER_STARTED_PREDICATE)
>Predicate serverStartedPredicate();
>@Provides
>@Named(SERVER_NORMAL_PREDICATE)
>Predicate serverNormalPredicate();
> }
> {code}
> Fix also requires a change to the 
> https://github.com/apache/jclouds-examples/tree/master/dimensiondata



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [jclouds-site] nacx merged pull request #6: JCLOUDS-1492 Dimension Data Feature API Predicates are not usable

2019-04-01 Thread GitBox
nacx merged pull request #6: JCLOUDS-1492 Dimension Data Feature API Predicates 
are not usable
URL: https://github.com/apache/jclouds-site/pull/6
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (JCLOUDS-1492) Dimension Data Feature API Predicates are not usable

2019-04-01 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16806989#comment-16806989
 ] 

ASF subversion and git services commented on JCLOUDS-1492:
--

Commit d7d37d6b7cd53a3f465cc55d68ce7590d074343a in jclouds-labs's branch 
refs/heads/master from Trevor Flanagan
[ https://gitbox.apache.org/repos/asf?p=jclouds-labs.git;h=d7d37d6 ]

JCLOUDS-1492 Dimension Data Feature API Predicates are not usable (#1)




> Dimension Data Feature API Predicates are not usable
> 
>
> Key: JCLOUDS-1492
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1492
> Project: jclouds
>  Issue Type: Bug
>Reporter: Trevor Flanagan
>Priority: Major
>  Labels: dimensiondata
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The predicates exposed in 
> [https://github.com/apache/jclouds-labs/blob/master/dimensiondata/src/main/java/org/jclouds/dimensiondata/cloudcontrol/features/ServerApi.java#L183-L197]
>  and other Feature API are not working as expected.
> The issue is that where an interface is marked with {{@Delegate}} anything 
> that exists inside is considered as something that will be invoked over HTTP. 
> In the case of the Predicates these are not the case. The following error 
> occurs when a call to 
> {{api.getNetworkApi().networkDomainNormalPredicate().apply(networkDomainId);}}
>  is made.
> {code:java}
> Exception in thread "main" java.lang.IllegalStateException: Optional.get() 
> cannot be called on an absent value
> at com.google.common.base.Absent.get(Absent.java:47)
> at 
> org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:227)
> at 
> org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:137)
> at 
> org.jclouds.rest.internal.InvokeHttpMethod.toCommand(InvokeHttpMethod.java:189)
> at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:85)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)
> at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)
> at 
> org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
> at 
> com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
> at com.sun.proxy.$Proxy56.networkDomainNormalPredicate(Unknown Source)
> at 
> org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer.deployNetworkDomain(DeployNetworkDomainVlanAndServer.java:148)
> at 
> org.jclouds.examples.dimensiondata.cloudcontrol.DeployNetworkDomainVlanAndServer.main(DeployNetworkDomainVlanAndServer.java:78){code}
> The fix is to move the Predicates into 
> {{org.jclouds.dimensiondata.cloudcontrol.DimensionDataCloudControlApi}} and 
> remove them from the API classes.
> {code:java}
> public interface DimensionDataCloudControlApi extends Closeable {
>@Delegate
>AccountApi getAccountApi();
>@Delegate
>InfrastructureApi getInfrastructureApi();
>@Delegate
>ServerImageApi getServerImageApi();
>@Delegate
>NetworkApi getNetworkApi();
>@Delegate
>ServerApi getServerApi();
>@Delegate
>TagApi getTagApi();
>@Delegate
>CustomerImageApi getCustomerImageApi();
>@Provides
>@Named(VLAN_DELETED_PREDICATE)
>Predicate vlanDeletedPredicate();
>@Provides
>@Named(NETWORK_DOMAIN_DELETED_PREDICATE)
>Predicate networkDomainDeletedPredicate();
>@Provides
>@Named(NETWORK_DOMAIN_NORMAL_PREDICATE)
>Predicate networkDomainNormalPredicate();
>@Provides
>@Named(VLAN_NORMAL_PREDICATE)
>Predicate vlanNormalPredicate();
>@Provides
>@Named(SERVER_STOPPED_PREDICATE)
>Predicate serverStoppedPredicate();
>@Provides
>@Named(SERVER_DELETED_PREDICATE)
>Predicate serverDeletedPredicate();
>@Provides
>@Named(SERVER_STARTED_PREDICATE)
>Predicate serverStartedPredicate();
>@Provides
>@Named(SERVER_NORMAL_PREDICATE)
>Predicate serverNormalPredicate();
> }
> {code}
> Fix also requires a change to the 
> https://github.com/apache/jclouds-examples/tree/master/dimensiondata



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] [jclouds-labs] nacx merged pull request #1: JCLOUDS-1492 Dimension Data Feature API Predicates are not usable

2019-04-01 Thread GitBox
nacx merged pull request #1: JCLOUDS-1492 Dimension Data Feature API Predicates 
are not usable
URL: https://github.com/apache/jclouds-labs/pull/1
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Jenkins build is still unstable: jclouds-with-credentials » jclouds-google-compute-engine-live-tests #20

2019-04-01 Thread Apache Jenkins Server
See 




[GitHub] [jclouds-site] jclouds-commentator commented on issue #6: JCLOUDS-1492 Dimension Data Feature API Predicates are not usable

2019-04-01 Thread GitBox
jclouds-commentator commented on issue #6: JCLOUDS-1492 Dimension Data Feature 
API Predicates are not usable
URL: https://github.com/apache/jclouds-site/pull/6#issuecomment-478475241
 
 
 Go to 
http://ffd4768ce16129a573fb-915d69f270c543467704832fba9063e2.r42.cf5.rackcdn.com/
 to review your changes.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jclouds-site] trevorflanagan opened a new pull request #6: JCLOUDS-1492 Dimension Data Feature API Predicates are not usable

2019-04-01 Thread GitBox
trevorflanagan opened a new pull request #6: JCLOUDS-1492 Dimension Data 
Feature API Predicates are not usable
URL: https://github.com/apache/jclouds-site/pull/6
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [jclouds-labs] trevorflanagan commented on a change in pull request #1: JCLOUDS-1492 Dimension Data Feature API Predicates are not usable

2019-04-01 Thread GitBox
trevorflanagan commented on a change in pull request #1: JCLOUDS-1492 Dimension 
Data Feature API Predicates are not usable
URL: https://github.com/apache/jclouds-labs/pull/1#discussion_r270738485
 
 

 ##
 File path: 
dimensiondata/src/test/java/org/jclouds/dimensiondata/cloudcontrol/features/NetworkApiLiveTest.java
 ##
 @@ -42,114 +42,134 @@
 import static org.testng.Assert.assertTrue;
 
 @Test(groups = "live", testName = "NetworkApiLiveTest", singleThreaded = true)
-public class NetworkApiLiveTest extends 
BaseDimensionDataCloudControlApiLiveTest {
-
-   private String networkDomainId;
-   private String networkDomainName;
-   private String vlanId;
-   private String portListId;
-   private String firewallRuleId;
-
-   private List firewallRuleIds;
-
-   @BeforeClass
-   public void init() {
-  firewallRuleIds = Lists.newArrayList();
-   }
-
-   @Test(dependsOnMethods = "testDeployVlan")
-   public void testCreatePortList() {
-  portListId = api()
-.createPortList(networkDomainId, 
this.getClass().getCanonicalName(), this.getClass().getCanonicalName(),
-  ImmutableList.of(FirewallRuleTarget.Port.create(22, null)), 
Lists.newArrayList());
-  assertNotNull(portListId);
-   }
-
-   @Test(dependsOnMethods = "testCreatePortList")
-   public void testGetPortList() {
-  FirewallRuleTarget.PortList portList = api().getPortList(portListId);
-  assertNotNull(portList);
-  assertTrue(portList.port().get(0).begin() == 22);
-   }
-
-   @Test(dependsOnMethods = "testGetPortList")
-   public void testCreateFirewallRuleWithPortList() {
-  firewallRuleId = api().createFirewallRule(networkDomainId, 
generateFirewallRuleName("server-id"), DEFAULT_ACTION,
-DEFAULT_IP_VERSION, DEFAULT_PROTOCOL, 
FirewallRuleTarget.builder().ip(IpRange.create("ANY", null)).build(),
-FirewallRuleTarget.builder().ip(IpRange.create("ANY", 
null)).portListId(portListId).build(), Boolean.TRUE,
-Placement.builder().position("LAST").build());
-  firewallRuleIds.add(firewallRuleId);
-   }
-
-   @Test(dependsOnMethods = "testCreateFirewallRuleWithPortList")
-   public void testListFirewallRules() {
-  PagedIterable firewallRulesList = 
api().listFirewallRules(networkDomainId);
-  assertFalse(firewallRulesList.isEmpty());
-  
assertEquals(firewallRulesList.last().get().first().get().networkDomainId(), 
networkDomainId);
-   }
-
-   @Test(dependsOnMethods = "testListFirewallRules")
-   public void testDeleteFirewallRule() {
-  api().deleteFirewallRule(firewallRuleId);
-  FirewallRule rule = 
findById(api().listFirewallRules(networkDomainId).concat().toList(), 
firewallRuleId);
-  assertNull(rule);
-   }
-
-   @Test(dependsOnMethods = "testDeployNetworkDomain")
-   public void testDeployVlan() {
-  vlanId = api().deployVlan(networkDomainId, 
NetworkApiLiveTest.class.getSimpleName() + new Date().getTime(),
-NetworkApiLiveTest.class.getSimpleName() + new Date().getTime(), 
DEFAULT_PRIVATE_IPV4_BASE_ADDRESS,
-DEFAULT_PRIVATE_IPV4_PREFIX_SIZE);
-  assertNotNull(vlanId);
-  assertTrue(vlanNormalPredicate.apply(vlanId), "vlan is not in a NORMAL 
state after timeout");
-   }
-
-   @Test
-   public void testDeployNetworkDomain() {
-  networkDomainName = NetworkApiLiveTest.class.getSimpleName() + new 
Date().getTime();
-  networkDomainId = 
api().deployNetworkDomain(datacenters.iterator().next(), networkDomainName,
-NetworkApiLiveTest.class.getSimpleName() + new Date().getTime() + 
"description", "ESSENTIALS");
-  assertNotNull(networkDomainId);
-  assertTrue(networkDomainNormalPredicate.apply(networkDomainId),
-"network domain is not in a NORMAL state after timeout");
-   }
-
-   @Test(expectedExceptions = ResourceAlreadyExistsException.class)
-   public void testDeploySameNetworkDomain() {
-  api().deployNetworkDomain(datacenters.iterator().next(), 
networkDomainName, networkDomainName, "ESSENTIALS");
-   }
-
-   @AfterClass
-   public void tearDown() {
-  if (!firewallRuleIds.isEmpty()) {
- for (String firewallRuleId : firewallRuleIds) {
-api().deleteFirewallRule(firewallRuleId);
- }
-  }
-  if (portListId != null) {
- api().deletePortList(portListId);
-  }
-  if (vlanId != null) {
- api().deleteVlan(vlanId);
- assertTrue(vlanDeletedPredicate.apply(vlanId), "vlan is not in a 
DELETED state after timeout");
-  }
-  if (networkDomainId != null) {
- api().deleteNetworkDomain(networkDomainId);
- assertTrue(networkDomainDeletedPredicate.apply(networkDomainId),
-   "network domain is not in a DELETED state after timeout");
-  }
-   }
-
-   private NetworkApi api() {
-  return api.getNetworkApi();
-   }
-
-   private FirewallRule findById(List collection, String id) {
-  for (FirewallRule rule : collection) {
- if 

[jira] [Commented] (JCLOUDS-1428) Support for SAS token based Authentication for Azure Blob Storage

2019-04-01 Thread Alexandra Horuszko (JIRA)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16806458#comment-16806458
 ] 

Alexandra Horuszko commented on JCLOUDS-1428:
-

[~nacx] Thanks! I've found another place as well - 
[here|https://github.com/apache/jclouds/blob/c2670079fabe74f163f43fbade0866469f7a84ec/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/config/AzureBlobStoreContextModule.java#L54].
 I am checking for the sasAuth, and in case it is true, I omit returning 
client.getPublicAccessForContainer(container), but proceed to setting the 
PublicAccess value to CONTAINER. Then getBlob and listBlobs work with SAS. 

However, it may be that someone has the actual access level set to BLOB (which 
would allow getBlob to work), but there will be an Authorisation error, when 
they call listBlobs, since one would need the CONTAINER access level to perform 
this. You can tell the level of access of 'traditional' service SAS strings - 
token " sr=c" for container and "sr=b" for blob, while all account SAS strings 
already mean container level of access. However, I don't see any possibility to 
tell from an SAS built with stored access policy which level of access it 
grants. I have to do some further investigation in this direction. 

 

> Support for SAS token based Authentication for Azure Blob Storage
> -
>
> Key: JCLOUDS-1428
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1428
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Himanshu Jain
>Priority: Major
>  Labels: azureblob
> Fix For: 2.2.0, 2.1.3
>
> Attachments: azure_stacktrace.txt
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> We have one use case where we want to provide limited access to objects in 
> our storage accounts. We figured that the best way to do  this is by using 
> SAS token based authentication mechanism to upload/download objects to Azure 
> Blob Storage - [SAS based 
> Authentication|https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1]
> We found that JClouds client library provides support for Azure Blob Storage 
> using account keys which might not fit our use case because of security 
> reasons.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)