Skip to content

Commit 8bc120b

Browse files
committed
Merge remote-tracking branch 'apache/4.15' into main
2 parents e1e6ec1 + f822547 commit 8bc120b

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

scripts/vm/network/security_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,13 +1371,13 @@ def verify_network_rules(vm_name, vm_id, vm_ip, vm_ip6, vm_mac, vif, brname, sec
13711371
vm_id = vm_name.split("-")[-2]
13721372

13731373
if brname is None:
1374-
brname = execute("virsh domiflist %s |grep -w '%s' |tr -s ' '|cut -d ' ' -f3" % (vm_name, vm_mac)).strip()
1374+
brname = execute("virsh domiflist %s |grep -w '%s' | awk '{print $3}'" % (vm_name, vm_mac)).strip()
13751375
if not brname:
13761376
print("Cannot find bridge")
13771377
sys.exit(1)
13781378

13791379
if vif is None:
1380-
vif = execute("virsh domiflist %s |grep -w '%s' |tr -s ' '|cut -d ' ' -f1" % (vm_name, vm_mac)).strip()
1380+
vif = execute("virsh domiflist %s |grep -w '%s' | awk '{print $1}'" % (vm_name, vm_mac)).strip()
13811381
if not vif:
13821382
print("Cannot find vif")
13831383
sys.exit(1)

test/integration/component/test_multiple_nic_support.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def setUpClass(cls):
225225
cls.virtual_machine1.default_network_id = nic.networkid
226226
break
227227
except Exception as e:
228-
cls.fail(f"Exception while deploying virtual machine: {e}")
228+
cls.fail("Exception while deploying virtual machine: %s" % {e})
229229

230230
try:
231231
cls.virtual_machine2 = VirtualMachine.create(
@@ -244,7 +244,7 @@ def setUpClass(cls):
244244
cls.virtual_machine2.default_network_id = nic.networkid
245245
break
246246
except Exception as e:
247-
cls.fail(f"Exception while deploying virtual machine: {e}")
247+
cls.fail("Exception while deploying virtual machine: %s" % {e})
248248

249249
cls._cleanup.append(cls.virtual_machine1)
250250
cls._cleanup.append(cls.virtual_machine2)

ui/src/config/section/compute.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ export default {
186186
docHelp: 'adminguide/virtual_machines.html#virtual-machine-snapshots',
187187
dataView: true,
188188
popup: true,
189+
show: (record) => {
190+
return ((['Running'].includes(record.state) && record.hypervisor !== 'LXC') ||
191+
(['Stopped'].includes(record.state) && !['KVM', 'LXC'].includes(record.hypervisor)))
192+
},
189193
component: () => import('@/views/compute/CreateSnapshotWizard.vue')
190194
},
191195
{

ui/src/config/section/infra/primaryStorages.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ export default {
111111
label: 'label.action.delete.primary.storage',
112112
dataView: true,
113113
args: ['forced'],
114-
show: (record) => { return (record.state === 'Down' || record.state === 'Maintenance' || record.state === 'Disconnected') }
114+
show: (record) => { return (record.state === 'Down' || record.state === 'Maintenance' || record.state === 'Disconnected') },
115+
displayName: (record) => { return record.name || record.displayName || record.id }
115116
}
116117
]
117118
}

ui/src/config/section/infra/secondaryStorages.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ export default {
8787
icon: 'delete',
8888
label: 'label.action.delete.secondary.storage',
8989
message: 'message.action.delete.secondary.storage',
90-
dataView: true
90+
dataView: true,
91+
displayName: (record) => { return record.name || record.displayName || record.id }
9192
}
9293
]
9394
}

0 commit comments

Comments
 (0)