nvazquez commented on a change in pull request #6007:
URL: https://github.com/apache/cloudstack/pull/6007#discussion_r810727984
##########
File path: packaging/centos7/cloud.spec
##########
@@ -346,6 +346,7 @@ install -D
agent/target/transformed/cloudstack-agent-profile.sh ${RPM_BUILD_ROOT
install -D agent/target/transformed/cloudstack-agent.logrotate
${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}-agent
install -D
plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-%{_maventag}.jar
${RPM_BUILD_ROOT}%{_datadir}/%name-agent/lib/cloud-plugin-hypervisor-kvm-%{_maventag}.jar
cp plugins/hypervisors/kvm/target/dependencies/*
${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib
+cp plugins/storage/volume/storpool/target/*.jar
${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib
Review comment:
This could be avoided if the storpool plugin module is added as a
dependency of the KVM hypervisor module
##########
File path:
plugins/storage/volume/storpool/src/main/java/com/cloud/agent/api/storage/StorPoolModifyStoragePoolAnswer.java
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.cloud.agent.api.storage;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.ModifyStoragePoolAnswer;
+import com.cloud.agent.api.StoragePoolInfo;
+import com.cloud.storage.template.TemplateProp;
+
+public class StorPoolModifyStoragePoolAnswer extends Answer{
Review comment:
Instead of creating these new command and answer classes, it could be
beneficial to extend the existing commands/answers and discriminating by a new
StoragePoolType for Storpool
##########
File path:
plugins/storage/volume/storpool/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/StorPoolModifyStorageCommandWrapper.java
##########
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package com.cloud.hypervisor.kvm.resource.wrapper;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.apache.log4j.Logger;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.storage.StorPoolModifyStoragePoolAnswer;
+import com.cloud.agent.api.storage.StorPoolModifyStoragePoolCommand;
+import com.cloud.hypervisor.kvm.resource.LibvirtComputingResource;
+import com.cloud.hypervisor.kvm.storage.KVMStoragePool;
+import com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager;
+import com.cloud.hypervisor.kvm.storage.StorpoolStorageAdaptor;
+import com.cloud.resource.CommandWrapper;
+import com.cloud.resource.ResourceWrapper;
+import com.cloud.storage.template.TemplateProp;
+import com.cloud.utils.script.OutputInterpreter;
+import com.cloud.utils.script.Script;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonParser;
+
+@ResourceWrapper(handles = StorPoolModifyStoragePoolCommand.class)
+public final class StorPoolModifyStorageCommandWrapper extends
CommandWrapper<StorPoolModifyStoragePoolCommand, Answer,
LibvirtComputingResource> {
Review comment:
Same idea with the command wrappers - the existing ones could be reused
if the command/answers are kept generic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]