You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Kris Sterckx <no...@github.com> on 2013/08/27 09:46:43 UTC
[jclouds-labs-openstack] OpenStack Neutron v2.0 implementation (#23)
Hello, I've added the Neutron v2.0 implementation (see https://issues.apache.org/jira/browse/JCLOUDS-176).
I've run the live tests against a DevStack setup which is using the Grizzly version of OpenStack.
Find below the contents of my localrc file :
ADMIN_PASSWORD=password
MYSQL_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=token
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-meta
enable_service quantum
enable_service q-lbaas
OVS_ENABLE_TUNNELING=False
NOVA_BRANCH=stable/grizzly
CINDER_BRANCH=stable/grizzly
GLANCE_BRANCH=stable/grizzly
HORIZON_BRANCH=stable/grizzly
KEYSTONE_BRANCH=stable/grizzly
QUANTUM_BRANCH=stable/grizzly
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=False
SCREEN_LOGDIR=/opt/stack/logs
OVS_VLAN_RANGES=RegionOne:1:4000
You can merge this Pull Request by running:
git pull https://github.com/KrisSterckx/jclouds-labs-openstack master
Or you can view, comment on it, or merge it online at:
https://github.com/jclouds/jclouds-labs-openstack/pull/23
-- Commit Summary --
* OpenStack Neutron v2.0 implementation
-- File Changes --
R openstack-neutron/pom.xml (26)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApi.java (75)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApiMetadata.java (107)
R openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/config/NeutronHttpApiModule.java (18)
R openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/config/NeutronProperties.java (6)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/AllocationPool.java (126)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkNetwork.java (210)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkPort.java (232)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/BulkSubnet.java (274)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/HostRoute.java (128)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/IP.java (124)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Network.java (258)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/NetworkType.java (46)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Port.java (235)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Reference.java (129)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/ReferenceWithName.java (112)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/State.java (30)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/domain/Subnet.java (261)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/NetworkApi.java (137)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/PortApi.java (139)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/features/SubnetApi.java (138)
R openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/handlers/NeutronErrorHandler.java (4)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/CreateNetworkBulkOptions.java (141)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/CreateNetworkOptions.java (244)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/CreatePortBulkOptions.java (137)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/CreatePortOptions.java (245)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/CreateSubnetBulkOptions.java (143)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/CreateSubnetOptions.java (261)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/UpdateNetworkOptions.java (132)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/UpdatePortOptions.java (219)
A openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2_0/options/UpdateSubnetOptions.java (219)
R openstack-neutron/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata (2)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/NeutronApiMetadataTest.java (36)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/features/NetworkApiExpectTest.java (242)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/features/NetworkApiLiveTest.java (114)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/features/PortApiExpectTest.java (243)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/features/PortApiLiveTest.java (142)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/features/SubnetApiExpectTest.java (251)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/features/SubnetApiLiveTest.java (128)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/internal/BaseNeutronApiExpectTest.java (70)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/internal/BaseNeutronApiLiveTest.java (47)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/internal/BaseNeutronExpectTest.java (68)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/parse/ParseNetworkTest.java (55)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/parse/ParsePortTest.java (54)
A openstack-neutron/src/test/java/org/jclouds/openstack/neutron/v2_0/parse/ParseSubnetTest.java (53)
A openstack-neutron/src/test/resources/list_networks.json (62)
A openstack-neutron/src/test/resources/list_ports.json (86)
A openstack-neutron/src/test/resources/list_subnets.json (98)
R openstack-neutron/src/test/resources/logback.xml (0)
A openstack-neutron/src/test/resources/network.json (7)
A openstack-neutron/src/test/resources/port.json (7)
A openstack-neutron/src/test/resources/subnet.json (8)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApi.java (72)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/QuantumApiMetadata.java (91)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/domain/Attachment.java (63)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/domain/Network.java (102)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/domain/NetworkDetails.java (108)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/domain/Port.java (108)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/domain/PortDetails.java (103)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/domain/Reference.java (108)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApi.java (122)
D openstack-quantum/src/main/java/org/jclouds/openstack/quantum/v1_0/features/PortApi.java (147)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/QuantumApiMetadataTest.java (35)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiExpectTest.java (235)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiLiveTest.java (91)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiExpectTest.java (245)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiLiveTest.java (137)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiExpectTest.java (28)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumApiLiveTest.java (44)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/internal/BaseQuantumExpectTest.java (57)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseAttachmentTest.java (45)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkDetailsTest.java (49)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParseNetworkTest.java (45)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortDetailsTest.java (47)
D openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/parse/ParsePortTest.java (45)
D openstack-quantum/src/test/resources/attachment.json (1)
D openstack-quantum/src/test/resources/list_network_refs.json (14)
D openstack-quantum/src/test/resources/list_networks.json (14)
D openstack-quantum/src/test/resources/network.json (1)
D openstack-quantum/src/test/resources/network_details.json (1)
D openstack-quantum/src/test/resources/port.json (1)
D openstack-quantum/src/test/resources/port_details.json (1)
M pom.xml (2)
-- Patch Links --
https://github.com/jclouds/jclouds-labs-openstack/pull/23.patch
https://github.com/jclouds/jclouds-labs-openstack/pull/23.diff
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
> + && Objects.equal(this.gatewayIp, that.gatewayIp)
> + && Objects.equal(this.ipVersion, that.ipVersion)
> + && Objects.equal(this.cidr, that.cidr)
> + && Objects.equal(this.allocationPools, that.allocationPools)
> + && Objects.equal(this.enableDhcp, that.enableDhcp)
> + && Objects.equal(this.dnsNameServers, that.dnsNameServers)
> + && Objects.equal(this.hostRoutes, that.hostRoutes);
> + }
> +
> + protected ToStringHelper string() {
> + return super.string()
> + .add("networkId", networkId)
> + .add("gatewayIp", gatewayIp)
> + .add("ipVersion", ipVersion)
> + .add("cidr", cidr)
> + .add("enableDHCP", enableDhcp);
No, just a mistake on my part. Forgot them.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23/files#r6080250
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
Have a good holiday!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23674775
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
@nlivens That's great!
I don't see your email address on GitHub so I guess it's not public. Here's what I suggest:
1. Subscribe to the jclouds dev mailing list by sending an email to jclouds-dev-subscribe@apache.org
1. Create a [JIRA user](https://issues.apache.org/jira/browse/JCLOUDS) and let me know the username. I'll add you as a contributor.
1. Read up on [How To Contribute](https://wiki.apache.org/jclouds/How%20to%20Contribute) and [How To Contribute Doc](https://wiki.apache.org/jclouds/How%20to%20Contribute%20Documentation)
1. Hack away!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24517172
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
In the options package I see empty public constructors in some of the classes, e.g. `CreateNetworkOptions()`. What is the purpose of these?
It seems like they would just create an invalid Options class and I didn't find any usages of them either.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23514043
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
@KrisSterckx Right from the start it's been really great working with you on this PR. Would you and/or Nick Livens be interested in getting a bit more involved in the jclouds community? Perhaps becoming a committer on the project at some point?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24355220
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #38](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/38/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24299027
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #395](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/395/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24298933
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
In general, this is a really solid PR. Lots of good code. I have some general review comments and questions that I'll make as separate comments below so they can be addressed one by one.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23512915
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
I've followed the following guide : http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
The steps are exactly the same as the guide you mentioned. I only didn't do a forced push, therefore I had to pull first which gave the empty merge commit. I'll try to rebase again and do a forced push instead.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24297827
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
Cool. I've added you as Contributor in JIRA.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24553096
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Nick Livens <no...@github.com>.
Hi Everett, I'd love to get a bit more involved in the JClouds community in my spare time. You can contact me through my email (I think it's public, but I'm not sure)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24509378
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Ignasi Barrera <no...@github.com>.
>There are empty public constructors because I'm using the @MapBinder annotation above the methods with Options to fill in the body of the request. Now, when there is not an empty constructor in place and you don't pass in some options, Guice will try to instantiate a Options instance for you through the default constructor (no parameters). Since there would be no default constructor, Guice will throw an exception. Therefore, the public empty constructor is there.
Could you try to annotate the constructor with all the parameters with the `@ConstructorProperties` annotation, and see if that makes it work? The values of the annotation should match the name of the fields in the json, and the order must be the constructor parameters order.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23554483
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #362](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/362/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23554441
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
Well, I found the issue, it's a timing issue. TestNG is testing parallel.
So basically, when you do a list of references, and right after the list of networks. It could be that in the small window between these 2 calls there has been created another network in another test (so the size of both collections will not be equal). This is the second fail you're seeing.
The first fail can be explained by the exact same issue as above, the SubnetApiLiveTest could of created a subnet in a network in the small window between the list of networks, and retrieving the details of that network. So the attribute "subnets" of that network is not equal.
I'm currently looking for a solution.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23397655
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
With the changes to the pom.xml file I had to run the tests with
mvn -Plive -Dtest.openstack-neutron.identity=admin:admin -Dtest.openstack-neutron.credential=password clean install
And everything is passing 100% now!
I should be able to get the code review sometime tomorrow.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23440380
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
Hi,
contributions will be delayed for 1 week as of holiday.
On the @author tags, i am working together with my colleague Nick Livens on this contribution set. Nick deserves to have his name anywhere, so i 'd like him to have his name everywhere. I remain finally accountable however. I hope that's ok.
So just a bit of patience please - thanks for all detailed feedback.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23631708
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
> + List<CreateNetworkOptions.CreateNetworkRequest> createNetworkRequests = Lists.newArrayList();
> +
> + for (BulkNetwork network : this.networks) {
> + if (network.getNetworkType() != null) {
> + //Validations for each NetworkType
> + if (network.getNetworkType() == NetworkType.FLAT) {
> + checkNotNull(network.getPhysicalNetworkName(), "physicalNetworkName must be present when networkType=FLAT");
> + } else if (network.getNetworkType() == NetworkType.VLAN) {
> + checkNotNull(network.getPhysicalNetworkName(), "physicalNetworkName must be present when networkType=VLAN");
> + checkNotNull(network.getSegmentationId(), "segmentationId must be present when networkType=VLAN");
> + } else if (network.getNetworkType() == NetworkType.GRE) {
> + checkNotNull(network.getSegmentationId(), "segmentationId must be present when NetworkType=GRE");
> + }
> + }
> +
> + CreateNetworkOptions.CreateNetworkRequest createNetworkRequest = new CreateNetworkOptions.CreateNetworkRequest();
Static import CreateNetworkRequest to simplify this.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23/files#r6066262
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
> + BulkSubnet that = BulkSubnet.class.cast(obj);
> + return Objects.equal(this.name, that.name)
> + && Objects.equal(this.networkId, that.networkId)
> + && Objects.equal(this.gatewayIp, that.gatewayIp)
> + && Objects.equal(this.ipVersion, that.ipVersion)
> + && Objects.equal(this.cidr, that.cidr)
> + && Objects.equal(this.allocationPools, that.allocationPools)
> + && Objects.equal(this.enableDhcp, that.enableDhcp)
> + && Objects.equal(this.dnsNameServers, that.dnsNameServers)
> + && Objects.equal(this.hostRoutes, that.hostRoutes);
> + }
> +
> + protected Objects.ToStringHelper string() {
> + return Objects.toStringHelper(this)
> + .add("name", name).add("networkId", networkId).add("gatewayIp", gatewayIp).add("ipVersion", ipVersion)
> + .add("cidr", cidr).add("enableDhcp", enableDhcp);
No, just a mistake on my part. Forgot them.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23/files#r6080248
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Ignasi Barrera <no...@github.com>.
@KrisSterckx , Regarding the pagination stuff, I tried to summarize how pagination works in jclouds in [this comment](https://github.com/jclouds/jclouds-labs/pull/12#issuecomment-22689554) and [this one](https://github.com/jclouds/jclouds-labs/pull/12#issuecomment-22927296). I plan to summarize that in the wiki, but still haven't had time. Anyway, it can help to understand what needs to be done.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23523779
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
Looking good. Almost there.
1. If you don't want to update the @author tags to yourself, that's okay, but please just remove them completely.
2. Can you try making the empty Constructors private? I *think* Guice will still be able to use them and that implementation detail won't leak out.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23572282
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
To answer your following question :
In the options package I see empty public constructors in some of the classes, e.g. CreateNetworkOptions(). What is the purpose of these?
There are empty public constructors because I'm using the @MapBinder annotation above the methods with Options to fill in the body of the request. Now, when there is not an empty constructor in place and you don't pass in some options, Guice will try to instantiate a Options instance for you through the default constructor (no parameters). Since there would be no default constructor, Guice will throw an exception. Therefore, the public empty constructor is there.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23553870
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
> *
> * @author Adam Lowe
> */
> -public class QuantumProperties {
> +public class NeutronProperties {
Delete this class as it has no use.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23/files#r6065481
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
Update all of the @author tags to be yourself.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23513008
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
I can already give the commands to manually clean up the Neutron resources (use this order) :
* Port : quantum port-list | awk '{print $2}' | xargs -I{} quantum port-delete "{}"
* Subnet : quantum subnet-list | awk '{print $2}' | xargs -I{} quantum subnet-delete "{}"
* Network : quantum net-list | awk '{print $2}' | xargs -I{} quantum net-delete "{}"
I'm still looking into the failure you're seeing as I'm unable to reproduce it.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23396480
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
Now it seems to be correct, thanks for your help.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24298749
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #36](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/36/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24138008
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
+1
I just ran the live tests one last time and everything is looking good! Please squash down the commits and this is good to merge.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24173569
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #34](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/34/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23554518
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
Did your squash happen correctly?
I see 6 commits on this PR and the last one is an empty merge commit. I would have expected to simply see one and only one commit after the squash. Did you follow a process similar to steps 17-22 of http://blog.phymata.com/2013/01/25/an-annotated-github-workflow/ ?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24275180
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
> +import java.util.Properties;
> +
> +import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
> +import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE;
> +
> +/**
> + * Implementation of {@link org.jclouds.apis.ApiMetadata} for Neutron 2.0 API
> + *
> + * @author Adam Lowe
> + * @author Nick Livens
> + */
> +public class NeutronApiMetadata extends BaseHttpApiMetadata<NeutronApi> {
> + /**
> + * The serialVersionUID
> + */
> + private static final long serialVersionUID = -7273686435105663195L;
What part isn't necessary? The "Implementation ..." part on the comments and the serialVersionUID?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23/files#r6080234
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
In all of the domain object, all Builder code should be moved to the bottom of the class. It's an eyesore and gets in the way of figuring out what the domain object is all about.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23513150
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #31](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/31/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23404361
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #351](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/351/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23404280
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
Fixed the comments you gave, can you please review?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23554296
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
> +import java.util.Properties;
> +
> +import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
> +import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.SERVICE_TYPE;
> +
> +/**
> + * Implementation of {@link org.jclouds.apis.ApiMetadata} for Neutron 2.0 API
> + *
> + * @author Adam Lowe
> + * @author Nick Livens
> + */
> +public class NeutronApiMetadata extends BaseHttpApiMetadata<NeutronApi> {
> + /**
> + * The serialVersionUID
> + */
> + private static final long serialVersionUID = -7273686435105663195L;
This isn't necessary.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23/files#r6065042
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
Fixed the timing issue by removing parallel building for the live tests.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23404077
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
In the features package, all of the list methods of all of the Api classes that return `FluentIterable` will need to return `PagedIterable`. You can find examples of implementing this in `org.jclouds.openstack.nova.v2_0.features.ImageAsyncApi`. Also see http://docs.openstack.org/api/openstack-network/2.0/content/pagination.html and http://docs.openstack.org/api/openstack-compute/2/content/Paginated_Collections-d1e664.html
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23513837
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
Squashed the commits down to one commit (OpenStack Neutron v2.0 implementation)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24216451
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
> + && Objects.equal(this.gatewayIp, that.gatewayIp)
> + && Objects.equal(this.ipVersion, that.ipVersion)
> + && Objects.equal(this.cidr, that.cidr)
> + && Objects.equal(this.allocationPools, that.allocationPools)
> + && Objects.equal(this.enableDhcp, that.enableDhcp)
> + && Objects.equal(this.dnsNameServers, that.dnsNameServers)
> + && Objects.equal(this.hostRoutes, that.hostRoutes);
> + }
> +
> + protected ToStringHelper string() {
> + return super.string()
> + .add("networkId", networkId)
> + .add("gatewayIp", gatewayIp)
> + .add("ipVersion", ipVersion)
> + .add("cidr", cidr)
> + .add("enableDHCP", enableDhcp);
Is there a reason that allocationPools, dnsNameServers, and hostRoutes are missing here?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23/files#r6065935
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #37](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/37/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24216674
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
I ran the tests on an Ubuntu 12.04 Rackspace Cloud Server setup as follows:
apt-get install -y git openjdk-7-jdk maven
git clone https://github.com/openstack-dev/devstack.git -b stable/grizzly devstack/
cd devstack/
vim localrc
# copy localrc from above
./stack.sh
git clone https://github.com/jclouds/jclouds-labs-openstack.git
cd jclouds-labs-openstack/
git fetch https://github.com/KrisSterckx/jclouds-labs-openstack.git master
git cherry-pick 6243d71
cd
git clone https://github.com/jclouds/jclouds.git
cd jclouds/apis
mv ~/jclouds-labs-openstack/openstack-neutron/ .
cd openstack-neutron/
vim pom.xml
# added <relativePath>../../project/pom.xml</relativePath> to <project><parent>
mvn clean install
mvn -Plive clean install
I got the following failure on the live tests:
Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.738 sec <<< FAILURE!
testGetAndListNetworks(org.jclouds.openstack.neutron.v2_0.features.NetworkApiLiveTest) Time elapsed: 0.241 sec <<< FAILURE!
java.lang.AssertionError: expected [Network{id=ce8584e5-b920-4a5b-9109-8841d9278917, tenantId=2e91767869ad47c2afd984e56c9d4daa, name=JClouds-Live-Network, state=ACTIVE, subnets=[], adminStateUp=true, shared=false, external=false, networkType=LOCAL, physicalNetworkName=null, segmentationId=null}] but found [Network{id=ce8584e5-b920-4a5b-9109-8841d9278917, tenantId=2e91767869ad47c2afd984e56c9d4daa, name=JClouds-Live-Network, state=ACTIVE, subnets=[20bdd2ef-2fc0-4fb9-ab97-6f5f187d5c3d], adminStateUp=true, shared=false, external=false, networkType=LOCAL, physicalNetworkName=null, segmentationId=null}]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:165)
at org.jclouds.openstack.neutron.v2_0.features.NetworkApiLiveTest.testGetAndListNetworks(NetworkApiLiveTest.java:57)
Looks like there's an unexpected subnet kicking around.
I then immediately reran the live tests and got the following failure:
Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.66 sec <<< FAILURE!
testGetAndListNetworks(org.jclouds.openstack.neutron.v2_0.features.NetworkApiLiveTest) Time elapsed: 0.129 sec <<< FAILURE!
java.lang.AssertionError: expected [3] but found [2]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:370)
at org.testng.Assert.assertEquals(Assert.java:380)
at org.jclouds.openstack.neutron.v2_0.features.NetworkApiLiveTest.testGetAndListNetworks(NetworkApiLiveTest.java:50)
Which probably means the tests don't clean up after themselves quite correctly after a fail.
@KrisSterckx Can you please look into the failures?
Can you also include the commands to manually delete all Neutron resources after a test run?
For example, I do the following with Swift to delete all containers:
swift list | xargs -n 1 swift delete
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23358707
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
> + BulkSubnet that = BulkSubnet.class.cast(obj);
> + return Objects.equal(this.name, that.name)
> + && Objects.equal(this.networkId, that.networkId)
> + && Objects.equal(this.gatewayIp, that.gatewayIp)
> + && Objects.equal(this.ipVersion, that.ipVersion)
> + && Objects.equal(this.cidr, that.cidr)
> + && Objects.equal(this.allocationPools, that.allocationPools)
> + && Objects.equal(this.enableDhcp, that.enableDhcp)
> + && Objects.equal(this.dnsNameServers, that.dnsNameServers)
> + && Objects.equal(this.hostRoutes, that.hostRoutes);
> + }
> +
> + protected Objects.ToStringHelper string() {
> + return Objects.toStringHelper(this)
> + .add("name", name).add("networkId", networkId).add("gatewayIp", gatewayIp).add("ipVersion", ipVersion)
> + .add("cidr", cidr).add("enableDhcp", enableDhcp);
Is there a reason that allocationPools, dnsNameServers, and hostRoutes are missing here?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23/files#r6065865
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Nick Livens <no...@github.com>.
@everett-toews
1. I was already subscribed to the mailing list
2. Username : nlivens
3. I'll read them when I find the time
4. Hell yeah!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-24517627
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-openstack #340](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/340/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23318609
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Kris Sterckx <no...@github.com>.
[quote]Could you try to annotate the constructor with all the parameters with the @ConstructorProperties annotation, and see if that makes it work? The values of the annotation should match the name of the fields in the json, and the order must be the constructor parameters order.[/quote]
I just tried it, but still the same exception. I think it has something to do with the way MapBinder is implemented.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23554867
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-openstack-pull-requests #29](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/29/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23318686
Re: [jclouds-labs-openstack] OpenStack Neutron v2.0 implementation
(#23)
Posted by Everett Toews <no...@github.com>.
In the domain objects I see you have many of the Builders as
public static abstract class Builder<T extends Builder<T>>
I don't think all of that is necessary unless the domain objects are doing inheritance. You should be able to just do a simple
public static class Builder
in objects that don't inherit. The point being to just simplify the Builder code as much as possible.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/23#issuecomment-23513406