95 Commits

Author SHA1 Message Date
Sheng Yang
58568db1d0 NaaS: Use provider() instead of explicit isRedundant flag 2011-11-09 15:23:01 -08:00
Sheng Yang
b85744859f NaaS: Set new added virtual router element enabled by default 2011-11-09 13:56:35 -08:00
Murali Reddy
db991dd8f6 NAAS : adding support for service capabilities to be specified as part of network offering 2011-11-08 13:01:44 -08:00
alena
3a845d2d75 Keep Service/Provider map per network as well as per networkOffering (to handle the case when there are multiple providers defined for the same service in the network offering, and only one is picked when the network is created) 2011-11-07 16:16:03 -08:00
prachi
dce0bfd558 Fixing VirtualRouterElement and RVR to not use forceShutdown 2011-11-04 18:06:35 -07:00
prachi
5f93665a30 - Send network labels to hypervisor recource during processConnect
- Create Default physicalnetwork and add traffic types while creating a zone
- DeleteProvider should error out if there are networks using the provider.
- Other validations
2011-11-04 17:57:05 -07:00
Sheng Yang
3051dc2621 NaaS: Discard DhcpElement
VirtualRouterElement would do all the job. The difference would be public
network enabled or not.
2011-11-04 14:13:55 -07:00
Sheng Yang
3de3fc69d2 NaaS: Implement shutdownProviderInstances for virtual router 2011-11-03 13:44:26 -07:00
alena
6882cf8fd5 Cleaned up unused code that was commented out 2011-11-03 11:06:47 -07:00
Sheng Yang
4a960f2912 NaaS: Update VirtualRouterElement on StaticNat and PortForwarding services 2011-11-02 19:26:42 -07:00
Sheng Yang
3fc9b149e4 NaaS: Add portforwarding and staticnat service provider
Make them service rather than capability of firewall. Now firewall only means
open/close the port.
2011-11-02 15:18:39 -07:00
prachi
6aa743165a Changes to support Enable/ Disable services of a service provider added to physical network:
- ListSupportedNetworkServiceProvidersCmd will now return Providers along with its element's services and boolean 'canEnableIndividualServices' that indicates if for this Provider services can be enabled/disabled
- add & update NetworkServiceProvider changed to take in the list of services to enable. While adding a provider, if list is null then all services supported by the element are enabled by default.
- ListNetworkServices enhanced to take in a provider name and returns services of that specific provider.
2011-11-01 18:03:55 -07:00
Sheng Yang
a43364f0a4 NaaS: Rename virtual_router_elements to virtual_router_provider 2011-10-31 15:59:53 -07:00
Sheng Yang
cd3fbf0548 NaaS: Create AddVirtualRouterElementCmd
As DhcpElement/VirtualRouterElement/RedundantVirtualRouterElement is decided to
be the service provider of the physical network, this API should be called to
add a new element, with correlated network service provider ID.

Then e.g. ConfigureVirtualRouterElementCmd should be called to configure and
enable the element.
2011-10-31 15:59:44 -07:00
Sheng Yang
00bb63ac67 NaaS: Remove separate configuration fields for virtual router elements
The fields are duplicated with network offerings.
2011-10-31 15:59:36 -07:00
Sheng Yang
928fc64ebc NaaS: Enable VirtualRouterElement to deal with service separately 2011-10-31 15:59:31 -07:00
prachi
549c7d2ef9 Added NetworkElement API's isReady() and shutdownProviderInstances() called by NetworkMgr while enabling/shutdown the service provider. 2011-10-31 13:09:54 -07:00
alena
d315e57b0e Renamed "type" to "guestType" 2011-10-27 16:51:42 -07:00
alena
71b53a3432 Made isSharedSourceNatService a capability of SoureNatService 2011-10-27 16:49:20 -07:00
Sheng Yang
bf4e21f315 NaaS: Destroy virtual router when cleanup=true at shutdown
As we did in the restart() function.
2011-10-27 16:45:34 -07:00
Sheng Yang
e1e96c0bb3 NaaS: Add ServiceProviders
Added PortForwardingServiceProvider, StaticNatServiceProvider, rename
PasswordServiceProvider to UserDataServiceProvider(may rename to a better name
later).

