mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' into ui-install-wizard
This commit is contained in:
commit
77e5e60dc1
|
|
@ -448,43 +448,45 @@ public class ApiXmlDocWriter {
|
|||
|
||||
for (Field responseField : responseFields) {
|
||||
SerializedName nameAnnotation = responseField.getAnnotation(SerializedName.class);
|
||||
Param paramAnnotation = responseField.getAnnotation(Param.class);
|
||||
Argument respArg = new Argument(nameAnnotation.value());
|
||||
if (nameAnnotation != null) {
|
||||
Param paramAnnotation = responseField.getAnnotation(Param.class);
|
||||
Argument respArg = new Argument(nameAnnotation.value());
|
||||
|
||||
boolean hasChildren = false;
|
||||
if (paramAnnotation != null && paramAnnotation.includeInApiDoc()) {
|
||||
String description = paramAnnotation.description();
|
||||
Class fieldClass = paramAnnotation.responseObject();
|
||||
if (description != null && !description.isEmpty()) {
|
||||
respArg.setDescription(description);
|
||||
}
|
||||
boolean hasChildren = false;
|
||||
if (paramAnnotation != null && paramAnnotation.includeInApiDoc()) {
|
||||
String description = paramAnnotation.description();
|
||||
Class fieldClass = paramAnnotation.responseObject();
|
||||
if (description != null && !description.isEmpty()) {
|
||||
respArg.setDescription(description);
|
||||
}
|
||||
|
||||
if (fieldClass != null) {
|
||||
Class<?> superClass = fieldClass.getSuperclass();
|
||||
if (superClass != null) {
|
||||
String superName = superClass.getName();
|
||||
if (superName.equals(BaseResponse.class.getName())) {
|
||||
ArrayList<Argument> fieldArguments = new ArrayList<Argument>();
|
||||
Field[] fields = fieldClass.getDeclaredFields();
|
||||
fieldArguments = setResponseFields(fields);
|
||||
respArg.setArguments(fieldArguments);
|
||||
hasChildren = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fieldClass != null) {
|
||||
Class<?> superClass = fieldClass.getSuperclass();
|
||||
if (superClass != null) {
|
||||
String superName = superClass.getName();
|
||||
if (superName.equals(BaseResponse.class.getName())) {
|
||||
ArrayList<Argument> fieldArguments = new ArrayList<Argument>();
|
||||
Field[] fields = fieldClass.getDeclaredFields();
|
||||
fieldArguments = setResponseFields(fields);
|
||||
respArg.setArguments(fieldArguments);
|
||||
hasChildren = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (paramAnnotation != null && paramAnnotation.includeInApiDoc()) {
|
||||
if (nameAnnotation.value().equals("id")) {
|
||||
id = respArg;
|
||||
} else {
|
||||
if (hasChildren) {
|
||||
respArg.setName(nameAnnotation.value() + "(*)");
|
||||
sortedArguments.add(respArg);
|
||||
} else {
|
||||
sortedChildlessArguments.add(respArg);
|
||||
}
|
||||
}
|
||||
if (paramAnnotation != null && paramAnnotation.includeInApiDoc()) {
|
||||
if (nameAnnotation.value().equals("id")) {
|
||||
id = respArg;
|
||||
} else {
|
||||
if (hasChildren) {
|
||||
respArg.setName(nameAnnotation.value() + "(*)");
|
||||
sortedArguments.add(respArg);
|
||||
} else {
|
||||
sortedChildlessArguments.add(respArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ public enum Config {
|
|||
OvsNetwork("Network", ManagementServer.class, Boolean.class, "open.vswitch.vlan.network", "false", "enable/disable vlan remapping of open vswitch network", null),
|
||||
OvsTunnelNetwork("Network", ManagementServer.class, Boolean.class, "open.vswitch.tunnel.network", "false", "enable/disable open vswitch tunnel network(no vlan)", null),
|
||||
VmNetworkThrottlingRate("Network", ManagementServer.class, Integer.class, "vm.network.throttling.rate", "200", "Default data transfer rate in megabits per second allowed in User vm's default network.", null),
|
||||
NetworkLockTimeout("Network", ManagementServer.class, Integer.class, "network.lock.timeout", "600", "Lock wait timeout (seconds) while implementing network", null),
|
||||
|
||||
|
||||
SecurityGroupWorkCleanupInterval("Network", ManagementServer.class, Integer.class, "network.securitygroups.work.cleanup.interval", "120", "Time interval (seconds) in which finished work is cleaned up from the work table", null),
|
||||
|
|
|
|||
|
|
@ -248,6 +248,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
String _networkDomain;
|
||||
int _cidrLimit;
|
||||
boolean _allowSubdomainNetworkAccess;
|
||||
int _networkLockTimeout;
|
||||
|
||||
private Map<String, String> _configs;
|
||||
|
||||
|
|
@ -382,6 +383,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
txn.start();
|
||||
|
||||
owner = _accountDao.acquireInLockTable(ownerId);
|
||||
|
||||
if (owner == null) {
|
||||
throw new ConcurrentOperationException("Unable to lock account " + ownerId);
|
||||
}
|
||||
|
|
@ -755,6 +757,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
_networkDomain = _configs.get(Config.GuestDomainSuffix.key());
|
||||
|
||||
_cidrLimit = NumbersUtil.parseInt(_configs.get(Config.NetworkGuestCidrLimit.key()), 22);
|
||||
_networkLockTimeout = NumbersUtil.parseInt(_configs.get(Config.NetworkLockTimeout.key()), 600);
|
||||
|
||||
NetworkOfferingVO publicNetworkOffering = new NetworkOfferingVO(NetworkOfferingVO.SystemPublicNetwork, TrafficType.Public);
|
||||
publicNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(publicNetworkOffering);
|
||||
|
|
@ -1154,7 +1157,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
Transaction.currentTxn();
|
||||
Pair<NetworkGuru, NetworkVO> implemented = new Pair<NetworkGuru, NetworkVO>(null, null);
|
||||
|
||||
NetworkVO network = _networksDao.acquireInLockTable(networkId);
|
||||
NetworkVO network = _networksDao.acquireInLockTable(networkId, _networkLockTimeout);
|
||||
if (network == null) {
|
||||
throw new ConcurrentOperationException("Unable to acquire network configuration: " + networkId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,3 +62,5 @@ update host_details set name='privateip' where host_id in (select id from host w
|
|||
INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-server', 'vmware.root.disk.controller', 'ide', 'Specify the default disk controller for root volumes, valid values are scsi, ide');
|
||||
INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.destory.forcestop', 'false', 'On destory, force-stop takes this value');
|
||||
|
||||
INSERT IGNORE INTO configuration VALUES ('Network', 'DEFAULT', 'management-server', 'network.lock.timeout', '600', 'Lock wait timeout (seconds) while implementing network');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue