1.0.0
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/attr"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type DataSourceExtNetModel struct {
|
||||
// request fields
|
||||
NetID types.Int64 `tfsdk:"net_id"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
CKey types.String `tfsdk:"ckey"`
|
||||
Meta types.List `tfsdk:"meta"`
|
||||
CheckIPs types.List `tfsdk:"check_ips"`
|
||||
Default types.Bool `tfsdk:"default"`
|
||||
DefaultQOS *QOSModel `tfsdk:"default_qos"`
|
||||
Description types.String `tfsdk:"desc"`
|
||||
DNS types.List `tfsdk:"dns"`
|
||||
Excluded []ExcludedModel `tfsdk:"excluded"`
|
||||
FreeIPs types.Int64 `tfsdk:"free_ips"`
|
||||
Gateway types.String `tfsdk:"gateway"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
IPCIDR types.String `tfsdk:"ipcidr"`
|
||||
Milestones types.Int64 `tfsdk:"milestones"`
|
||||
NetName types.String `tfsdk:"net_name"`
|
||||
Network types.String `tfsdk:"network"`
|
||||
NetworkID types.Int64 `tfsdk:"network_id"`
|
||||
PreReservationsNum types.Int64 `tfsdk:"pre_reservations_num"`
|
||||
Prefix types.Int64 `tfsdk:"prefix"`
|
||||
PriVNFDevID types.Int64 `tfsdk:"pri_vnf_dev_id"`
|
||||
Reservations []ItemReservationModel `tfsdk:"reservations"`
|
||||
SharedWith types.List `tfsdk:"shared_with"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
VLANID types.Int64 `tfsdk:"vlan_id"`
|
||||
VNFs *VNFsModel `tfsdk:"vnfs"`
|
||||
}
|
||||
|
||||
type VNFsModel struct {
|
||||
DHCP types.Int64 `tfsdk:"dhcp"`
|
||||
}
|
||||
|
||||
type ExcludedModel struct {
|
||||
ClientType types.String `tfsdk:"client_type"`
|
||||
DomainName types.String `tfsdk:"domainname"`
|
||||
HostName types.String `tfsdk:"hostname"`
|
||||
IP types.String `tfsdk:"ip"`
|
||||
MAC types.String `tfsdk:"mac"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VMID types.Int64 `tfsdk:"vm_id"`
|
||||
}
|
||||
|
||||
type QOSModel struct {
|
||||
EBurst types.Int64 `tfsdk:"e_burst"`
|
||||
ERate types.Int64 `tfsdk:"e_rate"`
|
||||
GUID types.String `tfsdk:"guid"`
|
||||
InBurst types.Int64 `tfsdk:"in_burst"`
|
||||
InRate types.Int64 `tfsdk:"in_rate"`
|
||||
}
|
||||
|
||||
type ItemReservationModel struct {
|
||||
ClientType types.String `tfsdk:"client_type"`
|
||||
Description types.String `tfsdk:"desc"`
|
||||
DomainName types.String `tfsdk:"domainname"`
|
||||
Hostname types.String `tfsdk:"hostname"`
|
||||
IP types.String `tfsdk:"ip"`
|
||||
MAC types.String `tfsdk:"mac"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
VMID types.Int64 `tfsdk:"vm_id"`
|
||||
}
|
||||
|
||||
var ItemExcluded = map[string]attr.Type{
|
||||
"client_type": types.StringType,
|
||||
"mac": types.StringType,
|
||||
"ip": types.StringType,
|
||||
"type": types.StringType,
|
||||
"vm_id": types.Int64Type,
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type DataSourceExtNetComputesListModel struct {
|
||||
// required fields
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
|
||||
// optional fields
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
ComputeID types.Int64 `tfsdk:"compute_id"`
|
||||
Page types.Int64 `tfsdk:"page"`
|
||||
Size types.Int64 `tfsdk:"size"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
SortBy types.String `tfsdk:"sort_by"`
|
||||
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemComputeModel `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type ItemComputeModel struct {
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
AccountName types.String `tfsdk:"account_name"`
|
||||
ExtNets []ItemComputeExtNetModel `tfsdk:"extnets"`
|
||||
ID types.Int64 `tfsdk:"id"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
RGID types.Int64 `tfsdk:"rg_id"`
|
||||
RGName types.String `tfsdk:"rg_name"`
|
||||
}
|
||||
|
||||
type ItemComputeExtNetModel struct {
|
||||
NetId types.Int64 `tfsdk:"net_id"`
|
||||
IpAddr types.String `tfsdk:"ipaddr"`
|
||||
IPCIDR types.String `tfsdk:"ipcidr"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type DataSourceExtNetDefaultModel struct {
|
||||
// request fields
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
NetId types.Int64 `tfsdk:"net_id"`
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type DataSourceExtNetListModel struct {
|
||||
// optional fields
|
||||
AccountID types.Int64 `tfsdk:"account_id"`
|
||||
ByID types.Int64 `tfsdk:"by_id"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
Network types.String `tfsdk:"network"`
|
||||
VLANID types.Int64 `tfsdk:"vlan_id"`
|
||||
VNFDevID types.Int64 `tfsdk:"vnfdev_id"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Page types.Int64 `tfsdk:"page"`
|
||||
Size types.Int64 `tfsdk:"size"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
SortBy types.String `tfsdk:"sort_by"`
|
||||
|
||||
// response fields
|
||||
Id types.String `tfsdk:"id"`
|
||||
Items []ItemExtNetModel `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type ItemExtNetModel struct {
|
||||
ID types.Int64 `tfsdk:"net_id"`
|
||||
IPCIDR types.String `tfsdk:"ipcidr"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
}
|
||||
Reference in New Issue
Block a user