Add related function for service providers.
2011-10-27 11:55:10 -07:00
Sheng Yang
b369e45c78 NaaS: Remove some configure items for virtual router
DHCP range, domain name, etc. are the property of network, not virtual router
specific.

The focus of virtual router configuration would on separate enable/disable each
service it provided.
2011-10-27 11:55:03 -07:00
alena
95bac58076 Cleanup firewall/pf/lb/vpn rules as a part of networkShutdown 2011-10-26 18:00:22 -07:00
alena
525a0a7675 1)Changed implementation for restart network: call shutdown/implement methods as a part of it
2)Re-apply all existing firewall rules as a part of implement call. TODO: Cleanup all existing rules from the backend (leave them in the DB) as a part of shutdown call
2011-10-25 18:24:24 -07:00
Murali Reddy
aa808f5685 -Added LB serive provider (seperating it out from Firewall service provider)
-Bringing add/delete/list of all external network devices under one unified API's (addNetworkDevice, deleteNetworkDevice, listNetworkDevice)
-Refactoring External network manager to work from both sets of API's add/delete/list NetworkDevice and add/delete/list External Firewall/LoadBalancer
2011-10-21 18:15:36 +05:30
Sheng Yang
21344e3c36 NaaS: Remove some API test code 2011-10-20 15:19:00 -07:00
Sheng Yang
2ebb719aba NaaS: Add configuration for virtual router elements 2011-10-20 13:59:23 -07:00
Sheng Yang
04f106a595 NaaS: Configure commands for DhcpElement, VirtualRouterElement and RedundantVirtualRouterElement
Add configure command for these virtual router based elements. The commands
should be different for different elements.

The context of configuration would be added later.
2011-10-20 13:58:54 -07:00
alena
c00058adc2 Added type (Shared/Isolated) to the networkOffering/networks 2011-10-13 17:33:41 -07:00
alena
7433d5314a 1) Refactored networkOfferings:
* moved all services to the separate table, map them to the network_offering+provider.
* added state/securityGroupEnabled properties for the networkOffering
* added ability to list by state/securityGroupEnabled in listNetworkOfferings api command

2) New service: SourceNat
2011-10-12 16:38:59 -07:00
Sheng Yang
b2a007dc3c NaaS: Remove IsServiceProvider() functions
If the element is the service provider for this network, then can be tell from
network offering. We don't need these functions in the interface.
2011-10-11 14:04:13 -07:00
Sheng Yang
30d48c40b3 Network as a service(NaaS): Separate redundant virtual router as a standalone element
Since we would introduce a way to specify each service provider in the network
offering, it's better for redundant virtual router as a separate service
provider.

Also isRedundant() flag in the network offering would be removed. Redundant
virtual router temporality won't work from now. Until we're able to add
different network elements/service providers in network_offering.
2011-10-10 15:41:07 -07:00
Sheng Yang
0121c0516d Network: Add Service providers
In the past, the NetworkElement would cover almost all the functionality that
e.g.  virtual router can cover: firewall, source NAT, static NAT, password,
VPN... So anyone want to implement the NetworkElement would have to implement
these service's specific methods, even it wouldn't support it. Also, if we want
to find a e.g. FirewallServiceProvider, we have to proceed all the current
network service providers, to call a method to know if it support such service.
That's neither elegant nor scaling way to do it.

As the first step, this patch separates each ServiceProvider from NetworkElement
(there are some interface already out of NetworkElement, so this patch slightly
modifies them too), and only the class would implement the correlated interface, would
have the ability to do these services.
2011-10-10 11:45:39 -07:00
Sheng Yang
1fb5030cca Clean up global redundant_router config item
We would use network_offering option in 3.0 instead.
2011-09-27 16:50:24 -07:00
Sheng Yang
f19fca6ec6 Fix restartNetwork wrongly report stop failure 2011-09-14 16:24:43 -07:00
Sheng Yang
474d1a6034 bug 11307: Add destroyRouter command 2011-09-14 16:23:42 -07:00
Sheng Yang
684a603a6e bug 11307: Add cleanup parameter to restartNetwork command
Default set it to true. When cleanup=false, restartNetwork would only
re-implement the network, but don't destroy current existed routers.
2011-09-14 16:23:34 -07:00
alena
d3eb9db7fa bug 11204: when search for domR/dhcp, include Role to the corresponding search to eliminate getting "LB" network element in the response
status 11204: resolved fixed

