You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by inbar stolberg <no...@github.com> on 2013/10/14 11:30:44 UTC

[jclouds] extended Openstack rebuild server options (#181)

jclouds openstack extended rebuild server options to support changes to 
password ipv4 ipv6 and server name +live test 

the live test is an extension of the same class that is in PR #179 so if #179 is merged first only the rebuild test should be added to the class (and not the entire class) 
You can merge this Pull Request by running:

  git pull https://github.com/inbarsto/jclouds-1 rebuildServer

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

  https://github.com/jclouds/jclouds/pull/181

-- Commit Summary --

  * jclouds openstack extended rebuild server options to support changes to password ipv4 ipv6 and server name

-- File Changes --

    M apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/options/RebuildServerOptions.java (73)
    A apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/CreateServerApiLiveTest.java (126)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/181.patch
https://github.com/jclouds/jclouds/pull/181.diff

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #344](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/344/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779646

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26406013

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Andrew Phillips <no...@github.com>.
>  
>     @Override
>     public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
>        Map<String, String> image = Maps.newHashMap();
>        if (imageRef != null)
>           image.put("imageRef", imageRef);
> +      if (name != null)
> +         image.put("name", name);
> +      if (adminPass != null)
> +         image.put("adminPass", adminPass);
> +      if (accessIPv4 != null)
> +         image.put("accessIPv4", accessIPv4);
> +      if (accessIPv6 != null)
> +         image.put("accessIPv6", accessIPv6);
> +
> +

[minor] Remove blank line?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6995573

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #342](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/342/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779905

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26411445

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
> +import com.google.common.collect.Iterables;
> +import org.jclouds.openstack.nova.v2_0.domain.Server;
> +import org.jclouds.openstack.nova.v2_0.domain.ServerCreated;
> +import org.jclouds.openstack.nova.v2_0.features.ServerApi;
> +import org.jclouds.openstack.nova.v2_0.internal.BaseNovaApiLiveTest;
> +import org.jclouds.openstack.nova.v2_0.options.CreateServerOptions;
> +import org.jclouds.openstack.nova.v2_0.options.RebuildServerOptions;
> +import org.testng.annotations.BeforeGroups;
> +import org.testng.annotations.Test;
> +
> +import static org.testng.Assert.assertEquals;
> +
> +@Test(groups = "live", testName = "CreateServerApiLiveTest", singleThreaded = true)
> +public class CreateServerApiLiveTest extends BaseNovaApiLiveTest {
> +   private ServerApi serverApi;
> +   private Optional<? extends ServerWithSecurityGroupsApi> apiOption;

This field doesn't actually get used beyond being assigned in setupContext(). What is its purpose? Can it be removed?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6984256

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26411409

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
> +   private Server createServer(String regionId, String availabilityZoneId, boolean shouldWork) {
> +      ServerApi serverApi = api.getServerApiForZone(regionId);
> +      CreateServerOptions options = new CreateServerOptions();
> +    //  options = options.availabilityZone(availabilityZoneId);
> +      ServerCreated server = serverApi.create(hostName, imageIdForZone(regionId), flavorRefForZone(regionId), options);
> +      if (shouldWork) {
> +         blockUntilServerInState(server.getId(), serverApi, Server.Status.ACTIVE);
> +      } else {
> +         blockUntilServerInState(server.getId(), serverApi, Server.Status.ERROR);
> +      }
> +
> +      return serverApi.get(server.getId());
> +   }
> +
> +   @Test
> +   public void testCreateInAvailabilityZone() {

removed

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6996444

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
> +
> +         server = serverApi.get(server_id2);
> +
> +         assertEquals(server.getStatus(), Server.Status.ACTIVE);
> +
> +
> +      } finally {
> +         serverApi.delete(server_id1);
> +         serverApi.delete(server_id2);
> +      }
> +
> +   }
> +
> +
> +   @Test
> +   public void testRebuildServer() {

fixed

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6996428

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
> +
> +@Test(groups = "live", testName = "CreateServerApiLiveTest", singleThreaded = true)
> +public class CreateServerApiLiveTest extends BaseNovaApiLiveTest {
> +   private ServerApi serverApi;
> +   private Optional<? extends ServerWithSecurityGroupsApi> apiOption;
> +   private String zone;
> +
> +   @BeforeGroups(groups = {"integration", "live"})
> +   public void setupContext() {
> +      super.setup();
> +      zone = Iterables.getLast(api.getConfiguredZones(), "nova");
> +      serverApi = api.getServerApiForZone(zone);
> +      apiOption = api.getServerWithSecurityGroupsExtensionForZone(zone);
> +   }
> +
> +   private Server createServer(String regionId, String availabilityZoneId, boolean shouldWork) {

availabilityZoneId doesn't get used. What is its purpose? Can it be removed?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6984298

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26410589

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
> +
> +import com.google.common.base.Optional;
> +import com.google.common.collect.Iterables;
> +import org.jclouds.openstack.nova.v2_0.domain.Server;
> +import org.jclouds.openstack.nova.v2_0.domain.ServerCreated;
> +import org.jclouds.openstack.nova.v2_0.features.ServerApi;
> +import org.jclouds.openstack.nova.v2_0.internal.BaseNovaApiLiveTest;
> +import org.jclouds.openstack.nova.v2_0.options.CreateServerOptions;
> +import org.jclouds.openstack.nova.v2_0.options.RebuildServerOptions;
> +import org.testng.annotations.BeforeGroups;
> +import org.testng.annotations.Test;
> +
> +import static org.testng.Assert.assertEquals;
> +
> +@Test(groups = "live", testName = "CreateServerApiLiveTest", singleThreaded = true)
> +public class CreateServerApiLiveTest extends BaseNovaApiLiveTest {

This PR is all about the additional options for a rebuild right?

rebuild is part of the org.jclouds.openstack.nova.v2_0.features.ServerApi. There is already a class for those live tests. Just add any live tests to org.jclouds.openstack.nova.v2_0.features.ServerApiLiveTest.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6984231

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #340](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/340/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26778213

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
I ran the live test and it's good. Just a couple of things left to do.

- [ ] Add an expect test to org.jclouds.openstack.nova.v2_0.features.ServerApiExpectTest
- [ ] Squash down the commits (if you need a hand squashing the commits see steps 17-22 of [An Annotated GitHub Workflow](http://blog.phymata.com/2013/01/25/an-annotated-github-workflow/))

Good work. Almost there!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26451015

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #343](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/343/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779458

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Andrew Phillips <no...@github.com>.
>   */
>  public class RebuildServerOptions implements MapBinder {
>     @Inject
>     private BindToJsonPayload jsonBinder;
>     String imageRef;
> +   String name;
> +   String adminPass;
> +   String accessIPv4;
> +   String accessIPv6;
> +

[minor] Remove blank line?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6995564

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26246106

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #808](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/808/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779688

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
> +
> +         server = serverApi.get(server_id2);
> +
> +         assertEquals(server.getStatus(), Server.Status.ACTIVE);
> +
> +
> +      } finally {
> +         serverApi.delete(server_id1);
> +         serverApi.delete(server_id2);
> +      }
> +
> +   }
> +
> +
> +   @Test
> +   public void testRebuildServer() {

This can be moved to org.jclouds.openstack.nova.v2_0.features.ServerApiLiveTest

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6984503

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #803](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/803/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26778200

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
> +    //  options = options.availabilityZone(availabilityZoneId);
> +      ServerCreated server = serverApi.create(hostName, imageIdForZone(regionId), flavorRefForZone(regionId), options);
> +      if (shouldWork) {
> +         blockUntilServerInState(server.getId(), serverApi, Server.Status.ACTIVE);
> +      } else {
> +         blockUntilServerInState(server.getId(), serverApi, Server.Status.ERROR);
> +      }
> +
> +      return serverApi.get(server.getId());
> +   }
> +
> +   @Test
> +   public void testCreateInAvailabilityZone() {
> +
> +      String server_id1 = null;
> +      String server_id2 = null;

fixed

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6996434

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26312102

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #550](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/550/) FAILURE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26778956

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Andrew Phillips <no...@github.com>.
> +
> +import com.google.common.base.Optional;
> +import com.google.common.collect.Iterables;
> +import org.jclouds.openstack.nova.v2_0.domain.Server;
> +import org.jclouds.openstack.nova.v2_0.domain.ServerCreated;
> +import org.jclouds.openstack.nova.v2_0.features.ServerApi;
> +import org.jclouds.openstack.nova.v2_0.internal.BaseNovaApiLiveTest;
> +import org.jclouds.openstack.nova.v2_0.options.CreateServerOptions;
> +import org.jclouds.openstack.nova.v2_0.options.RebuildServerOptions;
> +import org.testng.annotations.BeforeGroups;
> +import org.testng.annotations.Test;
> +
> +import static org.testng.Assert.assertEquals;
> +
> +@Test(groups = "live", testName = "CreateServerApiLiveTest", singleThreaded = true)
> +public class CreateServerApiLiveTest extends BaseNovaApiLiveTest {

See comments for the similar test in #180.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6995597

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
> +    //  options = options.availabilityZone(availabilityZoneId);
> +      ServerCreated server = serverApi.create(hostName, imageIdForZone(regionId), flavorRefForZone(regionId), options);
> +      if (shouldWork) {
> +         blockUntilServerInState(server.getId(), serverApi, Server.Status.ACTIVE);
> +      } else {
> +         blockUntilServerInState(server.getId(), serverApi, Server.Status.ERROR);
> +      }
> +
> +      return serverApi.get(server.getId());
> +   }
> +
> +   @Test
> +   public void testCreateInAvailabilityZone() {
> +
> +      String server_id1 = null;
> +      String server_id2 = null;

Java standard naming of vars serverId1/2

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6984367

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
> +
> +@Test(groups = "live", testName = "CreateServerApiLiveTest", singleThreaded = true)
> +public class CreateServerApiLiveTest extends BaseNovaApiLiveTest {
> +   private ServerApi serverApi;
> +   private Optional<? extends ServerWithSecurityGroupsApi> apiOption;
> +   private String zone;
> +
> +   @BeforeGroups(groups = {"integration", "live"})
> +   public void setupContext() {
> +      super.setup();
> +      zone = Iterables.getLast(api.getConfiguredZones(), "nova");
> +      serverApi = api.getServerApiForZone(zone);
> +      apiOption = api.getServerWithSecurityGroupsExtensionForZone(zone);
> +   }
> +
> +   private Server createServer(String regionId, String availabilityZoneId, boolean shouldWork) {

it was related to different PR please ignore, i removed this classed and created a live test as requested in the right place...

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6996463

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #549](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/549/) FAILURE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26778195

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
added jira ticket https://issues.apache.org/jira/browse/JCLOUDS-350 can you please assign me to this i cant assign myself or anyone else :/

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26395900

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
Please create a [JIRA](https://issues.apache.org/jira/browse/JCLOUDS) for this issue and then paste the link to it in the original PR description above.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26371259

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #774](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/774/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26311671

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
for some reason jenkins some times passes and some times fails :/ dont know why...

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26781220

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
> +   private ServerApi serverApi;
> +   private Optional<? extends ServerWithSecurityGroupsApi> apiOption;
> +   private String zone;
> +
> +   @BeforeGroups(groups = {"integration", "live"})
> +   public void setupContext() {
> +      super.setup();
> +      zone = Iterables.getLast(api.getConfiguredZones(), "nova");
> +      serverApi = api.getServerApiForZone(zone);
> +      apiOption = api.getServerWithSecurityGroupsExtensionForZone(zone);
> +   }
> +
> +   private Server createServer(String regionId, String availabilityZoneId, boolean shouldWork) {
> +      ServerApi serverApi = api.getServerApiForZone(regionId);
> +      CreateServerOptions options = new CreateServerOptions();
> +    //  options = options.availabilityZone(availabilityZoneId);

fixed

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6996467

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #805](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/805/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779889

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
> +
> +import com.google.common.base.Optional;
> +import com.google.common.collect.Iterables;
> +import org.jclouds.openstack.nova.v2_0.domain.Server;
> +import org.jclouds.openstack.nova.v2_0.domain.ServerCreated;
> +import org.jclouds.openstack.nova.v2_0.features.ServerApi;
> +import org.jclouds.openstack.nova.v2_0.internal.BaseNovaApiLiveTest;
> +import org.jclouds.openstack.nova.v2_0.options.CreateServerOptions;
> +import org.jclouds.openstack.nova.v2_0.options.RebuildServerOptions;
> +import org.testng.annotations.BeforeGroups;
> +import org.testng.annotations.Test;
> +
> +import static org.testng.Assert.assertEquals;
> +
> +@Test(groups = "live", testName = "CreateServerApiLiveTest", singleThreaded = true)
> +public class CreateServerApiLiveTest extends BaseNovaApiLiveTest {

done

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6996485

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26406012

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #341](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/341/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26778979

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
after some mess with git CloudBees dont seem too fond of this, can you please reset it?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779708

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
> +   private Server createServer(String regionId, String availabilityZoneId, boolean shouldWork) {
> +      ServerApi serverApi = api.getServerApiForZone(regionId);
> +      CreateServerOptions options = new CreateServerOptions();
> +    //  options = options.availabilityZone(availabilityZoneId);
> +      ServerCreated server = serverApi.create(hostName, imageIdForZone(regionId), flavorRefForZone(regionId), options);
> +      if (shouldWork) {
> +         blockUntilServerInState(server.getId(), serverApi, Server.Status.ACTIVE);
> +      } else {
> +         blockUntilServerInState(server.getId(), serverApi, Server.Status.ERROR);
> +      }
> +
> +      return serverApi.get(server.getId());
> +   }
> +
> +   @Test
> +   public void testCreateInAvailabilityZone() {

I ran this test against a DevStack install and it endlessly waited for a server that became ACTIVE to go into the ERROR state (which it never would).

What's the purpose of this test? Is it even necessary?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6984354

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #552](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/552/) FAILURE
Looks like there's a problem with this pull request
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26781128

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #806](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/806/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779448

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26410356

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Andrew Phillips <no...@github.com>.
Pending BuildHive, +1 - looks good to me! When BuildHive comes back, could you squash-n-rebase? Thanks, @inbarsto!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26406441

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #804](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/804/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26778967

Re: [jclouds] extended Openstack rebuild server options (#181)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26246118

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-java-7-pull-requests #807](https://jclouds.ci.cloudbees.com/job/jclouds-java-7-pull-requests/807/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779640

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds #551](https://buildhive.cloudbees.com/job/jclouds/job/jclouds/551/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26781123

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
This also needs an expect test. You could add something to org.jclouds.openstack.nova.v2_0.features.ServerApiExpectTest

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26370955

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by Everett Toews <no...@github.com>.
> +   private ServerApi serverApi;
> +   private Optional<? extends ServerWithSecurityGroupsApi> apiOption;
> +   private String zone;
> +
> +   @BeforeGroups(groups = {"integration", "live"})
> +   public void setupContext() {
> +      super.setup();
> +      zone = Iterables.getLast(api.getConfiguredZones(), "nova");
> +      serverApi = api.getServerApiForZone(zone);
> +      apiOption = api.getServerWithSecurityGroupsExtensionForZone(zone);
> +   }
> +
> +   private Server createServer(String regionId, String availabilityZoneId, boolean shouldWork) {
> +      ServerApi serverApi = api.getServerApiForZone(regionId);
> +      CreateServerOptions options = new CreateServerOptions();
> +    //  options = options.availabilityZone(availabilityZoneId);

Remove commented code.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6984276

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-pull-requests #345](https://jclouds.ci.cloudbees.com/job/jclouds-pull-requests/345/) FAILURE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181#issuecomment-26779696

Re: [jclouds] extended Openstack rebuild server options (#181)

Posted by inbar stolberg <no...@github.com>.
> +import com.google.common.collect.Iterables;
> +import org.jclouds.openstack.nova.v2_0.domain.Server;
> +import org.jclouds.openstack.nova.v2_0.domain.ServerCreated;
> +import org.jclouds.openstack.nova.v2_0.features.ServerApi;
> +import org.jclouds.openstack.nova.v2_0.internal.BaseNovaApiLiveTest;
> +import org.jclouds.openstack.nova.v2_0.options.CreateServerOptions;
> +import org.jclouds.openstack.nova.v2_0.options.RebuildServerOptions;
> +import org.testng.annotations.BeforeGroups;
> +import org.testng.annotations.Test;
> +
> +import static org.testng.Assert.assertEquals;
> +
> +@Test(groups = "live", testName = "CreateServerApiLiveTest", singleThreaded = true)
> +public class CreateServerApiLiveTest extends BaseNovaApiLiveTest {
> +   private ServerApi serverApi;
> +   private Optional<? extends ServerWithSecurityGroupsApi> apiOption;

fixed

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/181/files#r6996478