diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApi.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApi.java
deleted file mode 100644
index d39bc3c22f..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApi.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0;
-
-import java.io.Closeable;
-import java.util.Set;
-
-import org.jclouds.location.Region;
-import org.jclouds.location.Zone;
-import org.jclouds.location.functions.RegionToEndpoint;
-import org.jclouds.location.functions.ZoneToEndpoint;
-import org.jclouds.openstack.neutron.v2_0.extensions.RouterApi;
-import org.jclouds.openstack.neutron.v2_0.features.NetworkApi;
-import org.jclouds.openstack.neutron.v2_0.features.PortApi;
-import org.jclouds.openstack.neutron.v2_0.features.SubnetApi;
-import org.jclouds.openstack.v2_0.features.ExtensionApi;
-import org.jclouds.rest.annotations.Delegate;
-import org.jclouds.rest.annotations.EndpointParam;
-
-import com.google.common.base.Optional;
-import com.google.inject.Provides;
-
-/**
- * Provides access to the OpenStack Networking (Neutron) v2 API.
- *
- *
- * @deprecated Please use {@link org.jclouds.openstack.neutron.v2.NeutronApi} instead. To be removed in jclouds 2.0.
- */
-@Deprecated
-public interface NeutronApi extends Closeable {
-
- /**
- * @return the Region codes configured
- */
- @Provides
- @Region
- Set getConfiguredRegions();
-
- /**
- * Provides access to Extension features.
- */
- @Delegate
- ExtensionApi getExtensionApi(@EndpointParam(parser = RegionToEndpoint.class) String region);
-
- /**
- * Provides access to Network features.
- */
- @Delegate
- NetworkApi getNetworkApi(@EndpointParam(parser = RegionToEndpoint.class) String region);
-
- /**
- * Provides access to Subnet features.
- */
- @Delegate
- SubnetApi getSubnetApi(@EndpointParam(parser = RegionToEndpoint.class) String region);
-
- /**
- * Provides access to Port features.
- */
- @Delegate
- PortApi getPortApi(@EndpointParam(parser = RegionToEndpoint.class) String region);
-
- /**
- * Provides access to Router features.
- */
- @Delegate
- Optional extends RouterApi> getRouterApi(@EndpointParam(parser = RegionToEndpoint.class) String region);
-
- /**
- * @return the Zone codes configured
- * @deprecated Please use {@link #getConfiguredRegions()} instead. To be removed in jclouds 2.0.
- */
- @Deprecated
- @Provides
- @Zone
- Set getConfiguredZones();
-
- /**
- * Provides access to Extension features.
- * @deprecated Please use {@link #getExtensionApi(String)} instead. To be removed in jclouds 2.0.
- */
- @Deprecated
- @Delegate
- ExtensionApi getExtensionApiForZone(
- @EndpointParam(parser = ZoneToEndpoint.class) String zone);
-
- /**
- * Provides access to Network features.
- * @deprecated Please use {@link #getNetworkApi(String)} instead. To be removed in jclouds 2.0.
- */
- @Deprecated
- @Delegate
- NetworkApi getNetworkApiForZone(@EndpointParam(parser = ZoneToEndpoint.class) String zone);
-
- /**
- * Provides access to Subnet features.
- * @deprecated Please use {@link #getSubnetApi(String)} instead. To be removed in jclouds 2.0.
- */
- @Deprecated
- @Delegate
- SubnetApi getSubnetApiForZone(@EndpointParam(parser = ZoneToEndpoint.class) String zone);
-
- /**
- * Provides access to Port features.
- * @deprecated Please use {@link #getPortApi(String)} instead. To be removed in jclouds 2.0.
- */
- @Deprecated
- @Delegate
- PortApi getPortApiForZone(@EndpointParam(parser = ZoneToEndpoint.class) String zone);
-
- /**
- * Provides access to Router features.
- * @deprecated Please use {@link #getRouterApi(String)} instead. To be removed in jclouds 2.0.
- */
- @Deprecated
- @Delegate
- Optional extends RouterApi> getRouterExtensionForZone(@EndpointParam(parser = ZoneToEndpoint.class) String zone);
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApiMetadata.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApiMetadata.java
deleted file mode 100644
index f3336471c8..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApiMetadata.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0;
-
-import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
-import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.jclouds.apis.ApiMetadata;
-import org.jclouds.openstack.keystone.v2_0.config.AuthenticationApiModule;
-import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
-import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.ZoneModule;
-import org.jclouds.openstack.neutron.v2_0.config.NeutronHttpApiModule;
-import org.jclouds.openstack.v2_0.ServiceType;
-import org.jclouds.rest.internal.BaseHttpApiMetadata;
-
-import com.google.auto.service.AutoService;
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Module;
-
-/**
- * Implementation of {@link org.jclouds.apis.ApiMetadata} for Neutron 2.0 API
- * @deprecated To be removed in jclouds 2.0.
- */
-@Deprecated
-@AutoService(ApiMetadata.class)
-public class NeutronApiMetadata extends BaseHttpApiMetadata {
-
- @Override
- public Builder toBuilder() {
- return new Builder().fromApiMetadata(this);
- }
-
- public NeutronApiMetadata() {
- this(new Builder());
- }
-
- protected NeutronApiMetadata(Builder builder) {
- super(builder);
- }
-
- public static Properties defaultProperties() {
- Properties properties = BaseHttpApiMetadata.defaultProperties();
- properties.setProperty(CREDENTIAL_TYPE, CredentialTypes.PASSWORD_CREDENTIALS);
- properties.setProperty(SERVICE_TYPE, ServiceType.NETWORK);
- return properties;
- }
-
- public static class Builder extends BaseHttpApiMetadata.Builder {
-
- protected Builder() {
- super(NeutronApi.class);
- id("openstack-neutron-legacy")
- .name("OpenStack Neutron API")
- .identityName("${tenantName}:${userName} or ${userName}, if your keystone supports a default tenant")
- .credentialName("${password}")
- .endpointName("KeyStone base url ending in /v2.0/")
- .documentation(URI.create("http://docs.openstack.org/api/openstack-network/2.0/content/"))
- .version("2.0")
- .defaultEndpoint("http://localhost:5000/v2.0/")
- .defaultProperties(NeutronApiMetadata.defaultProperties())
- .defaultModules(ImmutableSet.>builder()
- .add(AuthenticationApiModule.class)
- .add(KeystoneAuthenticationModule.class)
- .add(ZoneModule.class)
- .add(NeutronHttpApiModule.class).build());
- }
-
- @Override
- public NeutronApiMetadata build() {
- return new NeutronApiMetadata(this);
- }
-
- @Override
- public Builder fromApiMetadata(ApiMetadata in) {
- super.fromApiMetadata(in);
- return this;
- }
-
- @Override
- protected Builder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/config/NeutronHttpApiModule.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/config/NeutronHttpApiModule.java
deleted file mode 100644
index b46262e355..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/config/NeutronHttpApiModule.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.neutron.v2_0.config;
-
-import static org.jclouds.openstack.keystone.v2_0.config.KeystoneHttpApiModule.aliasBinder;
-
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import javax.inject.Provider;
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.annotation.ClientError;
-import org.jclouds.http.annotation.Redirection;
-import org.jclouds.http.annotation.ServerError;
-import org.jclouds.json.config.GsonModule.DateAdapter;
-import org.jclouds.json.config.GsonModule.Iso8601DateAdapter;
-import org.jclouds.openstack.neutron.v2_0.NeutronApi;
-import org.jclouds.openstack.neutron.v2_0.handlers.NeutronErrorHandler;
-import org.jclouds.openstack.v2_0.domain.Extension;
-import org.jclouds.openstack.v2_0.functions.PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet;
-import org.jclouds.rest.ConfiguresHttpApi;
-import org.jclouds.rest.config.HttpApiModule;
-import org.jclouds.rest.functions.ImplicitOptionalConverter;
-
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.inject.Provides;
-
-/**
- * Configures the Neutron connection.
- */
-@ConfiguresHttpApi
-public class NeutronHttpApiModule extends HttpApiModule {
-
- @Override
- protected void configure() {
- bind(DateAdapter.class).to(Iso8601DateAdapter.class);
- bind(ImplicitOptionalConverter.class).to(PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSet.class);
- super.configure();
- aliasBinder(binder());
- }
-
- @Provides
- @Singleton
- public LoadingCache> provideExtensionsByZone(final Provider quantumApi) {
- return CacheBuilder.newBuilder().expireAfterWrite(23, TimeUnit.HOURS)
- .build(new CacheLoader>() {
- @Override
- public Set extends Extension> load(String key) throws Exception {
- return quantumApi.get().getExtensionApiForZone(key).list();
- }
- });
- }
-
- @Override
- protected void bindErrorHandlers() {
- bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(NeutronErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(NeutronErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(NeutronErrorHandler.class);
- }
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/AllocationPool.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/AllocationPool.java
deleted file mode 100644
index f81192efdd..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/AllocationPool.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-import java.beans.ConstructorProperties;
-
-/**
- * A Neutron Subnet Allocation Pool
- *
- * @see api doc
- */
-public class AllocationPool {
-
- private final String start;
- private final String end;
-
- @ConstructorProperties({
- "start", "end"
- })
- protected AllocationPool(String start, String end) {
- this.start = start;
- this.end = end;
- }
-
- /**
- * @return the start ip
- */
- public String getStart() {
- return start;
- }
-
- /**
- * @return the end ip
- */
- public String getEnd() {
- return end;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(start, end);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- AllocationPool that = AllocationPool.class.cast(obj);
- return Objects.equal(this.start, that.start) && Objects.equal(this.end, that.end);
- }
-
- protected ToStringHelper string() {
- return Objects.toStringHelper(this).add("start", start).add("end", end);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder builder() {
- return new ConcreteBuilder();
- }
-
- public Builder toBuilder() {
- return new ConcreteBuilder().fromAllocationPool(this);
- }
-
- public abstract static class Builder {
- protected abstract Builder self();
-
- protected String start;
- protected String end;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.AllocationPool#getStart()
- */
- public Builder start(String start) {
- this.start = start;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.AllocationPool#getEnd()
- */
- public Builder end(String end) {
- this.end = end;
- return self();
- }
-
- public AllocationPool build() {
- return new AllocationPool(start, end);
- }
-
- public Builder fromAllocationPool(AllocationPool in) {
- return this.start(in.getStart()).end(in.getEnd());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkNetwork.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkNetwork.java
deleted file mode 100644
index f2e4a0e5a0..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkNetwork.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-
-import java.beans.ConstructorProperties;
-
-/**
- * A Neutron network used for creating networks in bulk
- * The only difference between this and the actual network are the missing fields id, tenantId, state & shared
- */
-public class BulkNetwork {
-
- private final String name;
- private final Boolean adminStateUp;
- private final Boolean external;
- private final NetworkType networkType;
- private final String physicalNetworkName;
- private final Integer segmentationId;
-
- @ConstructorProperties({
- "name", "admin_state_up", "router:external", "provider:network_type", "provider:physical_network", "provider:segmentation_id"
- })
- protected BulkNetwork(String name, Boolean adminStateUp, Boolean external, String networkType, String physicalNetworkName, Integer segmentationId) {
- this.name = name;
- this.adminStateUp = adminStateUp;
- this.external = external;
- this.networkType = NetworkType.fromValue(networkType);
- this.physicalNetworkName = physicalNetworkName;
- this.segmentationId = segmentationId;
- }
-
- /**
- * @return the name of the network
- */
- public String getName() {
- return name;
- }
-
- /**
- * @return the administrative state of network. If false, the network does not forward packets.
- */
- public Boolean getAdminStateUp() {
- return adminStateUp;
- }
-
- /**
- * @return true if network is external, false if not
- */
- public Boolean getExternal() {
- return external;
- }
-
- /**
- * @return the type of network
- */
- public NetworkType getNetworkType() {
- return networkType;
- }
-
- /**
- * @return the physical network name
- */
- public String getPhysicalNetworkName() {
- return physicalNetworkName;
- }
-
- /**
- * @return the segmentation id of the network
- */
- public Integer getSegmentationId() {
- return segmentationId;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(name, adminStateUp, external, networkType, physicalNetworkName, segmentationId);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- BulkNetwork that = BulkNetwork.class.cast(obj);
- return Objects.equal(this.name, that.name)
- && Objects.equal(this.adminStateUp, that.adminStateUp)
- && Objects.equal(this.external, that.external)
- && Objects.equal(this.networkType, that.networkType)
- && Objects.equal(this.physicalNetworkName, that.physicalNetworkName)
- && Objects.equal(this.segmentationId, that.segmentationId);
- }
-
- protected Objects.ToStringHelper string() {
- return Objects.toStringHelper(this)
- .add("name", name).add("adminStateUp", adminStateUp).add("external", external)
- .add("networkType", networkType).add("physicalNetworkName", physicalNetworkName)
- .add("segmentationId", segmentationId);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder builder() {
- return new ConcreteBuilder();
- }
-
- public Builder toBuilder() {
- return new ConcreteBuilder().fromBulkNetwork(this);
- }
-
- public abstract static class Builder {
- protected abstract Builder self();
-
- protected String name;
- protected Boolean adminStateUp;
- protected Boolean external;
- protected NetworkType networkType;
- protected String physcialNetworkName;
- protected Integer segmentationId;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkNetwork#getName()
- */
- public Builder name(String name) {
- this.name = name;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkNetwork#getAdminStateUp()
- */
- public Builder adminStateUp(Boolean adminStateUp) {
- this.adminStateUp = adminStateUp;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkNetwork#getExternal()
- */
- public Builder external(Boolean external) {
- this.external = external;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkNetwork#getNetworkType()
- */
- public Builder networkType(NetworkType networkType) {
- this.networkType = networkType;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkNetwork#getPhysicalNetworkName()
- */
- public Builder physicalNetworkName(String physicalNetworkName) {
- this.physcialNetworkName = physicalNetworkName;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkNetwork#getSegmentationId()
- */
- public Builder segmentationId(Integer segmentationId) {
- this.segmentationId = segmentationId;
- return self();
- }
-
- public BulkNetwork build() {
- return new BulkNetwork(name, adminStateUp, external, networkType == null ? null : networkType.getValue(), physcialNetworkName, segmentationId);
- }
-
- public Builder fromBulkNetwork(BulkNetwork in) {
- return this.name(in.getName())
- .adminStateUp(in.getAdminStateUp())
- .external(in.getExternal())
- .networkType(in.getNetworkType())
- .physicalNetworkName(in.getPhysicalNetworkName())
- .segmentationId(in.getSegmentationId());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkPort.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkPort.java
deleted file mode 100644
index 91c26376df..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkPort.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-
-import java.beans.ConstructorProperties;
-import java.util.Collection;
-import java.util.Set;
-
-/**
- * A Neutron port used for creating ports in bulk
- * The only difference between this and the actual port are the missing fields id, tenantId & state
- */
-public class BulkPort {
-
- private final String name;
- private final String networkId;
- private final Boolean adminStateUp;
- private final String deviceId;
- private final String deviceOwner;
- private final Set fixedIps;
- private final String macAddress;
-
- @ConstructorProperties({
- "name", "network_id", "admin_state_up", "device_id", "device_owner", "fixed_ips", "mac_address"
- })
- protected BulkPort(String name, String networkId, Boolean adminStateUp, String deviceId, String deviceOwner, Set fixedIps, String macAddress) {
- this.name = name;
- this.networkId = networkId;
- this.adminStateUp = adminStateUp;
- this.deviceId = deviceId;
- this.deviceOwner = deviceOwner;
- this.fixedIps = fixedIps != null ? ImmutableSet.copyOf(fixedIps) : ImmutableSet.of();
- this.macAddress = macAddress;
- }
-
- /**
- * @return the name of the port
- */
- public String getName() {
- return name;
- }
-
- /**
- * @return the id of the network where this port is associated with
- */
- public String getNetworkId() {
- return networkId;
- }
-
- /**
- * @return the administrative state of port. If false, port does not forward packets
- */
- public Boolean getAdminStateUp() {
- return adminStateUp;
- }
-
- /**
- * @return the id of the device (e.g. server) using this port.
- */
- public String getDeviceId() {
- return deviceId;
- }
-
- /**
- * @return the entity (e.g.: dhcp agent) using this port.
- */
- public String getDeviceOwner() {
- return deviceOwner;
- }
-
- /**
- * @return the set of fixed ips this port has been assigned
- */
- public Set getFixedIps() {
- return fixedIps;
- }
-
- /**
- * @return the mac address of this port
- */
- public String getMacAddress() {
- return macAddress;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(name, networkId, adminStateUp, deviceId, deviceOwner, fixedIps, macAddress);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- BulkPort that = BulkPort.class.cast(obj);
- return Objects.equal(this.name, that.name)
- && Objects.equal(this.networkId, that.networkId)
- && Objects.equal(this.adminStateUp, that.adminStateUp)
- && Objects.equal(this.deviceId, that.deviceId)
- && Objects.equal(this.deviceOwner, that.deviceOwner)
- && Objects.equal(this.fixedIps, that.fixedIps)
- && Objects.equal(this.macAddress, that.macAddress);
- }
-
- protected Objects.ToStringHelper string() {
- return Objects.toStringHelper(this)
- .add("name", name).add("networkId", networkId).add("adminStateUp", adminStateUp)
- .add("deviceId", deviceId).add("deviceOwner", deviceOwner).add("fixedIps", fixedIps).add("macAddress", macAddress);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder builder() {
- return new ConcreteBuilder();
- }
-
- public Builder toBuilder() {
- return new ConcreteBuilder().fromBulkPort(this);
- }
-
- public abstract static class Builder {
- protected abstract Builder self();
-
- protected String name;
- protected String networkId;
- protected String deviceId;
- protected String deviceOwner;
- protected String macAddress;
- protected Set fixedIps;
- protected Boolean adminStateUp;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkPort#getName()
- */
- public Builder name(String name) {
- this.name = name;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkPort#getNetworkId()
- */
- public Builder networkId(String networkId) {
- this.networkId = networkId;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkPort#getDeviceId()
- */
- public Builder deviceId(String deviceId) {
- this.deviceId = deviceId;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkPort#getDeviceOwner()
- */
- public Builder deviceOwner(String deviceOwner) {
- this.deviceOwner = deviceOwner;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkPort#getMacAddress()
- */
- public Builder macAddress(String macAddress) {
- this.macAddress = macAddress;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkPort#getFixedIps()
- */
- public Builder fixedIps(Collection fixedIps) {
- this.fixedIps = ImmutableSet.copyOf(fixedIps);
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkPort#getAdminStateUp()
- */
- public Builder adminStateUp(Boolean adminStateUp) {
- this.adminStateUp = adminStateUp;
- return self();
- }
-
- public BulkPort build() {
- return new BulkPort(name, networkId, adminStateUp, deviceId, deviceOwner, fixedIps, macAddress);
- }
-
- public Builder fromBulkPort(BulkPort in) {
- return this.name(in.getName())
- .networkId(in.getNetworkId())
- .adminStateUp(in.getAdminStateUp())
- .deviceId(in.getDeviceId())
- .deviceOwner(in.getDeviceOwner())
- .fixedIps(in.getFixedIps())
- .macAddress(in.getMacAddress());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkSubnet.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkSubnet.java
deleted file mode 100644
index c1eea4506a..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkSubnet.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-
-import java.beans.ConstructorProperties;
-import java.util.Collection;
-import java.util.Set;
-
-/**
- * A Neutron subnet used for creating subnets in bulk
- * The only difference between this and the actual subnet are the missing fields id & tenantId
- */
-public class BulkSubnet {
-
- protected String name;
- protected String networkId;
- protected String gatewayIp;
- protected Integer ipVersion;
- protected String cidr;
- protected Set allocationPools;
- protected Boolean enableDhcp;
- protected Set dnsNameServers;
- protected Set hostRoutes;
-
- @ConstructorProperties({
- "name", "network_id", "gateway_ip", "ip_version", "cidr", "allocation_pools", "enable_dhcp", "dns_nameservers", "host_routes"
- })
- protected BulkSubnet(String name, String networkId, String gatewayIp, Integer ipVersion, String cidr,
- Set allocationPools, Boolean enableDhcp, Set dnsNameServers, Set hostRoutes) {
- this.name = name;
- this.networkId = networkId;
- this.gatewayIp = gatewayIp;
- this.ipVersion = ipVersion;
- this.cidr = cidr;
- this.allocationPools = allocationPools != null ? ImmutableSet.copyOf(allocationPools) : ImmutableSet.of();
- this.enableDhcp = enableDhcp;
- this.dnsNameServers = dnsNameServers != null ? ImmutableSet.copyOf(dnsNameServers) : ImmutableSet.of();
- this.hostRoutes = hostRoutes != null ? ImmutableSet.copyOf(hostRoutes) : ImmutableSet.of();
- }
-
- /**
- * @return the name of the subnet
- */
- public String getName() {
- return name;
- }
-
- /**
- * @return the id of the network this subnet is associated with
- */
- public String getNetworkId() {
- return networkId;
- }
-
- /**
- * @return the default gateway used by devices in this subnet
- */
- public String getGatewayIp() {
- return gatewayIp;
- }
-
- /**
- * @return the ip version used by this subnet
- */
- public Integer getIpVersion() {
- return ipVersion;
- }
-
- /**
- * @return the cidr representing the IP range for this subnet, based on IP version
- */
- public String getCidr() {
- return cidr;
- }
-
- /**
- * @return the sub-ranges of cidr available for dynamic allocation to ports
- */
- public Set getAllocationPools() {
- return allocationPools;
- }
-
- /**
- * @return true if DHCP is enabled for this subnet, false if not.
- */
- public Boolean getEnableDhcp() {
- return enableDhcp;
- }
-
- /**
- * @return the set of DNS name servers used by hosts in this subnet.
- */
- public Set getDnsNameServers() {
- return dnsNameServers;
- }
-
- /**
- * @return the set of routes that should be used by devices with IPs from this subnet
- */
- public Set getHostRoutes() {
- return hostRoutes;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(name, networkId, gatewayIp, ipVersion, cidr,
- allocationPools, enableDhcp, dnsNameServers, hostRoutes);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- BulkSubnet that = BulkSubnet.class.cast(obj);
- return Objects.equal(this.name, that.name)
- && Objects.equal(this.networkId, that.networkId)
- && Objects.equal(this.gatewayIp, that.gatewayIp)
- && Objects.equal(this.ipVersion, that.ipVersion)
- && Objects.equal(this.cidr, that.cidr)
- && Objects.equal(this.allocationPools, that.allocationPools)
- && Objects.equal(this.enableDhcp, that.enableDhcp)
- && Objects.equal(this.dnsNameServers, that.dnsNameServers)
- && Objects.equal(this.hostRoutes, that.hostRoutes);
- }
-
- protected Objects.ToStringHelper string() {
- return Objects.toStringHelper(this)
- .add("name", name).add("networkId", networkId).add("gatewayIp", gatewayIp).add("ipVersion", ipVersion)
- .add("cidr", cidr).add("enableDhcp", enableDhcp).add("allocationPools", allocationPools)
- .add("dnsNameServers", dnsNameServers).add("hostRoutes", hostRoutes);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder builder() {
- return new ConcreteBuilder();
- }
-
- public Builder toBuilder() {
- return new ConcreteBuilder().fromBulkSubnet(this);
- }
-
- public abstract static class Builder {
- protected abstract Builder self();
-
- protected String name;
- protected String networkId;
- protected String gatewayIp;
- protected Integer ipVersion;
- protected String cidr;
- protected Set allocationPools;
- protected Boolean enableDhcp;
- protected Set dnsNameServers;
- protected Set hostRoutes;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getName()
- */
- public Builder name(String name) {
- this.name = name;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getNetworkId()
- */
- public Builder networkId(String networkId) {
- this.networkId = networkId;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getGatewayIp()
- */
- public Builder gatewayIp(String gatewayIp) {
- this.gatewayIp = gatewayIp;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getIpVersion()
- */
- public Builder ipVersion(Integer ipVersion) {
- this.ipVersion = ipVersion;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getCidr()
- */
- public Builder cidr(String cidr) {
- this.cidr = cidr;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getAllocationPools()
- */
- public Builder allocationPools(Collection allocationPools) {
- this.allocationPools = ImmutableSet.copyOf(allocationPools);
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getEnableDhcp()
- */
- public Builder enableDhcp(Boolean enableDhcp) {
- this.enableDhcp = enableDhcp;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getDnsNameServers()
- */
- public Builder dnsNameServers(Collection dnsNameServers) {
- this.dnsNameServers = ImmutableSet.copyOf(dnsNameServers);
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.BulkSubnet#getHostRoutes()
- */
- public Builder hostRoutes(Collection hostRoutes) {
- this.hostRoutes = ImmutableSet.copyOf(hostRoutes);
- return self();
- }
-
- public BulkSubnet build() {
- return new BulkSubnet(name, networkId, gatewayIp, ipVersion, cidr, allocationPools, enableDhcp, dnsNameServers, hostRoutes);
- }
-
- public Builder fromBulkSubnet(BulkSubnet in) {
- return this.name(in.getName())
- .networkId(in.getNetworkId())
- .gatewayIp(in.getGatewayIp())
- .ipVersion(in.getIpVersion())
- .cidr(in.getCidr())
- .allocationPools(in.getAllocationPools())
- .enableDhcp(in.getEnableDhcp())
- .dnsNameServers(in.getDnsNameServers())
- .hostRoutes(in.getHostRoutes());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/ExternalGatewayInfo.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/ExternalGatewayInfo.java
deleted file mode 100644
index f5473ed767..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/ExternalGatewayInfo.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-
-import java.beans.ConstructorProperties;
-
-/**
- * Information on external gateway for the router
- */
-public class ExternalGatewayInfo {
-
- private final String networkId;
-
- @ConstructorProperties({"network_id"})
- protected ExternalGatewayInfo(String networkId) {
- this.networkId = networkId;
- }
-
- /**
- * @return the id of the network which is used as external gateway for the router
- */
- public String getNetworkId() {
- return networkId;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(networkId);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- ExternalGatewayInfo that = ExternalGatewayInfo.class.cast(obj);
- return Objects.equal(this.networkId, that.networkId);
- }
-
- protected Objects.ToStringHelper string() {
- return Objects.toStringHelper(this).add("networkId", networkId);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder builder() {
- return new ConcreteBuilder();
- }
-
- public Builder toBuilder() {
- return new ConcreteBuilder().fromExternalGatewayInfo(this);
- }
-
- public abstract static class Builder {
- protected abstract Builder self();
-
- protected String networkId;
-
- /**
- * @see ExternalGatewayInfo#getNetworkId()
- */
- public Builder networkId(String networkId) {
- this.networkId = networkId;
- return self();
- }
-
- public ExternalGatewayInfo build() {
- return new ExternalGatewayInfo(networkId);
- }
-
- public Builder fromExternalGatewayInfo(ExternalGatewayInfo in) {
- return this.networkId(in.getNetworkId());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/HostRoute.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/HostRoute.java
deleted file mode 100644
index c5dcb56513..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/HostRoute.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-import java.beans.ConstructorProperties;
-
-/**
- * A Neutron Subnet Host Route
- *
- * @see api doc
- */
-public class HostRoute {
-
- private final String destinationCidr;
- private final String nextHop;
-
- @ConstructorProperties({
- "destination", "nexthop"
- })
- protected HostRoute(String destinationCidr, String nextHop) {
- this.destinationCidr = destinationCidr;
- this.nextHop = nextHop;
- }
-
- /**
- * @return the destination cidr for this route
- */
- public String getDestinationCidr() {
- return destinationCidr;
- }
-
- /**
- * @return the ip of the next hop to forward traffic to
- */
- public String getNextHop() {
- return nextHop;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(destinationCidr, nextHop);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- HostRoute that = HostRoute.class.cast(obj);
- return Objects.equal(this.destinationCidr, that.destinationCidr) && Objects.equal(this.nextHop, that.nextHop);
- }
-
- protected ToStringHelper string() {
- return Objects.toStringHelper(this)
- .add("destinationCidr", destinationCidr).add("nextHop", nextHop);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder builder() {
- return new ConcreteBuilder();
- }
-
- public Builder toBuilder() {
- return new ConcreteBuilder().fromHostRoute(this);
- }
-
- public abstract static class Builder {
- protected abstract Builder self();
-
- protected String destinationCidr;
- protected String nextHop;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.HostRoute#getDestinationCidr()
- */
- public Builder destinationCidr(String destinationCidr) {
- this.destinationCidr = destinationCidr;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.HostRoute#getNextHop()
- */
- public Builder nextHop(String nextHop) {
- this.nextHop = nextHop;
- return self();
- }
-
- public HostRoute build() {
- return new HostRoute(destinationCidr, nextHop);
- }
-
- public Builder fromHostRoute(HostRoute in) {
- return this.destinationCidr(in.getDestinationCidr()).nextHop(in.getNextHop());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/IP.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/IP.java
deleted file mode 100644
index 689a53ea8e..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/IP.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-
-import java.beans.ConstructorProperties;
-
-public class IP {
-
- private String ipAddress;
- private String subnetId;
-
- @ConstructorProperties({
- "ip_address", "subnet_id"
- })
- protected IP(String ipAddress, String subnetId) {
- this.ipAddress = ipAddress;
- this.subnetId = subnetId;
- }
-
- /**
- * @return the fixed ip address
- */
- public String getIpAddress() {
- return ipAddress;
- }
-
- /**
- * @return the id of the subnet of this ip
- */
- public String getSubnetId() {
- return subnetId;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(ipAddress, subnetId);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- IP that = IP.class.cast(obj);
- return Objects.equal(this.ipAddress, that.ipAddress) && Objects.equal(this.subnetId, that.subnetId);
- }
-
- protected Objects.ToStringHelper string() {
- return Objects.toStringHelper(this)
- .add("ipAddress", ipAddress).add("subnetId", subnetId);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder builder() {
- return new ConcreteBuilder();
- }
-
- public Builder toBuilder() {
- return new ConcreteBuilder().fromIP(this);
- }
-
- public abstract static class Builder {
- protected abstract Builder self();
-
- protected String ipAddress;
- protected String subnetId;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.IP#getIpAddress
- */
- public Builder ipAddress(String ipAddress) {
- this.ipAddress = ipAddress;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.IP#getSubnetId
- */
- public Builder subnetId(String subnetId) {
- this.subnetId = subnetId;
- return self();
- }
-
- public IP build() {
- return new IP(ipAddress, subnetId);
- }
-
- public Builder fromIP(IP in) {
- return this.ipAddress(in.getIpAddress()).subnetId(in.getSubnetId());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Network.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Network.java
deleted file mode 100644
index 3aa1804291..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Network.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-
-import java.beans.ConstructorProperties;
-import java.util.Set;
-
-/**
- * A Neutron network
- *
- * @see api doc
- */
-public class Network extends ReferenceWithName {
-
- private final State state;
- private final Set subnets;
- private final Boolean adminStateUp;
- private final Boolean shared;
- private final Boolean external;
- private final NetworkType networkType;
- private final String physicalNetworkName;
- private final Integer segmentationId;
-
- @ConstructorProperties({
- "id", "tenant_id", "name", "status", "subnets", "admin_state_up", "shared", "router:external",
- "provider:network_type", "provider:physical_network", "provider:segmentation_id"
- })
- protected Network(String id, String tenantId, String name, State state,
- Set subnets, Boolean adminStateUp, Boolean shared, Boolean external,
- String networkType, String physicalNetworkName, Integer segmentationId) {
- super(id, tenantId, name);
- this.state = state;
- this.subnets = subnets != null ? ImmutableSet.copyOf(subnets) : ImmutableSet.of();
- this.adminStateUp = adminStateUp;
- this.shared = shared;
- this.external = external;
- this.networkType = networkType != null ? NetworkType.fromValue(networkType) : null;
- this.physicalNetworkName = physicalNetworkName;
- this.segmentationId = segmentationId;
- }
-
- /**
- * @return the current state of the network
- */
- public State getState() {
- return state;
- }
-
- /**
- * @return set of subnet ids that are associated with this network
- */
- public Set getSubnets() {
- return subnets;
- }
-
- /**
- * @return the administrative state of network. If false, the network does not forward packets.
- */
- public Boolean getAdminStateUp() {
- return adminStateUp;
- }
-
- /**
- * @return true if the network resource can be accessed by any tenant or not, false if not
- */
- public Boolean getShared() {
- return shared;
- }
-
- /**
- * @return true if network is external, false if not
- */
- public Boolean getExternal() {
- return external;
- }
-
- /**
- * @return the type of network
- */
- public NetworkType getNetworkType() {
- return networkType;
- }
-
- /**
- * @return the physical network name
- */
- public String getPhysicalNetworkName() {
- return physicalNetworkName;
- }
-
- /**
- * @return the segmentation id of the network
- */
- public Integer getSegmentationId() {
- return segmentationId;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), state, subnets, adminStateUp, shared, external,
- networkType, physicalNetworkName, segmentationId);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- Network that = Network.class.cast(obj);
- return super.equals(obj)
- && Objects.equal(this.state, that.state)
- && Objects.equal(this.subnets, that.subnets)
- && Objects.equal(this.adminStateUp, that.adminStateUp)
- && Objects.equal(this.shared, that.shared)
- && Objects.equal(this.external, that.external)
- && Objects.equal(this.networkType, that.networkType)
- && Objects.equal(this.physicalNetworkName, that.physicalNetworkName)
- && Objects.equal(this.segmentationId, that.segmentationId);
- }
-
- protected Objects.ToStringHelper string() {
- return super.string()
- .add("state", state).add("subnets", subnets).add("adminStateUp", adminStateUp).add("shared", shared).add("external", external)
- .add("networkType", networkType).add("physicalNetworkName", physicalNetworkName).add("segmentationId", segmentationId);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder> toBuilder() {
- return new ConcreteBuilder().fromNetwork(this);
- }
-
- public abstract static class Builder> extends ReferenceWithName.Builder {
- protected State state;
- protected Set subnets;
- protected Boolean adminStateUp;
- protected Boolean shared;
- protected Boolean external;
- protected NetworkType networkType;
- protected String physicalNetworkName;
- protected Integer segmentationId;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Network#getState()
- */
- public T state(State state) {
- this.state = state;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Network#getSubnets()
- */
- public T subnets(Set subnets) {
- this.subnets = subnets;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Network#getAdminStateUp()
- */
- public T adminStateUp(Boolean adminStateUp) {
- this.adminStateUp = adminStateUp;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Network#getShared()
- */
- public T shared(Boolean shared) {
- this.shared = shared;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Network#getExternal()
- */
- public T external(Boolean external) {
- this.external = external;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Network#getNetworkType()
- */
- public T networkType(NetworkType networkType) {
- this.networkType = networkType;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Network#getPhysicalNetworkName()
- */
- public T physicalNetworkName(String physicalNetworkName) {
- this.physicalNetworkName = physicalNetworkName;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Network#getSegmentationId()
- */
- public T segmentationId(Integer segmentationId) {
- this.segmentationId = segmentationId;
- return self();
- }
-
- public Network build() {
- return new Network(id, tenantId, name, state, subnets, adminStateUp, shared, external, networkType == null ? null : networkType.getValue(), physicalNetworkName, segmentationId);
- }
-
- public T fromNetwork(Network in) {
- return super.fromReference(in)
- .state(in.getState())
- .subnets(in.getSubnets())
- .adminStateUp(in.getAdminStateUp())
- .shared(in.getShared())
- .external(in.getExternal())
- .networkType(in.getNetworkType())
- .physicalNetworkName(in.getPhysicalNetworkName())
- .segmentationId(in.getSegmentationId());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/NetworkType.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/NetworkType.java
deleted file mode 100644
index b0f1d205cf..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/NetworkType.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-/**
- * The type of Network
- */
-public enum NetworkType {
- LOCAL("local"), FLAT("flat"), VLAN("vlan"), GRE("gre");
-
- private String value;
-
- private NetworkType(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-
- public static NetworkType fromValue(String value) {
- return NetworkType.valueOf(value.toUpperCase());
- }
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Port.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Port.java
deleted file mode 100644
index 75f491fadc..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Port.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-
-import java.beans.ConstructorProperties;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * A Neutron port
- *
- * @see api doc
- */
-public class Port extends ReferenceWithName {
-
- private final State state;
- private final Boolean adminStateUp;
- private final String networkId;
- private final String deviceId;
- private final String deviceOwner;
- private final String macAddress;
- private final Set fixedIps;
-
- @ConstructorProperties({
- "id", "tenant_id", "name", "status", "network_id", "admin_state_up", "device_id", "device_owner", "fixed_ips", "mac_address"
- })
- protected Port(String id, String tenantId, String name, State state, String networkId, Boolean adminStateUp,
- String deviceId, String deviceOwner, Set fixedIps, String macAddress) {
- super(id, tenantId, name);
- this.adminStateUp = adminStateUp;
- this.state = state;
- this.networkId = checkNotNull(networkId, "networkId");
- this.deviceId = deviceId;
- this.deviceOwner = deviceOwner;
- this.fixedIps = fixedIps;
- this.macAddress = macAddress;
- }
-
- /**
- * @return the current state of the port
- */
- public State getState() {
- return this.state;
- }
-
- /**
- * @return the administrative state of port. If false, port does not forward packets.
- */
- public Boolean getAdminStateUp() {
- return adminStateUp;
- }
-
- /**
- * @return the id of the network where this port is associated with
- */
- public String getNetworkId() {
- return networkId;
- }
-
- /**
- * @return the id of the device (e.g. server) using this port.
- */
- public String getDeviceId() {
- return deviceId;
- }
-
- /**
- * @return the entity (e.g.: dhcp agent) using this port.
- */
- public String getDeviceOwner() {
- return deviceOwner;
- }
-
- /**
- * @return the set of fixed ips this port has been assigned
- */
- public Set getFixedIps() {
- return fixedIps;
- }
-
- /**
- * @return the mac address of this port
- */
- public String getMacAddress() {
- return macAddress;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), state, adminStateUp, networkId, deviceId, deviceOwner, fixedIps, macAddress);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- Port that = Port.class.cast(obj);
- return super.equals(obj)
- && Objects.equal(this.state, that.state)
- && Objects.equal(this.adminStateUp, that.adminStateUp)
- && Objects.equal(this.networkId, that.networkId)
- && Objects.equal(this.deviceId, that.deviceId)
- && Objects.equal(this.deviceOwner, that.deviceOwner)
- && Objects.equal(this.fixedIps, that.fixedIps)
- && Objects.equal(this.macAddress, that.macAddress);
- }
-
- protected Objects.ToStringHelper string() {
- return super.string()
- .add("state", state).add("adminStateUp", adminStateUp).add("networkId", networkId).add("deviceId", deviceId)
- .add("deviceOwner", deviceOwner).add("fixedIps", fixedIps).add("macAddress", macAddress);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder> toBuilder() {
- return new ConcreteBuilder().fromPort(this);
- }
-
- public abstract static class Builder> extends ReferenceWithName.Builder {
- protected String networkId;
- protected String deviceId;
- protected String deviceOwner;
- protected String macAddress;
- protected Set fixedIps;
- protected State state;
- protected Boolean adminStateUp;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Port#getState()
- */
- public T state(State state) {
- this.state = state;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Port#getNetworkId()
- */
- public T networkId(String networkId) {
- this.networkId = networkId;
- return self();
- }
-
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Port#getAdminStateUp()
- */
- public T adminStateUp(Boolean adminStateUp) {
- this.adminStateUp = adminStateUp;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Port#getDeviceId()
- */
- public T deviceId(String deviceId) {
- this.deviceId = deviceId;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Port#getDeviceOwner()
- */
- public T deviceOwner(String deviceOwner) {
- this.deviceOwner = deviceOwner;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Port#getDeviceId()
- */
- public T fixedIps(Set fixedIps) {
- this.fixedIps = fixedIps;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Port#getMacAddress()
- */
- public T macAddress(String macAddress) {
- this.macAddress = macAddress;
- return self();
- }
-
- public Port build() {
- return new Port(id, tenantId, name, state, networkId, adminStateUp, deviceId, deviceOwner, fixedIps, macAddress);
- }
-
- public T fromPort(Port in) {
- return super.fromReference(in)
- .state(in.getState())
- .networkId(in.getNetworkId())
- .adminStateUp(in.getAdminStateUp())
- .deviceId(in.getDeviceId())
- .deviceOwner(in.getDeviceOwner())
- .fixedIps(in.getFixedIps())
- .macAddress(in.getMacAddress());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Reference.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Reference.java
deleted file mode 100644
index 045811883e..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Reference.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-
-import java.beans.ConstructorProperties;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Base class for beans in the Neutron v2.0 api
- *
- * @see api doc
- */
-public class Reference {
-
- private final String id;
- private final String tenantId;
-
- @ConstructorProperties({
- "id", "tenant_id"
- })
- protected Reference(String id, String tenantId) {
- this.id = checkNotNull(id, "id");
- this.tenantId = checkNotNull(tenantId, "tenantId");
- }
-
- /**
- * @return the id of the entity
- */
- public String getId() {
- return this.id;
- }
-
- /**
- * @return the id of the tenant where this entity is associated with
- */
- public String getTenantId() {
- return tenantId;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(id, tenantId);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- Reference that = Reference.class.cast(obj);
- return Objects.equal(this.id, that.id) && Objects.equal(this.tenantId, that.tenantId);
- }
-
- protected Objects.ToStringHelper string() {
- return Objects.toStringHelper(this)
- .add("id", id).add("tenantId", tenantId);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder> toBuilder() {
- return new ConcreteBuilder().fromReference(this);
- }
-
- public abstract static class Builder> {
- protected abstract T self();
-
- protected String id;
- protected String tenantId;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Reference#getId()
- */
- public T id(String id) {
- this.id = id;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Reference#getTenantId()
- */
- public T tenantId(String tenantId) {
- this.tenantId = tenantId;
- return self();
- }
-
- public Reference build() {
- return new Reference(id, tenantId);
- }
-
- public T fromReference(Reference in) {
- return this.id(in.getId()).tenantId(in.getTenantId());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/ReferenceWithName.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/ReferenceWithName.java
deleted file mode 100644
index 28db0bec6d..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/ReferenceWithName.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.base.Strings;
-
-import java.beans.ConstructorProperties;
-
-/**
- * Base class for beans in the Neutron v2.0 api
- *
- * @see api doc
- */
-public class ReferenceWithName extends Reference {
-
- private final String name;
-
- @ConstructorProperties({
- "id", "tenant_id", "name"
- })
- protected ReferenceWithName(String id, String tenantId, String name) {
- super(id, tenantId);
- this.name = Strings.nullToEmpty(name);
- }
-
- /**
- * @return the name of the entity
- */
- public String getName() {
- return name;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), name);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- ReferenceWithName that = ReferenceWithName.class.cast(obj);
- return super.equals(obj) && Objects.equal(this.name, that.name);
- }
-
- protected ToStringHelper string() {
- return super.string().add("name", name);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder> toBuilder() {
- return new ConcreteBuilder().fromReferenceWithName(this);
- }
-
- public abstract static class Builder> extends Reference.Builder {
- protected abstract T self();
-
- protected String name;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.ReferenceWithName#getName()
- */
- public T name(String name) {
- this.name = name;
- return self();
- }
-
- public ReferenceWithName build() {
- return new ReferenceWithName(id, tenantId, name);
- }
-
- public T fromReferenceWithName(ReferenceWithName in) {
- return super.fromReference(in).name(in.getName());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Router.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Router.java
deleted file mode 100644
index 5096ed9638..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Router.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-
-import java.beans.ConstructorProperties;
-
-/**
- * A Neutron Router
- *
- * @see api doc
- */
-public class Router extends ReferenceWithName {
-
- private final Boolean adminStateUp;
- private final State state;
- private final ExternalGatewayInfo externalGatewayInfo;
-
- @ConstructorProperties({
- "id", "tenant_id", "name", "admin_state_up", "status", "external_gateway_info"
- })
- protected Router(String id, String tenantId, String name, Boolean adminStateUp, State state, ExternalGatewayInfo externalGatewayInfo) {
- super(id, tenantId, name);
- this.adminStateUp = adminStateUp;
- this.state = state;
- this.externalGatewayInfo = externalGatewayInfo;
- }
-
- /**
- * @return the administrative state of the router
- */
- public Boolean getAdminStateUp() {
- return adminStateUp;
- }
-
- /**
- * @return the current state of the router
- */
- public State getState() {
- return state;
- }
-
- /**
- * @return the information on external gateway for the router
- */
- public ExternalGatewayInfo getExternalGatewayInfo() {
- return externalGatewayInfo;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), adminStateUp, state, externalGatewayInfo);
- }
-
- @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, that.adminStateUp)
- && Objects.equal(this.state, that.state)
- && Objects.equal(this.externalGatewayInfo, that.externalGatewayInfo);
- }
-
- protected Objects.ToStringHelper string() {
- return super.string()
- .add("adminStateUp", adminStateUp).add("state", state).add("externalGatewayInfo", externalGatewayInfo != null ? externalGatewayInfo.toString() : "");
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder> toBuilder() {
- return new ConcreteBuilder().fromRouter(this);
- }
-
- public abstract static class Builder> extends ReferenceWithName.Builder {
-
- protected Boolean adminStateUp;
- protected State state;
- protected ExternalGatewayInfo externalGatewayInfo;
-
- /**
- * @see Router#getAdminStateUp()
- */
- public T adminStateUp(Boolean adminStateUp) {
- this.adminStateUp = adminStateUp;
- return self();
- }
-
- /**
- * @see Router#getState()
- */
- public T state(State state) {
- this.state = state;
- return self();
- }
-
- /**
- * @see Router#getExternalGatewayInfo()
- */
- public T externalGatewayInfo(ExternalGatewayInfo externalGatewayInfo) {
- this.externalGatewayInfo = externalGatewayInfo;
- return self();
- }
-
- public Router build() {
- return new Router(id, tenantId, name, adminStateUp, state, externalGatewayInfo);
- }
-
- public T fromRouter(Router in) {
- return super.fromReference(in)
- .adminStateUp(in.getAdminStateUp())
- .state(in.getState())
- .externalGatewayInfo(in.getExternalGatewayInfo());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/RouterInterface.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/RouterInterface.java
deleted file mode 100644
index f1a9c70e40..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/RouterInterface.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-
-import java.beans.ConstructorProperties;
-
-/**
- * A Neutron Router Interface
- *
- * @see api doc
- */
-public class RouterInterface {
-
- private final String subnetId;
- private final String portId;
-
- @ConstructorProperties({
- "subnet_id", "port_id"
- })
- protected RouterInterface(String subnetId, String portId) {
- this.subnetId = subnetId;
- this.portId = portId;
- }
-
- /**
- * @return the id of the subnet this router interface is associated with
- */
- public String getSubnetId() {
- return subnetId;
- }
-
- /**
- * @return the id of the port this router interface is associated with
- */
- public String getPortId() {
- return portId;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(subnetId, portId);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- RouterInterface that = RouterInterface.class.cast(obj);
- return Objects.equal(this.subnetId, that.subnetId) && Objects.equal(this.portId, that.portId);
- }
-
- protected Objects.ToStringHelper string() {
- return Objects.toStringHelper(this)
- .add("subnetId", subnetId).add("portId", portId);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder builder() {
- return new ConcreteBuilder();
- }
-
- public Builder toBuilder() {
- return new ConcreteBuilder().fromRouterInterface(this);
- }
-
- public abstract static class Builder {
- protected abstract Builder self();
-
- protected String subnetId;
- protected String portId;
-
- /**
- * @see RouterInterface#getSubnetId()
- */
- public Builder subnetId(String subnetId) {
- this.subnetId = subnetId;
- return self();
- }
-
- /**
- * @see RouterInterface#getPortId()
- */
- public Builder portId(String portId) {
- this.portId = portId;
- return self();
- }
-
- public RouterInterface build() {
- return new RouterInterface(subnetId, portId);
- }
-
- public Builder fromRouterInterface(RouterInterface in) {
- return this.subnetId(in.getSubnetId()).portId(in.getPortId());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/State.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/State.java
deleted file mode 100644
index e276df86ba..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/State.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-/**
- * The possible state of an entity
- *
- * @see api doc
- */
-public enum State {
- ACTIVE, DOWN, BUILD, ERROR
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Subnet.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Subnet.java
deleted file mode 100644
index 9faf8bd879..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Subnet.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.domain;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.collect.ImmutableSet;
-
-import java.beans.ConstructorProperties;
-import java.util.Collection;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * A Neutron subnet
- *
- * @see api doc
- */
-public class Subnet extends ReferenceWithName {
-
- private final String networkId;
- private final String gatewayIp;
- private final Integer ipVersion;
- private final String cidr;
- private final Set allocationPools;
- private final Boolean enableDhcp;
- private final Set dnsNameServers;
- private final Set hostRoutes;
-
- @ConstructorProperties({
- "id", "tenant_id", "name", "network_id", "gateway_ip", "ip_version", "cidr", "allocation_pools", "enable_dhcp", "dns_nameservers", "host_routes"
- })
- protected Subnet(String id, String tenantId, String name, String networkId,
- String gatewayIp, Integer ipVersion, String cidr, Set allocationPools,
- Boolean enableDhcp, Set dnsNameServers, Set hostRoutes) {
- super(id, tenantId, name);
- this.networkId = checkNotNull(networkId, "networkId");
- this.gatewayIp = gatewayIp;
- this.ipVersion = checkNotNull(ipVersion, "ipVersion");
- this.cidr = checkNotNull(cidr, "cidr");
- this.allocationPools = allocationPools != null ? ImmutableSet.copyOf(allocationPools) : ImmutableSet.of();
- this.enableDhcp = enableDhcp;
- this.dnsNameServers = dnsNameServers != null ? ImmutableSet.copyOf(dnsNameServers) : ImmutableSet.of();
- this.hostRoutes = hostRoutes != null ? ImmutableSet.copyOf(hostRoutes) : ImmutableSet.of();
- }
-
- /**
- * @return the id of the network this subnet is associated with
- */
- public String getNetworkId() {
- return networkId;
- }
-
- /**
- * @return the default gateway used by devices in this subnet
- */
- public String getGatewayIp() {
- return gatewayIp;
- }
-
- /**
- * @return the ip version used by this subnet
- */
- public Integer getIpVersion() {
- return ipVersion;
- }
-
- /**
- * @return the cidr representing the IP range for this subnet, based on IP version
- */
- public String getCidr() {
- return cidr;
- }
-
- /**
- * @return the sub-ranges of cidr available for dynamic allocation to ports
- */
- public Set getAllocationPools() {
- return allocationPools;
- }
-
- /**
- * @return true if DHCP is enabled for this subnet, false if not.
- */
- public Boolean getEnableDhcp() {
- return enableDhcp;
- }
-
- /**
- * @return the set of DNS name servers used by hosts in this subnet.
- */
- public Set getDnsNameServers() {
- return dnsNameServers;
- }
-
- /**
- * @return the set of routes that should be used by devices with IPs from this subnet
- */
- public Set getHostRoutes() {
- return hostRoutes;
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), networkId, gatewayIp, ipVersion, cidr,
- allocationPools, enableDhcp, dnsNameServers, hostRoutes);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) return true;
- if (obj == null || getClass() != obj.getClass()) return false;
- Subnet that = Subnet.class.cast(obj);
- return super.equals(obj)
- && Objects.equal(this.networkId, that.networkId)
- && Objects.equal(this.gatewayIp, that.gatewayIp)
- && Objects.equal(this.ipVersion, that.ipVersion)
- && Objects.equal(this.cidr, that.cidr)
- && Objects.equal(this.allocationPools, that.allocationPools)
- && Objects.equal(this.enableDhcp, that.enableDhcp)
- && Objects.equal(this.dnsNameServers, that.dnsNameServers)
- && Objects.equal(this.hostRoutes, that.hostRoutes);
- }
-
- protected ToStringHelper string() {
- return super.string()
- .add("networkId", networkId)
- .add("gatewayIp", gatewayIp)
- .add("ipVersion", ipVersion)
- .add("cidr", cidr)
- .add("enableDHCP", enableDhcp)
- .add("allocationPools", allocationPools)
- .add("dnsNameServers", dnsNameServers)
- .add("hostRoutes", hostRoutes);
- }
-
- @Override
- public String toString() {
- return string().toString();
- }
-
- public static Builder> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder> toBuilder() {
- return new ConcreteBuilder().fromSubnet(this);
- }
-
- public abstract static class Builder> extends ReferenceWithName.Builder {
- protected String networkId;
- protected String gatewayIp;
- protected Integer ipVersion;
- protected String cidr;
- protected Set allocationPools;
- protected Boolean enableDhcp;
- protected Set dnsNameServers;
- protected Set hostRoutes;
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Subnet#getNetworkId()
- */
- public T networkId(String networkId) {
- this.networkId = networkId;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Subnet#getGatewayIp()
- */
- public T gatewayIp(String gatewayIp) {
- this.gatewayIp = gatewayIp;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Subnet#getIpVersion()
- */
- public T ipVersion(Integer ipVersion) {
- this.ipVersion = ipVersion;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Subnet#getCidr()
- */
- public T cidr(String cidr) {
- this.cidr = cidr;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Subnet#getAllocationPools()
- */
- public T allocationPools(Collection allocationPools) {
- this.allocationPools = ImmutableSet.copyOf(allocationPools);
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Subnet#getEnableDhcp()
- */
- public T enableDhcp(Boolean enableDhcp) {
- this.enableDhcp = enableDhcp;
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Subnet#getDnsNameServers()
- */
- public T dnsNameServers(Collection dnsNameServers) {
- this.dnsNameServers = ImmutableSet.copyOf(dnsNameServers);
- return self();
- }
-
- /**
- * @see org.jclouds.openstack.neutron.v2_0.domain.Subnet#getHostRoutes()
- */
- public T hostRoutes(Collection hostRoutes) {
- this.hostRoutes = ImmutableSet.copyOf(hostRoutes);
- return self();
- }
-
- public Subnet build() {
- return new Subnet(id, tenantId, name, networkId, gatewayIp, ipVersion, cidr, allocationPools, enableDhcp, dnsNameServers, hostRoutes);
- }
-
- public T fromSubnet(Subnet in) {
- return super.fromReference(in)
- .networkId(in.getNetworkId())
- .gatewayIp(in.getGatewayIp())
- .ipVersion(in.getIpVersion())
- .cidr(in.getCidr())
- .allocationPools(in.getAllocationPools())
- .enableDhcp(in.getEnableDhcp())
- .dnsNameServers(in.getDnsNameServers())
- .hostRoutes(in.getHostRoutes());
- }
- }
-
- private static class ConcreteBuilder extends Builder {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/extensions/RouterApi.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/extensions/RouterApi.java
deleted file mode 100644
index 3da0e34cd5..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/extensions/RouterApi.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.extensions;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.Fallbacks;
-import org.jclouds.collect.PagedIterable;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.openstack.keystone.v2_0.KeystoneFallbacks.EmptyPaginatedCollectionOnNotFoundOr404;
-import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
-import org.jclouds.openstack.neutron.v2_0.domain.ReferenceWithName;
-import org.jclouds.openstack.neutron.v2_0.domain.Router;
-import org.jclouds.openstack.neutron.v2_0.domain.RouterInterface;
-import org.jclouds.openstack.neutron.v2_0.functions.ParseRouterDetails;
-import org.jclouds.openstack.neutron.v2_0.functions.ParseRouters;
-import org.jclouds.openstack.neutron.v2_0.options.CreateRouterOptions;
-import org.jclouds.openstack.neutron.v2_0.options.EmptyOptions;
-import org.jclouds.openstack.neutron.v2_0.options.UpdateRouterOptions;
-import org.jclouds.openstack.v2_0.options.PaginationOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.annotations.Transform;
-
-/**
- * Provides access to Router operations for the OpenStack Networking (Neutron) v2 API.
- *
- * A logical entity for forwarding packets across internal subnets and NATting them on external
- * networks through an appropriate external gateway.
- *
- * @deprecated Please use {@link org.jclouds.openstack.neutron.v2.extensions.RouterApi} instead.
- * To be removed in jclouds 2.0.
- */
-@Deprecated
-@Path("/v2.0/routers")
-@RequestFilters(AuthenticateRequest.class)
-@Consumes(MediaType.APPLICATION_JSON)
-public interface RouterApi {
-
- /**
- * 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.
- */
- @Named("router:list")
- @GET
- @ResponseParser(ParseRouters.class)
- @Transform(ParseRouters.ToPagedIterable.class)
- @Fallback(Fallbacks.EmptyPagedIterableOnNotFoundOr404.class)
- @QueryParams(keys = {"fields", "fields", "fields"}, values = {"id", "tenant_id", "name"})
- PagedIterable extends ReferenceWithName> list();
-
- /**
- * @see api doc
- */
- @Named("router:list")
- @GET
- @ResponseParser(ParseRouters.class)
- @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
- @QueryParams(keys = {"fields", "fields", "fields"}, values = {"id", "tenant_id", "name"})
- PagedIterable extends ReferenceWithName> list(PaginationOptions options);
-
- /**
- * 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)
- @Transform(ParseRouterDetails.ToPagedIterable.class)
- @Fallback(Fallbacks.EmptyPagedIterableOnNotFoundOr404.class)
- PagedIterable extends Router> listInDetail();
-
- /**
- * @see api doc
- */
- @Named("router:list")
- @GET
- @ResponseParser(ParseRouterDetails.class)
- @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
- PagedIterable extends Router> listInDetail(PaginationOptions options);
-
- /**
- * Returns the specific router.
- *
- * @param id the id of the router to return
- * @return Router or null if not found
- */
- @Named("router:get")
- @GET
- @Path("/{id}")
- @SelectJson("router")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- @Nullable
- Router get(@PathParam("id") String id);
-
- /**
- * Create a new router
- *
- * @param options optional arguments
- * @return the newly created router
- */
- @Named("router:create")
- @POST
- @SelectJson("router")
- @MapBinder(CreateRouterOptions.class)
- Router create(CreateRouterOptions... options);
-
- /**
- * Update a router
- *
- * @param id the id of the router to update
- * @param options the attributes to update
- * @return true if update successful, false if not
- */
- @Named("router:update")
- @PUT
- @Path("/{id}")
- @MapBinder(UpdateRouterOptions.class)
- @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
- boolean update(@PathParam("id") String id, UpdateRouterOptions... options);
-
- /**
- * Deletes the specified router
- *
- * @param id the id of the router to delete
- * @return true if delete successful, false if not
- */
- @Named("router:delete")
- @DELETE
- @Path("/{id}")
- @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
- boolean delete(@PathParam("id") String id);
-
- /**
- * Add a interface to a router to connect to the specified subnet
- *
- * @param routerId the id of the router to create the interface at
- * @param subnetId the id of the subnet to connect with the interface
- * @return the newly-created router interface
- */
- @Named("router:addInterfaceForSubnet")
- @PUT
- @Path("/{id}/add_router_interface")
- @MapBinder(EmptyOptions.class)
- RouterInterface addInterfaceForSubnet(@PathParam("id") String routerId, @PayloadParam("subnet_id") String subnetId);
-
- /**
- * Add a interface to a router to connect to the specified port
- *
- * @param routerId the id of the router to create the interface at
- * @param portId the id of the port to connect with the interface
- * @return the newly-created router interface
- */
- @Named("router:addInterfaceForPort")
- @PUT
- @Path("{id}/add_router_interface")
- @MapBinder(EmptyOptions.class)
- RouterInterface addInterfaceForPort(@PathParam("id") String routerId, @PayloadParam("port_id") String portId);
-
- /**
- * Remove the interface where the specified subnet is connected to
- *
- * @param routerId the id of the router to remove the interface from
- * @param subnetId the id of the subnet to disconnect from the interface
- */
- @Named("router:removeInterfaceForSubnet")
- @PUT
- @Path("/{id}/remove_router_interface")
- @MapBinder(EmptyOptions.class)
- boolean removeInterfaceForSubnet(@PathParam("id") String routerId, @PayloadParam("subnet_id") String subnetId);
-
- /**
- * Remove the interface where the specified port is connected to
- *
- * @param routerId the id of the router to remove the interface from
- * @param portId the id of the port to disconnect from the interface
- */
- @Named("router:removeInterfaceForPort")
- @PUT
- @Path("{id}/remove_router_interface")
- @MapBinder(EmptyOptions.class)
- boolean removeInterfaceForPort(@PathParam("id") String routerId, @PayloadParam("port_id") String portId);
-
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/NetworkApi.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/NetworkApi.java
deleted file mode 100644
index dc7b005607..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/NetworkApi.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.features;
-
-import com.google.common.collect.FluentIterable;
-import org.jclouds.Fallbacks;
-import org.jclouds.collect.PagedIterable;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
-import org.jclouds.openstack.neutron.v2_0.domain.Network;
-import org.jclouds.openstack.neutron.v2_0.domain.ReferenceWithName;
-import org.jclouds.openstack.neutron.v2_0.functions.ParseNetworkDetails;
-import org.jclouds.openstack.neutron.v2_0.functions.ParseNetworks;
-import org.jclouds.openstack.neutron.v2_0.options.CreateNetworkBulkOptions;
-import org.jclouds.openstack.neutron.v2_0.options.CreateNetworkOptions;
-import org.jclouds.openstack.neutron.v2_0.options.UpdateNetworkOptions;
-import org.jclouds.openstack.v2_0.options.PaginationOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.annotations.Transform;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.core.MediaType;
-
-import static org.jclouds.Fallbacks.EmptyPagedIterableOnNotFoundOr404;
-import static org.jclouds.openstack.keystone.v2_0.KeystoneFallbacks.EmptyPaginatedCollectionOnNotFoundOr404;
-
-/**
- * Provides access to Network operations for the OpenStack Networking (Neutron) v2 API.
- *
- * Each tenant can define one or more networks. A network is a virtual isolated layer-2 broadcast domain reserved to the
- * tenant. A tenant can create several ports for a network, and plug virtual interfaces into these ports.
- *
- * @see api doc
- * @deprecated Please use {@link org.jclouds.openstack.neutron.v2.features.NetworkApi} instead.
- * To be removed in jclouds 2.0.
- */
-@Deprecated
-@Path("/v2.0/networks")
-@RequestFilters(AuthenticateRequest.class)
-@Consumes(MediaType.APPLICATION_JSON)
-public interface NetworkApi {
-
- /**
- * Returns the list of all networks currently defined in Neutron for the current tenant. The list provides the unique
- * identifier of each network configured for the tenant.
- *
- * @return the list of all network references configured for the tenant
- */
- @Named("network:list")
- @GET
- @ResponseParser(ParseNetworks.class)
- @Transform(ParseNetworks.ToPagedIterable.class)
- @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
- @QueryParams(keys = {"fields", "fields", "fields"}, values = {"id", "tenant_id", "name"})
- PagedIterable extends ReferenceWithName> list();
-
- /**
- * @see api doc
- */
- @Named("network:list")
- @GET
- @ResponseParser(ParseNetworks.class)
- @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
- @QueryParams(keys = {"fields", "fields", "fields"}, values = {"id", "tenant_id", "name"})
- PagedIterable extends ReferenceWithName> list(PaginationOptions options);
-
- /**
- * Returns all networks currently defined in Neutron for the current tenant.
- *
- * @return the list of all networks configured for the tenant
- */
- @Named("network:list")
- @GET
- @ResponseParser(ParseNetworkDetails.class)
- @Transform(ParseNetworkDetails.ToPagedIterable.class)
- @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
- PagedIterable extends Network> listInDetail();
-
- /**
- * @see api doc
- */
- @Named("network:list")
- @GET
- @ResponseParser(ParseNetworkDetails.class)
- @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
- PagedIterable extends Network> listInDetail(PaginationOptions options);
-
- /**
- * Return a specific network
- *
- * @param id the id of the network to return
- * @return Network or null if not found
- */
- @Named("network:get")
- @GET
- @Path("/{id}")
- @SelectJson("network")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- @Nullable
- Network get(@PathParam("id") String id);
-
- /**
- * Create a new network with the specified type
- *
- * @param options optional arguments
- * @return a reference of the newly-created network
- */
- @Named("network:create")
- @POST
- @SelectJson("network")
- @MapBinder(CreateNetworkOptions.class)
- Network create(CreateNetworkOptions... options);
-
- /**
- * Create multiple networks
- *
- * @param networks the bulk of networks to create
- * @return list of references of the newly-created networks
- */
- @Named("network:createBulk")
- @POST
- @SelectJson("networks")
- @MapBinder(CreateNetworkBulkOptions.class)
- FluentIterable extends Network> createBulk(CreateNetworkBulkOptions networks);
-
- /**
- * Update a network
- *
- * @param id the id of the network to update
- * @param options the attributes to update
- * @return true if update successful, false if not
- */
- @Named("network:update")
- @PUT
- @Path("/{id}")
- @MapBinder(UpdateNetworkOptions.class)
- @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
- boolean update(@PathParam("id") String id, UpdateNetworkOptions... options);
-
- /**
- * Deletes the specified network
- *
- * @param id the id of the network to delete
- * @return true if delete was successful, false if not
- */
- @Named("network:delete")
- @DELETE
- @Path("/{id}")
- @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
- boolean delete(@PathParam("id") String id);
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/PortApi.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/PortApi.java
deleted file mode 100644
index 4aef5cde78..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/PortApi.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.features;
-
-import com.google.common.collect.FluentIterable;
-import org.jclouds.Fallbacks;
-import org.jclouds.collect.PagedIterable;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
-import org.jclouds.openstack.neutron.v2_0.domain.Port;
-import org.jclouds.openstack.neutron.v2_0.domain.ReferenceWithName;
-import org.jclouds.openstack.neutron.v2_0.functions.ParsePortDetails;
-import org.jclouds.openstack.neutron.v2_0.functions.ParsePorts;
-import org.jclouds.openstack.neutron.v2_0.options.CreatePortBulkOptions;
-import org.jclouds.openstack.neutron.v2_0.options.CreatePortOptions;
-import org.jclouds.openstack.neutron.v2_0.options.UpdatePortOptions;
-import org.jclouds.openstack.v2_0.options.PaginationOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.annotations.Transform;
-
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.core.MediaType;
-
-import static org.jclouds.Fallbacks.EmptyPagedIterableOnNotFoundOr404;
-import static org.jclouds.openstack.keystone.v2_0.KeystoneFallbacks.EmptyPaginatedCollectionOnNotFoundOr404;
-
-/**
- * Provides access to Port operations for the OpenStack Networking (Neutron) v2 API.
- *
- * A port represents a virtual switch port on a logical network switch where all the interfaces attached to a given network are connected.
- *
- * A port has an administrative state which is either 'DOWN' or 'ACTIVE'. Ports which are administratively down will not be able to receive/send traffic.
-
- * @see api doc
- * @deprecated Please use {@link org.jclouds.openstack.neutron.v2.features.PortApi} instead.
- * To be removed in jclouds 2.0.
- */
-@Deprecated
-@Path("/v2.0/ports")
-@RequestFilters(AuthenticateRequest.class)
-@Consumes(MediaType.APPLICATION_JSON)
-public interface PortApi {
-
- /**
- * Returns the list of all ports currently defined in Neutron for the current tenant. The list provides the unique
- * identifier of each network configured for the tenant.
- *
- * @return the list of all port references configured for the tenant
- */
- @Named("port:list")
- @GET
- @ResponseParser(ParsePorts.class)
- @Transform(ParsePorts.ToPagedIterable.class)
- @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
- @QueryParams(keys = {"fields", "fields", "fields"}, values = {"id", "tenant_id", "name"})
- PagedIterable extends ReferenceWithName> list();
-
- /**
- * @see api doc
- */
- @Named("port:list")
- @GET
- @ResponseParser(ParsePorts.class)
- @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
- @QueryParams(keys = {"fields", "fields", "fields"}, values = {"id", "tenant_id", "name"})
- PagedIterable extends ReferenceWithName> list(PaginationOptions options);
-
- /**
- * Returns the set of ports currently defined in Neutron for the requested network.
- *
- * @return the list of all ports configured for the tenant
- */
- @Named("port:list")
- @GET
- @ResponseParser(ParsePortDetails.class)
- @Transform(ParsePortDetails.ToPagedIterable.class)
- @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
- PagedIterable extends Port> listInDetail();
-
- /**
- * @see api doc
- */
- @Named("port:list")
- @GET
- @ResponseParser(ParsePortDetails.class)
- @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
- PagedIterable extends Port> listInDetail(PaginationOptions options);
-
- /**
- * Returns the specific port
- *
- * @param id the id of the port to return
- * @return Port or null if not found
- */
- @Named("port:get")
- @GET
- @Path("/{id}")
- @SelectJson("port")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- @Nullable
- Port get(@PathParam("id") String id);
-
- /**
- * Create a new port in the specified network
- *
- * @param networkId the id of the network to associate this port with
- * @param options optional arguments
- * @return a reference of the newly-created port
- */
- @Named("port:create")
- @POST
- @SelectJson("port")
- @MapBinder(CreatePortOptions.class)
- Port create(@PayloadParam("network_id") String networkId, CreatePortOptions... options);
-
- /**
- * Create multiple ports
- *
- * @param ports the bulk of ports to create
- * @return list of references of the newly-created ports
- */
- @Named("port:createBulk")
- @POST
- @SelectJson("ports")
- @MapBinder(CreatePortBulkOptions.class)
- FluentIterable extends Port> createBulk(CreatePortBulkOptions ports);
-
- /**
- * Update a port
- *
- * @param id the id of the port to update
- * @param options the attributes to update
- * @return true if update successful, false if not
- */
- @Named("port:update")
- @PUT
- @Path("/{id}")
- @MapBinder(UpdatePortOptions.class)
- @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
- boolean update(@PathParam("id") String id, UpdatePortOptions... options);
-
- /**
- * Delete a port
- *
- * @param id the id of the port to delete
- * @return true if delete successful, false if not
- */
- @Named("port:delete")
- @DELETE
- @Path("/{id}")
- @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
- boolean delete(@PathParam("id") String id);
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/SubnetApi.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/SubnetApi.java
deleted file mode 100644
index 24ce4b3f00..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/SubnetApi.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jclouds.openstack.neutron.v2_0.features;
-
-import com.google.common.collect.FluentIterable;
-import org.jclouds.Fallbacks;
-import org.jclouds.collect.PagedIterable;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
-import org.jclouds.openstack.neutron.v2_0.domain.ReferenceWithName;
-import org.jclouds.openstack.neutron.v2_0.domain.Subnet;
-import org.jclouds.openstack.neutron.v2_0.functions.ParseSubnetDetails;
-import org.jclouds.openstack.neutron.v2_0.functions.ParseSubnets;
-import org.jclouds.openstack.neutron.v2_0.options.CreateSubnetBulkOptions;
-import org.jclouds.openstack.neutron.v2_0.options.CreateSubnetOptions;
-import org.jclouds.openstack.neutron.v2_0.options.UpdateSubnetOptions;
-import org.jclouds.openstack.v2_0.options.PaginationOptions;
-import org.jclouds.rest.annotations.Fallback;
-import org.jclouds.rest.annotations.MapBinder;
-import org.jclouds.rest.annotations.PayloadParam;
-import org.jclouds.rest.annotations.QueryParams;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.ResponseParser;
-import org.jclouds.rest.annotations.SelectJson;
-import org.jclouds.rest.annotations.Transform;
-
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.core.MediaType;
-
-import static org.jclouds.Fallbacks.EmptyPagedIterableOnNotFoundOr404;
-import static org.jclouds.openstack.keystone.v2_0.KeystoneFallbacks.EmptyPaginatedCollectionOnNotFoundOr404;
-
-/**
- * Provides access to Subnet operations for the OpenStack Networking (Neutron) v2 API.
- *
-
- * @see api doc
- * @deprecated Please use {@link org.jclouds.openstack.neutron.v2.features.SubnetApi} instead.
- * To be removed in jclouds 2.0.
- */
-@Deprecated
-@Path("/v2.0/subnets")
-@RequestFilters(AuthenticateRequest.class)
-@Consumes(MediaType.APPLICATION_JSON)
-public interface SubnetApi {
-
- /**
- * Returns the list of all subnets currently defined in Neutron for the current tenant. The list provides the unique
- * identifier of each subnet configured for the tenant.
- *
- * @return the list of all subnet references configured for the tenant
- */
- @Named("subnet:list")
- @GET
- @ResponseParser(ParseSubnets.class)
- @Transform(ParseSubnets.ToPagedIterable.class)
- @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
- @QueryParams(keys = {"fields", "fields", "fields"}, values = {"id", "tenant_id", "name"})
- PagedIterable extends ReferenceWithName> list();
-
- /**
- * @see api doc
- */
- @Named("subnet:list")
- @GET
- @ResponseParser(ParseSubnets.class)
- @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
- @QueryParams(keys = {"fields", "fields", "fields"}, values = {"id", "tenant_id", "name"})
- PagedIterable extends ReferenceWithName> list(PaginationOptions options);
-
- /**
- * Returns all subnets currently defined in Neutron for the current tenant.
- *
- * @return the list of all subnets configured for the tenant
- */
- @Named("subnet:list")
- @GET
- @ResponseParser(ParseSubnetDetails.class)
- @Transform(ParseSubnetDetails.ToPagedIterable.class)
- @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
- PagedIterable extends Subnet> listInDetail();
-
- /**
- * @see api doc
- */
- @Named("subnet:list")
- @GET
- @ResponseParser(ParseSubnetDetails.class)
- @Fallback(EmptyPaginatedCollectionOnNotFoundOr404.class)
- PagedIterable extends Subnet> listInDetail(PaginationOptions options);
-
- /**
- * Returns the specific Subnet.
- *
- * @param id the id of the subnet to return
- * @return Subnet or null if not found
- */
- @Named("subnet:get")
- @GET
- @Path("/{id}")
- @SelectJson("subnet")
- @Fallback(Fallbacks.NullOnNotFoundOr404.class)
- @Nullable
- Subnet get(@PathParam("id") String id);
-
- /**
- * Create a subnet within a specified network
- *
- * @param networkId the id of the network to associate the subnet with
- * @param ipVersion the ip version of this subnet
- * @param cidr the cidr for this subnet
- * @param options optional arugments
- * @return a reference of the newly-created subnet
- */
- @Named("subnet:create")
- @POST
- @SelectJson("subnet")
- @MapBinder(CreateSubnetOptions.class)
- Subnet create(@PayloadParam("network_id") String networkId, @PayloadParam("ip_version") Integer ipVersion,
- @PayloadParam("cidr") String cidr, CreateSubnetOptions... options);
-
- /**
- * Create multiple subnets
- *
- * @param subnets the bulk of subnets to create
- * @return list of references of the newly-created subnets
- */
- @Named("subnet:createBulk")
- @POST
- @SelectJson("subnets")
- @MapBinder(CreateSubnetBulkOptions.class)
- FluentIterable extends Subnet> createBulk(CreateSubnetBulkOptions subnets);
-
- /**
- * Update a subnet
- *
- * @param id the id of the subnet to update
- * @param options the attributes to update
- * @return true if update was successful, false if not
- */
- @Named("subnet:update")
- @PUT
- @Path("/{id}")
- @MapBinder(UpdateSubnetOptions.class)
- @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
- boolean update(@PathParam("id") String id, UpdateSubnetOptions... options);
-
- /**
- * Delete a subnet
- *
- * @param id the id of the subnet to delete
- * @return true if delete successful, false if not
- */
- @Named("subnet:delete")
- @DELETE
- @Path("/{id}")
- @Fallback(Fallbacks.FalseOnNotFoundOr404.class)
- boolean delete(@PathParam("id") String id);
-}
diff --git a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/functions/ParseNetworkDetails.java b/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/functions/ParseNetworkDetails.java
deleted file mode 100644
index 421bf71dae..0000000000
--- a/apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/functions/ParseNetworkDetails.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.openstack.neutron.v2_0.functions;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.beans.ConstructorProperties;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.collect.internal.Arg0ToPagedIterable;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-import org.jclouds.openstack.neutron.v2_0.NeutronApi;
-import org.jclouds.openstack.neutron.v2_0.domain.Network;
-import org.jclouds.openstack.neutron.v2_0.features.NetworkApi;
-import org.jclouds.openstack.neutron.v2_0.functions.ParseNetworkDetails.Networks;
-import org.jclouds.openstack.v2_0.domain.Link;
-import org.jclouds.openstack.v2_0.domain.PaginatedCollection;
-import org.jclouds.openstack.v2_0.options.PaginationOptions;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.inject.TypeLiteral;
-
-/**
- */
-@Beta
-@Singleton
-public class ParseNetworkDetails extends ParseJson {
- static class Networks extends PaginatedCollection {
-
- @ConstructorProperties({ "networks", "networks_links" })
- protected Networks(Iterable networks, Iterable networksLinks) {
- super(networks, networksLinks);
- }
-
- }
-
- @Inject
- public ParseNetworkDetails(Json json) {
- super(json, TypeLiteral.get(Networks.class));
- }
-
- public static class ToPagedIterable extends Arg0ToPagedIterable.FromCaller {
-
- private final NeutronApi api;
-
- @Inject
- protected ToPagedIterable(NeutronApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function