You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2014/12/23 05:26:44 UTC
[20/51] [partial] stratos git commit: dropping jclouds 1.8.0 clone
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java
deleted file mode 100644
index 588be0a..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java
+++ /dev/null
@@ -1,66 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Predicates.instanceOf;
-import static com.google.common.collect.Iterables.tryFind;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.collect.PagedIterable;
-import org.jclouds.collect.PagedIterables;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.InvocationContext;
-import org.jclouds.rest.internal.GeneratedHttpRequest;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-
-@Beta
-public abstract class BaseToPagedIterable<T, I extends BaseToPagedIterable<T, I>> implements
- Function<ListPage<T>, PagedIterable<T>>, InvocationContext<I> {
-
- private GeneratedHttpRequest request;
-
- @Override
- public PagedIterable<T> apply(ListPage<T> input) {
- if (input.nextMarker() == null)
- return PagedIterables.of(input);
-
- Optional<Object> project = tryFind(request.getCaller().get().getArgs(), instanceOf(String.class));
-
- Optional<Object> listOptions = tryFind(request.getInvocation().getArgs(), instanceOf(ListOptions.class));
-
- assert project.isPresent() : String.format("programming error, method %s should have a string param for the "
- + "project", request.getCaller().get().getInvokable());
-
- return PagedIterables.advance(
- input, fetchNextPage(project.get().toString(), (ListOptions) listOptions.orNull()));
- }
-
- protected abstract Function<Object, IterableWithMarker<T>> fetchNextPage(String projectName,
- ListOptions listOptions);
-
- @SuppressWarnings("unchecked")
- @Override
- public I setContext(HttpRequest request) {
- this.request = GeneratedHttpRequest.class.cast(request);
- return (I) this;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java
deleted file mode 100644
index a4cc52d..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java
+++ /dev/null
@@ -1,72 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Predicates.instanceOf;
-import static com.google.common.collect.Iterables.tryFind;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.collect.PagedIterable;
-import org.jclouds.collect.PagedIterables;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.InvocationContext;
-import org.jclouds.rest.internal.GeneratedHttpRequest;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-
-@Beta
-public abstract class BaseWithRegionToPagedIterable<T, I extends BaseWithRegionToPagedIterable<T, I>> implements
- Function<ListPage<T>, PagedIterable<T>>, InvocationContext<I> {
-
- private GeneratedHttpRequest request;
-
- @Override
- public PagedIterable<T> apply(ListPage<T> input) {
- if (input.nextMarker() == null)
- return PagedIterables.of(input);
-
- Optional <Object> project = tryFind(request.getCaller().get().getArgs(), instanceOf(String.class));
-
- Optional<Object> region = tryFind(request.getInvocation().getArgs(), instanceOf(String.class));
-
- Optional<Object> listOptions = tryFind(request.getInvocation().getArgs(), instanceOf(ListOptions.class));
-
- assert project.isPresent() : String.format("programming error, method %s should have a string param for the "
- + "project", request.getCaller().get().getInvokable());
-
- assert region.isPresent() : String.format("programming error, method %s should have a string param for the "
- + "region", request.getCaller().get().getInvokable());
-
- return PagedIterables.advance(
- input, fetchNextPage(project.get().toString(), region.get().toString(), (ListOptions) listOptions.orNull()));
- }
-
- protected abstract Function<Object, IterableWithMarker<T>> fetchNextPage(String projectName,
- String regionName,
- ListOptions listOptions);
-
- @SuppressWarnings("unchecked")
- @Override
- public I setContext(HttpRequest request) {
- this.request = GeneratedHttpRequest.class.cast(request);
- return (I) this;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java
deleted file mode 100644
index d9dcbf2..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java
+++ /dev/null
@@ -1,72 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Predicates.instanceOf;
-import static com.google.common.collect.Iterables.tryFind;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.collect.PagedIterable;
-import org.jclouds.collect.PagedIterables;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.InvocationContext;
-import org.jclouds.rest.internal.GeneratedHttpRequest;
-
-import com.google.common.annotations.Beta;
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-
-@Beta
-public abstract class BaseWithZoneToPagedIterable<T, I extends BaseWithZoneToPagedIterable<T, I>> implements
- Function<ListPage<T>, PagedIterable<T>>, InvocationContext<I> {
-
- private GeneratedHttpRequest request;
-
- @Override
- public PagedIterable<T> apply(ListPage<T> input) {
- if (input.nextMarker() == null)
- return PagedIterables.of(input);
-
- Optional<Object> project = tryFind(request.getCaller().get().getArgs(), instanceOf(String.class));
-
- Optional<Object> zone = tryFind(request.getInvocation().getArgs(), instanceOf(String.class));
-
- Optional<Object> listOptions = tryFind(request.getInvocation().getArgs(), instanceOf(ListOptions.class));
-
- assert project.isPresent() : String.format("programming error, method %s should have a string param for the "
- + "project", request.getCaller().get().getInvokable());
-
- assert zone.isPresent() : String.format("programming error, method %s should have a string param for the "
- + "zone", request.getCaller().get().getInvokable());
-
- return PagedIterables.advance(
- input, fetchNextPage(project.get().toString(), zone.get().toString(), (ListOptions) listOptions.orNull()));
- }
-
- protected abstract Function<Object, IterableWithMarker<T>> fetchNextPage(String projectName,
- String zoneName,
- ListOptions listOptions);
-
- @SuppressWarnings("unchecked")
- @Override
- public I setContext(HttpRequest request) {
- this.request = GeneratedHttpRequest.class.cast(request);
- return (I) this;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java
deleted file mode 100644
index 4e287dc..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java
+++ /dev/null
@@ -1,35 +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.googlecomputeengine.functions.internal;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import javax.ws.rs.HttpMethod;
-
-/**
- * Indicates that the annotated method responds to HTTP PATCH requests
- *
- * @see javax.ws.rs.HttpMethod
- */
-@Target({ElementType.METHOD})
-@Retention(RetentionPolicy.RUNTIME)
-@HttpMethod("PATCH")
-public @interface PATCH {
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java
deleted file mode 100644
index 59b4408..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java
+++ /dev/null
@@ -1,67 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.Address;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-@Singleton
-public class ParseAddresses extends ParseJson<ListPage<Address>> {
-
- @Inject
- public ParseAddresses(Json json) {
- super(json, new TypeLiteral<ListPage<Address>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseWithRegionToPagedIterable<Address, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Address>> fetchNextPage(final String projectName,
- final String regionName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Address>>() {
-
- @Override
- public IterableWithMarker<Address> apply(Object input) {
- return api.getAddressApiForProject(projectName)
- .listAtMarkerInRegion(regionName, input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java
deleted file mode 100644
index eca4a11..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java
+++ /dev/null
@@ -1,67 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.Disk;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-@Singleton
-public class ParseDisks extends ParseJson<ListPage<Disk>> {
-
- @Inject
- public ParseDisks(Json json) {
- super(json, new TypeLiteral<ListPage<Disk>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseWithZoneToPagedIterable<Disk, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Disk>> fetchNextPage(final String projectName,
- final String zoneName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Disk>>() {
-
- @Override
- public IterableWithMarker<Disk> apply(Object input) {
- return api.getDiskApiForProject(projectName)
- .listAtMarkerInZone(zoneName, input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java
deleted file mode 100644
index 05d11bd..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java
+++ /dev/null
@@ -1,63 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.Firewall;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseFirewalls extends ParseJson<ListPage<Firewall>> {
-
- @Inject
- public ParseFirewalls(Json json) {
- super(json, new TypeLiteral<ListPage<Firewall>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseToPagedIterable<Firewall, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Firewall>> fetchNextPage(final String projectName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Firewall>>() {
-
- @Override
- public IterableWithMarker<Firewall> apply(Object input) {
- return api.getFirewallApiForProject(projectName).listAtMarker(input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java
deleted file mode 100644
index b2a589e..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java
+++ /dev/null
@@ -1,63 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Operation;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseGlobalOperations extends ParseJson<ListPage<Operation>> {
-
- @Inject
- public ParseGlobalOperations(Json json) {
- super(json, new TypeLiteral<ListPage<Operation>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseToPagedIterable<Operation, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Operation>> fetchNextPage(final String projectName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Operation>>() {
-
- @Override
- public IterableWithMarker<Operation> apply(Object input) {
- return api.getGlobalOperationApiForProject(projectName).listAtMarker(input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java
deleted file mode 100644
index 6d23343..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java
+++ /dev/null
@@ -1,63 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.Image;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseImages extends ParseJson<ListPage<Image>> {
-
- @Inject
- public ParseImages(Json json) {
- super(json, new TypeLiteral<ListPage<Image>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseToPagedIterable<Image, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Image>> fetchNextPage(final String projectName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Image>>() {
-
- @Override
- public IterableWithMarker<Image> apply(Object input) {
- return api.getImageApiForProject(projectName).listAtMarker(input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java
deleted file mode 100644
index 001a98c..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java
+++ /dev/null
@@ -1,65 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.Instance;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseInstances extends ParseJson<ListPage<Instance>> {
-
- @Inject
- public ParseInstances(Json json) {
- super(json, new TypeLiteral<ListPage<Instance>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseWithZoneToPagedIterable<Instance, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Instance>> fetchNextPage(final String project,
- final String zone,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Instance>>() {
-
- @Override
- public IterableWithMarker<Instance> apply(Object input) {
- return api.getInstanceApiForProject(project)
- .listAtMarkerInZone(zone, input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java
deleted file mode 100644
index be78b92..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java
+++ /dev/null
@@ -1,64 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.MachineType;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseMachineTypes extends ParseJson<ListPage<MachineType>> {
-
- @Inject
- public ParseMachineTypes(Json json) {
- super(json, new TypeLiteral<ListPage<MachineType>>() {});
- }
-
- public static class ToPagedIterable extends BaseWithZoneToPagedIterable<MachineType, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<MachineType>> fetchNextPage(final String project,
- final String zone,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<MachineType>>() {
-
- @Override
- public IterableWithMarker<MachineType> apply(Object input) {
- return api.getMachineTypeApiForProject(project)
- .listAtMarkerInZone(zone, input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java
deleted file mode 100644
index 0aa550b..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java
+++ /dev/null
@@ -1,63 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Network;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseNetworks extends ParseJson<ListPage<Network>> {
-
- @Inject
- public ParseNetworks(Json json) {
- super(json, new TypeLiteral<ListPage<Network>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseToPagedIterable<Network, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Network>> fetchNextPage(final String projectName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Network>>() {
-
- @Override
- public IterableWithMarker<Network> apply(Object input) {
- return api.getNetworkApiForProject(projectName).listAtMarker(input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java
deleted file mode 100644
index 84c8954..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java
+++ /dev/null
@@ -1,65 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Operation;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseRegionOperations extends ParseJson<ListPage<Operation>> {
-
- @Inject
- public ParseRegionOperations(Json json) {
- super(json, new TypeLiteral<ListPage<Operation>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseWithRegionToPagedIterable<Operation, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Operation>> fetchNextPage(final String projectName,
- final String regionName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Operation>>() {
-
- @Override
- public IterableWithMarker<Operation> apply(Object input) {
- return api.getRegionOperationApiForProject(projectName)
- .listAtMarkerInRegion(regionName, input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java
deleted file mode 100644
index ca1819e..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java
+++ /dev/null
@@ -1,63 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Region;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseRegions extends ParseJson<ListPage<Region>> {
-
- @Inject
- public ParseRegions(Json json) {
- super(json, new TypeLiteral<ListPage<Region>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseToPagedIterable<Region, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Region>> fetchNextPage(final String projectName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Region>>() {
-
- @Override
- public IterableWithMarker<Region> apply(Object input) {
- return api.getRegionApiForProject(projectName).listAtMarker(input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java
deleted file mode 100644
index 6191892..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java
+++ /dev/null
@@ -1,63 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Route;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseRoutes extends ParseJson<ListPage<Route>> {
-
- @Inject
- public ParseRoutes(Json json) {
- super(json, new TypeLiteral<ListPage<Route>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseToPagedIterable<Route, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Route>> fetchNextPage(final String projectName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Route>>() {
-
- @Override
- public IterableWithMarker<Route> apply(Object input) {
- return api.getRouteApiForProject(projectName).listAtMarker(input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java
deleted file mode 100644
index 66ac2e7..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java
+++ /dev/null
@@ -1,66 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Snapshot;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-@Singleton
-public class ParseSnapshots extends ParseJson<ListPage<Snapshot>> {
-
- @Inject
- public ParseSnapshots(Json json) {
- super(json, new TypeLiteral<ListPage<Snapshot>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseToPagedIterable<Snapshot, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Snapshot>> fetchNextPage(final String projectName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Snapshot>>() {
-
- @Override
- public IterableWithMarker<Snapshot> apply(Object input) {
- return api.getSnapshotApiForProject(projectName)
- .listAtMarker(input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java
deleted file mode 100644
index 28cc443..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java
+++ /dev/null
@@ -1,65 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Operation;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseZoneOperations extends ParseJson<ListPage<Operation>> {
-
- @Inject
- public ParseZoneOperations(Json json) {
- super(json, new TypeLiteral<ListPage<Operation>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseWithZoneToPagedIterable<Operation, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Operation>> fetchNextPage(final String projectName,
- final String zoneName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Operation>>() {
-
- @Override
- public IterableWithMarker<Operation> apply(Object input) {
- return api.getZoneOperationApiForProject(projectName)
- .listAtMarkerInZone(zoneName, input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java
deleted file mode 100644
index f3e54ea..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java
+++ /dev/null
@@ -1,63 +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.googlecomputeengine.functions.internal;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import javax.inject.Inject;
-
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Zone;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-
-public class ParseZones extends ParseJson<ListPage<Zone>> {
-
- @Inject
- public ParseZones(Json json) {
- super(json, new TypeLiteral<ListPage<Zone>>() {
- });
- }
-
- public static class ToPagedIterable extends BaseToPagedIterable<Zone, ToPagedIterable> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject
- protected ToPagedIterable(GoogleComputeEngineApi api) {
- this.api = checkNotNull(api, "api");
- }
-
- @Override
- protected Function<Object, IterableWithMarker<Zone>> fetchNextPage(final String projectName,
- final ListOptions options) {
- return new Function<Object, IterableWithMarker<Zone>>() {
-
- @Override
- public IterableWithMarker<Zone> apply(Object input) {
- return api.getZoneApiForProject(projectName).listAtMarker(input.toString(), options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java
deleted file mode 100644
index b5ce22e..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java
+++ /dev/null
@@ -1,56 +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.googlecomputeengine.handlers;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Map;
-
-import javax.inject.Inject;
-
-import org.jclouds.googlecomputeengine.options.FirewallOptions;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.MapBinder;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-public class FirewallBinder implements MapBinder {
-
- @Inject
- private BindToJsonPayload jsonBinder;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
- FirewallOptions options = (FirewallOptions) checkNotNull(postParams.get("options"), "firewallOptions");
- String name = (String) checkNotNull(postParams.get("name"), "name");
- URI network = (URI) checkNotNull(postParams.get("network"), "network");
- options.name(name);
- options.network(network);
- return bindToRequest(request, options);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R extends HttpRequest> R bindToRequest(R request, Object input) {
- return jsonBinder.bindToRequest(request, input);
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java
deleted file mode 100644
index 109b050..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java
+++ /dev/null
@@ -1,62 +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.googlecomputeengine.handlers;
-
-import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream;
-
-import javax.inject.Singleton;
-
-import org.jclouds.http.HttpCommand;
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.HttpResponse;
-import org.jclouds.http.HttpResponseException;
-import org.jclouds.rest.AuthorizationException;
-import org.jclouds.rest.ResourceNotFoundException;
-
-/**
- * This will parse and set an appropriate exception on the command object.
- */
-@Singleton
-public class GoogleComputeEngineErrorHandler implements HttpErrorHandler {
- public void handleError(HttpCommand command, HttpResponse response) {
- // it is important to always read fully and close streams
- byte[] data = closeClientButKeepContentStream(response);
- String message = data != null ? new String(data) : null;
-
- Exception exception = message != null ? new HttpResponseException(command, response, message)
- : new HttpResponseException(command, response);
- message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(),
- response.getStatusLine());
- switch (response.getStatusCode()) {
- case 400:
- break;
- case 401:
- case 403:
- exception = new AuthorizationException(message, exception);
- break;
- case 404:
- if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
- exception = new ResourceNotFoundException(message, exception);
- }
- break;
- case 409:
- exception = new IllegalStateException(message, exception);
- break;
- }
- command.setException(exception);
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java
deleted file mode 100644
index 2559ede..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java
+++ /dev/null
@@ -1,65 +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.googlecomputeengine.handlers;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Map;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.jclouds.googlecomputeengine.domain.InstanceTemplate;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.MapBinder;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-import com.google.common.base.Function;
-
-public class InstanceBinder implements MapBinder {
-
- @Inject
- private BindToJsonPayload jsonBinder;
-
- @Inject
- @Named("machineTypeToURI")
- Function<String, URI> machineTypesToURI;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
- InstanceTemplate template = (InstanceTemplate) checkNotNull(postParams.get("template"), "template");
- template.name(checkNotNull(postParams.get("name"), "name").toString());
-
- if (template.getMachineTypeName() != null) {
- template.machineType(machineTypesToURI.apply(template.getMachineTypeName()));
- }
- template.machineType((String) null);
- return bindToRequest(request, template);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R extends HttpRequest> R bindToRequest(R request, Object input) {
- return jsonBinder.bindToRequest(request, input);
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java
deleted file mode 100644
index b96afb4..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java
+++ /dev/null
@@ -1,60 +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.googlecomputeengine.handlers;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.Map;
-
-import javax.inject.Inject;
-
-import org.jclouds.googlecomputeengine.domain.Metadata;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.MapBinder;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-import com.google.common.collect.ImmutableMap;
-
-public class MetadataBinder implements MapBinder {
-
- @Inject
- private BindToJsonPayload jsonBinder;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
- Map<String, String> items =
- ImmutableMap.copyOf((Map<String, String>) checkNotNull(postParams.get("items"), "item"));
- String fingerprint = (String) checkNotNull(postParams.get("fingerprint"), "fingerprint");
- Metadata metadata = Metadata.builder()
- .fingerprint(fingerprint)
- .items(items)
- .build();
- return bindToRequest(request, metadata);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R extends HttpRequest> R bindToRequest(R request, Object input) {
- return jsonBinder.bindToRequest(request, input);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/RouteBinder.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/RouteBinder.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/RouteBinder.java
deleted file mode 100644
index 2863b44..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/handlers/RouteBinder.java
+++ /dev/null
@@ -1,56 +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.googlecomputeengine.handlers;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Map;
-
-import javax.inject.Inject;
-
-import org.jclouds.googlecomputeengine.options.RouteOptions;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.MapBinder;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-public class RouteBinder implements MapBinder {
-
- @Inject
- private BindToJsonPayload jsonBinder;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
- RouteOptions options = (RouteOptions) checkNotNull(postParams.get("options"), "routeOptions");
- String name = (String) checkNotNull(postParams.get("name"), "name");
- URI network = (URI) checkNotNull(postParams.get("network"), "network");
- options.name(name);
- options.network(network);
- return bindToRequest(request, options);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public <R extends HttpRequest> R bindToRequest(R request, Object input) {
- return jsonBinder.bindToRequest(request, input);
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/AttachDiskOptions.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/AttachDiskOptions.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/AttachDiskOptions.java
deleted file mode 100644
index 5ad2846..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/AttachDiskOptions.java
+++ /dev/null
@@ -1,128 +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.googlecomputeengine.options;
-
-import java.net.URI;
-
-/**
- * Options for attaching disks to instances.
- *
- * @see <a href="https://developers.google.com/compute/docs/reference/latest/instances/attachDisk"/>
- */
-public class AttachDiskOptions {
-
- public enum DiskType {
- SCRATCH,
- PERSISTENT
- }
-
- public enum DiskMode {
- READ_WRITE,
- READ_ONLY
- }
-
- private DiskType type;
- private DiskMode mode;
- private URI source;
- private String deviceName;
- private boolean boot;
-
- /**
- * The disk type
- *
- * @return the disk type.
- */
- public DiskType getType() {
- return type;
- }
-
- /**
- * The disk mode
- *
- * @return the disk mode
- */
- public DiskMode getMode() {
- return mode;
- }
-
- /**
- * The URI of the source disk - optional, if DiskType.SCRATCH is used.
- *
- * @return the URI
- */
- public URI getSource() {
- return source;
- }
-
- /**
- * The device name on the instance - optional.
- *
- * @return the device name
- */
- public String getDeviceName() {
- return deviceName;
- }
-
- /**
- * Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem.
- *
- * @return true if this is a boot disk, false otherwise
- */
- public boolean getBoot() {
- return boot;
- }
-
- /**
- * @see AttachDiskOptions#getType()
- */
- public AttachDiskOptions type(DiskType type) {
- this.type = type;
- return this;
- }
-
- /**
- * @see AttachDiskOptions#getMode()
- */
- public AttachDiskOptions mode(DiskMode mode) {
- this.mode = mode;
- return this;
- }
-
- /**
- * @see AttachDiskOptions#getSource()
- */
- public AttachDiskOptions source(URI source) {
- this.source = source;
- return this;
- }
-
- /**
- * @see AttachDiskOptions#getDeviceName()
- */
- public AttachDiskOptions deviceName(String deviceName) {
- this.deviceName = deviceName;
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.options.AttachDiskOptions#getBoot()
- */
- public AttachDiskOptions boot(boolean boot) {
- this.boot = boot;
- return this;
- }
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/DeprecateOptions.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/DeprecateOptions.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/DeprecateOptions.java
deleted file mode 100644
index 382bf71..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/DeprecateOptions.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.googlecomputeengine.options;
-
-import java.net.URI;
-import java.util.Date;
-
-/**
- * Options to set the deprecation status of a resource. Currently only for images.
- *
- * @see <a href="https://developers.google.com/compute/docs/reference/latest/images/deprecate" />
- */
-public class DeprecateOptions {
-
- public enum State {
- DEPRECATED,
- OBSOLETE,
- DELETED
- }
-
- private State state;
- private URI replacement;
- private Date deprecated;
- private Date obsolete;
- private Date deleted;
-
- /**
- * The new deprecation state.
- *
- * @return the new deprecation state.
- */
- public State getState() {
- return state;
- }
-
- /**
- * Optional URL for replacement of deprecated resource.
- *
- * @return the URL
- */
- public URI getReplacement() {
- return replacement;
- }
-
- /**
- * Optional RFC3339 timestamp for when the deprecation state was changed to DEPRECATED.
- *
- * @return the timestamp
- */
- public Date getDeprecated() {
- return deprecated;
- }
-
- /**
- * Optional RFC3339 timestamp for when the deprecation state was changed to OBSOLETE.
- *
- * @return the timestamp
- */
- public Date getObsolete() {
- return obsolete;
- }
-
- /**
- * Optional RFC3339 timestamp for when the deprecation state was changed to DELETED.
- *
- * @return the timestamp
- */
- public Date getDeleted() {
- return deleted;
- }
-
- /**
- * @see DeprecateOptions#getState()
- */
- public DeprecateOptions state(State state) {
- this.state = state;
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.options.DeprecateOptions#getReplacement()
- */
- public DeprecateOptions replacement(URI replacement) {
- this.replacement = replacement;
- return this;
- }
-
- /**
- * @see DeprecateOptions#getDeprecated()
- */
- public DeprecateOptions deprecated(Date deprecated) {
- this.deprecated = deprecated;
- return this;
- }
-
- /**
- * @see DeprecateOptions#getObsolete()
- */
- public DeprecateOptions obsolete(Date obsolete) {
- this.obsolete = obsolete;
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.options.DeprecateOptions#getDeleted()
- */
- public DeprecateOptions deleted(Date deleted) {
- this.deleted = deleted;
- return this;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/stratos/blob/a9834e9e/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/FirewallOptions.java
----------------------------------------------------------------------
diff --git a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/FirewallOptions.java b/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/FirewallOptions.java
deleted file mode 100644
index d70d4d0..0000000
--- a/dependencies/jclouds/apis/gce/1.8.0-stratos/src/main/java/org/jclouds/googlecomputeengine/options/FirewallOptions.java
+++ /dev/null
@@ -1,166 +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.googlecomputeengine.options;
-
-import java.net.URI;
-import java.util.Set;
-
-import org.jclouds.googlecomputeengine.domain.Firewall;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Options to create a firewall.
- *
- * @see Firewall
- */
-public class FirewallOptions {
-
- private String name;
- private URI network;
- private ImmutableSet.Builder<String> sourceRanges = ImmutableSet.builder();
- private ImmutableSet.Builder<String> sourceTags = ImmutableSet.builder();
- private ImmutableSet.Builder<String> targetTags = ImmutableSet.builder();
- private ImmutableSet.Builder<Firewall.Rule> allowed = ImmutableSet.builder();
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getAllowed()
- */
- public Set<Firewall.Rule> getAllowed() {
- return allowed.build();
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getAllowed()
- */
- public FirewallOptions addAllowedRule(Firewall.Rule allowedRule) {
- this.allowed.add(allowedRule);
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getAllowed()
- */
- public FirewallOptions allowedRules(Set<Firewall.Rule> allowedRules) {
- this.allowed = ImmutableSet.builder();
- this.allowed.addAll(allowedRules);
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getName()
- */
- public FirewallOptions name(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getName()
- */
- public String getName() {
- return name;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getNetwork()
- */
- public FirewallOptions network(URI network) {
- this.network = network;
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getNetwork()
- */
- public URI getNetwork() {
- return network;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getSourceRanges()
- */
- public Set<String> getSourceRanges() {
- return sourceRanges.build();
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getSourceRanges()
- */
- public FirewallOptions addSourceRange(String sourceRange) {
- this.sourceRanges.add(sourceRange);
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getSourceRanges()
- */
- public FirewallOptions sourceRanges(Set<String> sourceRanges) {
- this.sourceRanges = ImmutableSet.builder();
- this.sourceRanges.addAll(sourceRanges);
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getSourceTags()
- */
- public Set<String> getSourceTags() {
- return sourceTags.build();
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getSourceTags()
- */
- public FirewallOptions addSourceTag(String sourceTag) {
- this.sourceTags.add(sourceTag);
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getSourceTags()
- */
- public FirewallOptions sourceTags(Set<String> sourceTags) {
- this.sourceTags = ImmutableSet.builder();
- this.sourceTags.addAll(sourceTags);
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getTargetTags()
- */
- public Set<String> getTargetTags() {
- return targetTags.build();
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getTargetTags()
- */
- public FirewallOptions addTargetTag(String targetTag) {
- this.targetTags.add(targetTag);
- return this;
- }
-
- /**
- * @see org.jclouds.googlecomputeengine.domain.Firewall#getTargetTags()
- */
- public FirewallOptions targetTags(Set<String> targetTags) {
- this.targetTags = ImmutableSet.builder();
- this.targetTags.addAll(targetTags);
- return this;
- }
-
-}