This commit is contained in:
asteam
2025-07-01 13:44:09 +03:00
parent 5382579a5f
commit ddbb12996d
1041 changed files with 2842 additions and 96448 deletions

View File

@@ -58,6 +58,7 @@ func ExtNetDataSource(ctx context.Context, state *models.DataSourceExtNetModel,
NetName: types.StringValue(recordExtNet.Name),
Network: types.StringValue(recordExtNet.Network),
NetworkID: types.Int64Value(int64(recordExtNet.NetworkID)),
NTP: flattens.FlattenSimpleTypeToList(ctx, types.StringType, recordExtNet.NTP),
PreReservationsNum: types.Int64Value(int64(recordExtNet.PreReservationsNum)),
Prefix: types.Int64Value(int64(recordExtNet.Prefix)),
PriVNFDevID: types.Int64Value(int64(recordExtNet.PriVNFDevID)),

View File

@@ -36,6 +36,7 @@ func ExtNetListDataSource(ctx context.Context, state *models.DataSourceExtNetLis
Network: state.Network,
VLANID: state.VLANID,
VNFDevID: state.VNFDevID,
OVSBridge: state.OVSBridge,
Status: state.Status,
Page: state.Page,
Size: state.Size,

View File

@@ -30,6 +30,7 @@ type DataSourceExtNetModel struct {
NetName types.String `tfsdk:"net_name"`
Network types.String `tfsdk:"network"`
NetworkID types.Int64 `tfsdk:"network_id"`
NTP types.List `tfsdk:"ntp"`
PreReservationsNum types.Int64 `tfsdk:"pre_reservations_num"`
Prefix types.Int64 `tfsdk:"prefix"`
PriVNFDevID types.Int64 `tfsdk:"pri_vnf_dev_id"`

View File

@@ -13,6 +13,7 @@ type DataSourceExtNetListModel struct {
Network types.String `tfsdk:"network"`
VLANID types.Int64 `tfsdk:"vlan_id"`
VNFDevID types.Int64 `tfsdk:"vnfdev_id"`
OVSBridge types.String `tfsdk:"ovs_bridge"`
Status types.String `tfsdk:"status"`
Page types.Int64 `tfsdk:"page"`
Size types.Int64 `tfsdk:"size"`

View File

@@ -31,6 +31,10 @@ func MakeSchemaDataSourceExtNet() map[string]schema.Attribute {
"default": schema.BoolAttribute{
Computed: true,
},
"ntp": schema.ListAttribute{
Computed: true,
ElementType: types.StringType,
},
"default_qos": schema.SingleNestedAttribute{
Computed: true,
Attributes: map[string]schema.Attribute{

View File

@@ -31,6 +31,10 @@ func MakeSchemaDataSourceExtNetList() map[string]schema.Attribute {
Optional: true,
Description: "find by vnfdevices id",
},
"ovs_bridge": schema.StringAttribute{
Optional: true,
Description: "find by ovs_bridge",
},
"status": schema.StringAttribute{
Optional: true,
Description: "find by status",

View File

@@ -34,6 +34,9 @@ func ExtNetListCheckPresence(ctx context.Context, plan *models.DataSourceExtNetL
if !plan.VNFDevID.IsNull() {
extnetListReq.VNFDevID = uint64(plan.VNFDevID.ValueInt64())
}
if !plan.OVSBridge.IsNull() {
extnetListReq.OVSBridge = plan.OVSBridge.ValueString()
}
if !plan.Status.IsNull() {
extnetListReq.Status = plan.Status.ValueString()
}