Turn a single VPC into a redundant VPC

- when restarting a VPC, the user can check the option Make Redundant in order to change
    the VPC offering and make it redundant
This commit is contained in:
wilderrodrigues 2015-02-03 16:27:54 +01:00
parent 87d4171c53
commit e350f1e76f
19 changed files with 82 additions and 22 deletions

View File

@ -127,10 +127,12 @@ public interface VpcService {
* Restarts the VPC. VPC gets shutdown and started as a part of it * Restarts the VPC. VPC gets shutdown and started as a part of it
* *
* @param id * @param id
* @param cleanUp
* @param makeredundant
* @return * @return
* @throws InsufficientCapacityException * @throws InsufficientCapacityException
*/ */
boolean restartVpc(long id, boolean cleanUp) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; boolean restartVpc(long id, boolean cleanUp, boolean makeredundant) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
/** /**
* Returns a Private gateway found in the VPC by id * Returns a Private gateway found in the VPC by id

View File

@ -48,6 +48,7 @@ public class ApiConstants {
public static final String IP6_CIDR = "ip6cidr"; public static final String IP6_CIDR = "ip6cidr";
public static final String CIDR_LIST = "cidrlist"; public static final String CIDR_LIST = "cidrlist";
public static final String CLEANUP = "cleanup"; public static final String CLEANUP = "cleanup";
public static final String MAKEREDUNDANTE = "makeredundant";
public static final String CLUSTER_ID = "clusterid"; public static final String CLUSTER_ID = "clusterid";
public static final String CLUSTER_NAME = "clustername"; public static final String CLUSTER_NAME = "clustername";
public static final String CLUSTER_TYPE = "clustertype"; public static final String CLUSTER_TYPE = "clustertype";
@ -450,7 +451,7 @@ public class ApiConstants {
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_NAME = "vsmdevicename"; public static final String EXTERNAL_SWITCH_MGMT_DEVICE_NAME = "vsmdevicename";
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_STATE = "vsmdevicestate"; public static final String EXTERNAL_SWITCH_MGMT_DEVICE_STATE = "vsmdevicestate";
// Would we need to have a capacity field for Cisco N1KV VSM? Max hosts managed by it perhaps? May remove this // Would we need to have a capacity field for Cisco N1KV VSM? Max hosts managed by it perhaps? May remove this
// later. // later.
public static final String EXTERNAL_SWITCH_MGMT_DEVICE_CAPACITY = "vsmdevicecapacity"; public static final String EXTERNAL_SWITCH_MGMT_DEVICE_CAPACITY = "vsmdevicecapacity";
public static final String CISCO_NEXUS_VSM_NAME = "vsmname"; public static final String CISCO_NEXUS_VSM_NAME = "vsmname";
public static final String VSM_USERNAME = "vsmusername"; public static final String VSM_USERNAME = "vsmusername";

View File

@ -51,6 +51,9 @@ public class RestartVPCCmd extends BaseAsyncCmd {
@Parameter(name = ApiConstants.CLEANUP, type = CommandType.BOOLEAN, required = false, description = "If cleanup old network elements") @Parameter(name = ApiConstants.CLEANUP, type = CommandType.BOOLEAN, required = false, description = "If cleanup old network elements")
private Boolean cleanup; private Boolean cleanup;
@Parameter(name = ApiConstants.MAKEREDUNDANTE, type = CommandType.BOOLEAN, required = false, description = "Turn a single VPC into a redundant one.")
private Boolean makeredundant;
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
/////////////////// Accessors /////////////////////// /////////////////// Accessors ///////////////////////
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
@ -66,6 +69,13 @@ public class RestartVPCCmd extends BaseAsyncCmd {
return true; return true;
} }
public Boolean getMakeredundant() {
if (makeredundant != null) {
return makeredundant;
}
return true;
}
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
/////////////// API Implementation/////////////////// /////////////// API Implementation///////////////////
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
@ -87,7 +97,7 @@ public class RestartVPCCmd extends BaseAsyncCmd {
@Override @Override
public void execute() { public void execute() {
try { try {
final boolean result = _vpcService.restartVpc(getId(), getCleanup()); final boolean result = _vpcService.restartVpc(getId(), getCleanup(), getMakeredundant());
if (result) { if (result) {
final SuccessResponse response = new SuccessResponse(getCommandName()); final SuccessResponse response = new SuccessResponse(getCommandName());
setResponseObject(response); setResponseObject(response);

View File

@ -450,6 +450,7 @@ label.cidr.list=Source CIDR
label.CIDR.of.destination.network=CIDR of destination network label.CIDR.of.destination.network=CIDR of destination network
label.cidr=CIDR label.cidr=CIDR
label.clean.up=Clean up label.clean.up=Clean up
label.make.redundant=Make redundant
label.clear.list=Clear list label.clear.list=Clear list
label.close=Close label.close=Close
label.cloud.console=Cloud Management Console label.cloud.console=Cloud Management Console

View File

@ -47,6 +47,7 @@ label.change.value=\u062a\u063a\u064a\u0631 \u0627\u0644\u0642\u064a\u0645\u0629
label.CIDR.list=\u0642\u0627\u0626\u0645\u0629 CIDR label.CIDR.list=\u0642\u0627\u0626\u0645\u0629 CIDR
label.CIDR.of.destination.network=CIDR \u0627\u0644\u062e\u0627\u0635 \u0628\u0627\u0644\u0634\u0628\u0643\u0629 \u0627\u0644\u0645\u0648\u062c\u0647\u0629. label.CIDR.of.destination.network=CIDR \u0627\u0644\u062e\u0627\u0635 \u0628\u0627\u0644\u0634\u0628\u0643\u0629 \u0627\u0644\u0645\u0648\u062c\u0647\u0629.
label.clean.up=\u062a\u0646\u0638\u064a\u0641 label.clean.up=\u062a\u0646\u0638\u064a\u0641
label.make.redundant=\u062c\u0639\u0644 \u0632\u0627\u0626\u062f\u0629 \u0639\u0646 \u0627\u0644\u062d\u0627\u062c\u0629
label.clear.list=\u0645\u0633\u062d \u0627\u0644\u0642\u0627\u0626\u0645\u0629 label.clear.list=\u0645\u0633\u062d \u0627\u0644\u0642\u0627\u0626\u0645\u0629
label.configuration=\u0627\u0644\u062a\u0643\u0648\u064a\u0646 label.configuration=\u0627\u0644\u062a\u0643\u0648\u064a\u0646
label.configure.network.ACLs=\u0636\u0628\u0637 \u0634\u0628\u0643\u0629 ACLs label.configure.network.ACLs=\u0636\u0628\u0637 \u0634\u0628\u0643\u0629 ACLs

View File

@ -332,6 +332,7 @@ label.cidr=CIDR
label.cidr.list=fuente CIDR label.cidr.list=fuente CIDR
label.CIDR.list=Lista CIDR label.CIDR.list=Lista CIDR
label.clean.up=Limpiar label.clean.up=Limpiar
label.make.redundant=\u0068\u0061\u0063\u0065\u0072 \u0072\u0065\u0064\u0075\u006e\u0064\u0061\u006e\u0074\u0065
label.clear.list=Limpiar lista label.clear.list=Limpiar lista
label.close=Cerrar label.close=Cerrar
label.cloud.console=Cloud Management Console label.cloud.console=Cloud Management Console

View File

@ -455,6 +455,7 @@ label.cisco.nexus1000v.password=Mot de passe Nexus 1000v
label.cisco.nexus1000v.username=Identifiant Nexus 1000v label.cisco.nexus1000v.username=Identifiant Nexus 1000v
label.ciscovnmc.resource.details=D\u00e9tails ressource CiscoVNMC label.ciscovnmc.resource.details=D\u00e9tails ressource CiscoVNMC
label.clean.up=Nettoyage label.clean.up=Nettoyage
label.make.redundant=\u006c\u0069\u0063\u0065\u006e\u0063\u0069\u0065\u0072
label.clear.list=Purger la liste label.clear.list=Purger la liste
label.close=Fermer label.close=Fermer
label.cloud.console=Console d\\'Administration du Cloud label.cloud.console=Console d\\'Administration du Cloud

View File

@ -445,6 +445,7 @@ label.cidr.list=\u9001\u4fe1\u5143 CIDR
label.CIDR.of.destination.network=\u5b9b\u5148\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e CIDR label.CIDR.of.destination.network=\u5b9b\u5148\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e CIDR
label.cidr=CIDR label.cidr=CIDR
label.clean.up=\u30af\u30ea\u30fc\u30f3 \u30a2\u30c3\u30d7\u3059\u308b label.clean.up=\u30af\u30ea\u30fc\u30f3 \u30a2\u30c3\u30d7\u3059\u308b
label.make.redundant=\u5197\u9577\u5316
label.clear.list=\u4e00\u89a7\u306e\u6d88\u53bb label.clear.list=\u4e00\u89a7\u306e\u6d88\u53bb
label.close=\u9589\u3058\u308b label.close=\u9589\u3058\u308b
label.cloud.console=\u30af\u30e9\u30a6\u30c9\u7ba1\u7406\u30b3\u30f3\u30bd\u30fc\u30eb label.cloud.console=\u30af\u30e9\u30a6\u30c9\u7ba1\u7406\u30b3\u30f3\u30bd\u30fc\u30eb

View File

@ -375,6 +375,7 @@ label.CIDR.list=CIDR \ubaa9\ub85d
label.cidr.list=\uc804\uc1a1\uc6d0 CIDR label.cidr.list=\uc804\uc1a1\uc6d0 CIDR
label.CIDR.of.destination.network=\ub300\uc0c1 \ub124\ud2b8\uc6cc\ud06c CIDR label.CIDR.of.destination.network=\ub300\uc0c1 \ub124\ud2b8\uc6cc\ud06c CIDR
label.clean.up=\uc0ad\uc81c\ud558\uae30 label.clean.up=\uc0ad\uc81c\ud558\uae30
label.make.redundant=\uc911\ubcf5 \ud655\uc778
label.clear.list=\ubaa9\ub85d \uc0ad\uc81c label.clear.list=\ubaa9\ub85d \uc0ad\uc81c
label.close=\ub2eb\uae30 label.close=\ub2eb\uae30
label.cloud.console=\ud074\ub77c\uc6b0\ub4dc \uad00\ub9ac \ucf58\uc194 label.cloud.console=\ud074\ub77c\uc6b0\ub4dc \uad00\ub9ac \ucf58\uc194

View File

@ -314,6 +314,7 @@ label.cidr=CIDR
label.CIDR.list=CIDR liste label.CIDR.list=CIDR liste
label.cidr.list=Kilde-CIDR label.cidr.list=Kilde-CIDR
label.clean.up=Rydd opp label.clean.up=Rydd opp
label.make.redundant=\u0067\u006a\u00f8\u0072\u0065 \u006f\u0076\u0065\u0072\u0066\u006c\u00f8\u0064\u0069\u0067
label.clear.list=T\u00f8m liste label.clear.list=T\u00f8m liste
label.close=Lukk label.close=Lukk
label.cloud.console=Cloud label.cloud.console=Cloud

View File

@ -432,6 +432,7 @@ label.cisco.nexus1000v.password=Nexus 1000v Wachtwoord
label.cisco.nexus1000v.username=Nexus 1000v Gebruikersnaam label.cisco.nexus1000v.username=Nexus 1000v Gebruikersnaam
label.ciscovnmc.resource.details=CiscoVNMC resource details label.ciscovnmc.resource.details=CiscoVNMC resource details
label.clean.up=Opschonen label.clean.up=Opschonen
label.make.redundant=\u0072\u0065\u0064\u0075\u006e\u0064\u0061\u006e\u0074\u0065 \u006d\u0061\u006b\u0065\u006e
label.clear.list=Schoon lijst op label.clear.list=Schoon lijst op
label.close=Sluiten label.close=Sluiten
label.cloud.console=Cloud Beheers Console label.cloud.console=Cloud Beheers Console

View File

@ -187,6 +187,7 @@ label.certificate=Certyfikat
label.cidr=CIDR label.cidr=CIDR
label.CIDR.list=Lista CIDR label.CIDR.list=Lista CIDR
label.clean.up=Wyczy\u015b\u0107 label.clean.up=Wyczy\u015b\u0107
label.make.redundant=\u0073\u0069\u0119 \u007a\u0062\u0119\u0064\u006e\u0065
label.clear.list=Wyczy\u015b\u0107 list\u0119 label.clear.list=Wyczy\u015b\u0107 list\u0119
label.close=Zamknij label.close=Zamknij
label.clvm=CLVM label.clvm=CLVM

View File

@ -398,6 +398,7 @@ label.cidr.list=CIDR de Origem
label.CIDR.list=Lista CIDR label.CIDR.list=Lista CIDR
label.CIDR.of.destination.network=CIDR da rede de destino label.CIDR.of.destination.network=CIDR da rede de destino
label.clean.up=Limpar label.clean.up=Limpar
label.make.redundant=\u0074\u006f\u0072\u006e\u0061\u0072 \u0072\u0065\u0064\u0075\u006e\u0064\u0061\u006e\u0074\u0065
label.clear.list=Limpar lista label.clear.list=Limpar lista
label.close=Fechar label.close=Fechar
label.cloud.console=Console de Gerenciamento da Nuvem label.cloud.console=Console de Gerenciamento da Nuvem

View File

@ -386,6 +386,7 @@ label.cidr.list=CIDR \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430
label.CIDR.list=\u0421\u043f\u0438\u0441\u043e\u043a CIDR label.CIDR.list=\u0421\u043f\u0438\u0441\u043e\u043a CIDR
label.CIDR.of.destination.network=CIDR \u0441\u0435\u0442\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f label.CIDR.of.destination.network=CIDR \u0441\u0435\u0442\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f
label.clean.up=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c label.clean.up=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c
label.make.redundant=\u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u043c
label.clear.list=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a label.clear.list=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a
label.close=\u0417\u0430\u043a\u0440\u044b\u0442\u044c label.close=\u0417\u0430\u043a\u0440\u044b\u0442\u044c
label.cloud.console=\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u043e\u043c label.cloud.console=\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u043e\u043c

View File

@ -445,6 +445,7 @@ label.cidr.list=\u6e90 CIDR
label.CIDR.of.destination.network=\u76ee\u7684\u5730\u7f51\u7edc\u7684 CIDR label.CIDR.of.destination.network=\u76ee\u7684\u5730\u7f51\u7edc\u7684 CIDR
label.cidr=CIDR label.cidr=CIDR
label.clean.up=\u6e05\u7406 label.clean.up=\u6e05\u7406
label.make.redundant=\u4f7f\u591a\u9918
label.clear.list=\u6e05\u9664\u5217\u8868 label.clear.list=\u6e05\u9664\u5217\u8868
label.close=\u5173\u95ed label.close=\u5173\u95ed
label.cloud.console=\u4e91\u7ba1\u7406\u63a7\u5236\u53f0 label.cloud.console=\u4e91\u7ba1\u7406\u63a7\u5236\u53f0

View File

@ -16,7 +16,8 @@
// under the License. // under the License.
package com.cloud.network.vpc; package com.cloud.network.vpc;
import com.cloud.utils.db.GenericDao; import java.util.Date;
import java.util.UUID;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
@ -24,8 +25,8 @@ import javax.persistence.EnumType;
import javax.persistence.Enumerated; import javax.persistence.Enumerated;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import java.util.Date;
import java.util.UUID; import com.cloud.utils.db.GenericDao;
@Entity @Entity
@Table(name = "vpc") @Table(name = "vpc")
@ -61,7 +62,7 @@ public class VpcVO implements Vpc {
State state; State state;
@Column(name = "redundant") @Column(name = "redundant")
boolean isRedundant; boolean redundant;
@Column(name = "vpc_offering_id") @Column(name = "vpc_offering_id")
long vpcOfferingId; long vpcOfferingId;
@ -92,8 +93,8 @@ public class VpcVO implements Vpc {
} }
public VpcVO(final long zoneId, final String name, final String displayText, final long accountId, final long domainId, public VpcVO(final long zoneId, final String name, final String displayText, final long accountId, final long domainId,
final long vpcOffId, String cidr, final String networkDomain, final boolean useDistributedRouter, final long vpcOffId, final String cidr, final String networkDomain, final boolean useDistributedRouter,
final boolean regionLevelVpc, final boolean isRedundant) { final boolean regionLevelVpc, final boolean isRedundant) {
this.zoneId = zoneId; this.zoneId = zoneId;
this.name = name; this.name = name;
this.displayText = displayText; this.displayText = displayText;
@ -104,9 +105,9 @@ public class VpcVO implements Vpc {
state = State.Enabled; state = State.Enabled;
this.networkDomain = networkDomain; this.networkDomain = networkDomain;
vpcOfferingId = vpcOffId; vpcOfferingId = vpcOffId;
this.usesDistributedRouter = useDistributedRouter; usesDistributedRouter = useDistributedRouter;
this.regionLevelVpc = regionLevelVpc; this.regionLevelVpc = regionLevelVpc;
this.isRedundant = isRedundant; redundant = isRedundant;
} }
@Override @Override
@ -149,7 +150,7 @@ public class VpcVO implements Vpc {
return state; return state;
} }
public void setState(State state) { public void setState(final State state) {
this.state = state; this.state = state;
} }
@ -158,6 +159,10 @@ public class VpcVO implements Vpc {
return vpcOfferingId; return vpcOfferingId;
} }
public void setVpcOfferingId(final long vpcOfferingId) {
this.vpcOfferingId = vpcOfferingId;
}
public Date getRemoved() { public Date getRemoved() {
return removed; return removed;
} }
@ -167,17 +172,17 @@ public class VpcVO implements Vpc {
return displayText; return displayText;
} }
public void setName(String name) { public void setName(final String name) {
this.name = name; this.name = name;
} }
public void setDisplayText(String displayText) { public void setDisplayText(final String displayText) {
this.displayText = displayText; this.displayText = displayText;
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder buf = new StringBuilder("[VPC ["); final StringBuilder buf = new StringBuilder("[VPC [");
return buf.append(id).append("-").append(name).append("]").toString(); return buf.append(id).append("-").append(name).append("]").toString();
} }
@ -186,7 +191,7 @@ public class VpcVO implements Vpc {
return networkDomain; return networkDomain;
} }
public void setRestartRequired(boolean restartRequired) { public void setRestartRequired(final boolean restartRequired) {
this.restartRequired = restartRequired; this.restartRequired = restartRequired;
} }
@ -195,7 +200,7 @@ public class VpcVO implements Vpc {
return restartRequired; return restartRequired;
} }
public void setUuid(String uuid) { public void setUuid(final String uuid) {
this.uuid = uuid; this.uuid = uuid;
} }
@ -205,7 +210,7 @@ public class VpcVO implements Vpc {
} }
public void setDisplay(boolean display) { public void setDisplay(final boolean display) {
this.display = display; this.display = display;
} }
@ -216,7 +221,11 @@ public class VpcVO implements Vpc {
@Override @Override
public boolean isRedundant() { public boolean isRedundant() {
return this.isRedundant; return redundant;
}
public void setRedundant(final boolean isRedundant) {
redundant = isRedundant;
} }
@Override @Override

View File

@ -1488,7 +1488,9 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
@Override @Override
@ActionEvent(eventType = EventTypes.EVENT_VPC_RESTART, eventDescription = "restarting vpc") @ActionEvent(eventType = EventTypes.EVENT_VPC_RESTART, eventDescription = "restarting vpc")
public boolean restartVpc(final long vpcId, final boolean cleanUp) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { public boolean restartVpc(final long vpcId, final boolean cleanUp, final boolean makeRedundant) throws ConcurrentOperationException,
ResourceUnavailableException, InsufficientCapacityException {
final Account caller = CallContext.current().getCallingAccount(); final Account caller = CallContext.current().getCallingAccount();
// Verify input parameters // Verify input parameters
@ -1504,7 +1506,23 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
s_logger.debug("Restarting VPC " + vpc); s_logger.debug("Restarting VPC " + vpc);
boolean restartRequired = false; boolean restartRequired = false;
try { try {
if (cleanUp) {
boolean forceCleanup = cleanUp;
if (!vpc.isRedundant() && makeRedundant) {
final VpcOfferingVO redundantOffering = _vpcOffDao.findByUniqueName(VpcOffering.redundantVPCOfferingName);
final VpcVO entity = _vpcDao.findById(vpcId);
entity.setRedundant(makeRedundant);
entity.setVpcOfferingId(redundantOffering.getId());
// Change the VPC in order to get it updated after the end of the restart procedure.
_vpcDao.update(vpc.getId(), entity);
//If the offering and redundant column are changing, force the clean up.
forceCleanup = true;
}
if (forceCleanup) {
s_logger.debug("Shutting down VPC " + vpc + " as a part of VPC restart process"); s_logger.debug("Shutting down VPC " + vpc + " as a part of VPC restart process");
if (!shutdownVpc(vpcId)) { if (!shutdownVpc(vpcId)) {
s_logger.warn("Failed to shutdown vpc as a part of VPC " + vpc + " restart process"); s_logger.warn("Failed to shutdown vpc as a part of VPC " + vpc + " restart process");

View File

@ -467,6 +467,7 @@ dictionary = {
'label.CIDR.list': '<fmt:message key="label.CIDR.list" />', 'label.CIDR.list': '<fmt:message key="label.CIDR.list" />',
'label.CIDR.of.destination.network': '<fmt:message key="label.CIDR.of.destination.network" />', 'label.CIDR.of.destination.network': '<fmt:message key="label.CIDR.of.destination.network" />',
'label.clean.up': '<fmt:message key="label.clean.up" />', 'label.clean.up': '<fmt:message key="label.clean.up" />',
'label.make.redundant': '<fmt:message key="label.make.redundant" />',
'label.clear.list': '<fmt:message key="label.clear.list" />', 'label.clear.list': '<fmt:message key="label.clear.list" />',
'label.close': '<fmt:message key="label.close" />', 'label.close': '<fmt:message key="label.close" />',
'label.cloud.console': '<fmt:message key="label.cloud.console" />', 'label.cloud.console': '<fmt:message key="label.cloud.console" />',

View File

@ -5523,11 +5523,17 @@
}); });
args.$form.find('.form-item[rel=cleanup]').find('input').attr('checked', 'checked'); //checked args.$form.find('.form-item[rel=cleanup]').find('input').attr('checked', 'checked'); //checked
args.$form.find('.form-item[rel=cleanup]').css('display', 'inline-block'); //shown args.$form.find('.form-item[rel=cleanup]').css('display', 'inline-block'); //shown
args.$form.find('.form-item[rel=makeredundant]').find('input').attr('checked', 'checked'); //checked
args.$form.find('.form-item[rel=makeredundant]').css('display', 'inline-block'); //shown
}, },
fields: { fields: {
cleanup: { cleanup: {
label: 'label.clean.up', label: 'label.clean.up',
isBoolean: true isBoolean: true
},
makeredundant: {
label: 'label.make.redundant',
isBoolean: true
} }
} }
}, },
@ -5545,7 +5551,8 @@
url: createURL("restartVPC"), url: createURL("restartVPC"),
data: { data: {
id: args.context.vpc[0].id, id: args.context.vpc[0].id,
cleanup: (args.data.cleanup == "on") cleanup: (args.data.cleanup == "on"),
makeredundant: (args.data.makeredundant == "on")
}, },
success: function(json) { success: function(json) {
var jid = json.restartvpcresponse.jobid; var jid = json.restartvpcresponse.jobid;