You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by alibazlamit <no...@github.com> on 2016/09/01 18:35:27 UTC
[jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
@nacx Ready for review thanks.
You can view, comment on, or merge this pull request online at:
https://github.com/jclouds/jclouds-labs/pull/315
-- Commit Summary --
* JCLOUDS-1167 oneandone-privatenetwork-api
-- File Changes --
A docker/src/test/java/org/jclouds/docker/compute/strategy/PredicateLocateImageByNameTest.java (111)
M oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/DataCenter.java (15)
M oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/Dvd.java (13)
A oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/GenericRequest.java (66)
M oneandone/src/main/java/org/apache/jclouds/oneandone/rest/domain/PrivateNetwork.java (116)
A oneandone/src/main/java/org/apache/jclouds/oneandone/rest/features/PrivateNetworkApi.java (101)
A oneandone/src/main/java/org/apache/jclouds/oneandone/rest/util/ArrayAdapter.java (148)
A oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PrivateNetworkApiMockTest.java (263)
A oneandone/src/test/java/org/apache/jclouds/oneandone/rest/features/PrivateNetworksApiLiveTest.java (138)
M oneandone/src/test/java/org/apache/jclouds/oneandone/rest/internal/BaseOneAndOneLiveTest.java (3)
A oneandone/src/test/resources/privatenetwork/get.json (25)
A oneandone/src/test/resources/privatenetwork/list.json (34)
A oneandone/src/test/resources/privatenetwork/list.options.json (34)
A oneandone/src/test/resources/privatenetwork/server.get.json (4)
A oneandone/src/test/resources/privatenetwork/servers.list.json (10)
M pom.xml (1)
-- Patch Links --
https://github.com/jclouds/jclouds-labs/pull/315.patch
https://github.com/jclouds/jclouds-labs/pull/315.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by alibazlamit <no...@github.com>.
@alibazlamit pushed 1 commit.
733480f removed unused file
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/d849a8d56cc71bff5379afb58ac20b5722d18da3..733480ff9c5da0d8d816c7f00764afd4875019db
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
> + public void testList() {
> + privateNetworks = privateNetworkApi().list();
> +
> + Assert.assertTrue(privateNetworks.size() > 0);
> + }
> +
> + @Test(dependsOnMethods = "testList")
> + public void testListWithOption() {
> + GenericQueryOptions options = new GenericQueryOptions();
> + options.options(0, 0, null, "jclouds", null);
> + List<PrivateNetwork> resultWithQuery = privateNetworkApi().list(options);
> +
> + Assert.assertTrue(resultWithQuery.size() > 0);
> + }
> +
> + @Test(dependsOnMethods = "testListWithOption")
No need for the dependency.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77631265
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
> @@ -37,7 +37,7 @@
> </scm>
>
> <properties>
> - <jclouds.version>2.0.0-SNAPSHOT</jclouds.version>
> + <jclouds.version>2.0.0-SNAPSHOT</jclouds.version>
Discard this change
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77631496
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
Thanks @alibazlamit! Take care of reformatting the code to use 3 space indentation.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315#issuecomment-244946602
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
> + * 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.apache.jclouds.oneandone.rest.domain;
> +
> +import com.google.auto.value.AutoValue;
> +
> +@AutoValue
> +public abstract class GenericRequest {
This class seems to not be used at all. Remove it.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77630685
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
Pushed to master as [80e5c911](http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/80e5c911). Thanks @alibazlamit!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315#issuecomment-247955312
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by alibazlamit <no...@github.com>.
@alibazlamit pushed 1 commit.
bac64e6 checkstyle removed
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/5d796bfd91ab2794c1cbbd56070d0f676a7d3272..bac64e627e61be321bcb269f9ff759ee03e22c3a
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by alibazlamit <no...@github.com>.
@alibazlamit pushed 1 commit.
369145f minor change
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/46c1839dcd594c18f3552e843dea111635cffd5e..369145f40ac3867dbe03de3ce5d79f43b71a86bc
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by alibazlamit <no...@github.com>.
@alibazlamit pushed 1 commit.
16df06c Changes applied
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f..16df06cba291a67439848cb9d1504a553f50c00f
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
> +
> + PrivateNetwork updateResult = privateNetworkApi().attachServer(currentPrivateNetwork.id(), PrivateNetwork.Server.CreateServer.create(servers));
> +
> + assertNotNull(updateResult);
> +
> + }
> +
> + @Test(dependsOnMethods = "testAttachServer")
> + public void testListServers() {
> + assertPrivateNetworkAvailable(ServerPrivateNetworkRef.create(currentServer.id(), currentPrivateNetwork.id()));
> + List<PrivateNetwork.Server> servers = privateNetworkApi().listServers(currentPrivateNetwork.id());
> +
> + Assert.assertTrue(servers.size() > 0);
> + }
> +
> + @Test(dependsOnMethods = "testListServers")
Better depend on the attach test too.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77631387
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
> + final Predicate<Image> predicate = DockerComputeServiceAdapter
> + .createPredicateMatchingRepoTags("docker.io/kwart/alpine-ext:3.3-ssh");
> + assertFalse(predicate.apply(IMAGE_REPO_TAGS_MULTI));
> + assertFalse(predicate.apply(IMAGE_REPO_TAGS_EMPTY));
> + assertTrue(predicate.apply(IMAGE_REPO_TAGS_WITH_HOST));
> + }
> +
> + public void testRepoTagLatestWithHost() {
> + final Predicate<Image> predicate = DockerComputeServiceAdapter
> + .createPredicateMatchingRepoTags("docker.io/kwart/alpine-ext");
> + assertFalse(predicate.apply(IMAGE_REPO_TAGS_MULTI));
> + assertFalse(predicate.apply(IMAGE_REPO_TAGS_EMPTY));
> + assertTrue(predicate.apply(IMAGE_REPO_TAGS_WITH_HOST));
> + }
> +
> +}
Make sure your branch is properly rebased. This class shouldn't be part of the PR.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77630377
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by alibazlamit <no...@github.com>.
@nacx Changed applied and re based correctly
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315#issuecomment-245879114
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
> + assertNodeAvailable(currentServer);
> + currentPrivateNetwork = privateNetworkApi().create(PrivateNetwork.CreatePrivateNetwork.builder()
> + .name("jclouds privatenetwork")
> + .networkAddress("192.168.1.0")
> + .subnetMask("255.255.255.0")
> + .build());
> + }
> +
> + @Test
> + public void testList() {
> + privateNetworks = privateNetworkApi().list();
> +
> + Assert.assertTrue(privateNetworks.size() > 0);
> + }
> +
> + @Test(dependsOnMethods = "testList")
There is no need for this dependency.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77631232
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
> +
> + public abstract String name();
> +
> + @SerializedNames({"id", "name"})
> + public static Server create(String id, String name) {
> + return new AutoValue_PrivateNetwork_Server(id, name);
> + }
> +
> + @AutoValue
> + public abstract static class CreateServer {
> +
> + public abstract List<String> servers();
> +
> + @SerializedNames({"servers"})
> + public static CreateServer create(List<String> servers) {
> + return new AutoValue_PrivateNetwork_Server_CreateServer(servers == null ? ImmutableList.<String>of() : servers);
Enforce an immutable list when present too.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/aec0775e803138e2a965a03a6035af54ad5e098f#r77630827
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by Ignasi Barrera <no...@github.com>.
Closed #315.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315#event-793808243
Re: [jclouds/jclouds-labs] JCLOUDS-1167 oneandone-privatenetwork-api
(#315)
Posted by alibazlamit <no...@github.com>.
@alibazlamit pushed 1 commit.
d83c6da minor change
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/315/files/4a911ecdd9c36089c7d298a8f81009712ff9dd9e..d83c6da0bd4ca8b06a58074a37f4ccc119763c89