1.0.0
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type InfoStackModel struct {
|
||||
//required and optional fields
|
||||
StackID types.Int64 `tfsdk:"stack_id"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
|
||||
//computed fields
|
||||
Ckey types.String `tfsdk:"ckey"`
|
||||
Meta types.List `tfsdk:"meta"`
|
||||
APIURL types.String `tfsdk:"api_url"`
|
||||
Apikey types.String `tfsdk:"api_key"`
|
||||
AppID types.String `tfsdk:"app_id"`
|
||||
CPUAllocationRatio types.Float64 `tfsdk:"cpu_allocation_ratio"`
|
||||
Description types.String `tfsdk:"description"`
|
||||
Descr types.String `tfsdk:"descr"`
|
||||
Drivers types.List `tfsdk:"drivers"`
|
||||
Eco types.String `tfsdk:"eco"`
|
||||
Error types.Int64 `tfsdk:"error"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
Images types.List `tfsdk:"images"`
|
||||
Login types.String `tfsdk:"login"`
|
||||
MemAllocationRatio types.Float64 `tfsdk:"mem_allocation_ratio"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
Packages *PackagesModel `tfsdk:"packages"`
|
||||
Password types.String `tfsdk:"passwd"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
}
|
||||
|
||||
type PackagesModel struct {
|
||||
LibvirtBin *LibvirtBinModel `tfsdk:"libvirt_bin"`
|
||||
LibvirtDaemon *LibvirtDaemonModel `tfsdk:"libvirt_daemon"`
|
||||
Lvm2Lockd *Lvm2LockdModel `tfsdk:"lvm2_lockd"`
|
||||
OpenvswitchCommon *OpenvswitchCommonModel `tfsdk:"openvswitch_common"`
|
||||
OpenvswitchSwitch *OpenvswitchSwitchModel `tfsdk:"openvswitch_switch"`
|
||||
QemuSystemX86 *QemuSystemX86Model `tfsdk:"qemu_system_x86"`
|
||||
Sanlock *SanlockModel `tfsdk:"sanlock"`
|
||||
}
|
||||
|
||||
type LibvirtBinModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type LibvirtDaemonModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type Lvm2LockdModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type OpenvswitchCommonModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type OpenvswitchSwitchModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type QemuSystemX86Model struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type SanlockModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
|
||||
"github.com/hashicorp/terraform-plugin-framework/types"
|
||||
)
|
||||
|
||||
type DataSourceStackListModel struct {
|
||||
// optional fields
|
||||
ByID types.Int64 `tfsdk:"by_id"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
SortBy types.String `tfsdk:"sort_by"`
|
||||
Page types.Int64 `tfsdk:"page"`
|
||||
Size types.Int64 `tfsdk:"size"`
|
||||
Timeouts timeouts.Value `tfsdk:"timeouts"`
|
||||
|
||||
// response fields
|
||||
Items []InfoStackListModel `tfsdk:"items"`
|
||||
EntryCount types.Int64 `tfsdk:"entry_count"`
|
||||
}
|
||||
|
||||
type InfoStackListModel struct {
|
||||
StackID types.Int64 `tfsdk:"stack_id"`
|
||||
Ckey types.String `tfsdk:"ckey"`
|
||||
Meta types.List `tfsdk:"meta"`
|
||||
APIURL types.String `tfsdk:"api_url"`
|
||||
Apikey types.String `tfsdk:"api_key"`
|
||||
AppID types.String `tfsdk:"app_id"`
|
||||
CPUAllocationRatio types.Float64 `tfsdk:"cpu_allocation_ratio"`
|
||||
Description types.String `tfsdk:"description"`
|
||||
Descr types.String `tfsdk:"descr"`
|
||||
Drivers types.List `tfsdk:"drivers"`
|
||||
Eco types.String `tfsdk:"eco"`
|
||||
Error types.Int64 `tfsdk:"error"`
|
||||
GID types.Int64 `tfsdk:"gid"`
|
||||
GUID types.Int64 `tfsdk:"guid"`
|
||||
Images types.List `tfsdk:"images"`
|
||||
Login types.String `tfsdk:"login"`
|
||||
MemAllocationRatio types.Float64 `tfsdk:"mem_allocation_ratio"`
|
||||
Name types.String `tfsdk:"name"`
|
||||
Packages *PackagesStackListModel `tfsdk:"packages"`
|
||||
Password types.String `tfsdk:"passwd"`
|
||||
ReferenceID types.String `tfsdk:"reference_id"`
|
||||
Status types.String `tfsdk:"status"`
|
||||
Type types.String `tfsdk:"type"`
|
||||
}
|
||||
|
||||
type PackagesStackListModel struct {
|
||||
LibvirtBin *LibvirtBinStackListModel `tfsdk:"libvirt_bin"`
|
||||
LibvirtDaemon *LibvirtDaemonStackListModel `tfsdk:"libvirt_daemon"`
|
||||
Lvm2Lockd *Lvm2LockdStackListModel `tfsdk:"lvm2_lockd"`
|
||||
OpenvswitchCommon *OpenvswitchCommonStackListModel `tfsdk:"openvswitch_common"`
|
||||
OpenvswitchSwitch *OpenvswitchSwitchStackListModel `tfsdk:"openvswitch_switch"`
|
||||
QemuSystemX86 *QemuSystemX86StackListModel `tfsdk:"qemu_system_x86"`
|
||||
Sanlock *SanlockStackListModel `tfsdk:"sanlock"`
|
||||
}
|
||||
|
||||
type LibvirtBinStackListModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type LibvirtDaemonStackListModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type Lvm2LockdStackListModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type OpenvswitchCommonStackListModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type OpenvswitchSwitchStackListModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type QemuSystemX86StackListModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
|
||||
type SanlockStackListModel struct {
|
||||
InstalledSize types.String `tfsdk:"installed_size"`
|
||||
Ver types.String `tfsdk:"ver"`
|
||||
}
|
||||
Reference in New Issue
Block a user