This commit is contained in:
2025-11-18 16:20:26 +03:00
parent 4b3f21d9be
commit e42fbcef39
397 changed files with 17560 additions and 1501 deletions

View File

@@ -147,6 +147,11 @@ func dataSourceBasicServiceListSchemaMake() 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,

View File

@@ -51,14 +51,15 @@ func resourceBasicServiceGroupCreate(ctx context.Context, d *schema.ResourceData
c := m.(*controller.ControllerCfg)
req := bservice.GroupAddRequest{
ServiceID: uint64(d.Get("service_id").(int)),
Name: d.Get("compgroup_name").(string),
Count: uint64(d.Get("comp_count").(int)),
CPU: uint64(d.Get("cpu").(int)),
RAM: uint64(d.Get("ram").(int)),
Disk: uint64(d.Get("disk").(int)),
ImageID: uint64(d.Get("image_id").(int)),
Driver: d.Get("driver").(string),
ServiceID: uint64(d.Get("service_id").(int)),
Name: d.Get("compgroup_name").(string),
Count: uint64(d.Get("comp_count").(int)),
CPU: uint64(d.Get("cpu").(int)),
RAM: uint64(d.Get("ram").(int)),
Disk: uint64(d.Get("disk").(int)),
ImageID: uint64(d.Get("image_id").(int)),
Driver: d.Get("driver").(string),
StoragePolicyID: uint64(d.Get("storage_policy_id").(int)),
}
if role, ok := d.GetOk("role"); ok {
@@ -396,10 +397,10 @@ func resourceBasicServiceGroupSchemaMake() map[string]*schema.Schema {
Required: true,
Description: "OS image ID to create computes from",
},
"driver": {
Type: schema.TypeString,
"storage_policy_id": {
Type: schema.TypeInt,
Required: true,
Description: "compute driver like a KVM_X86, etc.",
Description: "storage policy id of compute. The rules of the specified storage policy will be used.",
},
///4.4.0
"sep_id": {
@@ -425,6 +426,12 @@ func resourceBasicServiceGroupSchemaMake() map[string]*schema.Schema {
ValidateFunc: validation.StringInSlice([]string{"i440fx", "Q35"}, false),
Default: "i440fx",
},
"driver": {
Type: schema.TypeString,
Optional: true,
Description: "compute driver like a KVM_X86, etc.",
Default: "KVM_X86",
},
///
"role": {
Type: schema.TypeString,

View File

@@ -85,6 +85,9 @@ func utilityBasicServiceListCheckPresence(ctx context.Context, d *schema.Resourc
if acc_name, ok := d.GetOk("account_name"); ok {
req.AccountName = acc_name.(string)
}
if zoneID, ok := d.GetOk("zone_id"); ok {
req.ZoneID = uint64(zoneID.(int))
}
log.Debugf("utilityBasicServiceListCheckPresence")
basicServiceList, err := c.CloudAPI().BService().List(ctx, req)