4.12.0
This commit is contained in:
@@ -263,11 +263,12 @@ func flattenGetNetAddr(address node.NetAddr) []map[string]interface{} {
|
||||
func flattenCpuInfo(info node.CpuInfo) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 1)
|
||||
temp := map[string]interface{}{
|
||||
"clock_speed": info.ClockSpeed,
|
||||
"core_count": info.CoreCount,
|
||||
"phys_count": info.PhysCount,
|
||||
"flags": info.Flags,
|
||||
"model_name": info.ModelName,
|
||||
"clock_speed": info.ClockSpeed,
|
||||
"core_count": info.CoreCount,
|
||||
"phys_count": info.PhysCount,
|
||||
"flags": info.Flags,
|
||||
"model_name": info.ModelName,
|
||||
"thread_count": info.ThreadCount,
|
||||
}
|
||||
res[0] = temp
|
||||
return res
|
||||
|
||||
@@ -52,7 +52,7 @@ func dataSourceNodeSchemaMake() map[string]*schema.Schema {
|
||||
Elem: &schema.Resource{
|
||||
Schema: map[string]*schema.Schema{
|
||||
"vcpu": {
|
||||
Type: schema.TypeInt,
|
||||
Type: schema.TypeFloat,
|
||||
Computed: true,
|
||||
},
|
||||
"ram": {
|
||||
@@ -121,6 +121,10 @@ func dataSourceNodeSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"thread_count": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -498,6 +502,11 @@ func dataSourceNodeListSchemaMake() map[string]*schema.Schema {
|
||||
Optional: true,
|
||||
Description: "find node by status",
|
||||
},
|
||||
"zone_id": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Description: "find node by zone id",
|
||||
},
|
||||
"sort_by": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
@@ -570,6 +579,10 @@ func dataSourceNodeListSchemaMake() map[string]*schema.Schema {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"thread_count": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -76,6 +76,9 @@ func utilityNodeListCheckPresence(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))
|
||||
}
|
||||
|
||||
log.Debugf("utilityNodeListCheckPresence: load node list")
|
||||
nodeList, err := c.CloudBroker().Node().List(ctx, req)
|
||||
|
||||
Reference in New Issue
Block a user