4.8.1
This commit is contained in:
@@ -37,18 +37,16 @@ import (
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/sep"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/flattens"
|
||||
)
|
||||
|
||||
func flattenSep(d *schema.ResourceData, desSep *sep.RecordSEP) {
|
||||
d.Set("ckey", desSep.CKey)
|
||||
d.Set("meta", flattens.FlattenMeta(desSep.Meta))
|
||||
d.Set("consumed_by", desSep.ConsumedBy)
|
||||
d.Set("desc", desSep.Description)
|
||||
d.Set("gid", desSep.GID)
|
||||
d.Set("guid", desSep.GUID)
|
||||
d.Set("sep_id", desSep.ID)
|
||||
d.Set("milestones", desSep.Milestones)
|
||||
d.Set("multipath_num", desSep.MultipathNum)
|
||||
d.Set("name", desSep.Name)
|
||||
d.Set("obj_status", desSep.ObjStatus)
|
||||
d.Set("provided_by", desSep.ProvidedBy)
|
||||
@@ -64,21 +62,20 @@ func flattenSepListItems(sl *sep.ListSEP) []map[string]interface{} {
|
||||
for _, item := range sl.Data {
|
||||
data, _ := json.Marshal(item.Config)
|
||||
temp := map[string]interface{}{
|
||||
"ckey": item.CKey,
|
||||
"meta": flattens.FlattenMeta(item.Meta),
|
||||
"consumed_by": item.ConsumedBy,
|
||||
"desc": item.Description,
|
||||
"gid": item.GID,
|
||||
"guid": item.GUID,
|
||||
"sep_id": item.ID,
|
||||
"milestones": item.Milestones,
|
||||
"name": item.Name,
|
||||
"obj_status": item.ObjStatus,
|
||||
"provided_by": item.ProvidedBy,
|
||||
"shared_with": item.SharedWith,
|
||||
"tech_status": item.TechStatus,
|
||||
"type": item.Type,
|
||||
"config": string(data),
|
||||
"consumed_by": item.ConsumedBy,
|
||||
"desc": item.Description,
|
||||
"gid": item.GID,
|
||||
"guid": item.GUID,
|
||||
"sep_id": item.ID,
|
||||
"milestones": item.Milestones,
|
||||
"name": item.Name,
|
||||
"multipath_num": item.MultipathNum,
|
||||
"obj_status": item.ObjStatus,
|
||||
"provided_by": item.ProvidedBy,
|
||||
"shared_with": item.SharedWith,
|
||||
"tech_status": item.TechStatus,
|
||||
"type": item.Type,
|
||||
"config": string(data),
|
||||
}
|
||||
res = append(res, temp)
|
||||
}
|
||||
|
||||
@@ -9,19 +9,6 @@ func dataSourceSepCSchemaMake() map[string]*schema.Schema {
|
||||
Required: true,
|
||||
Description: "sep type des id",
|
||||
},
|
||||
"ckey": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "ckey",
|
||||
},
|
||||
"meta": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Description: "meta",
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
},
|
||||
"config": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
@@ -50,6 +37,11 @@ func dataSourceSepCSchemaMake() map[string]*schema.Schema {
|
||||
Computed: true,
|
||||
Description: "guid",
|
||||
},
|
||||
"multipath_num": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "multipath_num",
|
||||
},
|
||||
"milestones": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
@@ -295,19 +287,6 @@ func dataSourceSepListSchemaMake() map[string]*schema.Schema {
|
||||
Description: "sep list",
|
||||
Elem: &schema.Resource{
|
||||
Schema: map[string]*schema.Schema{
|
||||
"ckey": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "ckey",
|
||||
},
|
||||
"meta": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Description: "meta",
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
},
|
||||
"config": {
|
||||
Description: "config",
|
||||
Type: schema.TypeString,
|
||||
@@ -346,6 +325,11 @@ func dataSourceSepListSchemaMake() map[string]*schema.Schema {
|
||||
Computed: true,
|
||||
Description: "milestones",
|
||||
},
|
||||
"multipath_num": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "multipath_num",
|
||||
},
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
@@ -607,19 +591,6 @@ func resourceSepSchemaMake() map[string]*schema.Schema {
|
||||
},
|
||||
},
|
||||
},
|
||||
"ckey": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "ckey",
|
||||
},
|
||||
"meta": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Description: "meta",
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
},
|
||||
"config": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
@@ -651,6 +622,11 @@ func resourceSepSchemaMake() map[string]*schema.Schema {
|
||||
Computed: true,
|
||||
Description: "milestones",
|
||||
},
|
||||
"multipath_num": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "multipath_num",
|
||||
},
|
||||
"obj_status": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
|
||||
Reference in New Issue
Block a user