You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3321 lines
80 KiB
3321 lines
80 KiB
package vins
|
|
|
|
import (
|
|
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
|
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
|
|
)
|
|
|
|
func dataSourceVinsSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "vins id",
|
|
},
|
|
"reason": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "reason for action",
|
|
},
|
|
"vnf_dev": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "vnf dev",
|
|
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,
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"capabilities": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "capabilities",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeString,
|
|
},
|
|
},
|
|
"config": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "config",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"mgmt": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"ip_addr": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip address",
|
|
},
|
|
"password": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "password",
|
|
},
|
|
"ssh_key": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ssh key",
|
|
},
|
|
"user": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "user",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"resources": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"cpu": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "cpu",
|
|
},
|
|
"ram": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "ram",
|
|
},
|
|
"stack_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "stack id",
|
|
},
|
|
"uuid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "uuid",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"config_saved": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "is config saved",
|
|
},
|
|
"custom_precfg": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "custom pre config",
|
|
},
|
|
"description": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "description",
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "id",
|
|
},
|
|
"interfaces": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "interfaces",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"conn_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "connection id",
|
|
},
|
|
"conn_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "connection type",
|
|
},
|
|
"def_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "default gw",
|
|
},
|
|
"enabled": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "enabled",
|
|
},
|
|
"flipgroup_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "flipgroup id",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"ip_address": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip address",
|
|
},
|
|
"listen_ssh": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "listen ssh",
|
|
},
|
|
"mac": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "mac",
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "name",
|
|
},
|
|
"net_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net id",
|
|
},
|
|
"net_mask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"net_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "net type",
|
|
},
|
|
"node_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"pci_slot": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "pci slot",
|
|
},
|
|
"qos": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "qos",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"e_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"in_burst": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"in_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"target": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "target",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
"vnfs": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "vnfs",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "lock status",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "name",
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "tech status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
"vins": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "vins",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "account name",
|
|
},
|
|
"created_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "created by",
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "created time",
|
|
},
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "default gw",
|
|
},
|
|
"default_qos": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "default qoa",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"e_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"in_burst": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"in_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"deleted_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "deleted by",
|
|
},
|
|
"deleted_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "deleted time",
|
|
},
|
|
"description": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "description",
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "lock status",
|
|
},
|
|
"manager_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "manager id",
|
|
},
|
|
"manager_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "manager type",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "name",
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"network": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "network",
|
|
},
|
|
"pre_reservations_num": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "pre reservations num",
|
|
},
|
|
"redundant": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "redundant",
|
|
},
|
|
"rg_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "resource group id",
|
|
},
|
|
"rg_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "resource group name",
|
|
},
|
|
"sec_vnf_dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"updated_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "updated by",
|
|
},
|
|
"updated_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "updated time",
|
|
},
|
|
"user_managed": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "user managed",
|
|
},
|
|
"vnfs": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "vnfs",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dhcp": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "dhcp",
|
|
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,
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"config": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "config",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "default gw",
|
|
},
|
|
"dns": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "list of dns",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeString,
|
|
},
|
|
},
|
|
"ip_end": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip end",
|
|
},
|
|
"ip_start": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip start",
|
|
},
|
|
"lease": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "lease",
|
|
},
|
|
"net_mask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"network": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "network",
|
|
},
|
|
"reservations": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "reservations",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"client_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "client type",
|
|
},
|
|
"description": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "description",
|
|
},
|
|
"domain_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "domain name",
|
|
},
|
|
"host_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "host name",
|
|
},
|
|
"ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip",
|
|
},
|
|
"mac": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "mac",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
"vm_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "vm id",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "created time",
|
|
},
|
|
"devices": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "devices list",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"primary": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"iface01": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"iface02": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "id",
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "lock status",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"owner_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "owner id",
|
|
},
|
|
"owner_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "owner type",
|
|
},
|
|
"pure_virtual": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "prune virtual",
|
|
},
|
|
"routes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "compute ids",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "route id",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "destination",
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "gateway",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "tech status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"gw": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "gw",
|
|
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,
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"config": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "config",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "default gw",
|
|
},
|
|
"ext_net_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "extnet id",
|
|
},
|
|
"ext_net_ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "extnet ip",
|
|
},
|
|
"ext_netmask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "extnet mask",
|
|
},
|
|
"qos": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "qos",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"e_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"in_burst": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"in_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "created time",
|
|
},
|
|
"devices": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "devices list",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"primary": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"iface01": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"iface02": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "id",
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "losk status",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"owner_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "owner id",
|
|
},
|
|
"owner_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "owner type",
|
|
},
|
|
"pure_virtual": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "pure virtual",
|
|
},
|
|
"routes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "routes",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "tech status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"nat": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "nat",
|
|
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,
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"config": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "config",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"net_mask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"network": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "network",
|
|
},
|
|
"rules": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "nat rules",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"rule_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "nat rule id",
|
|
},
|
|
"local_ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "local ip",
|
|
},
|
|
"local_port": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "local port",
|
|
},
|
|
"protocol": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "protocol",
|
|
},
|
|
"public_port_end": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "public port end",
|
|
},
|
|
"public_port_start": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "public port start",
|
|
},
|
|
"vm_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "vm id",
|
|
},
|
|
"vm_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "vm name",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "created time",
|
|
},
|
|
"devices": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "devices list",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"primary": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"iface01": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"iface02": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "id",
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "lock status",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"owner_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "owner id",
|
|
},
|
|
"owner_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "owner type",
|
|
},
|
|
"pure_virtual": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "pure virtual",
|
|
},
|
|
"routes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "routes",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "tech status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"vxlan_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "vxlan id",
|
|
},
|
|
}
|
|
|
|
return rets
|
|
}
|
|
|
|
func dataSourceVinsListSchemaMake() map[string]*schema.Schema {
|
|
res := map[string]*schema.Schema{
|
|
"by_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Find by id",
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Name",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Find by account id",
|
|
},
|
|
"rg_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Find by rg id",
|
|
},
|
|
"ext_ip": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Find by ext ip",
|
|
},
|
|
"vnfdev_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "find by VNF Device id",
|
|
},
|
|
"include_deleted": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "include deleted computes",
|
|
},
|
|
"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{
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"created_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"default_qos": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"e_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"in_burst": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"in_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"deleted_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"deleted_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"description": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"external_ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"extnet_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"free_ips": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"manager_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"manager_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"network": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"pre_reservations_num": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"pri_vnf_dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"redundant": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
},
|
|
"rg_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"rg_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"sec_vnf_dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"updated_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"updated_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"user_managed": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
},
|
|
"vnfs": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dhcp": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"dns": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"fw": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"gw": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"nat": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"vpn": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"vxlan_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "entry count",
|
|
},
|
|
}
|
|
return res
|
|
}
|
|
|
|
func dataSourceVinsListDeletedSchemaMake() map[string]*schema.Schema {
|
|
res := map[string]*schema.Schema{
|
|
"by_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Filter by ID",
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Filter by name",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Filter by account ID",
|
|
},
|
|
"rg_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Description: "Filter by resgroup ID",
|
|
},
|
|
"ext_ip": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "Filter by external IP",
|
|
},
|
|
"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{
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"created_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"default_qos": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"e_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"in_burst": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"in_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"deleted_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"deleted_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"description": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"external_ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"manager_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"manager_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"network": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"pre_reservations_num": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"pri_vnf_dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"redundant": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
},
|
|
"rg_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"rg_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"sec_vnf_dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"updated_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"updated_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"user_managed": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
},
|
|
"vnfs": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dhcp": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"dns": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"fw": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"gw": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"nat": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"vpn": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"vxlan_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return res
|
|
}
|
|
|
|
func DataSourceVinsAuditsSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Unique ID of the ViNS. If ViNS ID is specified, then ViNS name, rg_id and account_id are ignored.",
|
|
},
|
|
"items": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"call": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"response_time": {
|
|
Type: schema.TypeFloat,
|
|
Computed: true,
|
|
},
|
|
"status_code": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"time_stamp": {
|
|
Type: schema.TypeFloat,
|
|
Computed: true,
|
|
},
|
|
"user": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
return rets
|
|
}
|
|
|
|
func DataSourceVinsExtNetListchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Unique ID of the ViNS. If ViNS ID is specified, then ViNS name, rg_id and account_id are ignored.",
|
|
},
|
|
"items": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"ext_net_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"prefix_len": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return rets
|
|
}
|
|
|
|
func DataSourceVinsIpListSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Unique ID of the ViNS",
|
|
},
|
|
"items": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"client_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"domain_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"host_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"mac": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"vm_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return rets
|
|
}
|
|
|
|
func DataSourceVinsNatRuleListSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Unique ID of the ViNS. If ViNS ID is specified, then ViNS name, rg_id and account_id are ignored.",
|
|
},
|
|
"reason": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Description: "reason for action",
|
|
},
|
|
"items": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"local_ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"local_port": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"protocol": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"public_port_end": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"public_port_start": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"vm_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"vm_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return rets
|
|
}
|
|
|
|
func dataSourceStaticRouteListSchemaMake() map[string]*schema.Schema {
|
|
res := map[string]*schema.Schema{
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "ID of VINS",
|
|
},
|
|
"items": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"entry_count": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return res
|
|
}
|
|
|
|
func resourceVinsSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
// parameters from CreateInAccount
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
Description: "name",
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Computed: true,
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Computed: true,
|
|
},
|
|
"ipcidr": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
},
|
|
"description": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Default: "",
|
|
Description: "Optional user-defined text description of this ViNS.",
|
|
},
|
|
"pre_reservations_num": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Default: 32,
|
|
},
|
|
"routes": {
|
|
Type: schema.TypeList,
|
|
Optional: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"reason": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
},
|
|
|
|
// Additional parameters from CreateInRG
|
|
"rg_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Optional: true,
|
|
},
|
|
"ext_net_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Default: -1,
|
|
},
|
|
"ext_ip": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
Default: "",
|
|
},
|
|
|
|
// Enable, delete parameters
|
|
"enable": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: true,
|
|
Description: "enable for enable/disable requests",
|
|
},
|
|
"force": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "force for delete request",
|
|
},
|
|
"permanently": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "permanently for delete request",
|
|
},
|
|
|
|
// IP release, IP reserve parameters
|
|
"ip": {
|
|
Type: schema.TypeList,
|
|
Optional: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
ValidateFunc: validation.StringInSlice([]string{"DHCP", "VIP", "EXCLUDE"}, false),
|
|
},
|
|
"ip_addr": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
},
|
|
"mac": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
},
|
|
"compute_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
},
|
|
"reason": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
// NAT rule add parameters
|
|
"nat_rule": {
|
|
Type: schema.TypeList,
|
|
Optional: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"int_ip": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
},
|
|
"int_port": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Computed: true,
|
|
},
|
|
"ext_port_start": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
},
|
|
"ext_port_end": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Computed: true,
|
|
},
|
|
"proto": {
|
|
Type: schema.TypeString,
|
|
Optional: true,
|
|
ValidateFunc: validation.StringInSlice([]string{"tcp", "udp"}, false),
|
|
Computed: true,
|
|
},
|
|
"rule_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
// vnf dev start, stop, restart, reset, redeploy parameters
|
|
"vnfdev_start": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
Description: "true to start vnfdev, false to stop vnfdev",
|
|
},
|
|
"vnfdev_reset": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
},
|
|
"vnfdev_restart": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
},
|
|
"vnfdev_redeploy": {
|
|
Type: schema.TypeBool,
|
|
Optional: true,
|
|
Default: false,
|
|
},
|
|
|
|
// default_qos
|
|
"default_qos": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Optional: true,
|
|
Description: "default qoa",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"e_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Optional: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"in_burst": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Optional: true,
|
|
},
|
|
"in_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Optional: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"dns": {
|
|
Type: schema.TypeSet,
|
|
Optional: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeString,
|
|
},
|
|
},
|
|
|
|
// other resource fields
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Optional: true,
|
|
Computed: true,
|
|
Description: "vins id",
|
|
},
|
|
"vnf_dev": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "vnf dev",
|
|
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,
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"capabilities": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "capabilities",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeString,
|
|
},
|
|
},
|
|
"config": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "config",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"mgmt": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"ip_addr": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip address",
|
|
},
|
|
"password": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "password",
|
|
},
|
|
"ssh_key": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ssh key",
|
|
},
|
|
"user": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "user",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"resources": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"cpu": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "cpu",
|
|
},
|
|
"ram": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "ram",
|
|
},
|
|
"stack_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "stack id",
|
|
},
|
|
"uuid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "uuid",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"config_saved": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "is config saved",
|
|
},
|
|
"custom_precfg": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "custom pre config",
|
|
},
|
|
"description": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "description",
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "id",
|
|
},
|
|
"interfaces": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "interfaces",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"conn_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "connection id",
|
|
},
|
|
"conn_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "connection type",
|
|
},
|
|
"def_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "default gw",
|
|
},
|
|
"enabled": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "enabled",
|
|
},
|
|
"flipgroup_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "flipgroup id",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"ip_address": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip address",
|
|
},
|
|
"listen_ssh": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "listen ssh",
|
|
},
|
|
"mac": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "mac",
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "name",
|
|
},
|
|
"net_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net id",
|
|
},
|
|
"net_mask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"net_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "net type",
|
|
},
|
|
"node_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"pci_slot": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "pci slot",
|
|
},
|
|
"qos": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "qos",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"e_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"in_burst": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"in_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"target": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "target",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
"vnfs": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "vnfs",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "lock status",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "name",
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "tech status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
"vins": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "vins",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"account_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "account name",
|
|
},
|
|
"created_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "created by",
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "created time",
|
|
},
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "default gw",
|
|
},
|
|
"deleted_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "deleted by",
|
|
},
|
|
"deleted_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "deleted time",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "lock status",
|
|
},
|
|
"manager_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "manager id",
|
|
},
|
|
"manager_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "manager type",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"network": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "network",
|
|
},
|
|
"redundant": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "redundant",
|
|
},
|
|
"rg_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "resource group name",
|
|
},
|
|
"sec_vnf_dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"updated_by": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "updated by",
|
|
},
|
|
"updated_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "updated time",
|
|
},
|
|
"user_managed": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "user managed",
|
|
},
|
|
"vnfs": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "vnfs",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dhcp": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "dhcp",
|
|
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,
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"config": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "config",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "default gw",
|
|
},
|
|
"dns": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "list of dns",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeString,
|
|
},
|
|
},
|
|
"ip_end": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip end",
|
|
},
|
|
"ip_start": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip start",
|
|
},
|
|
"lease": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "lease",
|
|
},
|
|
"net_mask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"network": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "network",
|
|
},
|
|
"reservations": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "reservations",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"client_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "client type",
|
|
},
|
|
"description": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "description",
|
|
},
|
|
"domain_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "domain name",
|
|
},
|
|
"host_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "host name",
|
|
},
|
|
"ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "ip",
|
|
},
|
|
"mac": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "mac",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
"vm_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "vm id",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "created time",
|
|
},
|
|
"devices": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "devices list",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"primary": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"iface01": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"iface02": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "id",
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "lock status",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"owner_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "owner id",
|
|
},
|
|
"owner_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "owner type",
|
|
},
|
|
"pure_virtual": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "prune virtual",
|
|
},
|
|
"routes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "compute ids",
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "route id",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "destination",
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "gateway",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "tech status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"gw": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "gw",
|
|
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,
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"config": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "config",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"default_gw": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "default gw",
|
|
},
|
|
"ext_net_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "extnet id",
|
|
},
|
|
"ext_net_ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "extnet ip",
|
|
},
|
|
"ext_netmask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "extnet mask",
|
|
},
|
|
"qos": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "qos",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"e_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"in_burst": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"in_rate": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "created time",
|
|
},
|
|
"devices": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "devices list",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"primary": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"iface01": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"iface02": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "id",
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "losk status",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"owner_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "owner id",
|
|
},
|
|
"owner_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "owner type",
|
|
},
|
|
"pure_virtual": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "pure virtual",
|
|
},
|
|
"routes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "routes",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "tech status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"nat": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "nat",
|
|
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,
|
|
},
|
|
},
|
|
"account_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "account id",
|
|
},
|
|
"config": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "config",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"net_mask": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "net mask",
|
|
},
|
|
"network": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "network",
|
|
},
|
|
"rules": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "nat rules",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"rule_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "nat rule id",
|
|
},
|
|
"local_ip": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "local ip",
|
|
},
|
|
"local_port": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "local port",
|
|
},
|
|
"protocol": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "protocol",
|
|
},
|
|
"public_port_end": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "public port end",
|
|
},
|
|
"public_port_start": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "public port start",
|
|
},
|
|
"vm_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "vm id",
|
|
},
|
|
"vm_name": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "vm name",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"created_time": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "created time",
|
|
},
|
|
"devices": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "devices list",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"primary": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"dev_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"iface01": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"iface02": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"gid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "gid",
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "guid",
|
|
},
|
|
"id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "id",
|
|
},
|
|
"lock_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "lock status",
|
|
},
|
|
"milestones": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "milestones",
|
|
},
|
|
"owner_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "owner id",
|
|
},
|
|
"owner_type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "owner type",
|
|
},
|
|
"pure_virtual": {
|
|
Type: schema.TypeBool,
|
|
Computed: true,
|
|
Description: "pure virtual",
|
|
},
|
|
"routes": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Description: "routes",
|
|
Elem: &schema.Resource{
|
|
Schema: map[string]*schema.Schema{
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "status",
|
|
},
|
|
"tech_status": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "tech status",
|
|
},
|
|
"type": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
Description: "type",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"vxlan_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "vxlan id",
|
|
},
|
|
}
|
|
|
|
return rets
|
|
}
|
|
|
|
func dataSourceStaticRouteSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Unique ID of the ViNS",
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Unique ID of the static route",
|
|
},
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
}
|
|
return rets
|
|
}
|
|
|
|
func resourceStaticRouteSchemaMake() map[string]*schema.Schema {
|
|
rets := map[string]*schema.Schema{
|
|
"destination": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
},
|
|
"gateway": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
},
|
|
"netmask": {
|
|
Type: schema.TypeString,
|
|
Required: true,
|
|
},
|
|
"vins_id": {
|
|
Type: schema.TypeInt,
|
|
Required: true,
|
|
Description: "Unique ID of the ViNS",
|
|
},
|
|
|
|
"guid": {
|
|
Type: schema.TypeString,
|
|
Computed: true,
|
|
},
|
|
"route_id": {
|
|
Type: schema.TypeInt,
|
|
Computed: true,
|
|
Description: "Unique ID of the static route",
|
|
},
|
|
"compute_ids": {
|
|
Type: schema.TypeList,
|
|
Computed: true,
|
|
Optional: true,
|
|
Elem: &schema.Schema{
|
|
Type: schema.TypeInt,
|
|
},
|
|
},
|
|
}
|
|
|
|
return rets
|
|
}
|