-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow renaming cluster, host, and storage #4165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f5d80bb
813ea48
bef567f
91961eb
9176e29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,7 @@ | |
| import com.cloud.vm.VirtualMachineProfileImpl; | ||
| import com.cloud.vm.dao.VMInstanceDao; | ||
| import org.apache.cloudstack.affinity.AffinityGroupProcessor; | ||
| import org.apache.cloudstack.api.command.admin.cluster.UpdateClusterCmd; | ||
| import org.apache.cloudstack.api.command.admin.host.PrepareForMaintenanceCmd; | ||
| import org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd; | ||
| import org.apache.cloudstack.context.CallContext; | ||
|
|
@@ -114,12 +115,15 @@ public boolean configure(String name, Map<String, Object> params) throws Configu | |
| return true; | ||
| } | ||
|
|
||
| private void updateCluster(long clusterId, String state) { | ||
| private void updateCluster(long clusterId, String allocationState) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nvazquez can you please take a look at it? I changed API parameter handling from separate parameters on the method call to an object of UpdateClusterCmd class. Therefore, I needed to change this tiny piece of RollingMaintenanceManagerImpl.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @GabrielBrascher, looks good to me. The change needed in RollingMaintenanceManagerImpl will be just the same as you've done below |
||
| Cluster cluster = resourceManager.getCluster(clusterId); | ||
| if (cluster == null) { | ||
| throw new InvalidParameterValueException("Unable to find the cluster by id=" + clusterId); | ||
| } | ||
| resourceManager.updateCluster(cluster, "", "", state, ""); | ||
| UpdateClusterCmd updateClusterCmd = new UpdateClusterCmd(); | ||
| updateClusterCmd.setId(clusterId); | ||
| updateClusterCmd.setAllocationState(allocationState); | ||
| resourceManager.updateCluster(updateClusterCmd); | ||
| } | ||
|
|
||
| private void generateReportAndFinishingEvent(StartRollingMaintenanceCmd cmd, boolean success, String details, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhtyd considering your concerns with issues caused by renaming VMware clusters I added this line.