832 Commits

Author SHA1 Message Date
Sheng Yang
f45576bce5 IPv6: Fix missed AddressFormat in nic table 2013-01-30 19:46:30 -08:00
Sheng Yang
ed547d91f7 IPv6: Rename public_ipv6_address to user_ipv6_address 2013-01-30 17:05:47 -08:00
Sheng Yang
cb9f2d018d IPv6: move assignPublicIp6Address() from NetworkManager to new Ipv6AddressManager
Don't want to involve IP address management code in NetworkManager.
2013-01-29 19:08:03 -08:00
Sheng Yang
2cbca372bf IPv6: Add support for IPv6 on DeployVMCmd 2013-01-28 18:54:34 -08:00
Sheng Yang
bd4bc025d1 IPv6: Accept IPv6 parameter for createNetworkCmd
Also ass public_ipv6_address for ipv6 address management.

Extend nics and vlans for ipv6 address.

Add dependency to com.googlecode.ipv6(java-ipv6).

Modify dhcpcommand for ipv6.
2013-01-26 23:14:15 -08:00
Chiradeep Vittal
cadca5fc0c Merge branch 'master' into network-refactor-merge2
Conflicts:
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/network/element/RemoteAccessVPNServiceProvider.java
	plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
	server/src/com/cloud/acl/DomainChecker.java
	server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
	server/src/com/cloud/network/NetworkManager.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/network/MockNetworkManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
2013-01-16 19:17:14 -08:00
Murali Reddy
4b67340d8c Revert "Summary: partical check-in for L4-L7 network services in the
shared"

This reverts commits 0de5a145e4f06420a4eb1867309af674c16ace7c,
28bbf6c52798c9bd298952844250fbc3cb92dce0

Reverting due to IP clearance issues for the commits done as part of CLOUDSTACK-312
2013-01-16 16:43:37 +05:30
Murali Reddy
316c5267cc Revert " Summary: check-in for L4-L7 network services in the shared network in"
This reverts commit 7fcfcdf91e49d64375171c9ae7fe61067aa59b6e.

Reverting due to IP clearance issued for the commit done as part of CLOUDSTACK-312
2013-01-16 16:04:14 +05:30
Murali Reddy
156ed7a336 Revert "Summary: partical check-in for L4-L7 network services in the shared"
Reverting due to IP clearance issued for the commit done as part of
CLOUDSTACK-312

This reverts commit d4c604cfd8ec6b385de7abf694a936e89add0f38.
2013-01-16 15:58:44 +05:30
Rohit Yadav
8cdb40a416 NetworkManagerImpl: Add method to getNetwork by uuid
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:19 -08:00
Chiradeep Vittal
504264236c Network-refactor: In preparation for moving the read-only interface NetworkModel
to the api project, ensure that all methods use interfaces from the api project.
By moving it to the api project, it lessens the dependency of plugins on the server components.

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 15:49:01 -08:00
Chiradeep Vittal
6b6d8c5710 Network-refactor: Move code from NetworkManager to NetworkModel.
NetworkModel is intended as a read-only view on the network model.
This includes Networks, Nics, Ip address, PhysicalNetwork, NetworkOfferings, etc
The code in configure() and start() is used to support queries on the network model which is now the responsibility of the NetworkModel service

Network-refactor: Fix tests so that they get injected with the required NetworkModel mock

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 15:49:01 -08:00
Chiradeep Vittal
5a830c4db0 Network-refactor: Refactor NetworkManager into NetworkModel and NetworkManager.
NetworkManager's exclusive focus is now
 - handling plugins during orchestration, and
 - to deal with ip address allocation.
Those classes that used to refer to NetworkManager to get access to the datamodel now refer to NetworkModel

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-09 15:49:01 -08:00
Chiradeep Vittal
c876f02c6f Clean up some unused imports 2013-01-07 15:21:36 -08:00
Chiradeep Vittal
cf90685985 Remove old applyRules implementation 2013-01-07 14:26:09 -08:00
Chiradeep Vittal
f4da21998c WIP : extract NetworkService
WIP : move stuff between network manager and network service.
      at this point there is about 700 lines of duplicated code
