mirror of https://github.com/apache/cloudstack.git
Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x
This commit is contained in:
commit
c159f07c24
24
.project
24
.project
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>mgit</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>src</name>
|
||||
<type>2</type>
|
||||
<location>/Users/john1/mgit/cloudbridge/src</location>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
#new labels (begin) **********************************************************************************************
|
||||
label.network.rate.megabytes=Network Rate (MB/s)
|
||||
label.action.enable.physical.network=Enable physical network
|
||||
label.action.disable.physical.network=Disable physical network
|
||||
message.action.enable.physical.network=Please confirm that you want to enable this physical network.
|
||||
|
|
|
|||
|
|
@ -696,11 +696,8 @@ setup_elbvm() {
|
|||
|
||||
setup_default() {
|
||||
cat > /etc/network/interfaces << EOF
|
||||
auto lo eth0
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
iface eth0 inet static
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
@ -895,7 +892,9 @@ start)
|
|||
;;
|
||||
|
||||
stop)
|
||||
log_action_begin_msg "Stopping cloud-early-config (noop)"
|
||||
log_action_begin_msg "Stopping cloud-early-config"
|
||||
#Override old system's interface setting
|
||||
setup_default;
|
||||
log_action_end_msg 0
|
||||
;;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ set -e
|
|||
ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
|
||||
while read i
|
||||
do
|
||||
ifconfig $i down
|
||||
ifconfig $i up
|
||||
ifdown $i
|
||||
ifup $i
|
||||
done < /tmp/iflist
|
||||
ip route add default via [GATEWAY] dev eth2 && \
|
||||
service dnsmasq restart
|
||||
|
|
|
|||
|
|
@ -399,6 +399,23 @@ public class ClusterManagerImpl implements ClusterManager {
|
|||
s_logger.warn("Operation timed out", e);
|
||||
return null;
|
||||
}
|
||||
Answer[] answers = new Answer[1];
|
||||
answers[0] = new Answer(cmd, result, null);
|
||||
return _gson.toJson(answers);
|
||||
} else if (cmds.length == 1 && cmds[0] instanceof PropagateResourceEventCommand) {
|
||||
PropagateResourceEventCommand cmd = (PropagateResourceEventCommand) cmds[0];
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Intercepting resource manager command: " + _gson.toJson(cmd));
|
||||
}
|
||||
|
||||
boolean result = false;
|
||||
try {
|
||||
result = _resourceMgr.executeUserRequest(cmd.getHostId(), cmd.getEvent());
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("Exception happened while exceuting command from resource manager in other mgmt server", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
Answer[] answers = new Answer[1];
|
||||
answers[0] = new Answer(cmd, result, null);
|
||||
return _gson.toJson(answers);
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ public class ClusterBasedAgentLoadBalancerPlanner implements AgentLoadBalancerPl
|
|||
}
|
||||
|
||||
sc = SearchCriteria2.create(HostVO.class);
|
||||
sc.addAnd(sc.getEntity().getResource(), Op.NNULL);
|
||||
sc.addAnd(sc.getEntity().getManagementServerId(), Op.EQ, msId);
|
||||
sc.addAnd(sc.getEntity().getStatus(), Op.EQ, Status.Up);
|
||||
List<HostVO> directHosts = sc.list();
|
||||
|
|
|
|||
|
|
@ -1936,19 +1936,21 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
result = false;
|
||||
}
|
||||
if (result == false) {
|
||||
return false;
|
||||
return result;
|
||||
}
|
||||
answer = cmds.getAnswer("getDomRVersion");
|
||||
if (answer != null && answer instanceof GetDomRVersionAnswer) {
|
||||
GetDomRVersionAnswer versionAnswer = (GetDomRVersionAnswer)answer;
|
||||
if (answer == null || !answer.getResult()) {
|
||||
/* Try to push on because it's not a critical error */
|
||||
s_logger.warn("Unable to get the template/scripts version of router " + router.getInstanceName() + " due to: " + versionAnswer.getDetails() + ", but we would continue");
|
||||
s_logger.warn("Unable to get the template/scripts version of router " + router.getInstanceName() + " due to: " + versionAnswer.getDetails());
|
||||
result = false;
|
||||
} else {
|
||||
router.setTemplateVersion(versionAnswer.getTemplateVersion());
|
||||
router.setScriptsVersion(versionAnswer.getScriptsVersion());
|
||||
router = _routerDao.persist(router);
|
||||
}
|
||||
} else {
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import java.sql.Types;
|
|||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
|
@ -29,7 +30,6 @@ import org.apache.log4j.Logger;
|
|||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.utils.crypt.DBEncryptionUtil;
|
||||
import com.cloud.utils.crypt.EncryptionSecretKeyChecker;
|
||||
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.script.Script;
|
||||
|
||||
|
|
@ -82,8 +82,10 @@ public class Upgrade2214to30 implements DbUpgrade {
|
|||
updateReduntantRouters(conn);
|
||||
// update networks that have to switch from Shared to Isolated network offerings
|
||||
switchAccountSpecificNetworksToIsolated(conn);
|
||||
// update networks to external network offerings if needed
|
||||
String externalOfferingName = fixNetworksWithExternalDevices(conn);
|
||||
// create service/provider map for network offerings
|
||||
createNetworkOfferingServices(conn);
|
||||
createNetworkOfferingServices(conn, externalOfferingName);
|
||||
// create service/provider map for networks
|
||||
createNetworkServices(conn);
|
||||
//migrate user concentrated deployment planner choice to new global setting
|
||||
|
|
@ -854,67 +856,97 @@ public class Upgrade2214to30 implements DbUpgrade {
|
|||
}
|
||||
}
|
||||
|
||||
private void createNetworkOfferingServices(Connection conn) {
|
||||
private void createNetworkOfferingServices(Connection conn, String externalOfferingName) {
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try {
|
||||
pstmt = conn
|
||||
.prepareStatement("select id, dns_service, gateway_service, firewall_service, lb_service, userdata_service, vpn_service, dhcp_service, unique_name from `cloud`.`network_offerings` where traffic_type='Guest'");
|
||||
.prepareStatement("select id, dns_service, gateway_service, firewall_service, lb_service, userdata_service," +
|
||||
" vpn_service, dhcp_service, unique_name from `cloud`.`network_offerings` where traffic_type='Guest'");
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
boolean sharedSourceNat = false;
|
||||
boolean dedicatedLb = true;
|
||||
long id = rs.getLong(1);
|
||||
String uniqueName = rs.getString(9);
|
||||
|
||||
ArrayList<String> services = new ArrayList<String>();
|
||||
Map<String, String> services = new HashMap<String, String>();
|
||||
if (rs.getLong(2) != 0) {
|
||||
services.add("Dns");
|
||||
services.put("Dns", "VirtualRouter");
|
||||
}
|
||||
|
||||
if (rs.getLong(3) != 0) {
|
||||
services.add("Gateway");
|
||||
if (externalOfferingName != null && uniqueName.equalsIgnoreCase(externalOfferingName)) {
|
||||
services.put("Gateway", "JuniperSRX");
|
||||
} else {
|
||||
services.put("Gateway", "VirtualRouter");
|
||||
}
|
||||
}
|
||||
|
||||
if (rs.getLong(4) != 0) {
|
||||
services.add("Firewall");
|
||||
if (externalOfferingName != null && uniqueName.equalsIgnoreCase(externalOfferingName)) {
|
||||
services.put("Firewall", "JuniperSRX");
|
||||
} else {
|
||||
services.put("Firewall", "VirtualRouter");
|
||||
}
|
||||
}
|
||||
|
||||
if (rs.getLong(5) != 0) {
|
||||
services.add("Lb");
|
||||
if (externalOfferingName != null && uniqueName.equalsIgnoreCase(externalOfferingName)) {
|
||||
services.put("Lb", "F5BigIp");
|
||||
dedicatedLb = false;
|
||||
} else {
|
||||
services.put("Lb", "VirtualRouter");
|
||||
}
|
||||
}
|
||||
|
||||
if (rs.getLong(6) != 0) {
|
||||
services.add("UserData");
|
||||
services.put("UserData", "VirtualRouter");
|
||||
}
|
||||
|
||||
if (rs.getLong(7) != 0) {
|
||||
services.add("Vpn");
|
||||
if (externalOfferingName == null || !uniqueName.equalsIgnoreCase(externalOfferingName)) {
|
||||
services.put("Vpn", "VirtualRouter");
|
||||
}
|
||||
}
|
||||
|
||||
if (rs.getLong(8) != 0) {
|
||||
services.add("Dhcp");
|
||||
services.put("Dhcp", "VirtualRouter");
|
||||
}
|
||||
|
||||
if (uniqueName.equalsIgnoreCase(NetworkOffering.DefaultSharedNetworkOfferingWithSGService.toString())) {
|
||||
services.add("SecurityGroup");
|
||||
services.put("SecurityGroup", "SecurityGroupProvider");
|
||||
}
|
||||
|
||||
if (uniqueName.equals(NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService.toString())) {
|
||||
services.add("SourceNat");
|
||||
services.add("PortForwarding");
|
||||
services.add("StaticNat");
|
||||
if (uniqueName.equals(NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService.toString()) || uniqueName.equalsIgnoreCase(externalOfferingName)) {
|
||||
if (externalOfferingName != null && uniqueName.equalsIgnoreCase(externalOfferingName)) {
|
||||
services.put("SourceNat", "JuniperSRX");
|
||||
services.put("PortForwarding", "JuniperSRX");
|
||||
services.put("StaticNat", "JuniperSRX");
|
||||
sharedSourceNat = true;
|
||||
} else {
|
||||
services.put("SourceNat", "VirtualRouter");
|
||||
services.put("PortForwarding", "VirtualRouter");
|
||||
services.put("StaticNat", "VirtualRouter");
|
||||
}
|
||||
}
|
||||
|
||||
for (String service : services) {
|
||||
pstmt = conn.prepareStatement("INSERT INTO `cloud`.`ntwk_offering_service_map` (`network_offering_id`, `service`, `provider`, `created`) values (?,?,?, now())");
|
||||
for (String service : services.keySet()) {
|
||||
pstmt = conn.prepareStatement("INSERT INTO `cloud`.`ntwk_offering_service_map` (`network_offering_id`," +
|
||||
" `service`, `provider`, `created`) values (?,?,?, now())");
|
||||
pstmt.setLong(1, id);
|
||||
pstmt.setString(2, service);
|
||||
if (service.equalsIgnoreCase("SecurityGroup")) {
|
||||
pstmt.setString(3, "SecurityGroupProvider");
|
||||
} else {
|
||||
pstmt.setString(3, "VirtualRouter");
|
||||
}
|
||||
pstmt.setString(3, services.get(service));
|
||||
pstmt.executeUpdate();
|
||||
}
|
||||
|
||||
//update shared source nat and dedicated lb
|
||||
pstmt = conn.prepareStatement("UPDATE `cloud`.`network_offerings` set shared_source_nat_service=?, dedicated_lb_service=? where id=?");
|
||||
pstmt.setBoolean(1, sharedSourceNat);
|
||||
pstmt.setBoolean(2, dedicatedLb);
|
||||
pstmt.setLong(3, id);
|
||||
pstmt.executeUpdate();
|
||||
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Unable to create service/provider map for network offerings", e);
|
||||
|
|
@ -1175,7 +1207,7 @@ public class Upgrade2214to30 implements DbUpgrade {
|
|||
return ;
|
||||
}
|
||||
|
||||
// get all networks that need to be updated to the redundant network offerings
|
||||
// get all networks that need to be updated to the isolated network offering
|
||||
pstmt = conn
|
||||
.prepareStatement("select id, network_offering_id from `cloud`.`networks` where switch_to_isolated=1");
|
||||
rs = pstmt.executeQuery();
|
||||
|
|
@ -1310,4 +1342,107 @@ public class Upgrade2214to30 implements DbUpgrade {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected String fixNetworksWithExternalDevices(Connection conn) {
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
ResultSet rs1 = null;
|
||||
|
||||
//Get zones to upgrade
|
||||
List<Long> zoneIds = new ArrayList<Long>();
|
||||
try {
|
||||
pstmt = conn.prepareStatement("select id from `cloud`.`data_center` where lb_provider='F5BigIp' or firewall_provider='JuniperSRX' or gateway_provider='JuniperSRX'");
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
zoneIds.add(rs.getLong(1));
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Unable to switch networks to the new network offering", e);
|
||||
}
|
||||
|
||||
|
||||
String uniqueName = null;
|
||||
HashMap<Long, Long> newNetworkOfferingMap = new HashMap<Long, Long>();
|
||||
|
||||
for (Long zoneId : zoneIds) {
|
||||
try {
|
||||
// Find the correct network offering
|
||||
pstmt = conn
|
||||
.prepareStatement("select id, network_offering_id from `cloud`.`networks` where guest_type='Virtual' and data_center_id=?");
|
||||
pstmt.setLong(1, zoneId);
|
||||
rs = pstmt.executeQuery();
|
||||
pstmt = conn.prepareStatement("select count(*) from `cloud`.`network_offerings`");
|
||||
rs1 = pstmt.executeQuery();
|
||||
long ntwkOffCount = 0;
|
||||
while (rs1.next()) {
|
||||
ntwkOffCount = rs1.getLong(1);
|
||||
}
|
||||
|
||||
pstmt = conn.prepareStatement("CREATE TEMPORARY TABLE `cloud`.`network_offerings2` ENGINE=MEMORY SELECT * FROM `cloud`.`network_offerings` WHERE id=1");
|
||||
pstmt.executeUpdate();
|
||||
|
||||
|
||||
while (rs.next()) {
|
||||
long networkId = rs.getLong(1);
|
||||
long networkOfferingId = rs.getLong(2);
|
||||
s_logger.debug("Updating network offering for the network id=" + networkId + " as it has switch_to_isolated=1");
|
||||
Long newNetworkOfferingId = null;
|
||||
if (!newNetworkOfferingMap.containsKey(networkOfferingId)) {
|
||||
uniqueName = "Isolated with external providers";
|
||||
// clone the record to
|
||||
pstmt = conn.prepareStatement("INSERT INTO `cloud`.`network_offerings2` SELECT * FROM `cloud`.`network_offerings` WHERE id=?");
|
||||
pstmt.setLong(1, networkOfferingId);
|
||||
pstmt.executeUpdate();
|
||||
|
||||
//set the new unique name
|
||||
pstmt = conn.prepareStatement("UPDATE `cloud`.`network_offerings2` SET id=?, unique_name=?, name=? WHERE id=?");
|
||||
ntwkOffCount = ntwkOffCount + 1;
|
||||
newNetworkOfferingId = ntwkOffCount;
|
||||
pstmt.setLong(1, newNetworkOfferingId);
|
||||
pstmt.setString(2, uniqueName);
|
||||
pstmt.setString(3, uniqueName);
|
||||
pstmt.setLong(4, networkOfferingId);
|
||||
pstmt.executeUpdate();
|
||||
|
||||
pstmt = conn.prepareStatement("INSERT INTO `cloud`.`network_offerings` SELECT * from " +
|
||||
"`cloud`.`network_offerings2` WHERE id=" + newNetworkOfferingId);
|
||||
pstmt.executeUpdate();
|
||||
|
||||
pstmt = conn.prepareStatement("UPDATE `cloud`.`networks` SET network_offering_id=? where id=?");
|
||||
pstmt.setLong(1, newNetworkOfferingId);
|
||||
pstmt.setLong(2, networkId);
|
||||
pstmt.executeUpdate();
|
||||
|
||||
newNetworkOfferingMap.put(networkOfferingId, ntwkOffCount);
|
||||
} else {
|
||||
pstmt = conn.prepareStatement("UPDATE `cloud`.`networks` SET network_offering_id=? where id=?");
|
||||
newNetworkOfferingId = newNetworkOfferingMap.get(networkOfferingId);
|
||||
pstmt.setLong(1, newNetworkOfferingId);
|
||||
pstmt.setLong(2, networkId);
|
||||
pstmt.executeUpdate();
|
||||
}
|
||||
|
||||
s_logger.debug("Successfully updated network id=" + networkId + " with new network offering id " + newNetworkOfferingId);
|
||||
}
|
||||
|
||||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Unable to switch networks to the new network offering", e);
|
||||
} finally {
|
||||
try {
|
||||
pstmt = conn.prepareStatement("DROP TABLE `cloud`.`network_offerings2`");
|
||||
pstmt.executeUpdate();
|
||||
if (rs != null) {
|
||||
rs.close();
|
||||
}
|
||||
|
||||
if (pstmt != null) {
|
||||
pstmt.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return uniqueName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -768,14 +768,6 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IpAddress allocateIP(long networkId, Account ipOwner,
|
||||
boolean isSystem) throws ResourceAllocationException,
|
||||
InsufficientAddressCapacityException, ConcurrentOperationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PublicIp assignPublicIpAddress(long dcId, Long podId, Account owner,
|
||||
VlanType type, Long networkId, String requestedIp, boolean isSystem)
|
||||
|
|
@ -880,4 +872,13 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager, NetworkS
|
|||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.network.NetworkService#allocateIP(long, com.cloud.user.Account)
|
||||
*/
|
||||
@Override
|
||||
public IpAddress allocateIP(long networkId, Account ipOwner) throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ public class AdvanceZone223To224UpgradeTest extends TestCase {
|
|||
}
|
||||
|
||||
public void test217to22Upgrade() throws SQLException {
|
||||
s_logger.debug("Finding sample data from 2.2.8");
|
||||
// DbTestUtils.executeScript("PreviousDatabaseSchema/2.2.8/dave-sample.sql", false, true);
|
||||
s_logger.debug("Finding sample data from 2.2.14");
|
||||
// DbTestUtils.executeScript("PreviousDatabaseSchema/2.2.14/dave-sample.sql", false, true);
|
||||
|
||||
Connection conn;
|
||||
PreparedStatement pstmt;
|
||||
|
|
@ -50,9 +50,9 @@ public class AdvanceZone223To224UpgradeTest extends TestCase {
|
|||
DatabaseUpgradeChecker checker = ComponentLocator.inject(DatabaseUpgradeChecker.class);
|
||||
|
||||
String version = dao.getCurrentVersion();
|
||||
assert version.equals("2.2.8") : "Version returned is not 2.2.8 but " + version;
|
||||
assert version.equals("2.2.14") : "Version returned is not 2.2.14 but " + version;
|
||||
|
||||
checker.upgrade("2.2.8", "2.2.12");
|
||||
checker.upgrade("2.2.14", "3.0.3");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,4 +217,22 @@ public class MockVirtualMachineManagerImpl implements VirtualMachineManager {
|
|||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.vm.VirtualMachineManager#checkIfCanUpgrade(com.cloud.vm.VirtualMachine, long)
|
||||
*/
|
||||
@Override
|
||||
public void checkIfCanUpgrade(VirtualMachine vmInstance, long newServiceOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.cloud.vm.VirtualMachineManager#upgradeVmDb(long, long)
|
||||
*/
|
||||
@Override
|
||||
public boolean upgradeVmDb(long vmId, long serviceOfferingId) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,3 +168,5 @@ CREATE TABLE `cloud`.`port_profile` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DELETE FROM `cloud`.`storage_pool_host_ref` WHERE pool_id IN (SELECT id FROM storage_pool WHERE removed IS NOT NULL);
|
||||
|
||||
ALTER TABLE `cloud`.`service_offering` MODIFY `nw_rate` smallint(5) unsigned DEFAULT '200' COMMENT 'network rate throttle mbits/s';
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ from integration.lib.common import *
|
|||
#Import Local Modules
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
|
||||
class Services:
|
||||
"""Test Services
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ class TestHighAvailability(cloudstackTestCase):
|
|||
except Exception as e:
|
||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||
return
|
||||
@unittest.skip("skipped")
|
||||
|
||||
def test_01_host_maintenance_mode(self):
|
||||
"""Test host maintenance mode
|
||||
"""
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -21,7 +21,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
|
@ -1576,7 +1576,7 @@ class TestNetworkUpgrade(cloudstackTestCase):
|
|||
vpns = Vpn.list(
|
||||
self.apiclient,
|
||||
publicipid=src_nat.id,
|
||||
listall=True,
|
||||
listall=True,
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
class Services:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
|
||||
#Import System modules
|
||||
import time
|
||||
|
|
@ -77,6 +77,7 @@ class Services:
|
|||
# Algorithm used for load balancing
|
||||
"privateport": 22,
|
||||
"publicport": 2222,
|
||||
"protocol": 'TCP',
|
||||
},
|
||||
"fw_rule":{
|
||||
"startport": 1,
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
|
||||
#Import System modules
|
||||
import time
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
|
||||
class Services:
|
||||
"""Test Snapshots Services
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
import datetime
|
||||
|
||||
class Services:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from marvin.cloudstackAPI import *
|
|||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
#Import System modules
|
||||
import os
|
||||
import urllib
|
||||
|
|
|
|||
|
|
@ -598,7 +598,9 @@ class Template:
|
|||
time.sleep(interval)
|
||||
|
||||
elif 'Installing' not in template.status:
|
||||
raise Exception("ErrorInDownload")
|
||||
raise Exception(
|
||||
"Error in downloading template: status - %s" %
|
||||
template.status)
|
||||
|
||||
elif timeout == 0:
|
||||
break
|
||||
|
|
@ -690,10 +692,12 @@ class Iso:
|
|||
return
|
||||
elif 'Downloaded' not in response.status and \
|
||||
'Installing' not in response.status:
|
||||
raise Exception("ErrorInDownload")
|
||||
raise Exception(
|
||||
"Error In Downloading ISO: ISO Status - %s" %
|
||||
response.status)
|
||||
|
||||
elif timeout == 0:
|
||||
raise Exception("TimeoutException")
|
||||
raise Exception("ISO download Timeout Exception")
|
||||
else:
|
||||
timeout = timeout - 1
|
||||
return
|
||||
|
|
@ -725,12 +729,12 @@ class PublicIPAddress:
|
|||
if zoneid:
|
||||
cmd.zoneid = zoneid
|
||||
elif "zoneid" in services:
|
||||
services["zoneid"]
|
||||
cmd.zoneid = services["zoneid"]
|
||||
|
||||
if domainid:
|
||||
cmd.domainid = domainid
|
||||
elif "domainid" in services:
|
||||
services["domainid"]
|
||||
cmd.domainid = services["domainid"]
|
||||
|
||||
if networkid:
|
||||
cmd.networkid = networkid
|
||||
|
|
@ -1140,7 +1144,7 @@ class LoadBalancerRule:
|
|||
apiclient.removeFromLoadBalancerRule(cmd)
|
||||
return
|
||||
|
||||
def update(self, apiclient, algorithm=None, description=None, name=None):
|
||||
def update(self, apiclient, algorithm=None, description=None, name=None, **kwargs):
|
||||
"""Updates the load balancing rule"""
|
||||
cmd = updateLoadBalancerRule.updateLoadBalancerRuleCmd()
|
||||
cmd.id = self.id
|
||||
|
|
@ -1151,8 +1155,40 @@ class LoadBalancerRule:
|
|||
if name:
|
||||
cmd.name = name
|
||||
|
||||
[setattr(cmd, k, v) for k, v in kwargs.items()]
|
||||
return apiclient.updateLoadBalancerRule(cmd)
|
||||
|
||||
def createSticky(self, apiclient, methodname, name, description=None, param=None):
|
||||
"""Creates a sticky policy for the LB rule"""
|
||||
|
||||
cmd = createLBStickinessPolicy.createLBStickinessPolicyCmd()
|
||||
cmd.lbruleid = self.id
|
||||
cmd.methodname = methodname
|
||||
cmd.name = name
|
||||
if description:
|
||||
cmd.description = description
|
||||
if param:
|
||||
cmd.param = []
|
||||
for name, value in param.items():
|
||||
cmd.param.append({'name': name, 'value': value})
|
||||
return apiclient.createLBStickinessPolicy(cmd)
|
||||
|
||||
def deleteSticky(self, apiclient, id):
|
||||
"""Deletes stickyness policy"""
|
||||
|
||||
cmd = deleteLBStickinessPolicy.deleteLBStickinessPolicyCmd()
|
||||
cmd.id = id
|
||||
return apiclient.deleteLBStickinessPolicy(cmd)
|
||||
|
||||
@classmethod
|
||||
def listStickyPolicies(cls, apiclient, lbruleid, **kwargs):
|
||||
"""Lists stickiness policies for load balancing rule"""
|
||||
|
||||
cmd= listLBStickinessPolicies.listLBStickinessPoliciesCmd()
|
||||
cmd.lbruleid = lbruleid
|
||||
[setattr(cmd, k, v) for k, v in kwargs.items()]
|
||||
return apiclient.listLBStickinessPolicies(cmd)
|
||||
|
||||
@classmethod
|
||||
def list(cls, apiclient, **kwargs):
|
||||
"""List all Load balancing rules matching criteria"""
|
||||
|
|
@ -1401,6 +1437,15 @@ class Network:
|
|||
[setattr(cmd, k, v) for k, v in kwargs.items()]
|
||||
return(apiclient.updateNetwork(cmd))
|
||||
|
||||
def restart(self, apiclient, cleanup=None):
|
||||
"""Restarts the network"""
|
||||
|
||||
cmd = restartNetwork.restartNetworkCmd()
|
||||
cmd.id = self.id
|
||||
if cleanup:
|
||||
cmd.cleanup = cleanup
|
||||
return(apiclient.restartNetwork(cmd))
|
||||
|
||||
@classmethod
|
||||
def list(cls, apiclient, **kwargs):
|
||||
"""List all Networks matching criteria"""
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from utils import *
|
||||
from base import *
|
||||
|
||||
|
|
@ -103,12 +103,12 @@ def download_systemplates_sec_storage(server, services):
|
|||
|
||||
try:
|
||||
# Login to management server
|
||||
ssh = remoteSSHClient.remoteSSHClient(
|
||||
ssh = remoteSSHClient(
|
||||
server["ipaddress"],
|
||||
server["port"],
|
||||
server["username"],
|
||||
server["password"]
|
||||
)
|
||||
)
|
||||
except Exception:
|
||||
raise Exception("SSH access failted for server with IP address: %s" %
|
||||
server["ipaddess"])
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import marvin
|
||||
import time
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import cloudstackConnection
|
||||
#from cloudstackConnection import cloudConnection
|
||||
|
|
@ -111,12 +111,7 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=50):
|
|||
loop_cnt = retries
|
||||
while True:
|
||||
try:
|
||||
ssh = remoteSSHClient.remoteSSHClient(
|
||||
ipaddress,
|
||||
port,
|
||||
username,
|
||||
password
|
||||
)
|
||||
ssh = remoteSSHClient(ipaddress, port, username, password)
|
||||
except Exception as e:
|
||||
if loop_cnt == 0:
|
||||
raise e
|
||||
|
|
@ -158,12 +153,7 @@ def get_process_status(hostip, port, username, password, linklocalip, process):
|
|||
"""Double hop and returns a process status"""
|
||||
|
||||
#SSH to the machine
|
||||
ssh = remoteSSHClient.remoteSSHClient(
|
||||
hostip,
|
||||
port,
|
||||
username,
|
||||
password
|
||||
)
|
||||
ssh = remoteSSHClient(hostip, port, username, password)
|
||||
ssh_command = "ssh -i ~/.ssh/id_rsa.cloud -ostricthostkeychecking=no "
|
||||
ssh_command = ssh_command + \
|
||||
"-oUserKnownHostsFile=/dev/null -p 3922 %s %s" % (
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Services:
|
|||
|
||||
def __init__(self):
|
||||
self.services = {
|
||||
"ostypeid": '5776c0d2-f331-42db-ba3a-29f1f8319bc9',
|
||||
"ostypeid": '1a568aed-db2d-41ca-b644-416b0bdc067e',
|
||||
# Cent OS 5.3 (64 bit)
|
||||
"mode": 'advanced',
|
||||
# Networking mode: Basic or advanced
|
||||
|
|
@ -457,7 +457,7 @@ class TestPortForwarding(cloudstackTestCase):
|
|||
"SSHing into VM with IP address %s after NAT rule deletion" %
|
||||
self.virtual_machine.ipaddress)
|
||||
|
||||
remoteSSHClient.remoteSSHClient(
|
||||
remoteSSHClient(
|
||||
src_nat_ip_addr.ipaddress,
|
||||
self.virtual_machine.ssh_port,
|
||||
self.virtual_machine.username,
|
||||
|
|
@ -573,7 +573,7 @@ class TestPortForwarding(cloudstackTestCase):
|
|||
"SSHing into VM with IP address %s after NAT rule deletion" %
|
||||
self.virtual_machine.ipaddress)
|
||||
|
||||
remoteSSHClient.remoteSSHClient(
|
||||
remoteSSHClient(
|
||||
ip_address.ipaddress.ipaddress,
|
||||
self.virtual_machine.ssh_port,
|
||||
self.virtual_machine.username,
|
||||
|
|
@ -778,7 +778,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
|||
(self.vm_1.ipaddress, src_nat_ip_addr.ipaddress)
|
||||
)
|
||||
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
src_nat_ip_addr.ipaddress,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -803,7 +803,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
|||
self.vm_2.id
|
||||
))
|
||||
|
||||
ssh_2 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_2 = remoteSSHClient(
|
||||
src_nat_ip_addr.ipaddress,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -836,7 +836,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
|||
self.vm_2.id
|
||||
))
|
||||
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
src_nat_ip_addr.ipaddress,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -859,7 +859,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
|||
|
||||
with self.assertRaises(Exception):
|
||||
self.debug("Removed all VMs, trying to SSH")
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
src_nat_ip_addr.ipaddress,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -969,7 +969,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
|||
self.vm_1.id,
|
||||
self.vm_2.id
|
||||
))
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress.ipaddress,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -988,7 +988,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
|||
self.vm_1.id,
|
||||
self.vm_2.id
|
||||
))
|
||||
ssh_2 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_2 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress.ipaddress,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -1016,7 +1016,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
|||
self.non_src_nat_ip.ipaddress.ipaddress,
|
||||
self.vm_2.id
|
||||
))
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress.ipaddress,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -1042,7 +1042,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
|||
self.non_src_nat_ip.ipaddress.ipaddress,
|
||||
self.vm_1.id
|
||||
))
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress.ipaddress,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -1195,7 +1195,7 @@ class TestRebootRouter(cloudstackTestCase):
|
|||
try:
|
||||
self.debug("SSH into VM (ID : %s ) after reboot" % self.vm_1.id)
|
||||
|
||||
remoteSSHClient.remoteSSHClient(
|
||||
remoteSSHClient(
|
||||
self.nat_rule.ipaddress,
|
||||
self.services["natrule"]["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -1273,7 +1273,7 @@ class TestAssignRemoveLB(cloudstackTestCase):
|
|||
]
|
||||
return
|
||||
|
||||
def test_assign_and_removal_elb(self):
|
||||
def test_assign_and_removal_lb(self):
|
||||
"""Test for assign & removing load balancing rule"""
|
||||
|
||||
# Validate:
|
||||
|
|
@ -1347,7 +1347,7 @@ class TestAssignRemoveLB(cloudstackTestCase):
|
|||
self.vm_2.id
|
||||
))
|
||||
#Create SSH client for each VM
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress,
|
||||
self.services["lbrule"]["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -1364,7 +1364,7 @@ class TestAssignRemoveLB(cloudstackTestCase):
|
|||
self.vm_1.id,
|
||||
self.vm_2.id
|
||||
))
|
||||
ssh_2 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_2 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress,
|
||||
self.services["lbrule"]["publicport"],
|
||||
self.vm_2.username,
|
||||
|
|
@ -1406,7 +1406,7 @@ class TestAssignRemoveLB(cloudstackTestCase):
|
|||
self.vm_1.id,
|
||||
))
|
||||
# Again make a SSH connection, as previous is not used after LB remove
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress,
|
||||
self.services["lbrule"]["publicport"],
|
||||
self.vm_1.username,
|
||||
|
|
@ -1428,13 +1428,13 @@ class TestAssignRemoveLB(cloudstackTestCase):
|
|||
lb_rule.assign(self.apiclient, [self.vm_3])
|
||||
|
||||
try:
|
||||
ssh_1 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_1 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress,
|
||||
self.services["lbrule"]["publicport"],
|
||||
self.vm_1.username,
|
||||
self.vm_1.password
|
||||
)
|
||||
ssh_3 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_3 = remoteSSHClient(
|
||||
self.non_src_nat_ip.ipaddress,
|
||||
self.services["lbrule"]["publicport"],
|
||||
self.vm_3.username,
|
||||
|
|
@ -1599,7 +1599,7 @@ class TestReleaseIP(cloudstackTestCase):
|
|||
|
||||
# SSH Attempt though public IP should fail
|
||||
with self.assertRaises(Exception):
|
||||
ssh_2 = remoteSSHClient.remoteSSHClient(
|
||||
ssh_2 = remoteSSHClient(
|
||||
self.ip_addr.ipaddress,
|
||||
self.services["natrule"]["publicport"],
|
||||
self.virtual_machine.username,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class Services:
|
|||
{
|
||||
"displayname": "Test VM",
|
||||
"username": "root",
|
||||
"password": "fr3sca",
|
||||
"password": "password",
|
||||
"ssh_port": 22,
|
||||
"hypervisor": 'XenServer',
|
||||
"privateport": 22,
|
||||
|
|
@ -54,9 +54,9 @@ class Services:
|
|||
"firstname": "Test",
|
||||
"lastname": "User",
|
||||
"username": "testuser",
|
||||
"password": "fr3sca",
|
||||
"password": "password",
|
||||
},
|
||||
"ostypeid":'946b031b-0e10-4f4a-a3fc-d212ae2ea07f',
|
||||
"ostypeid":'1a568aed-db2d-41ca-b644-416b0bdc067e',
|
||||
"sleep": 60,
|
||||
"timeout": 10,
|
||||
"mode": 'advanced', #Networking mode: Basic, Advanced
|
||||
|
|
@ -152,7 +152,7 @@ class TestRouterServices(cloudstackTestCase):
|
|||
zoneid=router.zoneid,
|
||||
type='Routing',
|
||||
state='Up',
|
||||
virtualmachineid=self.vm_1.id
|
||||
id=router.hostid
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(hosts, list),
|
||||
|
|
@ -214,7 +214,7 @@ class TestRouterServices(cloudstackTestCase):
|
|||
zoneid=router.zoneid,
|
||||
type='Routing',
|
||||
state='Up',
|
||||
virtualmachineid=self.vm_1.id
|
||||
id=router.hostid
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(hosts, list),
|
||||
|
|
@ -400,7 +400,7 @@ class TestRouterServices(cloudstackTestCase):
|
|||
zoneid=router.zoneid,
|
||||
type='Routing',
|
||||
state='Up',
|
||||
virtualmachineid=self.vm_1.id
|
||||
id=router.hostid
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(hosts, list),
|
||||
|
|
|
|||
|
|
@ -39,14 +39,6 @@ class Services:
|
|||
"hypervisor": "XenServer",
|
||||
"templatefilter": "self",
|
||||
},
|
||||
1: {
|
||||
"hypervisor": "KVM",
|
||||
"templatefilter": "self",
|
||||
},
|
||||
2: {
|
||||
"hypervisor": "VMWare",
|
||||
"templatefilter": "self",
|
||||
},
|
||||
},
|
||||
"sleep": 60,
|
||||
"timeout": 5,
|
||||
|
|
@ -89,6 +81,7 @@ class TestSecStorageServices(cloudstackTestCase):
|
|||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||
return
|
||||
|
||||
@unittest.skip("do not add secondary storage")
|
||||
def test_01_add_sec_storage(self):
|
||||
"""Test secondary storage
|
||||
"""
|
||||
|
|
@ -377,4 +370,4 @@ class TestSecStorageServices(cloudstackTestCase):
|
|||
True,
|
||||
"Check whether state of template is ready or not"
|
||||
)
|
||||
return
|
||||
return
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
|
||||
|
||||
class Services:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class Services:
|
|||
self.services = {
|
||||
"host": {
|
||||
"username": 'root', # Credentials for SSH
|
||||
"password": 'fr3sca',
|
||||
"password": 'password',
|
||||
"publicport": 22,
|
||||
},
|
||||
"sleep": 60,
|
||||
|
|
@ -78,7 +78,6 @@ class TestSSVMs(cloudstackTestCase):
|
|||
self.apiclient,
|
||||
systemvmtype='secondarystoragevm',
|
||||
state='Running',
|
||||
zoneid=self.zone.id
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_ssvm_response, list),
|
||||
|
|
@ -196,7 +195,6 @@ class TestSSVMs(cloudstackTestCase):
|
|||
self.apiclient,
|
||||
systemvmtype='consoleproxy',
|
||||
state='Running',
|
||||
zoneid=self.zone.id
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(list_cpvm_response, list),
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
|
|
@ -42,7 +42,7 @@ class Services:
|
|||
"username": "test",
|
||||
# Random characters are appended in create account to
|
||||
# ensure unique username generated each time
|
||||
"password": "fr3sca",
|
||||
"password": "password",
|
||||
},
|
||||
"small":
|
||||
# Create a small virtual machine instance with disk offering
|
||||
|
|
@ -84,7 +84,7 @@ class Services:
|
|||
"name": "Small Instance",
|
||||
"displaytext": "Small Instance",
|
||||
"cpunumber": 1,
|
||||
"cpuspeed": 500,
|
||||
"cpuspeed": 100,
|
||||
"memory": 256
|
||||
},
|
||||
"medium":
|
||||
|
|
@ -94,17 +94,17 @@ class Services:
|
|||
"name": "Medium Instance",
|
||||
"displaytext": "Medium Instance",
|
||||
"cpunumber": 1,
|
||||
"cpuspeed": 1000,
|
||||
"memory": 1024
|
||||
"cpuspeed": 100,
|
||||
"memory": 256
|
||||
}
|
||||
},
|
||||
"iso": # ISO settings for Attach/Detach ISO tests
|
||||
{
|
||||
"displaytext": "Test ISO",
|
||||
"name": "testISO",
|
||||
"url": "http://iso.linuxquestions.org/download/504/1819/http/gd4.tuwien.ac.at/dsl-4.4.10.iso",
|
||||
"url": "http://nfs1.lab.vmops.com/isos_32bit/dsl-4.4.10.iso",
|
||||
# Source URL where ISO is located
|
||||
"ostypeid": '5776c0d2-f331-42db-ba3a-29f1f8319bc9',
|
||||
"ostypeid": '1a568aed-db2d-41ca-b644-416b0bdc067e',
|
||||
"mode": 'HTTP_DOWNLOAD', # Downloading existing ISO
|
||||
},
|
||||
"template": {
|
||||
|
|
@ -118,7 +118,7 @@ class Services:
|
|||
"sleep": 60,
|
||||
"timeout": 10,
|
||||
#Migrate VM to hostid
|
||||
"ostypeid": '5776c0d2-f331-42db-ba3a-29f1f8319bc9',
|
||||
"ostypeid": '1a568aed-db2d-41ca-b644-416b0bdc067e',
|
||||
# CentOS 5.3 (64-bit)
|
||||
"mode":'advanced',
|
||||
}
|
||||
|
|
@ -751,18 +751,15 @@ class TestVMLifeCycle(cloudstackTestCase):
|
|||
True,
|
||||
"Check the number of hosts in the zone"
|
||||
)
|
||||
self.assertEqual(
|
||||
self.assertGreaterEqual(
|
||||
len(hosts),
|
||||
2,
|
||||
"Atleast 2 hosts should be present in a zone for VM migration"
|
||||
)
|
||||
# Remove the host of current VM from the hosts list
|
||||
hosts[:] = [host for host in hosts if host.id != self.medium_virtual_machine.hostid]
|
||||
|
||||
# Find the host of VM and also the new host to migrate VM.
|
||||
if self.medium_virtual_machine.hostid == hosts[0].id:
|
||||
host = hosts[1]
|
||||
else:
|
||||
host = hosts[0]
|
||||
|
||||
host = hosts[0]
|
||||
self.debug("Migrating VM-ID: %s to Host: %s" % (
|
||||
self.medium_virtual_machine.id,
|
||||
host.id
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from integration.lib.utils import *
|
||||
from integration.lib.base import *
|
||||
from integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
#Import System modules
|
||||
import os
|
||||
import urllib
|
||||
|
|
|
|||
|
|
@ -3024,7 +3024,7 @@ Dialogs*/
|
|||
display: block;
|
||||
width: 119px;
|
||||
text-align: right;
|
||||
font-size: 13px;
|
||||
font-size: 12px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1583,7 +1583,6 @@
|
|||
<script src="lib/jquery-ui/js/jquery-ui.js" type="text/javascript"></script>
|
||||
<script src="lib/date.js" type="text/javascript"></script>
|
||||
<script src="lib/jquery.cookies.js" type="text/javascript"></script>
|
||||
<script src="lib/jquery.timers.js" type="text/javascript"></script>
|
||||
<script src="lib/jquery.md5.js" type="text/javascript" ></script>
|
||||
|
||||
<script src="lib/excanvas.js"></script>
|
||||
|
|
@ -1652,6 +1651,7 @@
|
|||
|
||||
<script language="javascript">
|
||||
dictionary = {
|
||||
'label.network.rate.megabytes': '<fmt:message key="label.network.rate.megabytes"/>',
|
||||
'message.setup.physical.network.during.zone.creation.basic': '<fmt:message key="message.setup.physical.network.during.zone.creation.basic"/>',
|
||||
'label.traffic.label': '<fmt:message key="label.traffic.label"/>',
|
||||
'label.management.ips': '<fmt:message key="label.management.ips"/>',
|
||||
|
|
|
|||
|
|
@ -1,150 +0,0 @@
|
|||
// Copyright 2012 Citrix Systems, Inc. Licensed under the
|
||||
// Apache License, Version 2.0 (the "License"); you may not use this
|
||||
// file except in compliance with the License. Citrix Systems, Inc.
|
||||
// reserves all rights not expressly granted by the License.
|
||||
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Automatically generated by addcopyright.py at 04/03/2012
|
||||
/**
|
||||
* jQuery.timers - Timer abstractions for jQuery
|
||||
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
|
||||
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
|
||||
* Date: 2009/10/16
|
||||
*
|
||||
* @author Blair Mitchelmore
|
||||
* @version 1.2
|
||||
*
|
||||
**/
|
||||
|
||||
jQuery.fn.extend({
|
||||
everyTime: function(interval, label, fn, times) {
|
||||
return this.each(function() {
|
||||
jQuery.timer.add(this, interval, label, fn, times);
|
||||
});
|
||||
},
|
||||
oneTime: function(interval, label, fn) {
|
||||
return this.each(function() {
|
||||
jQuery.timer.add(this, interval, label, fn, 1);
|
||||
});
|
||||
},
|
||||
stopTime: function(label, fn) {
|
||||
return this.each(function() {
|
||||
jQuery.timer.remove(this, label, fn);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
jQuery.extend({
|
||||
timer: {
|
||||
global: [],
|
||||
guid: 1,
|
||||
dataKey: "jQuery.timer",
|
||||
regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,
|
||||
powers: {
|
||||
// Yeah this is major overkill...
|
||||
'ms': 1,
|
||||
'cs': 10,
|
||||
'ds': 100,
|
||||
's': 1000,
|
||||
'das': 10000,
|
||||
'hs': 100000,
|
||||
'ks': 1000000
|
||||
},
|
||||
timeParse: function(value) {
|
||||
if (value == undefined || value == null)
|
||||
return null;
|
||||
var result = this.regex.exec(jQuery.trim(value.toString()));
|
||||
if (result[2]) {
|
||||
var num = parseFloat(result[1]);
|
||||
var mult = this.powers[result[2]] || 1;
|
||||
return num * mult;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
add: function(element, interval, label, fn, times) {
|
||||
var counter = 0;
|
||||
|
||||
if (jQuery.isFunction(label)) {
|
||||
if (!times)
|
||||
times = fn;
|
||||
fn = label;
|
||||
label = interval;
|
||||
}
|
||||
|
||||
interval = jQuery.timer.timeParse(interval);
|
||||
|
||||
if (typeof interval != 'number' || isNaN(interval) || interval < 0)
|
||||
return;
|
||||
|
||||
if (typeof times != 'number' || isNaN(times) || times < 0)
|
||||
times = 0;
|
||||
|
||||
times = times || 0;
|
||||
|
||||
var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {});
|
||||
|
||||
if (!timers[label])
|
||||
timers[label] = {};
|
||||
|
||||
fn.timerID = fn.timerID || this.guid++;
|
||||
|
||||
var handler = function() {
|
||||
if ((++counter > times && times !== 0) || fn.call(element, counter) === false)
|
||||
jQuery.timer.remove(element, label, fn);
|
||||
};
|
||||
|
||||
handler.timerID = fn.timerID;
|
||||
|
||||
if (!timers[label][fn.timerID])
|
||||
timers[label][fn.timerID] = window.setInterval(handler,interval);
|
||||
|
||||
this.global.push( element );
|
||||
|
||||
},
|
||||
remove: function(element, label, fn) {
|
||||
var timers = jQuery.data(element, this.dataKey), ret;
|
||||
|
||||
if ( timers ) {
|
||||
|
||||
if (!label) {
|
||||
for ( label in timers )
|
||||
this.remove(element, label, fn);
|
||||
} else if ( timers[label] ) {
|
||||
if ( fn ) {
|
||||
if ( fn.timerID ) {
|
||||
window.clearInterval(timers[label][fn.timerID]);
|
||||
delete timers[label][fn.timerID];
|
||||
}
|
||||
} else {
|
||||
for ( var fn in timers[label] ) {
|
||||
window.clearInterval(timers[label][fn]);
|
||||
delete timers[label][fn];
|
||||
}
|
||||
}
|
||||
|
||||
for ( ret in timers[label] ) break;
|
||||
if ( !ret ) {
|
||||
ret = null;
|
||||
delete timers[label];
|
||||
}
|
||||
}
|
||||
|
||||
for ( ret in timers ) break;
|
||||
if ( !ret )
|
||||
jQuery.removeData(element, this.dataKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(window).bind("unload", function() {
|
||||
jQuery.each(jQuery.timer.global, function(index, item) {
|
||||
jQuery.timer.remove(item);
|
||||
});
|
||||
});
|
||||
|
|
@ -1164,7 +1164,7 @@
|
|||
|
||||
displayText: { label: 'label.description', validation: { required: true } },
|
||||
|
||||
networkRate: { label: 'label.network.rate' },
|
||||
networkRate: { label: 'label.network.rate.megabytes' },
|
||||
|
||||
/*
|
||||
trafficType: {
|
||||
|
|
|
|||
|
|
@ -1349,7 +1349,7 @@
|
|||
}
|
||||
else if($form.find('.form-item[rel=projectId]').css("display") != "none") { //project-specific
|
||||
array1.push("&projectid=" + args.data.projectId);
|
||||
array1.push("&acltype=account");
|
||||
array1.push("&acltype=account");
|
||||
}
|
||||
else { //domain-specific
|
||||
array1.push("&acltype=domain");
|
||||
|
|
@ -1822,7 +1822,7 @@
|
|||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
dataProvider: function(args) {
|
||||
|
|
@ -2484,9 +2484,8 @@
|
|||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "addNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var addNetscalerProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -2496,7 +2495,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(addNetscalerProviderIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
nspMap["netscaler"] = result.jobresult.networkserviceprovider;
|
||||
addExternalLoadBalancer(args, selectedPhysicalNetworkObj, "addNetscalerLoadBalancer", "addnetscalerloadbalancerresponse", "netscalerloadbalancer");
|
||||
|
|
@ -2511,7 +2510,7 @@
|
|||
alert("addNetworkServiceProvider&name=Netscaler failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -2713,9 +2712,8 @@
|
|||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "addNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var addF5ProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -2725,7 +2723,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(addF5ProviderIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
nspMap["f5"] = json.queryasyncjobresultresponse.jobresult.networkserviceprovider;
|
||||
addExternalLoadBalancer(args, selectedPhysicalNetworkObj, "addF5LoadBalancer", "addf5bigiploadbalancerresponse");
|
||||
|
|
@ -2740,7 +2738,7 @@
|
|||
alert("addNetworkServiceProvider&name=F5BigIpfailed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -2962,8 +2960,7 @@
|
|||
async: true,
|
||||
success: function(json) {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "addNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var addJuniperSRXProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -2973,7 +2970,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(addJuniperSRXProviderIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
nspMap["srx"] = json.queryasyncjobresultresponse.jobresult.networkserviceprovider;
|
||||
addExternalFirewall(args, selectedPhysicalNetworkObj, "addSrxFirewall", "addsrxfirewallresponse", "srxfirewall");
|
||||
|
|
@ -2988,7 +2985,7 @@
|
|||
alert("addNetworkServiceProvider&name=JuniperSRX failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -5120,9 +5117,8 @@
|
|||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "addNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var addNetscalerProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -5132,7 +5128,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(addNetscalerProviderIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
nspMap["netscaler"] = result.jobresult.networkserviceprovider;
|
||||
addExternalLoadBalancer(args, selectedPhysicalNetworkObj, "addNetscalerLoadBalancer", "addnetscalerloadbalancerresponse", "netscalerloadbalancer");
|
||||
|
|
@ -5147,7 +5143,7 @@
|
|||
alert("addNetworkServiceProvider&name=Netscaler failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -5314,8 +5310,7 @@
|
|||
async: true,
|
||||
success: function(json) {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "addNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var addF5ProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -5325,7 +5320,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(addF5ProviderIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
nspMap["f5"] = json.queryasyncjobresultresponse.jobresult.networkserviceprovider;
|
||||
addExternalLoadBalancer(args, selectedPhysicalNetworkObj, "addF5LoadBalancer", "addf5bigiploadbalancerresponse", "f5loadbalancer");
|
||||
|
|
@ -5340,7 +5335,7 @@
|
|||
alert("addNetworkServiceProvider&name=F5BigIpfailed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -5524,8 +5519,7 @@
|
|||
async: true,
|
||||
success: function(json) {
|
||||
var jobId = json.addnetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "addNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var addJuniperSRXProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -5535,7 +5529,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(addJuniperSRXProviderIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
nspMap["srx"] = json.queryasyncjobresultresponse.jobresult.networkserviceprovider;
|
||||
addExternalFirewall(args, selectedPhysicalNetworkObj, "addSrxFirewall", "addsrxfirewallresponse", "srxfirewall");
|
||||
|
|
@ -5550,7 +5544,7 @@
|
|||
alert("addNetworkServiceProvider&name=JuniperSRX failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -8600,8 +8594,7 @@
|
|||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.updatephysicalnetworkresponse.jobid;
|
||||
var timerKey = "updatePhysicalNetworkJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var enablePhysicalNetworkIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -8611,7 +8604,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(enablePhysicalNetworkIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
//alert("updatePhysicalNetwork succeeded.");
|
||||
|
||||
|
|
@ -8656,8 +8649,7 @@
|
|||
async: false,
|
||||
success: function(json) {
|
||||
var jobId = json.configurevirtualrouterelementresponse.jobid;
|
||||
var timerKey = "configureVirtualRouterElementJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var enableVirtualRouterElementIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -8667,7 +8659,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(enableVirtualRouterElementIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
//alert("configureVirtualRouterElement succeeded.");
|
||||
|
||||
|
|
@ -8677,8 +8669,7 @@
|
|||
async: false,
|
||||
success: function(json) {
|
||||
var jobId = json.updatenetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "updateNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var enableVirtualRouterProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -8688,7 +8679,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(enableVirtualRouterProviderIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
//alert("Virtual Router Provider is enabled");
|
||||
|
||||
|
|
@ -8718,8 +8709,7 @@
|
|||
async: false,
|
||||
success: function(json) {
|
||||
var jobId = json.updatenetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "updateNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var enableSecurityGroupProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -8729,7 +8719,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(enableSecurityGroupProviderIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
//alert("Security group provider is enabled");
|
||||
|
||||
|
|
@ -8781,7 +8771,7 @@
|
|||
alert("updateNetworkServiceProvider failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -8862,7 +8852,7 @@
|
|||
alert("updateNetworkServiceProvider failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -8876,7 +8866,7 @@
|
|||
alert("configureVirtualRouterElement failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -8890,7 +8880,7 @@
|
|||
alert("updatePhysicalNetwork failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -82,8 +82,7 @@
|
|||
dataType: 'json',
|
||||
success: function(json) {
|
||||
var jid = json.uploadcustomcertificateresponse.jobid;
|
||||
var timerKey = "uploadcustomcertificatejob_" + jid;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var uploadCustomCertificateIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId=" + jid),
|
||||
dataType: "json",
|
||||
|
|
@ -93,7 +92,7 @@
|
|||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
clearInterval(uploadCustomCertificateIntervalID);
|
||||
if (result.jobstatus == 1) {
|
||||
cloudStack.dialog.notice({ message: 'Update SSL Certiciate succeeded' });
|
||||
}
|
||||
|
|
@ -108,7 +107,7 @@
|
|||
$loading.remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
cloudStack.dialog.notice({ message: 'Failed to update SSL Certificate. ' + parseXMLHttpResponse(XMLHttpResponse) });
|
||||
|
|
|
|||
|
|
@ -545,9 +545,9 @@
|
|||
var renderActionCol = function(actions) {
|
||||
return $.grep(
|
||||
$.map(actions, function(value, key) {
|
||||
return key;
|
||||
return { key: key, value: value };
|
||||
}),
|
||||
function(elem) { return elem != 'add'; }
|
||||
function(elem) { return elem.key != 'add' && !elem.value.isHeader; }
|
||||
).length;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1291,9 +1291,8 @@
|
|||
url: createURL("createPhysicalNetwork&zoneid=" + args.data.returnedZone.id + array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.createphysicalnetworkresponse.jobid;
|
||||
var timerKey = "createPhysicalNetworkJob_" + jobId;
|
||||
$("body").everyTime(2000, timerKey, function(){
|
||||
var jobId = json.createphysicalnetworkresponse.jobid;
|
||||
var createPhysicalNetworkIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1302,8 +1301,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(createPhysicalNetworkIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
var returnedBasicPhysicalNetwork = result.jobresult.physicalnetwork;
|
||||
var label = returnedBasicPhysicalNetwork.id + trafficLabelParam('guest', data);
|
||||
|
|
@ -1313,9 +1313,8 @@
|
|||
url: createURL("addTrafficType&trafficType=Guest&physicalnetworkid=" + label),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var timerKey = "addTrafficTypeJob_" + jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var addGuestTrafficTypeIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1324,8 +1323,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(addGuestTrafficTypeIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
returnedTrafficTypes.push(result.jobresult.traffictype);
|
||||
|
||||
|
|
@ -1348,8 +1348,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("Failed to add Guest traffic type to basic zone. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -1359,9 +1359,8 @@
|
|||
url: createURL("addTrafficType&trafficType=Management&physicalnetworkid=" + returnedBasicPhysicalNetwork.id + label),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var timerKey = "addTrafficTypeJob_" + jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var addManagementTrafficTypeIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1370,8 +1369,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(addManagementTrafficTypeIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
returnedTrafficTypes.push(result.jobresult.traffictype);
|
||||
|
||||
|
|
@ -1394,8 +1394,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("Failed to add Management traffic type to basic zone. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -1407,9 +1407,8 @@
|
|||
url: createURL('addTrafficType&physicalnetworkid=' + returnedBasicPhysicalNetwork.id + '&trafficType=Storage' + label),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var timerKey = "addTrafficTypeJob_" + jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var addStorageTrafficTypeIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1418,8 +1417,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(addStorageTrafficTypeIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
returnedTrafficTypes.push(result.jobresult.traffictype);
|
||||
|
||||
|
|
@ -1442,8 +1442,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("Failed to add Management traffic type to basic zone. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1454,9 +1454,8 @@
|
|||
url: createURL("addTrafficType&trafficType=Public&physicalnetworkid=" + returnedBasicPhysicalNetwork.id + label),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var timerKey = "addTrafficTypeJob_" + jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var addPublicTrafficTypeIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1465,8 +1464,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(addPublicTrafficTypeIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
returnedTrafficTypes.push(result.jobresult.traffictype);
|
||||
|
||||
|
|
@ -1489,8 +1489,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("Failed to add Public traffic type to basic zone. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1504,8 +1504,9 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("createPhysicalNetwork failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1520,9 +1521,8 @@
|
|||
url: createURL("createPhysicalNetwork&zoneid=" + args.data.returnedZone.id + array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.createphysicalnetworkresponse.jobid;
|
||||
var timerKey = "createPhysicalNetworkJob_" + jobId;
|
||||
$("body").everyTime(2000, timerKey, function(){
|
||||
var jobId = json.createphysicalnetworkresponse.jobid;
|
||||
var createPhysicalNetworkIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1531,8 +1531,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(createPhysicalNetworkIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
var returnedPhysicalNetwork = result.jobresult.physicalnetwork;
|
||||
returnedPhysicalNetwork.originalId = thisPhysicalNetwork.id;
|
||||
|
|
@ -1563,9 +1564,8 @@
|
|||
url: createURL(apiCmd + label),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var timerKey = "addTrafficTypeJob_" + jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.addtraffictyperesponse.jobid;
|
||||
var addTrafficTypeIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1574,8 +1574,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(addTrafficTypeIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
returnedTrafficTypes.push(result.jobresult.traffictype);
|
||||
|
||||
|
|
@ -1601,8 +1602,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert(apiCmd + " failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1616,8 +1617,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("createPhysicalNetwork failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1632,10 +1633,8 @@
|
|||
$.ajax({
|
||||
url: createURL("updatePhysicalNetwork&state=Enabled&id=" + args.data.returnedBasicPhysicalNetwork.id),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
//var jobId = json.updatephysicalnetworkresponse.jobid;
|
||||
var updatePhysicalNetworkTimer = "updatePhysicalNetworkJob_" + json.updatephysicalnetworkresponse.jobid;
|
||||
$("body").everyTime(2000, updatePhysicalNetworkTimer, function() {
|
||||
success: function(json) {
|
||||
var enablePhysicalNetworkIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId=" + json.updatephysicalnetworkresponse.jobid),
|
||||
dataType: "json",
|
||||
|
|
@ -1644,8 +1643,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(updatePhysicalNetworkTimer);
|
||||
else {
|
||||
clearInterval(enablePhysicalNetworkIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
//alert("updatePhysicalNetwork succeeded.");
|
||||
|
||||
|
|
@ -1688,10 +1688,8 @@
|
|||
url: createURL("configureVirtualRouterElement&enabled=true&id=" + virtualRouterElementId),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
//var jobId = json.configurevirtualrouterelementresponse.jobid;
|
||||
var configureVirtualRouterElementTimer = "configureVirtualRouterElementJob_" + json.configurevirtualrouterelementresponse.jobid;
|
||||
$("body").everyTime(2000, configureVirtualRouterElementTimer, function() {
|
||||
success: function(json) {
|
||||
var enableVirtualRouterElementIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId=" + json.configurevirtualrouterelementresponse.jobid),
|
||||
dataType: "json",
|
||||
|
|
@ -1700,8 +1698,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(configureVirtualRouterElementTimer);
|
||||
else {
|
||||
clearInterval(enableVirtualRouterElementIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
//alert("configureVirtualRouterElement succeeded.");
|
||||
|
||||
|
|
@ -1709,10 +1708,8 @@
|
|||
url: createURL("updateNetworkServiceProvider&state=Enabled&id=" + virtualRouterProviderId),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
//var jobId = json.updatenetworkserviceproviderresponse.jobid;
|
||||
var updateNetworkServiceProviderTimer = "updateNetworkServiceProviderJob_" + json.updatenetworkserviceproviderresponse.jobid;
|
||||
$("body").everyTime(2000, updateNetworkServiceProviderTimer, function() {
|
||||
success: function(json) {
|
||||
var enableVirtualRouterProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId=" + json.updatenetworkserviceproviderresponse.jobid),
|
||||
dataType: "json",
|
||||
|
|
@ -1721,8 +1718,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(updateNetworkServiceProviderTimer);
|
||||
else {
|
||||
clearInterval(enableVirtualRouterProviderIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
//alert("Virtual Router Provider is enabled");
|
||||
|
||||
|
|
@ -1754,9 +1752,8 @@
|
|||
url: createURL("updateNetworkServiceProvider&state=Enabled&id=" + securityGroupProviderId),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var updateNetworkServiceProviderTimer = "asyncJob_" + json.updatenetworkserviceproviderresponse.jobid;
|
||||
$("body").everyTime(2000, updateNetworkServiceProviderTimer, function() {
|
||||
success: function(json) {
|
||||
var enableSecurityGroupProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId=" + json.updatenetworkserviceproviderresponse.jobid),
|
||||
dataType: "json",
|
||||
|
|
@ -1765,8 +1762,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(updateNetworkServiceProviderTimer);
|
||||
else {
|
||||
clearInterval(enableSecurityGroupProviderIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) { //Security group provider has been enabled successfully
|
||||
stepFns.addNetscalerProvider({
|
||||
data: args.data
|
||||
|
|
@ -1781,8 +1779,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("failed to enable security group provider. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1801,8 +1799,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("failed to enable Virtual Router Provider. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1815,8 +1813,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("configureVirtualRouterElement failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1829,8 +1827,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("updatePhysicalNetwork failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1841,9 +1839,8 @@
|
|||
url: createURL("updatePhysicalNetwork&state=Enabled&id=" + thisPhysicalNetwork.id),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.updatephysicalnetworkresponse.jobid;
|
||||
var timerKey = "updatePhysicalNetworkJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.updatephysicalnetworkresponse.jobid;
|
||||
var enablePhysicalNetworkIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1852,8 +1849,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(enablePhysicalNetworkIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
//alert("updatePhysicalNetwork succeeded.");
|
||||
|
||||
|
|
@ -1897,9 +1895,8 @@
|
|||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var jobId = json.configurevirtualrouterelementresponse.jobid;
|
||||
var timerKey = "configureVirtualRouterElementJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.configurevirtualrouterelementresponse.jobid;
|
||||
var enableVirtualRouterElementIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1908,17 +1905,17 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(enableVirtualRouterElementIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) { //configureVirtualRouterElement succeeded
|
||||
$.ajax({
|
||||
url: createURL("updateNetworkServiceProvider&state=Enabled&id=" + virtualRouterProviderId),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var jobId = json.updatenetworkserviceproviderresponse.jobid;
|
||||
var timerKey = "updateNetworkServiceProviderJob_"+jobId;
|
||||
$("body").everyTime(2000, timerKey, function() {
|
||||
var jobId = json.updatenetworkserviceproviderresponse.jobid;
|
||||
var enableVirtualRouterProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId="+jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -1927,8 +1924,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(enableVirtualRouterProviderIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) { //Virtual Router Provider has been enabled successfully
|
||||
advZoneConfiguredPhysicalNetworkCount++;
|
||||
if(advZoneConfiguredPhysicalNetworkCount == args.data.returnedPhysicalNetworks.length) { //not call addPod() until all physical networks get configured
|
||||
|
|
@ -1946,8 +1944,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("updateNetworkServiceProvider failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1960,8 +1958,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("configureVirtualRouterElement failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1974,8 +1972,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
alert("updatePhysicalNetwork failed. Error: " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1990,9 +1988,8 @@
|
|||
url: createURL("addNetworkServiceProvider&name=Netscaler&physicalnetworkid=" + args.data.returnedBasicPhysicalNetwork.id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var addNetworkServiceProviderTimer = "asyncJob_" + json.addnetworkserviceproviderresponse.jobid;
|
||||
$("body").everyTime(2000, addNetworkServiceProviderTimer, function() {
|
||||
success: function(json) {
|
||||
var addNetscalerProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobId=" + json.addnetworkserviceproviderresponse.jobid),
|
||||
dataType: "json",
|
||||
|
|
@ -2001,8 +1998,9 @@
|
|||
if (result.jobstatus == 0) {
|
||||
return; //Job has not completed
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(addNetworkServiceProviderTimer);
|
||||
else {
|
||||
clearInterval(addNetscalerProviderIntervalID);
|
||||
|
||||
if (result.jobstatus == 1) {
|
||||
args.data.returnedNetscalerProvider = result.jobresult.networkserviceprovider;
|
||||
stepFns.addNetscalerDevice({
|
||||
|
|
@ -2020,8 +2018,8 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 3000);
|
||||
//add netscaler provider (end)
|
||||
}
|
||||
else { //selectedNetworkOfferingHavingNetscaler == false
|
||||
|
|
@ -2127,9 +2125,8 @@
|
|||
$.ajax({
|
||||
url: createURL("addNetscalerLoadBalancer" + array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var addNetscalerLoadBalancerTimer = "asyncJob_" + json.addnetscalerloadbalancerresponse.jobid;
|
||||
$("body").everyTime(2000, addNetscalerLoadBalancerTimer, function() {
|
||||
success: function(json) {
|
||||
var addNetscalerLoadBalancerIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + json.addnetscalerloadbalancerresponse.jobid),
|
||||
dataType: "json",
|
||||
|
|
@ -2138,18 +2135,17 @@
|
|||
if(result.jobstatus == 0) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(addNetscalerLoadBalancerTimer);
|
||||
else {
|
||||
clearInterval(addNetscalerLoadBalancerIntervalID);
|
||||
|
||||
if(result.jobstatus == 1) {
|
||||
args.data.returnedNetscalerProvider.returnedNetscalerloadbalancer = result.jobresult.netscalerloadbalancer;
|
||||
|
||||
$.ajax({
|
||||
url: createURL("updateNetworkServiceProvider&state=Enabled&id=" + args.data.returnedNetscalerProvider.id),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var updateNetworkServiceProviderTimer = "asyncJob_" + json.updatenetworkserviceproviderresponse.jobid;
|
||||
|
||||
$("body").everyTime(2000, updateNetworkServiceProviderTimer, function() {
|
||||
success: function(json) {
|
||||
var enableNetscalerProviderIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + json.updatenetworkserviceproviderresponse.jobid),
|
||||
dataType: "json",
|
||||
|
|
@ -2158,8 +2154,9 @@
|
|||
if(result.jobstatus == 0) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(updateNetworkServiceProviderTimer);
|
||||
else {
|
||||
clearInterval(enableNetscalerProviderIntervalID);
|
||||
|
||||
if(result.jobstatus == 1) {
|
||||
stepFns.addGuestNetwork({
|
||||
data: args.data
|
||||
|
|
@ -2170,8 +2167,8 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
|
|
@ -2184,8 +2181,8 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
error: function(XMLHttpResponse) {
|
||||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
|
|
@ -2490,9 +2487,8 @@
|
|||
url: createURL("updatePhysicalNetwork&id=" + returnedId + "&vlan=" + todb(vlan)),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
var jobId = json.updatephysicalnetworkresponse.jobid;
|
||||
var timerKey = "asyncJob_" + jobId;
|
||||
$("body").everyTime(2000, timerKey, function(){
|
||||
var jobId = json.updatephysicalnetworkresponse.jobid;
|
||||
var updatePhysicalNetworkVlanIntervalID = setInterval(function() {
|
||||
$.ajax({
|
||||
url: createURL("queryAsyncJobResult&jobid=" + jobId),
|
||||
dataType: "json",
|
||||
|
|
@ -2501,8 +2497,9 @@
|
|||
if(result.jobstatus == 0) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
$("body").stopTime(timerKey);
|
||||
else {
|
||||
clearInterval(updatePhysicalNetworkVlanIntervalID);
|
||||
|
||||
if(result.jobstatus == 1) {
|
||||
updatedCount++;
|
||||
if(updatedCount == physicalNetworksHavingGuestIncludingVlan.length) {
|
||||
|
|
@ -2520,8 +2517,8 @@
|
|||
var errorMsg = parseXMLHttpResponse(XMLHttpResponse);
|
||||
error('configureGuestTraffic', errorMsg, { fn: 'configureGuestTraffic', args: args });
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue