Beispiel #1
0
 def createKubernetesCluster(self, name, version_id, size=1, master_nodes=1):
     createKubernetesClusterCmd = createKubernetesCluster.createKubernetesClusterCmd()
     createKubernetesClusterCmd.name = name
     createKubernetesClusterCmd.description = name + "-description"
     createKubernetesClusterCmd.kubernetesversionid = version_id
     createKubernetesClusterCmd.size = size
     createKubernetesClusterCmd.masternodes = master_nodes
     createKubernetesClusterCmd.serviceofferingid = self.cks_service_offering.id
     createKubernetesClusterCmd.zoneid = self.zone.id
     createKubernetesClusterCmd.noderootdisksize = 10
     clusterResponse = self.apiclient.createKubernetesCluster(createKubernetesClusterCmd)
     if not clusterResponse:
         self.cleanup.append(clusterResponse)
     return clusterResponse
Beispiel #2
0
 def createKubernetesCluster(self,
                             name,
                             version_id,
                             size=1,
                             control_nodes=1):
     createKubernetesClusterCmd = createKubernetesCluster.createKubernetesClusterCmd(
     )
     createKubernetesClusterCmd.name = name
     createKubernetesClusterCmd.description = name + "-description"
     createKubernetesClusterCmd.kubernetesversionid = version_id
     createKubernetesClusterCmd.size = size
     createKubernetesClusterCmd.controlnodes = control_nodes
     createKubernetesClusterCmd.serviceofferingid = self.cks_service_offering.id
     createKubernetesClusterCmd.zoneid = self.zone.id
     createKubernetesClusterCmd.noderootdisksize = 10
     createKubernetesClusterCmd.account = self.account.name
     createKubernetesClusterCmd.domainid = self.domain.id
     if self.default_network:
         createKubernetesClusterCmd.networkid = self.default_network.id
     clusterResponse = self.apiclient.createKubernetesCluster(
         createKubernetesClusterCmd)
     if not clusterResponse:
         self.cleanup.append(clusterResponse)
     return clusterResponse