4.10.1
This commit is contained in:
@@ -68,6 +68,7 @@ func resourceK8sCPCreate(ctx context.Context, d *schema.ResourceData, m interfac
|
||||
K8CIID: uint64(d.Get("k8sci_id").(int)),
|
||||
WorkerGroupName: "temp",
|
||||
NetworkPlugin: d.Get("network_plugin").(string),
|
||||
StoragePolicyID: uint64(d.Get("storage_policy_id").(int)),
|
||||
}
|
||||
|
||||
if num, ok := d.GetOk("num"); ok {
|
||||
|
||||
@@ -58,14 +58,15 @@ func resourceK8sWgCreate(ctx context.Context, d *schema.ResourceData, m interfac
|
||||
}
|
||||
|
||||
req := k8s.WorkersGroupAddRequest{
|
||||
K8SID: uint64(d.Get("k8s_id").(int)),
|
||||
Name: d.Get("name").(string),
|
||||
WorkerNum: uint64(d.Get("num").(int)),
|
||||
WorkerCPU: uint64(d.Get("cpu").(int)),
|
||||
WorkerRAM: uint64(d.Get("ram").(int)),
|
||||
WorkerSEPID: uint64(d.Get("worker_sep_id").(int)),
|
||||
WorkerSEPPool: d.Get("worker_sep_pool").(string),
|
||||
Chipset: d.Get("chipset").(string),
|
||||
K8SID: uint64(d.Get("k8s_id").(int)),
|
||||
Name: d.Get("name").(string),
|
||||
WorkerNum: uint64(d.Get("num").(int)),
|
||||
WorkerCPU: uint64(d.Get("cpu").(int)),
|
||||
WorkerRAM: uint64(d.Get("ram").(int)),
|
||||
WorkerSEPID: uint64(d.Get("worker_sep_id").(int)),
|
||||
WorkerSEPPool: d.Get("worker_sep_pool").(string),
|
||||
Chipset: d.Get("chipset").(string),
|
||||
StoragePolicyID: uint64(d.Get("storage_policy_id").(int)),
|
||||
}
|
||||
|
||||
if d.Get("disk") == nil {
|
||||
|
||||
@@ -471,6 +471,11 @@ func dataSourceK8sListSchemaMake() map[string]*schema.Schema {
|
||||
Optional: true,
|
||||
Description: "Page size",
|
||||
},
|
||||
"zone_id": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Description: "Zone ID",
|
||||
},
|
||||
"items": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
@@ -1355,6 +1360,11 @@ func resourceK8sCPSchemaMake() map[string]*schema.Schema {
|
||||
Description: "Network plugin to be used",
|
||||
ValidateFunc: validation.StringInSlice([]string{"flannel", "weavenet", "calico"}, true),
|
||||
},
|
||||
"storage_policy_id": {
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
Description: "ID of the storage policy",
|
||||
},
|
||||
"zone_id": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
@@ -1771,6 +1781,11 @@ func resourceK8sWgSchemaMake() map[string]*schema.Schema {
|
||||
Required: true,
|
||||
Description: "Name of the worker group.",
|
||||
},
|
||||
"storage_policy_id": {
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
Description: "ID of the storage policy",
|
||||
},
|
||||
"num": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
|
||||
@@ -79,6 +79,9 @@ func utilityK8sListCheckPresence(ctx context.Context, d *schema.ResourceData, m
|
||||
if size, ok := d.GetOk("size"); ok {
|
||||
req.Size = uint64(size.(int))
|
||||
}
|
||||
if zoneID, ok := d.GetOk("zone_id"); ok {
|
||||
req.ZoneID = uint64(zoneID.(int))
|
||||
}
|
||||
|
||||
k8sList, err := c.CloudBroker().K8S().List(ctx, req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user