WIP: Leave creation of default offerings to NetworkManager init
WIP: clean up imports

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-07 14:25:03 -08:00
Rohit Yadav
ed0637b8c2 api: Refactor move acl to org.apache.cloudstack
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 15:30:58 -08:00
Rohit Yadav
5119785cf7 Get latest changes, merge branch 'master' into api_refactoring
Conflicts:
	api/src/com/cloud/network/element/RemoteAccessVPNServiceProvider.java
	server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
	server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-04 22:21:20 -08:00
Chiradeep Vittal
a64b386714 Move applyRules to the rightful place(s). Not sure why applyIps is required during applyRules, so we still have a reference back into a (simplified) applyRules in NetworkManager 2013-01-04 19:22:53 -08:00
Sheng Yang
42c8c73ab6 CLOUDSTACK-306: Introducing IpDeployingRequester and implement inline mode
For LB device in inline mode, the ip deployer(the owner of public ip) is the
firewall in front of it, not itself. So check if it's inline or not, if it's
inline, return the firewall as ip deployer
2013-01-04 19:18:03 -08:00
Sheng Yang
177e157cbf CLOUDSTACK-306: Move inline mode parameter from device to network offering
One F5 device can be used as inline and side-by-side at the same time(for
different networks). So we can define inline or not on network base.
2013-01-04 19:17:58 -08:00
Chiradeep Vittal
e37f458a8d Rationalize the interface by injecting all service providers by the service provider interface instead of assuming everybody implements NetworkElement. This is step 2 and includes all the plugins
import cleanups - remove unneeded and add explicit classes

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-04 15:13:47 -08:00
Chiradeep Vittal
b0a1a47d48 Not all network service providers need to be NetworkElements. NetworkElements are only those that are interested in L2 events. Since only NetworkElements were injected, and only in NetworkManagerImpl, this has led to all kinds of contortions. As a first step, enable individual service providers to be injected.
Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-01-04 12:14:49 -08:00
Rohit Yadav
296b49c2f8 Merge branch 'master' into test-merge-api
Conflicts:
	api/src/com/cloud/agent/api/BackupSnapshotCommand.java
	api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java
	api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/resource/ResourceService.java
	api/src/org/apache/cloudstack/api/ApiConstants.java
	api/src/org/apache/cloudstack/api/ResponseGenerator.java
	api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java
	client/tomcatconf/commands.properties.in
	core/src/com/cloud/storage/SnapshotVO.java
	pom.xml
	server/src/com/cloud/api/ApiDispatcher.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/offerings/NetworkOfferingVO.java
	server/src/com/cloud/resource/ResourceManagerImpl.java
	server/src/com/cloud/upgrade/dao/Upgrade40to41.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
	setup/db/create-schema.sql
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 13:54:46 -08:00
Min Chen
a88ce6bb7f Remove IdentityProxy from CloudException and ExceptionResponse. 2012-12-19 23:49:44 -08:00
Koushik Das
238c55fb6e CLOUDSTACK-596 : DeployVM command takes a lot of time to return job id Issue happens while deploying VM in advanced zone and 'networkids' parameter is not passed to deployVM command. In this case CS tries to identify a default guest network to be used for deploying VM. This logic is not optimized and latency increases with increase in user accounts and guest networks. Optimized logic for getting default network.
Signed-off-by: Koushik Das <koushik.das@citrix.com>
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2012-12-10 15:02:53 +05:30
Rohit Yadav
af28c06998 api: move and group all under command, org.apache.cloudstack.command.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 18:30:54 -08:00
Murali Reddy
7fcfcdf91e Summary: check-in for L4-L7 network services in the shared network in
the advanced zone

  Details:

  1). Added validation to check the Vlan Id specified in the createNetwork()
  does not overlap with any of the vlan's used by isolated networks or
  shared networks in the zone.

  2). state change for shared network with services to go to 'Setup' state
  on network shutdown instead of 'Allocated'

  Bug ID:CLOUDSTACK-312 enable L4-L7 network services in the shared network in the advanced zone
2012-12-06 13:06:18 +05:30
Murali Reddy
d4c604cfd8 Summary: partical check-in for L4-L7 network services in the shared
network in the advanced zone

Details : ensure that CIDR specified for shared network does not overlap with any
CloudStack generated CIDR's for isaolated guest networks when using
external networking devices

Bug ID:CLOUDSTACK-312 enable L4-L7 network services in the shared network in the advanced zone

Conflicts:
	server/src/com/cloud/network/NetworkManagerImpl.java
2012-12-06 12:29:38 +05:30
Murali Reddy
0de5a145e4 Summary: partical check-in for L4-L7 network services in the shared
network in the advanced zone