Conflicts:

	server/src/com/cloud/network/element/VirtualRouterElement.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
2011-08-23 12:05:53 -07:00
alena
8a7feb8ec1 Merge branch '2.2.y'
Conflicts:
	agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java
	api/src/com/cloud/agent/api/routing/LoadBalancerConfigCommand.java
	api/src/com/cloud/agent/api/to/FirewallRuleTO.java
	api/src/com/cloud/agent/api/to/IpAddressTO.java
	api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
	api/src/com/cloud/api/ApiConstants.java
	api/src/com/cloud/api/BaseCmd.java
	api/src/com/cloud/api/ResponseGenerator.java
	api/src/com/cloud/api/commands/CreateFirewallRuleCmd.java
	api/src/com/cloud/api/commands/CreateIpForwardingRuleCmd.java
	api/src/com/cloud/api/commands/CreateLoadBalancerRuleCmd.java
	api/src/com/cloud/api/commands/CreatePortForwardingRuleCmd.java
	api/src/com/cloud/api/commands/DeleteLoadBalancerRuleCmd.java
	api/src/com/cloud/api/commands/ListCapabilitiesCmd.java
	api/src/com/cloud/api/commands/UpdateNetworkCmd.java
	api/src/com/cloud/api/response/CapabilitiesResponse.java
	api/src/com/cloud/network/Network.java
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/network/firewall/FirewallService.java
	api/src/com/cloud/network/lb/LoadBalancingRule.java
	api/src/com/cloud/network/lb/LoadBalancingRulesService.java
	api/src/com/cloud/network/rules/FirewallRule.java
	api/src/com/cloud/network/rules/RulesService.java
	api/src/com/cloud/offering/NetworkOffering.java
	client/tomcatconf/commands.properties.in
	cloud.spec
	core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
	core/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java
	core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
	core/src/com/cloud/storage/template/DownloadManagerImpl.java
	core/src/com/cloud/vm/DomainRouterVO.java
	debian/cloud-deps.install
	patches/systemvm/debian/config/etc/init.d/cloud-early-config
	patches/systemvm/debian/config/root/ipassoc.sh
	patches/systemvm/debian/config/root/loadbalancer.sh
	scripts/vm/hypervisor/kvm/rundomrpre.sh
	scripts/vm/hypervisor/xenserver/vmops
	server/src/com/cloud/agent/manager/AgentAttache.java
	server/src/com/cloud/agent/manager/AgentManagerImpl.java
	server/src/com/cloud/agent/manager/AgentMonitor.java
	server/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
	server/src/com/cloud/alert/ClusterAlertAdapter.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/cluster/ClusterManagerImpl.java
	server/src/com/cloud/configuration/Config.java
	server/src/com/cloud/configuration/ConfigurationManager.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/deploy/FirstFitPlanner.java
	server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
	server/src/com/cloud/host/dao/HostDaoImpl.java
	server/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
	server/src/com/cloud/network/LoadBalancerVO.java
	server/src/com/cloud/network/NetworkManager.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/dao/FirewallRulesDao.java
	server/src/com/cloud/network/dao/FirewallRulesDaoImpl.java
	server/src/com/cloud/network/element/DhcpElement.java
	server/src/com/cloud/network/element/VirtualRouterElement.java
	server/src/com/cloud/network/firewall/FirewallManagerImpl.java
	server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/rules/FirewallManager.java
	server/src/com/cloud/network/rules/FirewallRuleVO.java
	server/src/com/cloud/network/rules/PortForwardingRuleVO.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/network/rules/StaticNatRuleImpl.java
	server/src/com/cloud/network/security/SecurityGroupListener.java
	server/src/com/cloud/network/security/SecurityGroupManagerImpl.java
	server/src/com/cloud/offerings/NetworkOfferingVO.java
	server/src/com/cloud/server/ConfigurationServerImpl.java
	server/src/com/cloud/server/ManagementServerImpl.java
	server/src/com/cloud/storage/StorageManager.java
	server/src/com/cloud/storage/StorageManagerImpl.java
	server/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java
	server/src/com/cloud/storage/download/DownloadMonitorImpl.java
	server/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
	server/src/com/cloud/upgrade/dao/Upgrade228to229.java
	server/src/com/cloud/upgrade/dao/Upgrade229to2210.java
	server/src/com/cloud/user/AccountManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
	server/src/com/cloud/vm/dao/DomainRouterDao.java
	server/src/com/cloud/vm/dao/DomainRouterDaoImpl.java
	setup/db/create-index-fk.sql
	setup/db/create-schema.sql
	setup/db/db/schema-222to224.sql
	setup/db/db/schema-227to228.sql
	setup/db/db/schema-228to229.sql
	setup/db/db/schema-229to2210.sql
	tools/testClient/README
	ui/scripts/cloud.core.instance.js
	utils/src/com/cloud/utils/SerialVersionUID.java
	utils/src/com/cloud/utils/db/ConnectionConcierge.java
	utils/src/com/cloud/utils/db/Merovingian2.java
	utils/src/com/cloud/utils/db/Transaction.java
	utils/src/com/cloud/utils/nio/Link.java
	utils/src/com/cloud/utils/nio/NioConnection.java
	utils/src/com/cloud/utils/time/InaccurateClock.java
