package node import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" func dataSourceNodeSchemaMake() map[string]*schema.Schema { return map[string]*schema.Schema{ "node_id": { Type: schema.TypeInt, Required: true, Description: "node id", }, "consumption": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "consumed": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ram": { Type: schema.TypeInt, Computed: true, }, "computes": { Type: schema.TypeInt, Computed: true, }, "routers": { Type: schema.TypeInt, Computed: true, }, "vcpu": { Type: schema.TypeInt, Computed: true, }, }, }, }, "free": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ram": { Type: schema.TypeInt, Computed: true, }, }, }, }, "reserved": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ram": { Type: schema.TypeInt, Computed: true, }, }, }, }, "total": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ram": { Type: schema.TypeInt, Computed: true, }, }, }, }, "hostname": { Type: schema.TypeString, Computed: true, }, }, }, }, "cpu_info": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "clock_speed": { Type: schema.TypeInt, Computed: true, }, "core_count": { Type: schema.TypeInt, Computed: true, }, "phys_count": { Type: schema.TypeInt, Computed: true, }, }, }, }, "cpu_allocation_ratio": { Type: schema.TypeInt, Computed: true, }, "gid": { Type: schema.TypeInt, Computed: true, }, "ipaddr": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "isolated_cpus": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "name": { Type: schema.TypeString, Computed: true, }, "need_reboot": { Type: schema.TypeBool, Computed: true, }, "nic_info": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "driver": { Type: schema.TypeString, Computed: true, }, "max_vfs": { Type: schema.TypeInt, Computed: true, }, "numa_node": { Type: schema.TypeInt, Computed: true, }, "num_vfs": { Type: schema.TypeInt, Computed: true, }, "os_name": { Type: schema.TypeString, Computed: true, }, "pci_slot": { Type: schema.TypeString, Computed: true, }, "vf_list": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "fn_id": { Type: schema.TypeInt, Computed: true, }, "pci_slot": { Type: schema.TypeString, Computed: true, }, }, }, }, }, }, }, "numa_topology": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "node_num": { Type: schema.TypeInt, Computed: true, }, "nodes": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu_list": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, "memory": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "one_g": { Type: schema.TypeInt, Computed: true, }, "two_m": { Type: schema.TypeInt, Computed: true, }, "total": { Type: schema.TypeInt, Computed: true, }, }, }, }, }, }, }, }, }, }, "reserved_cpus": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "roles": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "sriov_enabled": { Type: schema.TypeBool, Computed: true, }, "stack_id": { Type: schema.TypeInt, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "version": { Type: schema.TypeString, Computed: true, }, } } func dataSourceNodeListSchemaMake() map[string]*schema.Schema { return map[string]*schema.Schema{ "by_id": { Type: schema.TypeInt, Optional: true, Description: "find node by id", }, "name": { Type: schema.TypeString, Optional: true, Description: "find node by name", }, "version": { Type: schema.TypeString, Optional: true, Description: "find node by version", }, "release": { Type: schema.TypeString, Optional: true, Description: "find node by release", }, "sep_id": { Type: schema.TypeInt, Optional: true, Description: "find node by sepId", }, "role": { Type: schema.TypeString, Optional: true, Description: "find node by role", }, "status": { Type: schema.TypeString, Optional: true, Description: "find node by status", }, "sort_by": { Type: schema.TypeString, Optional: true, Description: "sort by one of supported fields, format +|-(field)", }, "page": { Type: schema.TypeInt, Optional: true, Description: "page number", }, "size": { Type: schema.TypeInt, Optional: true, Description: "page size", }, "items": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "additional_pkgs": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "cpu_info": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "clock_speed": { Type: schema.TypeFloat, Computed: true, }, "core_count": { Type: schema.TypeInt, Computed: true, }, "phys_count": { Type: schema.TypeInt, Computed: true, }, }, }, }, "description": { Type: schema.TypeString, Computed: true, }, "gid": { Type: schema.TypeInt, Computed: true, }, "guid": { Type: schema.TypeString, Computed: true, }, "hostkey": { Type: schema.TypeString, Computed: true, }, "node_id": { Type: schema.TypeInt, Computed: true, }, "ipaddr": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "isolated_cpus": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "lastcheck": { Type: schema.TypeInt, Computed: true, }, "machine_guid": { Type: schema.TypeString, Computed: true, }, "mainboard_sn": { Type: schema.TypeString, Computed: true, }, "memory": { Type: schema.TypeInt, Computed: true, }, "milestones": { Type: schema.TypeInt, Computed: true, }, "model": { Type: schema.TypeString, Computed: true, }, "name": { Type: schema.TypeString, Computed: true, }, "need_reboot": { Type: schema.TypeBool, Computed: true, }, "net_addr": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cidr": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "index": { Type: schema.TypeInt, Computed: true, }, "ip": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "mac": { Type: schema.TypeString, Computed: true, }, "mtu": { Type: schema.TypeInt, Computed: true, }, "name": { Type: schema.TypeString, Computed: true, }, }, }, }, "network_mode": { Type: schema.TypeString, Computed: true, }, "nic_info": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "driver": { Type: schema.TypeString, Computed: true, }, "max_vfs": { Type: schema.TypeInt, Computed: true, }, "numa_node": { Type: schema.TypeInt, Computed: true, }, "num_vfs": { Type: schema.TypeInt, Computed: true, }, "os_name": { Type: schema.TypeString, Computed: true, }, "pci_slot": { Type: schema.TypeString, Computed: true, }, "vf_list": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "fn_id": { Type: schema.TypeInt, Computed: true, }, "pci_slot": { Type: schema.TypeString, Computed: true, }, }, }, }, }, }, }, "node_uuid": { Type: schema.TypeString, Computed: true, }, "numa_topology": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "node_num": { Type: schema.TypeInt, Computed: true, }, "nodes": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cpu_list": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, "memory": { Type: schema.TypeList, Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "one_g": { Type: schema.TypeInt, Computed: true, }, "two_m": { Type: schema.TypeInt, Computed: true, }, "total": { Type: schema.TypeInt, Computed: true, }, }, }, }, }, }, }, }, }, }, "peer_backup": { Type: schema.TypeInt, Computed: true, }, "peer_log": { Type: schema.TypeInt, Computed: true, }, "peer_stats": { Type: schema.TypeInt, Computed: true, }, "pgpus": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, "public_keys": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "release": { Type: schema.TypeString, Computed: true, }, "reserved_cpus": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "roles": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "seps": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeInt, }, }, "serial_num": { Type: schema.TypeString, Computed: true, }, "sriov_enabled": { Type: schema.TypeBool, Computed: true, }, "stack_id": { Type: schema.TypeInt, Computed: true, }, "status": { Type: schema.TypeString, Computed: true, }, "tags": { Type: schema.TypeList, Computed: true, Elem: &schema.Schema{ Type: schema.TypeString, }, }, "type": { Type: schema.TypeString, Computed: true, }, "version": { Type: schema.TypeString, Computed: true, }, }, }, }, "entry_count": { Type: schema.TypeInt, Computed: true, Description: "entry count", }, } }