26404 Commits

Author SHA1 Message Date
Hugo Trippaers
4cfe2a32c0 Fix a few things introduced by the rebase 2015-03-16 11:35:35 +01:00
Leo Simons
9166848482 Stop using rvm 2015-03-16 11:35:35 +01:00
Leo Simons
d0281a3b41 Seems like some of these can be nil 2015-03-16 11:35:35 +01:00
wilderrodrigues
0a1677242a Adding tests for IpAssocVpc; DeleteIpAlias; DnsMasqConfig
Adding IpAssocVpcCommand to the AbstractConfigItemFacade map
2015-03-16 11:35:34 +01:00
wilderrodrigues
6d7f75e18b Adding LoadBalancer command to JSON style
Adding a couple of tests (ConfigHelperTest) to validate the following:

* Command is generated;
* JSON String is generated based on the Java Object
* JSON Object is generated based on the String content

Also fixed the SetPortForwardingRulesVpcConfigItem: implementation was missing.
2015-03-16 11:35:33 +01:00
wilderrodrigues
6898acd349 BumpUpPriotity doesn't need the generateConfigItems() method.
Its approach is different, it uses a non-parameterized script.
2015-03-16 11:35:33 +01:00
wilderrodrigues
8caafe2859 Adding all other (13) rules to the new code design
Removed the code from ConfigHelper, which is now really clean
Added Flyweight to AbstractConfigItemFacada
Renamed 3 *ConfigItem classes that had typos in their names
2015-03-16 11:35:33 +01:00
wilderrodrigues
7ccd174471 Add 8 Commands/ConfigItems to new style
Make subclasses extend the abstract class; change accessor of few methods
2015-03-16 11:35:32 +01:00
wrodrigues
36a95e7577 TK-2925 Add support for loadbalancer config in ConfigHelper
Adding new ConfigItem classes, that will be used to decouple the configureation from the ConfigHelper class.