Summary: change 'shared network' in advanced zone with L4-L7 services to  go through network
implement phase. Add ACL checks to associate IP to shared network in the
advanced zone

   Bug ID:CLOUDSTACK-312 enable L4-L7 network services in the shared network in the advanced zone

Conflicts:
	server/src/com/cloud/network/NetworkManagerImpl.java
2012-12-06 11:55:19 +05:30
Murali Reddy
28bbf6c527 Summary: partical check-in for L4-L7 network services in the shared network in the advanced zone
Details:

- changed associateIPAddr API to accept shared network Id and account Id. Ip will be owned by tuple (account Id, network Id)
- chaged createNetwork API to accpet CIDR when network offering has external networking device providers

Bug ID:CLOUDSTACK-312 enable L4-L7 network services in the shared
network in the advanced zone
2012-12-06 11:55:19 +05:30
Rohit Yadav
e07106db0b api_refactor: usage apis to admin.usage pkg
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-05 14:31:31 -08:00
Rohit Yadav
47ae62e44a api_refactor: refactor network apis
- Fix refactored apis in commands*.in
- Fix comments etc.
- Expand tabs, remove trailing whitespace
- Fix trailing whitespaces for all *.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 22:47:07 -08:00
Rohit Yadav
5edfc2760a refactor: remove redundant imports, fix trailing chars 2012-12-03 13:54:37 -08:00
Alena Prokharchyk
7857b1f62a CLOUDSTACK-573: check if external provider enabled, only when finalize the service/provider list for the network 2012-11-30 13:07:01 -08:00
Rohit Yadav
4c86b1545d CLOUDSTACK-424: Update userdata should propagate to VR
The code that would propage userdata to router, when updateVirtualMachine api
is called, was missing. As per the docs [0], userdata should be a base64 encoded
string upto 2KB which is put on domr's html directory adn using HTTP GET the
userdata information can be obtained from the domr.

The updateVirtualMachine api [0] would accept a base64 encoded string
and decoded and put into the domr's /var/www/html/userdata/<uservm ip>/user-data
file. The operation does not require the VM to be in stopped state, though it is
advised to stop and call this api in case the user vm has a script which gets
the userdata information from domr while starting.

For example, this script can be used to fetch the data:
server_ip=$(grep dhcp-server-identifier /var/lib/dhclient-eth0.leases | tail -1 | awk '{print $NF}' | tr '\;' ' ')
wget http://${server_ip}/latest/user-data

This feature can be useful, for example to use into puppet facts [1], or to do
automation and horizontal scaling etc. based on userdata.

[0] http://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/domain_admin/updateVirtualMachine.html
[1] http://geek.jasonhancock.com/2011/11/09/cloudstack-userdata-into-puppet-facts/

BUG-ID : CLOUDSTACK-424
Reviewed-by: Rohit Yadav <bhaisaab@apache.org>
Reported-by: Nick Wales

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-11-15 18:43:51 +05:30
Pranav Saxena
fe460fac43 Upgrading a network that has Network offering SRX/F5 inline mode to a network offering that has all service provided by VR does not give proper error message: Hence correcting the error message 2012-11-15 13:52:54 +05:30
Alena Prokharchyk
74622a4dc3 Fixed listNetworks for the case when a) caller is an admin 2) projectId=-1 is specified - admin wasn't able to list networks belonging to regular users' projects 2012-11-14 14:59:51 -08:00
Alena Prokharchyk
705130e42c CS-16499: removed useless txn.commit statement. Used to call it to ensure that the lock() on nic object will get removed even in case when we don't do the DB update. But our Transaction code does it automatic 2012-11-02 09:59:37 -07:00
Alena Prokharchyk
597bc8c66c CS-16499: forgot to add @DB to releaseNic() call 2012-11-02 09:59:36 -07:00
Alena Prokharchyk
7bd7884f57 CS-16499: releaseNic - lock the nic row in the DB before checking its state. Hold the lock till the nics attributes + nicCount is updated
Conflicts:

	server/src/com/cloud/network/NetworkManagerImpl.java

Conflicts:

	server/src/com/cloud/network/NetworkManagerImpl.java
