mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'origin/4.15'
This commit is contained in:
commit
e6fef05f30
@ -274,6 +274,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
|
||||
|
||||
SearchBuilder<NicVO> nicSearch = _nicDao.createSearchBuilder();
|
||||
nicSearch.and("networkId", nicSearch.entity().getNetworkId(), SearchCriteria.Op.EQ);
|
||||
nicSearch.and("removedNic", nicSearch.entity().getRemoved(), SearchCriteria.Op.NULL);
|
||||
|
||||
DistinctHostNameSearch = createSearchBuilder(String.class);
|
||||
DistinctHostNameSearch.selectFields(DistinctHostNameSearch.entity().getHostName());
|
||||
|
||||
@ -1065,6 +1065,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
|
||||
// Check that the specified service offering ID is valid
|
||||
_itMgr.checkIfCanUpgrade(vmInstance, newServiceOffering);
|
||||
|
||||
resizeRootVolumeOfVmWithNewOffering(vmInstance, newServiceOffering);
|
||||
|
||||
_itMgr.upgradeVmDb(vmId, newServiceOffering, currentServiceOffering);
|
||||
|
||||
// Increment or decrement CPU and Memory count accordingly.
|
||||
@ -1327,17 +1329,14 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
|
||||
throw new CloudRuntimeException(vmInstance + " is in zone:" + vmInstance.getDataCenterId() + " but " + network + " is in zone:" + network.getDataCenterId());
|
||||
}
|
||||
|
||||
// Get all vms hostNames in the network
|
||||
List<String> hostNames = _vmInstanceDao.listDistinctHostNames(network.getId());
|
||||
// verify that there are no duplicates, listDistictHostNames could return hostNames even if the NIC
|
||||
//in the network is removed, so also check if the NIC is present and then throw an exception.
|
||||
//This will also check if there are multiple nics of same vm in the network
|
||||
if (hostNames.contains(vmInstance.getHostName())) {
|
||||
for (String hostName : hostNames) {
|
||||
VMInstanceVO vm = _vmInstanceDao.findVMByHostName(hostName);
|
||||
if (_networkModel.getNicInNetwork(vm.getId(), network.getId()) != null && vm.getHostName().equals(vmInstance.getHostName())) {
|
||||
throw new CloudRuntimeException(network + " already has a vm with host name: " + vmInstance.getHostName());
|
||||
}
|
||||
if(_networkModel.getNicInNetwork(vmInstance.getId(),network.getId()) != null){
|
||||
s_logger.debug("VM " + vmInstance.getHostName() + " already in network " + network.getName() + " going to add another NIC");
|
||||
} else {
|
||||
//* get all vms hostNames in the network
|
||||
List<String> hostNames = _vmInstanceDao.listDistinctHostNames(network.getId());
|
||||
//* verify that there are no duplicates
|
||||
if (hostNames.contains(vmInstance.getHostName())) {
|
||||
throw new CloudRuntimeException("Network " + network.getName() + " already has a vm with host name: " + vmInstance.getHostName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ pycodestyle --max-line-length=179 *py
|
||||
pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py`
|
||||
if [ $? -gt 0 ]
|
||||
then
|
||||
echo "Pylint failed, please check your code"
|
||||
echo "pycodestyle failed, please check your code"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -35,7 +35,7 @@ pylint --disable=R,C,W *.py
|
||||
pylint --disable=R,C,W `find ../debian -name \*.py`
|
||||
if [ $? -gt 0 ]
|
||||
then
|
||||
echo "Pylint failed, please check your code"
|
||||
echo "pylint failed, please check your code"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
A modern role-based progressive CloudStack UI based on VueJS and Ant Design.
|
||||
|
||||

|
||||

|
||||
|
||||
## Getting Started
|
||||
|
||||
|
||||
@ -93,6 +93,12 @@
|
||||
<span v-else>{{ text }}</span>
|
||||
</template>
|
||||
<a slot="displayname" slot-scope="text, record" href="javascript:;">
|
||||
<QuickView
|
||||
style="margin-left: 5px"
|
||||
:actions="actions"
|
||||
:resource="record"
|
||||
:enabled="quickViewEnabled() && actions.length > 0 && columns && columns[0].dataIndex === 'displayname' "
|
||||
@exec-action="$parent.execAction"/>
|
||||
<router-link :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link>
|
||||
</a>
|
||||
<span slot="username" slot-scope="text, record" href="javascript:;">
|
||||
@ -404,7 +410,7 @@ export default {
|
||||
methods: {
|
||||
quickViewEnabled () {
|
||||
return new RegExp(['/vm', '/kubernetes', '/ssh', '/vmgroup', '/affinitygroup',
|
||||
'/volume', '/snapshot', '/backup',
|
||||
'/volume', '/snapshot', '/vmsnapshot', '/backup',
|
||||
'/guestnetwork', '/vpc', '/vpncustomergateway',
|
||||
'/template', '/iso',
|
||||
'/project', '/account',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user