mirror of https://github.com/apache/cloudstack.git
Merge remote-tracking branch 'apache/4.15' into main
This commit is contained in:
commit
8bc120b288
|
|
@ -1371,13 +1371,13 @@ def verify_network_rules(vm_name, vm_id, vm_ip, vm_ip6, vm_mac, vif, brname, sec
|
|||
vm_id = vm_name.split("-")[-2]
|
||||
|
||||
if brname is None:
|
||||
brname = execute("virsh domiflist %s |grep -w '%s' |tr -s ' '|cut -d ' ' -f3" % (vm_name, vm_mac)).strip()
|
||||
brname = execute("virsh domiflist %s |grep -w '%s' | awk '{print $3}'" % (vm_name, vm_mac)).strip()
|
||||
if not brname:
|
||||
print("Cannot find bridge")
|
||||
sys.exit(1)
|
||||
|
||||
if vif is None:
|
||||
vif = execute("virsh domiflist %s |grep -w '%s' |tr -s ' '|cut -d ' ' -f1" % (vm_name, vm_mac)).strip()
|
||||
vif = execute("virsh domiflist %s |grep -w '%s' | awk '{print $1}'" % (vm_name, vm_mac)).strip()
|
||||
if not vif:
|
||||
print("Cannot find vif")
|
||||
sys.exit(1)
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ class TestMulipleNicSupport(cloudstackTestCase):
|
|||
cls.virtual_machine1.default_network_id = nic.networkid
|
||||
break
|
||||
except Exception as e:
|
||||
cls.fail(f"Exception while deploying virtual machine: {e}")
|
||||
cls.fail("Exception while deploying virtual machine: %s" % {e})
|
||||
|
||||
try:
|
||||
cls.virtual_machine2 = VirtualMachine.create(
|
||||
|
|
@ -244,7 +244,7 @@ class TestMulipleNicSupport(cloudstackTestCase):
|
|||
cls.virtual_machine2.default_network_id = nic.networkid
|
||||
break
|
||||
except Exception as e:
|
||||
cls.fail(f"Exception while deploying virtual machine: {e}")
|
||||
cls.fail("Exception while deploying virtual machine: %s" % {e})
|
||||
|
||||
cls._cleanup.append(cls.virtual_machine1)
|
||||
cls._cleanup.append(cls.virtual_machine2)
|
||||
|
|
|
|||
|
|
@ -186,6 +186,10 @@ export default {
|
|||
docHelp: 'adminguide/virtual_machines.html#virtual-machine-snapshots',
|
||||
dataView: true,
|
||||
popup: true,
|
||||
show: (record) => {
|
||||
return ((['Running'].includes(record.state) && record.hypervisor !== 'LXC') ||
|
||||
(['Stopped'].includes(record.state) && !['KVM', 'LXC'].includes(record.hypervisor)))
|
||||
},
|
||||
component: () => import('@/views/compute/CreateSnapshotWizard.vue')
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -111,7 +111,8 @@ export default {
|
|||
label: 'label.action.delete.primary.storage',
|
||||
dataView: true,
|
||||
args: ['forced'],
|
||||
show: (record) => { return (record.state === 'Down' || record.state === 'Maintenance' || record.state === 'Disconnected') }
|
||||
show: (record) => { return (record.state === 'Down' || record.state === 'Maintenance' || record.state === 'Disconnected') },
|
||||
displayName: (record) => { return record.name || record.displayName || record.id }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@ export default {
|
|||
icon: 'delete',
|
||||
label: 'label.action.delete.secondary.storage',
|
||||
message: 'message.action.delete.secondary.storage',
|
||||
dataView: true
|
||||
dataView: true,
|
||||
displayName: (record) => { return record.name || record.displayName || record.id }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue