mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	ui,api: make description option for createKubernetesCluster (#7541)
Make the description for createKubernetesCLuster API optional. Similar to #7180 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
		
							parent
							
								
									b0d7a20d5d
								
							
						
					
					
						commit
						8ff0071bec
					
				@ -39,6 +39,7 @@ import org.apache.cloudstack.api.response.ProjectResponse;
 | 
				
			|||||||
import org.apache.cloudstack.api.response.ServiceOfferingResponse;
 | 
					import org.apache.cloudstack.api.response.ServiceOfferingResponse;
 | 
				
			||||||
import org.apache.cloudstack.api.response.ZoneResponse;
 | 
					import org.apache.cloudstack.api.response.ZoneResponse;
 | 
				
			||||||
import org.apache.cloudstack.context.CallContext;
 | 
					import org.apache.cloudstack.context.CallContext;
 | 
				
			||||||
 | 
					import org.apache.commons.lang3.StringUtils;
 | 
				
			||||||
import org.apache.log4j.Logger;
 | 
					import org.apache.log4j.Logger;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.cloud.kubernetes.cluster.KubernetesCluster;
 | 
					import com.cloud.kubernetes.cluster.KubernetesCluster;
 | 
				
			||||||
@ -68,7 +69,7 @@ public class CreateKubernetesClusterCmd extends BaseAsyncCreateCmd {
 | 
				
			|||||||
    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name for the Kubernetes cluster")
 | 
					    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name for the Kubernetes cluster")
 | 
				
			||||||
    private String name;
 | 
					    private String name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, required = true, description = "description for the Kubernetes cluster")
 | 
					    @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "description for the Kubernetes cluster")
 | 
				
			||||||
    private String description;
 | 
					    private String description;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @ACL(accessType = AccessType.UseEntry)
 | 
					    @ACL(accessType = AccessType.UseEntry)
 | 
				
			||||||
@ -155,7 +156,7 @@ public class CreateKubernetesClusterCmd extends BaseAsyncCreateCmd {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public String getDisplayName() {
 | 
					    public String getDisplayName() {
 | 
				
			||||||
        return description;
 | 
					        return StringUtils.firstNonEmpty(description, name);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public Long getDomainId() {
 | 
					    public Long getDomainId() {
 | 
				
			||||||
 | 
				
			|||||||
@ -284,7 +284,6 @@ export default {
 | 
				
			|||||||
      })
 | 
					      })
 | 
				
			||||||
      this.rules = reactive({
 | 
					      this.rules = reactive({
 | 
				
			||||||
        name: [{ required: true, message: this.$t('message.error.kubecluster.name') }],
 | 
					        name: [{ required: true, message: this.$t('message.error.kubecluster.name') }],
 | 
				
			||||||
        description: [{ required: true, message: this.$t('message.error.cluster.description') }],
 | 
					 | 
				
			||||||
        zoneid: [{ required: true, message: this.$t('message.error.zone.for.cluster') }],
 | 
					        zoneid: [{ required: true, message: this.$t('message.error.zone.for.cluster') }],
 | 
				
			||||||
        kubernetesversionid: [{ required: true, message: this.$t('message.error.version.for.cluster') }],
 | 
					        kubernetesversionid: [{ required: true, message: this.$t('message.error.version.for.cluster') }],
 | 
				
			||||||
        serviceofferingid: [{ required: true, message: this.$t('message.error.serviceoffering.for.cluster') }],
 | 
					        serviceofferingid: [{ required: true, message: this.$t('message.error.serviceoffering.for.cluster') }],
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user