[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-03 Thread DaanHoogland
GitHub user DaanHoogland opened a pull request:

https://github.com/apache/cloudstack/pull/22

Vpc refactor clean for pr

maybe wait with merging untill 4.5 is branched of. On the other hand we cn 
branch below this refatoring as well

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/schubergphilis/cloudstack 
vpc-refactor-clean-for-PR

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/22.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #22


commit 105ee89f47622bff0f6ad6c12af91b5842c4cc48
Author: Antonio Fornie 
Date:   2014-07-03T17:17:26Z

Rules and visitors for Load Balance Rules

Conflicts:
server/src/com/cloud/network/element/VirtualRouterElement.java

commit bca81b05737afe4861b6f588662314af9010ff4f
Author: Antonio Fornie 
Date:   2014-07-10T14:54:01Z

Extract general behavior to Router and Vpc delegates

Conflicts:

server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java

commit 705ced3a84cbdbbe82394f0e2651b9c74207caf1
Author: Antonio Fornie 
Date:   2014-07-11T13:07:35Z

Fix dependency problem. Extract and unify router deployment stuff

Conflicts:

server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java

commit db844438b4bbc97de1fc13113cddd24fde113233
Author: Wilder Rodrigues 
Date:   2014-07-13T12:34:23Z

Adding Firewall Rules to comply with the Visitor pattern implementation; 
refactoring the applyRules so we can reuse it.

Conflicts:
server/src/com/cloud/network/rules/LoadBalancingRules.java
server/src/com/cloud/network/topology/AdvancedNetworkVisitor.java
server/src/com/cloud/network/topology/BasicNetworkTopology.java
server/src/com/cloud/network/topology/NetworkTopology.java

commit 5f5bbe1988613e5ced9943fef2125166ce7eb447
Author: Wilder Rodrigues 
Date:   2014-07-14T09:34:48Z

changing accessor modifier in instance variables

commit b56b62b9d4db404c10980ab93ac3d6845177863e
Author: Wilder Rodrigues 
Date:   2014-07-14T09:52:51Z

fixing checkstyles

Conflicts:
server/src/com/cloud/network/topology/AdvancedNetworkVisitor.java
server/src/com/cloud/network/topology/BasicNetworkTopology.java

commit 1365acd2009dc44e395aab440c60a2a945aca1d4
Author: Wilder Rodrigues 
Date:   2014-07-14T14:20:28Z

finished firewall rules and load balancing rules; fixed all the injection 
problems; added VirtualMachineManager to the appliance factory to be injected.

Conflicts:
server/src/com/cloud/network/element/VirtualRouterElement.java

server/src/com/cloud/network/router/NEWVirtualNetworkApplianceManagerImpl.java
server/src/com/cloud/network/topology/BasicNetworkTopology.java

commit 08cf6b11a18d6c1ddcef3341e31114020257c0d0
Author: Daan Hoogland 
Date:   2014-07-14T15:50:27Z

TODO

commit 00f39e6b51860a00d6fc756e97ba54293c2c7985
Author: Wilder Rodrigues 
Date:   2014-07-14T17:36:29Z

adding static nat rules. Deploying new VMs is not working due to the 
appliance refactory, will check the changes with Antonio tomorrow.

Conflicts:
server/src/com/cloud/network/element/VirtualRouterElement.java
server/src/com/cloud/network/topology/AdvancedNetworkVisitor.java

commit 7b59dce792fabab00728a888c1acd43d8fd35943
Author: Wilder Rodrigues 
Date:   2014-07-15T07:23:26Z

we have to check if VPC is null bfore calling it. VPC is not used in gest 
networks, so deploying a new VM was broken.

commit 6188adb9702a2001bd9f53bacf1eeccea57de7b7
Author: Antonio Fornie 
Date:   2014-07-15T09:06:44Z

Fix offering setup

commit 3d16a407c97d877b96d765bb6dd0cade211e976b
Author: Antonio Fornie 
Date:   2014-07-15T09:54:58Z

Temporary put state info in a state object

commit 91dfad4a9789bf00ce89ee396964c2d003631202
Author: Wilder Rodrigues 
Date:   2014-07-15T07:38:21Z

adding apache license headers

commit 5b60394a3a0d3a373094cdae91640c71d223
Author: Wilder Rodrigues 
Date:   2014-07-15T08:59:42Z

adding Ip Association and VPN Rules

Conflicts:
server/src/com/cloud/network/topology/AdvancedNetworkVisitor.java
server/src/com/cloud/network/topology/BasicNetworkTopology.java
server/src/com/cloud/network/topology/NetworkTopologyVisitor.java

commit 0a08829153d0911b2231b77b88a8c40365504415
Author: Daan Hoogland 
Date:   2014-07-15T09:28:49Z

package rename

Conflicts:
server/src/com/cloud/network/rules/DhcpEntryRules.java
server/src/com/cloud/network/rules/DhcpSubNetRules.java

commit d306dfc194d5913e20642af13c26817d7b11fb2e
Author: Antonio Fornie 
Date:   2014-07-15T16:52:54Z

Unify and encapsulate deployment flow methods and params

Conflicts:

server/src/com/cloud/netwo

[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-06 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-58073492
  
Hi @bhaisaab,

This is a new Pull Request in order to fix the conflicts we found in the 
old pull request #19 .

Travis-CI is 100% green and this PR has been extensively tested.

I will put the most update version of the description here:

Pull request of changes in the "cloud-server" module

In the last 14 weeks we have worked in the cloud-server, focusing our time 
in the refactor of the 

![puml_routerdeployment](https://cloud.githubusercontent.com/assets/5129209/4531522/04b0ad16-4d8b-11e4-9c9f-493f71c9e88e.png)
[Vpc]VirtualNetworkApplianceManagerImpl. We had a mains goals increase of 
Maintainability, Extensibility, Readability and test coverage. That was just a 
first step towards the development, still in progress, of the Redundant Virtual 
Routers for VPC.

== What has been done so far:

• The VirtualNetworkApplianceManagerImpl class line numbers dropped from 
4440 to 2558
• The VpcVirtualNetworkApplianceImpl class line numbers dropped from 1484 
to 749
• We created 35 new classes in order to split the code/responsibility
• We added 97.8% unit test coverage for com.cloud.network.element/router 
and org.cloud.network.router.deployment packages
o The most complex classes we changed are in those packages
o About 1700 lines of unit tests
• We executed many Marvin tests that we got from ACS and made compliant 
with our domain:
o test_01_create_account
o test_01_add_vm_to_subdomain
o test_DeleteDomain
o test_forceDeleteDomain
o test_updateAdminDetails
o test_updateDomainAdminDetails
o test_updateUserDetails
o test_LoginApiDomain
o test_LoginApiUuidResponse
o test_privategw_acl
o test_01_reset_vm_on_reboot
o test_03_restart_network_cleanup
o test_05_router_basic
o test_06_router_advanced
o test_07_stop_router
o test_08_start_router
o test_09_reboot_router
o test_01_create_service_offering
o test_02_edit_service_offering
o test_03_delete_service_offering
o test_01_start_stop_router_after_addition_of_one_guest_network
o test_02_reboot_router_after_addition_of_one_guest_network
o test_04_chg_srv_off_router_after_addition_of_one_guest_network
o test_05_destroy_router_after_addition_of_one_guest_network
o test_01_stop_start_router_after_creating_vpc
o test_02_reboot_router_after_creating_vpc
o test_04_change_service_offerring_vpc
o test_05_destroy_router_after_creating_vpc
o test_vpc_remote_access_vpn
o test_vpc_site2site_vpn

We started the changes in the network area, trying to identify the 
differences in the 2 types of network we have. For that we created Basic and 
Advanced Network Topology classes. The network topology classes are responsible 
by invoking the Apply/Setup/Create/Save rules that were previously done by the 
[Vpc]VirtualNetworkAppliance. A topology instance is retrieved via a context 
object that is injected in the [Vpc]VirtualElement. The context object will 
return the most appropriate topology instance based on the Network Type, which 
is defined in the Data Centre. That was the first step towards the refactor.

From the topology class we reach the Rule Applier implementation that will 
be used to do all the rule setup preparation (i.e. invoke DAOs and prepare the 
command object). The RuleApplier interface was extracted from the 
VirtualNetworkApplianceManagerImpl, where it use to be an inner interface. For 
each anonymous implementation of the RuleApplier we created a concrete class. 
The rules are used as elements of a Visitor class, which will perform some 
extra logic, depending on the rule it's visiting, and call the send commands to 
router method. The latter has also been extracted from the 
VirtualNetworkApplianceManagerImpl and is now in a new helper class: 
NetworkHelperImpl.

The visitor has been used because we were aiming to split the 
responsibility and also because the way the RuleApplier was implemented before, 
it was clear that every command sent to the router was following a 2-steps 
approach: gather information to create the commands, apply some logic to send 
to the router. For those reason we implemented the visitor pattern. Since we 
already had the Basic/Advanced Network Topology classes, we created 2 concrete 
classes to visit the rules: Basic/Advanced Network Visitors. Both classes 
extend the abstract class NetworkTopologyVisitor, which defines all the visit 
methods per type of rule. By doing so, we can use the same rule and separate 
the logic based on the type of visitor that we have - Basic or Advanced.

Continuing on the refactor, we also added some helper classes for the 
"getSomething" related methods. Following this approach we ended up having the 
following classes:


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-08 Thread bhaisaab
Github user bhaisaab commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-58321537
  
Thanks for sharing Wilder, I'll review some of pending PRs today.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-08 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-58321829
  
Thanks, Rohit!

I also saw your reply on the list.  I hope it get through master soon... it 
will help us a lot in order to continue with the redundant VPC work.

Cheers,
Wilder 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-08 Thread bhaisaab
Github user bhaisaab commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-58341540
  
Code looks great, builds on my system as well. I saw the results with 
XenServer, I'll try to test against KVM by tomorrow and share that here. Wiki 
page was informational as well:

https://cwiki.apache.org/confluence/display/CLOUDSTACK/Refactor+for+Redundant+Virtual+Router+Implementation


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-08 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-58341935
  
Super nice to hear that! :)

We worked really hard to offer our best for now, although we know that 
there are still things to be improved. But we will tackle each and any of them.

I will inform the team about it. :)

Thanks a lot for reviewing it.

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-13 Thread bhaisaab
Github user bhaisaab commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-58875333
  
All's well with this PR, since 4.5 is cut now and this PR passes currently 
existing smoke tests should we merge it now to master?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-13 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-58881400
  
That would be really appreciated, as we have work on 2 other branches 
waiting to get upstream as well.

If you need more tests, please do not hesitate to let me know: always 
willing to help.

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-14 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-59035961
  
two small conflicts with present master. Can you decide on them, Wilder?

On Mon, Oct 13, 2014 at 1:49 PM, Wilder Rodrigues 
wrote:

> That would be really appreciated, as we have work on 2 other branches
> waiting to get upstream as well.
>
> If you need more tests, please do not hesitate to let me know: always
> willing to help.
>
> Cheers,
> Wilder
>
> —
> Reply to this email directly or view it on GitHub
> .
>



-- 
Daan


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-14 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-59036211
  
Sure, I will have a look now.

Cheers,
Wilder

From: Daan Hoogland 
mailto:notificati...@github.com>>
Reply-To: apache/cloudstack 
mailto:re...@reply.github.com>>
Date: Tuesday 14 October 2014 14:39
To: apache/cloudstack 
mailto:cloudst...@noreply.github.com>>
Cc: Wilder Rodrigues 
mailto:wrodrig...@schubergphilis.com>>
Subject: Re: [cloudstack] Vpc refactor clean for pr (#22)

two small conflicts with present master. Can you decide on them, Wilder?

On Mon, Oct 13, 2014 at 1:49 PM, Wilder Rodrigues 
mailto:notificati...@github.com>>
wrote:

> That would be really appreciated, as we have work on 2 other branches
> waiting to get upstream as well.
>
> If you need more tests, please do not hesitate to let me know: always
> willing to help.
>
> Cheers,
> Wilder
>
> —
> Reply to this email directly or view it on GitHub
> .
>



--
Daan

—
Reply to this email directly or view it on 
GitHub.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-14 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/22#issuecomment-59037299
  
Just a quick note: before pushing the rebase I will run the tests with 
Simulator + Xen Server on both Basic and Advanced network, so I know for sure 
everything is working.

Once I’m done and the conflicts’ resolution is pushed, I will let you 
know.

Cheers,
Wilder

From: Daan Hoogland 
mailto:notificati...@github.com>>
Reply-To: apache/cloudstack 
mailto:re...@reply.github.com>>
Date: Tuesday 14 October 2014 14:39
To: apache/cloudstack 
mailto:cloudst...@noreply.github.com>>
Cc: Wilder Rodrigues 
mailto:wrodrig...@schubergphilis.com>>
Subject: Re: [cloudstack] Vpc refactor clean for pr (#22)

two small conflicts with present master. Can you decide on them, Wilder?

On Mon, Oct 13, 2014 at 1:49 PM, Wilder Rodrigues 
mailto:notificati...@github.com>>
wrote:

> That would be really appreciated, as we have work on 2 other branches
> waiting to get upstream as well.
>
> If you need more tests, please do not hesitate to let me know: always
> willing to help.
>
> Cheers,
> Wilder
>
> —
> Reply to this email directly or view it on GitHub
> .
>



--
Daan

—
Reply to this email directly or view it on 
GitHub.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-14 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cloudstack/pull/22


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [GitHub] cloudstack pull request: Vpc refactor clean for pr

2014-10-14 Thread Daan Hoogland
:) github should tell me, shouldn't it?

On Tue, Oct 14, 2014 at 2:50 PM, wilderrodrigues  wrote:

> Github user wilderrodrigues commented on the pull request:
>
> https://github.com/apache/cloudstack/pull/22#issuecomment-59037299
>
> Just a quick note: before pushing the rebase I will run the tests with
> Simulator + Xen Server on both Basic and Advanced network, so I know for
> sure everything is working.
>
> Once I’m done and the conflicts’ resolution is pushed, I will let you
> know.
>
> Cheers,
> Wilder
>
> From: Daan Hoogland  notificati...@github.com>>
> Reply-To: apache/cloudstack  re...@reply.github.com>>
> Date: Tuesday 14 October 2014 14:39
> To: apache/cloudstack  cloudst...@noreply.github.com>>
> Cc: Wilder Rodrigues  wrodrig...@schubergphilis.com>>
> Subject: Re: [cloudstack] Vpc refactor clean for pr (#22)
>
> two small conflicts with present master. Can you decide on them,
> Wilder?
>
> On Mon, Oct 13, 2014 at 1:49 PM, Wilder Rodrigues <
> notificati...@github.com>
> wrote:
>
> > That would be really appreciated, as we have work on 2 other branches
> > waiting to get upstream as well.
> >
> > If you need more tests, please do not hesitate to let me know: always
> > willing to help.
> >
> > Cheers,
> > Wilder
> >
> > —
> > Reply to this email directly or view it on GitHub
> >  >.
> >
>
>
>
> --
> Daan
>
> —
> Reply to this email directly or view it on GitHub<
> https://github.com/apache/cloudstack/pull/22#issuecomment-59035961>.
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---
>



-- 
Daan