I ran all of the LiveTests and everything is running 100%. I used the command
mvn -Plive
-Dtest.openstack-neutron.endpoint=http://xxx.xxx.xxx.xxx:5000/v2.0/
-Dtest.openstack-neutron.identity=admin:admin
-Dtest.openstack-neutron.credential=devstack clean install
What's left to be done on
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) return true;
+ if (obj == null || getClass() != obj.getClass()) return false;
+ Router that = Router.class.cast(obj);
+ return super.equals(obj)
+ Objects.equal(this.adminStateUp,
+ *
+ * @author Nick Livens
+ * @see a href=
+ *
http://docs.openstack.org/api/openstack-network/2.0/content/router_ext.html;api
doc/a
+ */
+@Path(/v2.0/routers)
+@RequestFilters(AuthenticateRequest.class)
+@Consumes(MediaType.APPLICATION_JSON)
+public interface RouterApi {
+
+
@@ -116,6 +122,7 @@
@Path(/{id})
@SelectJson(subnet)
@Fallback(Fallbacks.NullOnNotFoundOr404.class)
+ @Nullable
Subnet get(@PathParam(id) String id);
[minor] I think we tend to put `@Nullable` on the same line as the object, i.e.
```
@Fallback(...
@Nullable Subnet get(...
+ authenticatedGET().endpoint(endpoint +
/routers).addQueryParam(fields, id, tenant_id, name).build(),
+
HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType(/list_routers.json,
APPLICATION_JSON)).build())
+
+ authenticatedGET().endpoint(endpoint +
/routers).addQueryParam(fields, id, tenant_id, name).build(),
+
HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType(/list_routers.json,
APPLICATION_JSON)).build())
+
+* @return the list of all router references configured for the tenant.
+*/
+ @Named(router:list)
+ @GET
+ @ResponseParser(ParseRouters.class)
+ @Transform(ParseRouters.ToPagedIterable.class)
+ @Fallback(Fallbacks.EmptyPagedIterableOnNotFoundOr404.class)
+
+* Returns all routers currently defined in Neutron for the current
tenant.
+*
+* @return the list of all routers configured for the tenant
+*/
+ @Named(router:list)
+ @GET
+ @ResponseParser(ParseRouterDetails.class)
+
+
+ @Override
+ protected FunctionObject, IterableWithMarkerReferenceWithName
markerToNextForArg0(OptionalObject arg0) {
+ String zone = arg0.isPresent() ? arg0.get().toString() : null;
+ final RouterApi routerApi =
api.getRouterExtensionForZone(zone).get();
+
assertTrue(subnetApi.delete(net.getId()));
}
assertTrue(networkApi.delete(networkId));
}
}
+
+ private PredicateSubnet createPredicate(final String subnetId) {
See above comment
---
Reply to this email directly or view it on GitHub:
+ */
+ public T state(State state) {
+ this.state = state;
+ return self();
+ }
+
+ /**
+ * @see Router#getExternalGatewayInfo()
+ */
+ public T externalGatewayInfo(ExternalGatewayInfo externalGatewayInfo) {
+
+ }
+
+ public Builder toBuilder() {
+ return new ConcreteBuilder().fromExternalGatewayInfo(this);
+ }
+
+ public static abstract class Builder {
+ protected abstract Builder self();
+
+ protected String networkId;
+
+ /**
+ * @see
@@ -37,10 +37,7 @@ public String getValue() {
}
public static NetworkType fromValue(String value) {
- for (NetworkType networkType : values()) {
- if (networkType.getValue().equalsIgnoreCase(value))
-return networkType;
- }
- return null;
+
+
+ /**
+* Returns the list of all routers currently defined in Neutron for the
current tenant. The list provides the unique
+* identifier of each router configured for the tenant
+*
+* @return the list of all router references configured for the tenant.
+*/
+
+
+ @Override
+ protected FunctionObject, IterableWithMarkerReferenceWithName
markerToNextForArg0(OptionalObject arg0) {
+ String zone = arg0.isPresent() ? arg0.get().toString() : null;
+ final RouterApi routerApi =
api.getRouterExtensionForZone(zone).get();
+
Thanks for responding to the review comments, @KrisSterckx!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/47#issuecomment-29208427
@@ -29,7 +29,7 @@
* @author Nick Livens
* @see a
href=http://docs.openstack.org/api/openstack-network/2.0/content/Subnets.html;api
doc/a
*/
-public class AllocationPool {
+public final class AllocationPool {
Ah, yes, I recall. Thanks for the reminder, @KrisSterckx!
---
Reply to
@@ -29,7 +29,7 @@
* @author Nick Livens
* @see a
href=http://docs.openstack.org/api/openstack-network/2.0/content/Subnets.html;api
doc/a
*/
-public class AllocationPool {
+public final class AllocationPool {
Any reason for making this and the domain classes below final? This may
+ }
+
+ public Builder toBuilder() {
+ return new ConcreteBuilder().fromExternalGatewayInfo(this);
+ }
+
+ public static abstract class Builder {
+ protected abstract Builder self();
+
+ protected String networkId;
+
+ /**
+ * @see
@@ -37,10 +37,7 @@ public String getValue() {
}
public static NetworkType fromValue(String value) {
- for (NetworkType networkType : values()) {
- if (networkType.getValue().equalsIgnoreCase(value))
-return networkType;
- }
- return null;
+
+ */
+ public T state(State state) {
+ this.state = state;
+ return self();
+ }
+
+ /**
+ * @see Router#getExternalGatewayInfo()
+ */
+ public T externalGatewayInfo(ExternalGatewayInfo externalGatewayInfo) {
+
+
+ /**
+* Returns the list of all routers currently defined in Neutron for the
current tenant. The list provides the unique
+* identifier of each router configured for the tenant
+*
+* @return the list of all router references configured for the tenant.
+*/
+
+ @Path(/{id})
+ @SelectJson(router)
+ @Fallback(Fallbacks.NullOnNotFoundOr404.class)
+ Router get(@PathParam(id) String id);
+
+ /**
+* Create a new router
+*
+* @param options optional arguments
+* @return the newly created router
+*/
+
+import java.beans.ConstructorProperties;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static
org.jclouds.openstack.v2_0.options.PaginationOptions.Builder.marker;
+
+/**
+ * @author Nick Livens
+ */
+@Beta
+@Singleton
+public class ParseRouterDetails
+ authenticatedGET().endpoint(endpoint +
/routers).addQueryParam(fields, id, tenant_id, name).build(),
+
HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType(/list_routers.json,
APPLICATION_JSON)).build())
+
assertTrue(subnetApi.delete(net.getId()));
}
assertTrue(networkApi.delete(networkId));
}
}
+
+ private PredicateSubnet createPredicate(final String subnetId) {
See above comment. And since we're using this in multiple places, move out to a
26 matches
Mail list logo