2011-08-22 20:28:30 -07:00
Sheng Yang
9366290423 Fix NPE when a router is fail to start
Also enforce the check for restartNetworkCommand
2011-08-16 11:43:47 -07:00
Sheng Yang
b10f560be5 Fix NPE when a router is fail to start
Also enforce the check for restartNetworkCommand
2011-08-16 11:43:36 -07:00
Sheng Yang
bb6c2d48f5 bug 11122: Fix router startup
The new created router got hostId = 0.

status 11122: resolved fixed

Conflicts:

	server/src/com/cloud/network/element/VirtualRouterElement.java
2011-08-13 00:21:35 -07:00
Sheng Yang
08a2f30785 bug 11122: Fix router startup
The new created router got hostId = 0.

status 11122: resolved fixed
2011-08-13 00:15:53 -07:00
alena
278f2a401f bug 10561: intermediate checkin for enable/disableStaticNat.
1) On enableStaticNat command we actually send the command to the backend (we used to just upgrade the DB in the past). The backend command carries sourceIp and destIp, and creates IP to IP mapping on the domR.
2) On disableStaticNat for the Ip address in addition to cleaning up port ranges, we also delete IP to IP mapping on the domR.
2011-08-11 10:19:22 -07:00
Sheng Yang
94f93a60c3 Clean up restart Network 2011-08-10 15:02:58 -07:00
Sheng Yang
18f2df44a1 Clean up restart Network 2011-08-10 15:02:08 -07:00
Sheng Yang
9569a7bbee Clean up VirtualRouterElement.restart() 2011-08-10 13:24:00 -07:00
Sheng Yang
bcf5058eda Clean up VirtualRouterElement.restart() 2011-08-10 13:23:30 -07:00
alena
4c4bff1c1e Fixed restarNetwork for networks of type Direct - was broken with checkin bfdb4d2d989ed00adcbbf5455731cc2980afcb7b 2011-08-09 15:51:57 -07:00
alena
2fef12e3ac Fixed the bug when domR was re-created as a part of implement() method in network gurus with sourceNatIp address belonging to incorrect user (System user instead of network owner).
Conflicts:

	server/src/com/cloud/network/element/DhcpElement.java
	server/src/com/cloud/network/element/VirtualRouterElement.java
2011-08-09 15:51:57 -07:00