Class HCIComputeOnlyCluster


  • @Sample(name="HCIComputeOnlyCluster",
            description="This sample code demonstrates how to call vSphere HCI API")
    public class HCIComputeOnlyCluster
    extends ConnectedVimServiceBase
     HCIComputeOnlyCluster
    
     This file includes sample codes for calling
     config HCI API with simple config.
    
     This example demonstrates how to call the vSphere HCI API via Vsphere SDK.
    
     Parameters:
     url               [required] : URL of the vCenter Web Service
     username          [required] : Username for the vCenter authentication
     password          [required] : Password for the vCenter authentication
     hostIps           [required] : IPs of the hosts to be added to the cluster
     hostUsername      [required] : Username of the hosts
     hostPassword      [required] : Password of the hosts
     createVlcmCluster [required] : Create a lifecycle managed cluster
     baseImageVersion  [optional] : Base image version in the desired software
                                    spec for the lifecycle managed cluster
     addOnName         [optional] : Name of the addon to include in the desired
                                    software spec for the lifecycle managed
                                    cluster
     addOnVersion      [optional] : Version of the addon to include in the desired
                                    software spec for the lifecycle managed
                                    cluster
     componentName     [optional] : Name of the component to include in the
                                    desired software spec for the lifecycle
                                    managed cluster
     componentVersion  [optional] : Version of the component to include in the
                                    desired software spec for the lifecycle
                                    managed cluster
    
     Command Line:
     run.bat com.vmware.hci.HCIComputeOnlyCluster
        --url [webserviceurl]
        --username [username]
        --password [password]
        --hostIps [name]
        --hostUsername [hostUsername]
        --hostPassword [hostPassword]
        --createVlcmCluster [createVlcmCluster]
        --baseImageVersion [baseImageVersion]
        --addOnName [addOnName]
        --addOnVersion [addOnVersion]
        --componentName [componentName]
        --componentVersion [componentVersion]
     
    • Constructor Detail

      • HCIComputeOnlyCluster

        public HCIComputeOnlyCluster()
    • Method Detail

      • sethostIps

        @Option(name="hostIps",
                required=true,
                description="The IPs of the hosts, comma separated")
        public void sethostIps​(java.lang.String hostIps)
      • sethostUsername

        @Option(name="hostUsername",
                required=true,
                description="The username for the hosts to be added")
        public void sethostUsername​(java.lang.String hostUsername)
      • sethostPassword

        @Option(name="hostPassword",
                required=true,
                description="The password for the hosts to be added")
        public void sethostPassword​(java.lang.String hostPassword)
      • setCreateVlcmCluster

        @Option(name="createVlcmCluster",
                required=true,
                description="Create a lifecycle managed cluster")
        public void setCreateVlcmCluster​(java.lang.String createVlcmCluster)
      • setBaseImageVersion

        @Option(name="baseImageVersion",
                required=false,
                description="Base image version to create a lifecycle managed cluster")
        public void setBaseImageVersion​(java.lang.String baseImageVersion)
      • setAddOnName

        @Option(name="addOnName",
                required=false,
                description="Name of the addon to include with the base image to create a lifecycle managed cluster")
        public void setAddOnName​(java.lang.String addOnName)
      • setAddOnVersion

        @Option(name="addOnVersion",
                required=false,
                description="Version of the addon included with the base image to create a lifecycle managed cluster")
        public void setAddOnVersion​(java.lang.String addOnVersion)
      • setComponentName

        @Option(name="componentName",
                required=false,
                description="Name of the component to include with the base image to create a lifecycle managed cluster")
        public void setComponentName​(java.lang.String componentName)
      • setComponentVersion

        @Option(name="componentVersion",
                required=false,
                description="Version of the component to include with the base image to create a lifecycle managed cluster")
        public void setComponentVersion​(java.lang.String componentVersion)
      • main

        @Action
        public void main()
                  throws com.vmware.vim25.NotFoundFaultMsg,
                         com.vmware.vim25.NotSupportedFaultMsg,
                         com.vmware.vim25.VsanFaultFaultMsg,
                         com.vmware.vim25.InvalidPropertyFaultMsg,
                         com.vmware.vim25.RuntimeFaultFaultMsg,
                         com.vmware.vim25.DuplicateNameFaultMsg,
                         com.vmware.vim25.HostConnectFaultFaultMsg,
                         com.vmware.vim25.InvalidNameFaultMsg,
                         com.vmware.vim25.InvalidLoginFaultMsg,
                         com.vmware.vim25.InvalidCollectorVersionFaultMsg
        This function demostrate a simple configHCI function call to config the host with NTP server and lockdown mode. This an example of showing the usuage of compute-only cluster with some simple config.
        Throws:
        com.vmware.vim25.NotFoundFaultMsg
        com.vmware.vim25.NotSupportedFaultMsg
        com.vmware.vim25.VsanFaultFaultMsg
        com.vmware.vim25.InvalidPropertyFaultMsg
        com.vmware.vim25.RuntimeFaultFaultMsg
        com.vmware.vim25.HostConnectFaultFaultMsg
        com.vmware.vim25.DuplicateNameFaultMsg
        com.vmware.vim25.InvalidLoginFaultMsg
        com.vmware.vim25.InvalidNameFaultMsg
        com.vmware.vim25.InvalidCollectorVersionFaultMsg