From e2bb4cf5830f98cc8502135190073dd1753af5be Mon Sep 17 00:00:00 2001 From: Marcus Sorensen Date: Fri, 23 Jan 2015 00:09:55 -0800 Subject: [PATCH] LibvirtComputingResource: Expose KVMStoragePoolManager KVMStoragePoolManager is a singleton in practice, any plugin or extension of LibvirtComputingResource will need to act on the specific instance of KVMStoragePoolManager that LibvirtComputingResource has initialized. Therefore, expose this variable for those who wish to call storage commands from plugins or extensions. Conflicts: plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java --- .../hypervisor/kvm/resource/LibvirtComputingResource.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index bcd8bb58627..8dcb88e0e29 100755 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -1,4 +1,4 @@ -// Licensed to the Apache Software Foundation (ASF) under one +// Licensed to the Apache Software Foundation (ASF) under oneD // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file @@ -4044,6 +4044,10 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv return _storagePoolMgr.disconnectPhysicalDiskByPath(path); } + protected KVMStoragePoolManager getPoolManager() { + return _storagePoolMgr; + } + protected synchronized String attachOrDetachISO(Connect conn, String vmName, String isoPath, boolean isAttach) throws LibvirtException, URISyntaxException, InternalErrorException { String isoXml = null;