2012-11-02 09:59:36 -07:00
Hugo Trippaers
e24456f487 [CLOUDSTACK-415] Workaround this problem for now 2012-10-29 09:26:14 +01:00
Alena Prokharchyk
214bbf3ebd CLOUDSTACK-279: fixed deleteProject when executed by the regular user. Always pass System account as a caller when do account cleanup
Conflicts:

	api/src/com/cloud/api/commands/DeleteRemoteAccessVpnCmd.java
	server/src/com/cloud/network/element/CiscoNexusVSMElement.java
	server/src/com/cloud/network/element/ElasticLoadBalancerElement.java
	server/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
	server/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
	server/src/com/cloud/network/element/NetscalerElement.java
	server/src/com/cloud/network/element/OvsElement.java
	server/src/com/cloud/network/element/VpcJuniperSRXExternalFirewallElement.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
	server/src/com/cloud/storage/StorageManager.java
2012-10-17 17:26:19 -07:00
Alena Prokharchyk
a9fab0526b CLOUDSTACK-348: decrement resource count when the network gets removed
Conflicts:

	server/src/com/cloud/network/NetworkManagerImpl.java
2012-10-16 16:18:36 -07:00
Alena Prokharchyk
3f5733cea7 CS-16412: fixed count for following commands:
listVlanIpRanges
listOsCategories
listOsTypes
listSystemVms
listPhysicalNetworks
listCounters
listConditions
listAutoScalePolicies
listAutoScaleVmProfiles
listAutoScaleVmGroups
listConfigurations
listStoragePools
listClusters
listPods
listInstanceGroups
listSSHKeyPairs
listHypervisorCapabilities
listNetworkServiceProviders
listVpnCustomerGateways
listVpnGateways
listVpnConnections
listProjects
listProjectAccounts
listProjectInvitations
listTrafficTypes

Conflicts:

	api/src/com/cloud/api/commands/ListAutoScalePoliciesCmd.java
	api/src/com/cloud/api/commands/ListAutoScaleVmGroupsCmd.java
	api/src/com/cloud/api/commands/ListAutoScaleVmProfilesCmd.java
	api/src/com/cloud/api/commands/ListConditionsCmd.java
	api/src/com/cloud/api/commands/ListCountersCmd.java
	api/src/com/cloud/api/commands/ListVpnConnectionsCmd.java
	api/src/com/cloud/api/commands/ListVpnCustomerGatewaysCmd.java
	api/src/com/cloud/api/commands/ListVpnGatewaysCmd.java
	api/src/com/cloud/network/as/AutoScaleService.java
	server/src/com/cloud/network/as/AutoScaleManagerImpl.java
	server/src/com/cloud/network/as/dao/CounterDao.java
	server/src/com/cloud/network/as/dao/CounterDaoImpl.java
	server/src/com/cloud/projects/ProjectManagerImpl.java
	server/src/com/cloud/server/ManagementServerImpl.java
2012-10-15 18:16:59 -07:00
Rohit Yadav
6dd5c3fd42 CLOUDSTACK-70: Improve restart network behaviour for basic network
If cleanup=true, network elements and resources are shutdown and
reimplemented. Else, shutdown/reimplementation is skipped. Enabled
cleanup checkbox in CS UI.

For both cases, VRs are only deployed for Pods with no running
or starting VRs and Pods having running or starting user vms.

New DAO helpers introduced:
HostPodDao: listByDataCenterIdVMTypeAndStates
DomainRouterDao: listByPodId and listByPodIdAndStates
VMInstanceDao: listByPodId and corrected definition of listByTypeAndState

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-10-11 19:33:26 +05:30
Alena Prokharchyk
823f0c9669 Fixed ipAssoc and createNetworkACL (for vpc) commands - didn't work in Project scenario
Conflicts:

	server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
2012-10-09 16:26:26 -07:00
Alena Prokharchyk
fa81f27254 CLOUDSTACK-271: when check for vnet conflicts against existing physical networks, skip the networks with null vnet ranges 2012-10-05 15:10:31 -07:00
Murali Reddy
4e1f3f9410 CS-16426 For network offerings with IP conserved mode off, LB/PF/StaticNAT rule creation fails if the first rule is firewall
fixes, accidental modification of network services map object corresponding to a public IP
2012-10-03 17:18:00 -07:00
Alena Prokharchyk
11fe086ada Fixing CLOUDSTACK-226: don't allow physical networks with overlaping vnet ranges, belong to the same zone. Fixed create and update physical network code 2012-09-28 13:11:20 -07:00