@danbroudy Good news! I have a [wip 
branch](https://github.com/nacx/jclouds-labs-google/compare/compute-auth) where 
all authentication related live tests are passing:

```bash
Failed tests:
  
TargetHttpProxyApiLiveTest.testInsertTargetHttpProxy:52->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:90
 » IllegalState
  
ImageApiLiveTest.testCreateImageFromPD:80->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:90
 » IllegalState
  
InstanceApiLiveTest.testAddAccessConfig:130->BaseGoogleComputeEngineApiLiveTest.assertOperationDoneSuccessfully:90
 » IllegalState

Tests run: 158, Failures: 3, Errors: 0, Skipped: 14
```

We still have to figure out why these three tests are still failing and why the 
others are skipped, but with the changes in the branch we'll have the compute 
tests working. Here is a summary of the changes there (they are all in the last 
commit):

* I've removed all custom strategies that populated the credentials. The 
jclouds default ones should be good to go in GCE too.
* I've added an option to the `GoogleComputeEngineTempalteOptions` to configure 
if a SSH key pair should be created if none is provided. By default is true.
* I've added the logic to create that SSH key pair when needed, and adapted the 
compute service to configure the `LoginCredentials` accordingly.

This way, if no specific authentication is provided, jclouds will create a 
default one so it can access the VM to bootstrap it. If users provide their 
custom auth config, however, jclouds will just use that one.

With this changes the VM authentication and the provider itself gets simpler 
and the ComputeService live tests are passing without having to change them. 
I'll play around with different combinations of the code snippet of my previous 
comment to make sure all combinations work as expected, cleanup a bit the 
branch and open a pull request.

Any comments on the code and/or feedback about this authentication 
configuration are very welcome!

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

Reply via email to