Issue 945:Port number is missing in service-managemant-url while invoking the Nova API of openstack

This commit is contained in:
Adrian Cole 2012-05-25 22:26:53 -07:00
parent 40bd08ee6b
commit 93381f47a4
2 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@ import org.jclouds.openstack.domain.AuthenticationResponse;
import org.jclouds.openstack.functions.ParseAuthenticationResponseFromHeaders; import org.jclouds.openstack.functions.ParseAuthenticationResponseFromHeaders;
import org.jclouds.openstack.reference.AuthHeaders; import org.jclouds.openstack.reference.AuthHeaders;
import org.jclouds.rest.annotations.ResponseParser; import org.jclouds.rest.annotations.ResponseParser;
import org.jclouds.rest.annotations.VirtualHost;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;
@ -39,6 +40,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* @author Adrian Cole * @author Adrian Cole
*/ */
@Path("/v{" + Constants.PROPERTY_API_VERSION + "}") @Path("/v{" + Constants.PROPERTY_API_VERSION + "}")
@VirtualHost
public interface OpenStackAuthAsyncClient { public interface OpenStackAuthAsyncClient {
public static final String VERSION = "1.0"; public static final String VERSION = "1.0";

View File

@ -48,7 +48,7 @@ public class OpenStackAuthAsyncClientTest extends BaseAsyncClientTest<OpenStackA
HttpRequest httpRequest = processor.createRequest(method, "foo", "bar"); HttpRequest httpRequest = processor.createRequest(method, "foo", "bar");
assertRequestLineEquals(httpRequest, "GET http://localhost:8080/v1.0 HTTP/1.1"); assertRequestLineEquals(httpRequest, "GET http://localhost:8080/v1.0 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: */*\nX-Auth-Key: bar\nX-Auth-User: foo\n"); assertNonPayloadHeadersEqual(httpRequest, "Accept: */*\nHost: localhost:8080\nX-Auth-Key: bar\nX-Auth-User: foo\n");
assertPayloadEquals(httpRequest, null, null, false); assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ParseAuthenticationResponseFromHeaders.class); assertResponseParserClassEquals(method, httpRequest, ParseAuthenticationResponseFromHeaders.class);
@ -62,7 +62,7 @@ public class OpenStackAuthAsyncClientTest extends BaseAsyncClientTest<OpenStackA
HttpRequest httpRequest = processor.createRequest(method, "foo", "bar"); HttpRequest httpRequest = processor.createRequest(method, "foo", "bar");
assertRequestLineEquals(httpRequest, "GET http://localhost:8080/v1.0 HTTP/1.1"); assertRequestLineEquals(httpRequest, "GET http://localhost:8080/v1.0 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: */*\nX-Storage-Pass: bar\nX-Storage-User: foo\n"); assertNonPayloadHeadersEqual(httpRequest, "Accept: */*\nHost: localhost:8080\nX-Storage-Pass: bar\nX-Storage-User: foo\n");
assertPayloadEquals(httpRequest, null, null, false); assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ParseAuthenticationResponseFromHeaders.class); assertResponseParserClassEquals(method, httpRequest, ParseAuthenticationResponseFromHeaders.class);