Allow renaming cluster, host, and storage#4165
Conversation
| } | ||
|
|
||
| private void updateCluster(long clusterId, String state) { | ||
| private void updateCluster(long clusterId, String allocationState) { |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
Thanks @GabrielBrascher, looks good to me. The change needed in RollingMaintenanceManagerImpl will be just the same as you've done below
Update Host name handling to update instead of persist Allow update Storage name
38e69e5 to
bef567f
Compare
|
Looks good to me based on the code |
|
Renaming of cluster on VMware could cause a problem if the cluster on VCenter is not mapped; on XenServer I'm not sure if there'll be any side-effects. On KVM LGTM |
nvazquez
left a comment
There was a problem hiding this comment.
Code looking good, @GabrielBrascher can you please add the small refactor on RollingMaintenanceManagerImpl as well?
|
@nvazquez thanks for the review! I think that I already did the necessary changes in the method |
|
@rhtyd thanks for the feedback, I will prevent cluster renaming on VMware then (maybe on Xenserver as well). |
cea53fb to
74e9900
Compare
74e9900 to
9176e29
Compare
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1528 |
nvazquez
left a comment
There was a problem hiding this comment.
LGTM based on code review, haven't tested it
| boolean doUpdate = false; | ||
|
|
||
| if (org.apache.commons.lang.StringUtils.isNotBlank(name)) { | ||
| if(cluster.getHypervisorType() == HypervisorType.VMware) { |
There was a problem hiding this comment.
@rhtyd considering your concerns with issues caused by renaming VMware clusters I added this line.
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos7 ✔debian. JID-1605 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1607 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2205)
|
* Allow renaming cluster, host, and storage CloudStack PR: apache/cloudstack#4165 * change clustername.label to Cluster Name
* Allow renaming cluster, host, and storage CloudStack PR: apache/cloudstack#4165 * change clustername.label to Cluster Name
* Allow renaming cluster, host, and storage CloudStack PR: #4165 * change clustername.label to Cluster Name Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Description
This PR adds implementation for changing host and storage name, additionally, it fixes a Bug on cluster updateCluster API command. This PRs also enhances the UI by allowing editing field name on Host and Storage pool. Due to the fact that there is no support to editing cluster via UI, it was not edited.
TODO: I will address Host, Cluster, and Storage Pool name edition on CloudStack Primate once the API implementation gets merged.
Details:
Prior to this PR the following API commands did not offer support for updating name:
Additionally, updateCluster claims to support changing a cluster name (via
clusternameparameter); however, such operation did not work. (bug)Types of changes
How Has This Been Tested?