The idea is to use mix of Flyweight and Facade implementation in order to the correct classes without having so many ifs and private static methods.
2015-03-16 11:35:31 +01:00
Ian Southam
55c008f569 Cockup during the adding of the Apache licence 2015-03-16 11:35:31 +01:00
Ian Southam
f0b783bb11 Removed stuff that is moved to CsRedundant 2015-03-16 11:35:30 +01:00
Ian Southam
7b95b78223 backup fault and master implemented
Some more refactoring to decluter the bin directory
New config class to carry around the log, command line and firewall data
2015-03-16 11:35:29 +01:00
Ian Southam
8a2391336c Getting redundancy to work via teh configuration files
Some refactoring to make class loading a little more logical
Removed fw global (does not persist accross modules)
Added first tests
Added command line call to set and disable redundancy
Added command line call to set master
2015-03-16 11:35:29 +01:00
Ian Southam
093749eaae A start on the redundancy code
This will not break anything but also will not work
2015-03-16 11:35:29 +01:00
Ian Southam
a01e9082cd New code for ACLs (VPN configuration) failed functional tests
Some corrections
2015-03-16 11:35:28 +01:00
Ian Southam
f7d0a11a34 Process VPN requests\
No tests (yet)
2015-03-16 11:35:28 +01:00
Ian Southam
b95d8257a4 Merge operation for site2site vpn 2015-03-16 11:35:28 +01:00
Ian Southam
725c040d5c Added code to configure netusage for vpc and domR devices
Removed code from existing scripts that does the same
Fixed some more issues with CsNetfilter
Added rsync for/etc/iptables in rsync
2015-03-16 11:35:27 +01:00
Ian Southam
56900434b4 Added some new tests to check the acls are being made sort of correctly 2015-03-16 11:35:27 +01:00
Ian Southam
fa3ecbe8a0 Add some parameters to make nose a little less chatty
Well to be accurate to make fabric a little less chatty
2015-03-16 11:35:27 +01:00
Ian Southam
3cdaa55462 icmp-type parameter was being skipped 2015-03-16 11:35:27 +01:00
Ian Southam
2765a506dc Moved databag into a separate file 2015-03-16 11:35:26 +01:00
Ian Southam
733bc19eac Include base rule sets in Acls
Also made some adjustments to the base rule sets to ensure my parsing routine works
2015-03-16 11:35:26 +01:00
Ian Southam
e779c9b1e3 Some new tests for the acl code
WIP:  Committed to reduce chances of conflicts
2015-03-16 11:35:26 +01:00
Hugo Trippaers
a7338387c1 Sourcenat is handled differently for routers and vpc routers 2015-03-16 11:35:26 +01:00
Hugo Trippaers
576564e744 If a file doesn't exist, create it 2015-03-16 11:35:26 +01:00
Ian Southam
762e05ddee Bug fixed:
Default drop rul for inbound chain gets dropped by CsNetFilter
This would have been bad (tm)
2015-03-16 11:35:25 +01:00
Ian Southam
8b38bff962 A lot of corner cases dealt with
Need now to expand the test data to ensure I have got them all
Also failure to match because bizarrely some strings were unicode and some not
2015-03-16 11:35:25 +01:00
Ian Southam
5137d7e136 Removed dhcpopts.conf for now as, it is the routing options and they seem to be dealt with dofferently in the new arrangement
Changed the dhcp tests to avoid handing out the broadcast and gateway addresses :)
2015-03-16 11:35:25 +01:00
Hugo Trippaers
f21b90a73e Add missing sourcenat rule 2015-03-16 11:35:25 +01:00
Hugo Trippaers
6d12d94e0c Add the public source nat rule 2015-03-16 11:35:24 +01:00
Hugo Trippaers
80a149abb7 Add port forwarding and static nat to the convergence infrastructure 2015-03-16 11:35:24 +01:00
Hugo Trippaers
8c5dba31d0 Fix the forwardingrule databag 2015-03-16 11:35:24 +01:00
Ian Southam
7fc3365459 Implemented delete (add : false) for cs_dhcp
Added some tests to the test_update_config tests for dhcp entries
2015-03-16 11:35:24 +01:00
Ian Southam
e6e47de6ff Stupid stupd bug
a or b is of course not the same as a | b
2015-03-16 11:35:23 +01:00
Ian Southam
c318bd6337 Corrected bug (I love tests)
The dhcp server will only start listening after a host has been added
In this condition, HUP is not enough
Changed so that if it is adding a first host it will restart the server
2015-03-16 11:35:23 +01:00
Ian Southam
0e8c79c7f1 That is the acls.
Need to check the order stays good
2015-03-16 11:35:23 +01:00
Ian Southam
8a92a0a460 Corrected a couple of small typos 2015-03-16 11:35:23 +01:00
Hugo Trippaers
f273fd4659 Add the static nat rules to the merge procedure 2015-03-16 11:35:23 +01:00
Hugo Trippaers
a789e8bf57 Fix a bug that would add updated control ip address instead of replace 2015-03-16 11:35:22 +01:00
Ian Southam
8f4461567d That should be all the dhcp settings correct
CsGuestNetwork moved out of configure
dnsmasq config all switched to CsDhcp
2015-03-16 11:35:22 +01:00
Ian Southam
b45c71ee31 Acl code linked in
Dhcp code
Test file for dhcp entry
2015-03-16 11:35:22 +01:00
Hugo Trippaers
683e660d60 Small (but important) fixes 2015-03-16 11:35:22 +01:00
Ian Southam
574fa2c0a0 Call update_config.py if it is there 2015-03-16 11:35:21 +01:00
Ian Southam
8abf1a22ab Auto create missing chains
Auto delete superfluous rules
TO DO: Priorities
2015-03-16 11:35:21 +01:00
Ian Southam
19fd0b4b57 Added logic to create all necessary firewall rules
TODO:  Auto add chains
TODO:  Delete rules that should not be there
TODO: Deal with precidence
2015-03-16 11:35:21 +01:00
Ian Southam
cd0ad69281 Tidied up main to be in line with the newer classes
Added a base classs CsDataBag which will autoload a given databag
2015-03-16 11:35:21 +01:00
Ian Southam
c6d99a45a2 First part of some serious refactoring
The problem is that teh convergence model does not works as it currently is
Firewall rules will get added but not deleted

This builds a table of firewall rules that need to be present
The new CsNetfilter class will then do:
1.  Add rules that are not present
2.  Delete any that were not explicitly in the add list

WIP
2015-03-16 11:35:21 +01:00
Hugo Trippaers
e323d63867 Merge vmmetadata, reuse the code from the existing script to parse it. 2015-03-16 11:35:20 +01:00
Ian Southam
4527519081 Refactored CsHelper into a module
Introduced CsNetfilter module/class
2015-03-16 11:35:20 +01:00