Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x

This commit is contained in:
Vijayendra Bhamidipati 2012-07-13 13:44:33 -07:00
commit 695db226af
6 changed files with 26 additions and 11 deletions

View File

@ -592,7 +592,7 @@ public class FirewallManagerImpl implements FirewallService, FirewallManager, Ma
for (FirewallRuleVO rule : fwRules) {
// Mark all Firewall rules as Revoke, but don't revoke them yet - we have to revoke all rules for ip, no
// need to send them one by one
// need to send them one by one
revokeFirewallRule(rule.getId(), false, caller, Account.ACCOUNT_ID_SYSTEM);
}

View File

@ -791,7 +791,6 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
finalizeSshAndVersionOnStart(cmds, profile, router, controlNic);
//2) FORM PLUG NIC COMMANDS
Map<Nic, Network> guestNics = new HashMap<Nic, Network>();
Map<Nic, Network> publicNics = new HashMap<Nic, Network>();
@ -908,14 +907,13 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
throw new CloudRuntimeException("Cannot find related provider of virtual router provider: " + vrProvider.getType().toString());
}
List<Long> routerGuestNtwkIds = _routerDao.getRouterNetworks(router.getId());
for (Long guestNetworkId : routerGuestNtwkIds) {
for (Nic nic : guestNics.keySet()) {
if (reprogramGuestNtwks) {
finalizeIpAssocForNetwork(cmds, router, provider, guestNetworkId);
finalizeNetworkRulesForNetwork(cmds, router, provider, guestNetworkId);
finalizeIpAssocForNetwork(cmds, router, provider, nic.getNetworkId());
finalizeNetworkRulesForNetwork(cmds, router, provider, nic.getNetworkId());
}
finalizeUserDataAndDhcpOnStart(cmds, router, provider, guestNetworkId);
finalizeUserDataAndDhcpOnStart(cmds, router, provider, nic.getNetworkId());
}
return true;

View File

@ -400,18 +400,26 @@ public class NetworkACLManagerImpl implements Manager,NetworkACLManager{
public boolean revokeAllNetworkACLsForNetwork(long networkId, long userId, Account caller) throws ResourceUnavailableException {
List<FirewallRuleVO> ACLs = _firewallDao.listByNetworkAndPurpose(networkId, Purpose.NetworkACL);
if (ACLs.isEmpty()) {
s_logger.debug("Found no network ACLs for network id=" + networkId);
return true;
}
if (s_logger.isDebugEnabled()) {
s_logger.debug("Releasing " + ACLs.size() + " Network ACLs for network id=" + networkId);
}
for (FirewallRuleVO ACL : ACLs) {
// Mark all Firewall rules as Revoke, but don't revoke them yet - we have to revoke all rules for ip, no
// Mark all Network ACLs rules as Revoke, but don't revoke them yet - we have to revoke all rules for ip, no
// need to send them one by one
revokeNetworkACL(ACL.getId(), false, caller, Account.ACCOUNT_ID_SYSTEM);
}
List<FirewallRuleVO> ACLsToRevoke = _firewallDao.listByNetworkAndPurpose(networkId, Purpose.NetworkACL);
// now send everything to the backend
boolean success = _firewallMgr.applyFirewallRules(ACLs, false, caller);
boolean success = _firewallMgr.applyFirewallRules(ACLsToRevoke, false, caller);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Successfully released Network ACLs for network id=" + networkId + " and # of rules now = " + ACLs.size());

View File

@ -1308,6 +1308,10 @@
if ($tierSelect.size() && $tierSelect.val() != '-1') {
data.networkid = $tierSelect.val();
}
else {
args.response.success({ data: null });
return;
}
if('vpc' in args.context) {
$.extend(data, {

View File

@ -167,7 +167,7 @@
$dialog.append($listView);
$dialog.dialog({
title: 'VMs in this tier',
title: 'VMs in tier: ' + name,
dialogClass: 'multi-edit-add-list panel configure-acl',
width: 825,
height: 600,
@ -457,7 +457,7 @@
context: context
})
).dialog({
title: 'Configure ACL',
title: 'Configure ACL for tier: ' + $tier.find('.title').html(),
dialogClass: 'configure-acl',
width: 900,
height: 600,

View File

@ -1096,6 +1096,9 @@
tiers: {
detailView: { //duplicate from cloudStack.sections.network.sections.networks.listView.detailView (begin)
name: 'Guest network details',
//comment out until JS error "$browser is undefined" is fixed
/*
viewAll: {
path: 'network.ipAddresses',
label: 'label.menu.ipaddresses',
@ -1152,6 +1155,8 @@
return false;
}
},
*/
actions: {
edit: {
label: 'label.edit',