parent
040af43607
commit
36879efd58
@ -1,5 +1,33 @@
|
||||
## Version 4.6.4
|
||||
## Version 4.7.0
|
||||
|
||||
### Bugfix
|
||||
- Fix bug that network reconnects to the compute if the weight field was not specified
|
||||
### Feature
|
||||
- Added decort_dpdknet and decort_dpdknet_list data sources in cloudapi/dpdknet and cloudbroker/dpdknet
|
||||
- Added decort_dpdknet resource in cloudbroker/dpdknet
|
||||
- Added decort_audit data source in cloudapi/audit
|
||||
- Added decort_cb_audits_export_to_file data source in cloudbroker/audit
|
||||
- Added field uniq_pools in decort_resgroup resource in cloudapi/rg which can be used when updating resource
|
||||
- Added feature that allows to remove def_net in decort_resgroup(cloudapi/rg) and decort_cb_rg(cloudbroker/rg)
|
||||
- Added the delete_async_mode field in resources "decort_snapshot" and "kvmvm"
|
||||
- Added field guid in decort_cb_user_get_audit data source in cloudbroker/user
|
||||
- Added the pci_devices field in resources cloudbroker/kvmvm, cloudapi/kvmvm, datasources cloudbroker/kvmvm, cloudapi/kvmvm
|
||||
- Added field enabled in dataSourceImageListSchema in cloudapi/image and cloudbroker/image
|
||||
- Added fields mtu and libvirt_settings in vnfInterfaceSchema in cloudapi/vins and cloudbroker/vins
|
||||
- Added libvirt_settings filed in resources "decort_cb_kvmvm", "decort_kvmvm", datasources "decort_cb_kvmvm", "decort_cb_kvmvm_list", "decort_kvmvm", "decort_kvmvm_list"
|
||||
- Added field enabled in dataSourceImageListSchema in cloudapi/image and cloudbroker/image
|
||||
- Added fields meta and ckey in "decort_cb_grid" in cloudbroker/grid
|
||||
- Added field bus_number in data sources "decort_vins", "decort_cb_vins" and resources "decort_vins", "decort_cb_vins" in cloudapi/vins, cloudbroker/vins
|
||||
- Change drivers field from required to optional in resourceCDROMImageSchema in cloudbroker/image
|
||||
- Added chipset, bus_number fileds in resources "decort_cb_kvmvm", "decort_kvmvm", datasources "decort_cb_kvmvm", "decort_cb_kvmvm_list", "decort_kvmvm", "decort_kvmvm_list"
|
||||
- Added stack_id, image_id fileds in decort_cb_kvmvm_list
|
||||
- Added chipset field in "decort_k8s", "decort_k8s_wg", "decort_cb_k8s_cp", "decort_cb_k8s_wg"
|
||||
- Change drivers field from required to optional in decort_image_from_platform_disk and decort_cb_image_from_platform_disk
|
||||
- Change client_ids field from []int to []string in decort_flipgroup_list
|
||||
- Added feature to change IP network without stopping compute in resources "decort_cb_kvmvm", "decort_kvmvm" in cloudapi/kvmvm, cloudbroker/kvmvm
|
||||
|
||||
### Removed
|
||||
- Remove apitask field in dataSourceAuditSchema in cloudbroker/audit
|
||||
- The ability to interact with kvmppc has been removed
|
||||
- Remove permanently field in resourceImageSchema, resourceVirtualImageSchema, resourceImageFromBlankComputeSchema, resourceImageFromPlatformDiskSchema in cloudapi/image and cloudbroker/image
|
||||
- Remove recursive_delete field in resource decort_cb_account in cloudbroker/account and cloudapi/account
|
||||
- The reason field has been deleted everywhere
|
||||
- Remove permanently field in resourceCDROMImageSchema in cloudbroker/image
|
||||
|
@ -0,0 +1,48 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_audit Data Source - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_audit (Data Source)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `audit_guid` (String) audit guid
|
||||
|
||||
### Optional
|
||||
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `args` (String)
|
||||
- `call` (String)
|
||||
- `guid` (String)
|
||||
- `id` (String) The ID of this resource.
|
||||
- `kwargs` (String)
|
||||
- `remote_addr` (String)
|
||||
- `responsetime` (Number)
|
||||
- `result` (String)
|
||||
- `status_code` (Number)
|
||||
- `tags` (String)
|
||||
- `timestamp` (Number)
|
||||
- `timestamp_end` (Number)
|
||||
- `user` (String)
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `default` (String)
|
||||
- `read` (String)
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_cb_audits_export_to_file Data Source - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_cb_audits_export_to_file (Data Source)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Optional
|
||||
|
||||
- `file_path` (String) file path
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `id` (String) The ID of this resource.
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `default` (String)
|
||||
- `read` (String)
|
@ -0,0 +1,48 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_cb_dpdknet Data Source - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_cb_dpdknet (Data Source)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `dpdk_id` (Number) The unique ID of the subscriber-owner of the DPDK network
|
||||
|
||||
### Optional
|
||||
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `account_access` (List of Number) List of accounts with access
|
||||
- `compute_ids` (List of Number) Compute IDs which uses this DPDK network
|
||||
- `created_time` (Number) Created time
|
||||
- `desc` (String) Description of DPDK network
|
||||
- `gid` (Number) ID of the grid (platform)
|
||||
- `guid` (Number) DPDK network ID on the storage side
|
||||
- `id` (String) The ID of this resource.
|
||||
- `name` (String) Name of network
|
||||
- `ovs_bridge` (String) OVS bridge in which interfaces for computers created
|
||||
- `rg_access` (List of Number) List of resource groups with access
|
||||
- `status` (String) DPDK network status
|
||||
- `updated_time` (Number) Updated time
|
||||
- `vlan_id` (Number) vlan ID
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `default` (String)
|
||||
- `read` (String)
|
@ -0,0 +1,63 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_cb_dpdknet_list Data Source - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_cb_dpdknet_list (Data Source)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Optional
|
||||
|
||||
- `by_id` (Number) Find by ID
|
||||
- `compute_ids` (List of Number) Find by compute IDs
|
||||
- `desc` (String) Find by description
|
||||
- `gid` (Number) Find by GID
|
||||
- `name` (String) Find by name
|
||||
- `page` (Number) Page number
|
||||
- `size` (Number) Page size
|
||||
- `sort_by` (String) sort by one of supported fields, format +|-(field)
|
||||
- `status` (String) Find by status
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `entry_count` (Number)
|
||||
- `id` (String) The ID of this resource.
|
||||
- `items` (List of Object) (see [below for nested schema](#nestedatt--items))
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `default` (String)
|
||||
- `read` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--items"></a>
|
||||
### Nested Schema for `items`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `account_access` (List of Number)
|
||||
- `compute_ids` (List of Number)
|
||||
- `created_time` (Number)
|
||||
- `desc` (String)
|
||||
- `dpdk_id` (Number)
|
||||
- `gid` (Number)
|
||||
- `guid` (Number)
|
||||
- `name` (String)
|
||||
- `ovs_bridge` (String)
|
||||
- `rg_access` (List of Number)
|
||||
- `status` (String)
|
||||
- `updated_time` (Number)
|
||||
- `vlan_id` (Number)
|
@ -0,0 +1,114 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_cb_grid_get_settings Data Source - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_cb_grid_get_settings (Data Source)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `grid_id` (Number) grid (platform) ID
|
||||
|
||||
### Optional
|
||||
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `allowed_ports` (List of Number)
|
||||
- `cleanup_retention_period` (Number)
|
||||
- `docker_registry` (List of Object) (see [below for nested schema](#nestedatt--docker_registry))
|
||||
- `enable_uptime_monitor` (Boolean)
|
||||
- `extnet_max_pre_reservations_num` (Number)
|
||||
- `healthcheck_notifications` (List of Object) (see [below for nested schema](#nestedatt--healthcheck_notifications))
|
||||
- `id` (String) The ID of this resource.
|
||||
- `k8s_cleanup_enabled` (Boolean)
|
||||
- `limits` (String)
|
||||
- `location_url` (String)
|
||||
- `net_qos` (List of Object) (see [below for nested schema](#nestedatt--net_qos))
|
||||
- `networks` (String)
|
||||
- `prometheus` (List of Object) (see [below for nested schema](#nestedatt--prometheus))
|
||||
- `vins_max_pre_reservations_num` (Number)
|
||||
- `vnfdev_mgmt_net_range` (String)
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `default` (String)
|
||||
- `read` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--docker_registry"></a>
|
||||
### Nested Schema for `docker_registry`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `password` (String)
|
||||
- `server` (String)
|
||||
- `username` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--healthcheck_notifications"></a>
|
||||
### Nested Schema for `healthcheck_notifications`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `emails` (List of Object) (see [below for nested schema](#nestedobjatt--healthcheck_notifications--emails))
|
||||
|
||||
<a id="nestedobjatt--healthcheck_notifications--emails"></a>
|
||||
### Nested Schema for `healthcheck_notifications.emails`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `address` (String)
|
||||
- `enabled` (Boolean)
|
||||
|
||||
|
||||
|
||||
<a id="nestedatt--net_qos"></a>
|
||||
### Nested Schema for `net_qos`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `extnet` (List of Object) (see [below for nested schema](#nestedobjatt--net_qos--extnet))
|
||||
- `vins` (List of Object) (see [below for nested schema](#nestedobjatt--net_qos--vins))
|
||||
|
||||
<a id="nestedobjatt--net_qos--extnet"></a>
|
||||
### Nested Schema for `net_qos.extnet`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `e_rate` (Number)
|
||||
- `in_burst` (Number)
|
||||
- `in_rate` (Number)
|
||||
|
||||
|
||||
<a id="nestedobjatt--net_qos--vins"></a>
|
||||
### Nested Schema for `net_qos.vins`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `e_rate` (Number)
|
||||
- `in_burst` (Number)
|
||||
- `in_rate` (Number)
|
||||
|
||||
|
||||
|
||||
<a id="nestedatt--prometheus"></a>
|
||||
### Nested Schema for `prometheus`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `scrape_interval` (Number)
|
@ -0,0 +1,48 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_dpdknet Data Source - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_dpdknet (Data Source)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `dpdk_id` (Number) The unique ID of the subscriber-owner of the DPDK network
|
||||
|
||||
### Optional
|
||||
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `account_access` (List of Number) List of accounts with access
|
||||
- `compute_ids` (List of Number) Compute IDs which uses this DPDK network
|
||||
- `created_time` (Number) Created time
|
||||
- `desc` (String) Description of DPDK network
|
||||
- `gid` (Number) ID of the grid (platform)
|
||||
- `guid` (Number) DPDK network ID on the storage side
|
||||
- `id` (String) The ID of this resource.
|
||||
- `name` (String) Name of network
|
||||
- `ovs_bridge` (String) OVS bridge in which interfaces for computers created
|
||||
- `rg_access` (List of Number) List of resource groups with access
|
||||
- `status` (String) DPDK network status
|
||||
- `updated_time` (Number) Updated time
|
||||
- `vlan_id` (Number) vlan ID
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `default` (String)
|
||||
- `read` (String)
|
@ -0,0 +1,63 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_dpdknet_list Data Source - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_dpdknet_list (Data Source)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Optional
|
||||
|
||||
- `by_id` (Number) Find by ID
|
||||
- `compute_ids` (List of Number) Find by compute IDs
|
||||
- `desc` (String) Find by description
|
||||
- `gid` (Number) Find by GID
|
||||
- `name` (String) Find by name
|
||||
- `page` (Number) Page number
|
||||
- `size` (Number) Page size
|
||||
- `sort_by` (String) sort by one of supported fields, format +|-(field)
|
||||
- `status` (String) Find by status
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `entry_count` (Number)
|
||||
- `id` (String) The ID of this resource.
|
||||
- `items` (List of Object) (see [below for nested schema](#nestedatt--items))
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `default` (String)
|
||||
- `read` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--items"></a>
|
||||
### Nested Schema for `items`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `account_access` (List of Number)
|
||||
- `compute_ids` (List of Number)
|
||||
- `created_time` (Number)
|
||||
- `desc` (String)
|
||||
- `dpdk_id` (Number)
|
||||
- `gid` (Number)
|
||||
- `guid` (Number)
|
||||
- `name` (String)
|
||||
- `ovs_bridge` (String)
|
||||
- `rg_access` (List of Number)
|
||||
- `status` (String)
|
||||
- `updated_time` (Number)
|
||||
- `vlan_id` (Number)
|
@ -1,148 +0,0 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_cb_disk_replication Resource - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_cb_disk_replication (Resource)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `disk_id` (Number) Id of primary disk
|
||||
- `disk_name` (String) Name of disk replica
|
||||
- `pool_name` (String) Pool for disk location
|
||||
- `sep_id` (Number) Storage endpoint provider ID to create disk replica
|
||||
|
||||
### Optional
|
||||
|
||||
- `detach` (Boolean) Detach disk from machine first
|
||||
- `pause` (Boolean) Resume replication
|
||||
- `permanently` (Boolean) Delete disk permanently
|
||||
- `reason` (String) Reason for disk deletion
|
||||
- `reverse` (Boolean) Reverse replication
|
||||
- `start` (Boolean) Start/Stop replication
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `account_id` (Number)
|
||||
- `account_name` (String)
|
||||
- `acl` (String)
|
||||
- `boot_partition` (Number)
|
||||
- `computes` (List of Object) (see [below for nested schema](#nestedatt--computes))
|
||||
- `created_time` (Number)
|
||||
- `deleted_time` (Number)
|
||||
- `desc` (String)
|
||||
- `destruction_time` (Number)
|
||||
- `devicename` (String)
|
||||
- `disk_path` (String)
|
||||
- `gid` (Number)
|
||||
- `guid` (Number)
|
||||
- `id` (String) The ID of this resource.
|
||||
- `image_id` (Number)
|
||||
- `images` (List of Number)
|
||||
- `iotune` (List of Object) (see [below for nested schema](#nestedatt--iotune))
|
||||
- `iqn` (String)
|
||||
- `login` (String)
|
||||
- `milestones` (Number)
|
||||
- `order` (Number)
|
||||
- `params` (String)
|
||||
- `parent_id` (Number)
|
||||
- `passwd` (String)
|
||||
- `pci_slot` (Number)
|
||||
- `present_to` (List of Number)
|
||||
- `purge_attempts` (Number)
|
||||
- `purge_time` (Number)
|
||||
- `reality_device_number` (Number)
|
||||
- `reference_id` (String)
|
||||
- `replica_disk_id` (Number) Id of replica disk
|
||||
- `replication` (List of Object) Replication status (see [below for nested schema](#nestedatt--replication))
|
||||
- `res_id` (String)
|
||||
- `res_name` (String)
|
||||
- `role` (String)
|
||||
- `sep_type` (String)
|
||||
- `shareable` (Boolean)
|
||||
- `size_max` (Number)
|
||||
- `size_used` (Number)
|
||||
- `snapshots` (List of Object) (see [below for nested schema](#nestedatt--snapshots))
|
||||
- `status` (String)
|
||||
- `status_replication` (String) Status of replication
|
||||
- `tech_status` (String)
|
||||
- `type` (String)
|
||||
- `vmid` (Number)
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `create` (String)
|
||||
- `default` (String)
|
||||
- `delete` (String)
|
||||
- `read` (String)
|
||||
- `update` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--computes"></a>
|
||||
### Nested Schema for `computes`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `compute_id` (String)
|
||||
- `compute_name` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--iotune"></a>
|
||||
### Nested Schema for `iotune`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `read_bytes_sec` (Number)
|
||||
- `read_bytes_sec_max` (Number)
|
||||
- `read_iops_sec` (Number)
|
||||
- `read_iops_sec_max` (Number)
|
||||
- `size_iops_sec` (Number)
|
||||
- `total_bytes_sec` (Number)
|
||||
- `total_bytes_sec_max` (Number)
|
||||
- `total_iops_sec` (Number)
|
||||
- `total_iops_sec_max` (Number)
|
||||
- `write_bytes_sec` (Number)
|
||||
- `write_bytes_sec_max` (Number)
|
||||
- `write_iops_sec` (Number)
|
||||
- `write_iops_sec_max` (Number)
|
||||
|
||||
|
||||
<a id="nestedatt--replication"></a>
|
||||
### Nested Schema for `replication`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `disk_id` (Number)
|
||||
- `pool_id` (String)
|
||||
- `role` (String)
|
||||
- `self_volume_id` (String)
|
||||
- `storage_id` (String)
|
||||
- `volume_id` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--snapshots"></a>
|
||||
### Nested Schema for `snapshots`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `guid` (String)
|
||||
- `label` (String)
|
||||
- `reference_id` (String)
|
||||
- `res_id` (String)
|
||||
- `snap_set_guid` (String)
|
||||
- `snap_set_time` (Number)
|
||||
- `timestamp` (Number)
|
@ -0,0 +1,52 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_cb_dpdknet Resource - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_cb_dpdknet (Resource)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `gid` (Number) ID of the grid (platform)
|
||||
- `name` (String) Name of network
|
||||
- `ovs_bridge` (String) OVS bridge in which interfaces for computers created
|
||||
- `vlan_id` (Number) vlan ID
|
||||
|
||||
### Optional
|
||||
|
||||
- `account_access` (List of Number) List of accounts with access
|
||||
- `desc` (String) Description of DPDK network
|
||||
- `enabled` (Boolean) Enabled or disabled DPDK network
|
||||
- `rg_access` (List of Number) List of resource groups with access
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `compute_ids` (List of Number) Compute IDs which uses this DPDK network
|
||||
- `created_time` (Number) Created time
|
||||
- `dpdk_id` (Number) The unique ID of the subscriber-owner of the DPDK network
|
||||
- `guid` (Number) DPDK network ID on the storage side
|
||||
- `id` (String) The ID of this resource.
|
||||
- `status` (String) DPDK network status
|
||||
- `updated_time` (Number) Updated time
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `create` (String)
|
||||
- `default` (String)
|
||||
- `delete` (String)
|
||||
- `read` (String)
|
||||
- `update` (String)
|
@ -1,137 +0,0 @@
|
||||
---
|
||||
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||
page_title: "decort_disk_replication Resource - terraform-provider-decort"
|
||||
subcategory: ""
|
||||
description: |-
|
||||
|
||||
---
|
||||
|
||||
# decort_disk_replication (Resource)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- schema generated by tfplugindocs -->
|
||||
## Schema
|
||||
|
||||
### Required
|
||||
|
||||
- `disk_id` (Number) Id of primary disk
|
||||
- `disk_name` (String) Name of disk replica
|
||||
- `pool_name` (String) Pool for disk location
|
||||
- `sep_id` (Number) Storage endpoint provider ID to create disk replica
|
||||
|
||||
### Optional
|
||||
|
||||
- `detach` (Boolean) Detach disk from machine first
|
||||
- `pause` (Boolean) Resume replication
|
||||
- `permanently` (Boolean) Delete disk permanently
|
||||
- `reason` (String) Reason for disk deletion
|
||||
- `reverse` (Boolean) Reverse replication
|
||||
- `start` (Boolean) Start/Stop replication
|
||||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
|
||||
|
||||
### Read-Only
|
||||
|
||||
- `account_id` (Number) The unique ID of the subscriber-owner of the disk
|
||||
- `account_name` (String) The name of the subscriber '(account') to whom this disk belongs
|
||||
- `acl` (String)
|
||||
- `computes` (List of Object) (see [below for nested schema](#nestedatt--computes))
|
||||
- `created_time` (Number) Created time
|
||||
- `deleted_time` (Number) Deleted time
|
||||
- `desc` (String) Description of disk
|
||||
- `destruction_time` (Number) Time of final deletion
|
||||
- `devicename` (String) Name of the device
|
||||
- `gid` (Number) ID of the grid (platform)
|
||||
- `id` (String) The ID of this resource.
|
||||
- `image_id` (Number) Image ID
|
||||
- `images` (List of String) IDs of images using the disk
|
||||
- `iotune` (List of Object) (see [below for nested schema](#nestedatt--iotune))
|
||||
- `order` (Number) Disk order
|
||||
- `params` (String) Disk params
|
||||
- `parent_id` (Number) ID of the parent disk
|
||||
- `pci_slot` (Number) ID of the pci slot to which the disk is connected
|
||||
- `present_to` (List of Number)
|
||||
- `purge_time` (Number) Time of the last deletion attempt
|
||||
- `replica_disk_id` (Number) Id of replica disk
|
||||
- `replication` (List of Object) Replication status (see [below for nested schema](#nestedatt--replication))
|
||||
- `res_id` (String) Resource ID
|
||||
- `res_name` (String) Name of the resource
|
||||
- `role` (String) Disk role
|
||||
- `sep_type` (String) Type SEP. Defines the type of storage system and contains one of the values set in the cloud platform
|
||||
- `shareable` (Boolean)
|
||||
- `size_max` (Number) Size in GB
|
||||
- `size_used` (Number) Number of used space, in GB
|
||||
- `snapshots` (List of Object) (see [below for nested schema](#nestedatt--snapshots))
|
||||
- `status` (String) Disk status
|
||||
- `status_replication` (String) Status of replication
|
||||
- `tech_status` (String) Technical status of the disk
|
||||
- `type` (String) The type of disk in terms of its role in compute: 'B=Boot, D=Data, T=Temp'
|
||||
- `vmid` (Number) Virtual Machine ID (Deprecated)
|
||||
|
||||
<a id="nestedblock--timeouts"></a>
|
||||
### Nested Schema for `timeouts`
|
||||
|
||||
Optional:
|
||||
|
||||
- `create` (String)
|
||||
- `default` (String)
|
||||
- `delete` (String)
|
||||
- `read` (String)
|
||||
- `update` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--computes"></a>
|
||||
### Nested Schema for `computes`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `compute_id` (String)
|
||||
- `compute_name` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--iotune"></a>
|
||||
### Nested Schema for `iotune`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `read_bytes_sec` (Number)
|
||||
- `read_bytes_sec_max` (Number)
|
||||
- `read_iops_sec` (Number)
|
||||
- `read_iops_sec_max` (Number)
|
||||
- `size_iops_sec` (Number)
|
||||
- `total_bytes_sec` (Number)
|
||||
- `total_bytes_sec_max` (Number)
|
||||
- `total_iops_sec` (Number)
|
||||
- `total_iops_sec_max` (Number)
|
||||
- `write_bytes_sec` (Number)
|
||||
- `write_bytes_sec_max` (Number)
|
||||
- `write_iops_sec` (Number)
|
||||
- `write_iops_sec_max` (Number)
|
||||
|
||||
|
||||
<a id="nestedatt--replication"></a>
|
||||
### Nested Schema for `replication`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `disk_id` (Number)
|
||||
- `pool_id` (String)
|
||||
- `role` (String)
|
||||
- `self_volume_id` (String)
|
||||
- `storage_id` (String)
|
||||
- `volume_id` (String)
|
||||
|
||||
|
||||
<a id="nestedatt--snapshots"></a>
|
||||
### Nested Schema for `snapshots`
|
||||
|
||||
Read-Only:
|
||||
|
||||
- `guid` (String)
|
||||
- `label` (String)
|
||||
- `res_id` (String)
|
||||
- `snap_set_guid` (String)
|
||||
- `snap_set_time` (Number)
|
||||
- `timestamp` (Number)
|
@ -0,0 +1,128 @@
|
||||
/*
|
||||
Copyright (c) 2019-2023 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Sergey Kisil, <svkisil@digitalenergy.online>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package audit
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/constants"
|
||||
)
|
||||
|
||||
func dataSourceAuditRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
|
||||
auditRec, err := utilityAuditCheckPresence(ctx, d, m)
|
||||
if err != nil {
|
||||
d.SetId("") // ensure ID is empty in this case
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
flattenAudit(d, auditRec)
|
||||
d.SetId(d.Get("audit_guid").(string))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func DataSourceAudit() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
SchemaVersion: 1,
|
||||
|
||||
ReadContext: dataSourceAuditRead,
|
||||
|
||||
Timeouts: &schema.ResourceTimeout{
|
||||
Read: &constants.Timeout30s,
|
||||
Default: &constants.Timeout60s,
|
||||
},
|
||||
|
||||
Schema: dataSourceAuditSchemaMake(),
|
||||
}
|
||||
}
|
||||
|
||||
func dataSourceAuditSchemaMake() map[string]*schema.Schema {
|
||||
return map[string]*schema.Schema{
|
||||
"audit_guid": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "audit guid",
|
||||
},
|
||||
|
||||
"args": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"call": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"guid": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"kwargs": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"remote_addr": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"responsetime": {
|
||||
Type: schema.TypeFloat,
|
||||
Computed: true,
|
||||
},
|
||||
"result": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"status_code": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
"tags": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp": {
|
||||
Type: schema.TypeFloat,
|
||||
Computed: true,
|
||||
},
|
||||
"timestamp_end": {
|
||||
Type: schema.TypeFloat,
|
||||
Computed: true,
|
||||
},
|
||||
"user": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright (c) 2019-2023 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Sergey Kisil, <svkisil@digitalenergy.online>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package audit
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/audit"
|
||||
)
|
||||
|
||||
func flattenAudit(d *schema.ResourceData, au *audit.RecordAudit) {
|
||||
log.Debugf("flattenAudit: decoded audit guid %s", d.Get("audit_guid").(string))
|
||||
|
||||
d.Set("args", au.Arguments)
|
||||
d.Set("call", au.Call)
|
||||
d.Set("guid", au.GUID)
|
||||
d.Set("kwargs", au.Kwargs)
|
||||
d.Set("remote_addr", au.RemoteAddr)
|
||||
d.Set("responsetime", au.ResponseTime)
|
||||
d.Set("result", au.Result)
|
||||
d.Set("status_code", au.StatusCode)
|
||||
d.Set("tags", au.Tags)
|
||||
d.Set("timestamp", au.Timestamp)
|
||||
d.Set("timestamp_end", au.TimestampEnd)
|
||||
d.Set("user", au.User)
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright (c) 2019-2023 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Sergey Kisil, <svkisil@digitalenergy.online>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package audit
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/audit"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/controller"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func utilityAuditCheckPresence(ctx context.Context, d *schema.ResourceData, m interface{}) (*audit.RecordAudit, error) {
|
||||
c := m.(*controller.ControllerCfg)
|
||||
req := audit.GetRequest{}
|
||||
|
||||
if d.Id() != "" {
|
||||
req.AuditGuid = d.Id()
|
||||
} else {
|
||||
req.AuditGuid = d.Get("audit_guid").(string)
|
||||
}
|
||||
|
||||
log.Debugf("utilityStackCheckPresence: load audit")
|
||||
auditInfo, err := c.CloudAPI().Audit().Get(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return auditInfo, nil
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
/*
|
||||
Copyright (c) 2019-2022 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Kasim Baybikov, <kmbaybikov@basistech.ru>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package dpdknet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/constants"
|
||||
)
|
||||
|
||||
func dataSourceDPDKNetRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
|
||||
dpdk, err := utilityDPDKNetCheckPresence(ctx, d, m)
|
||||
if err != nil {
|
||||
d.SetId("")
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
id := uuid.New()
|
||||
d.SetId(id.String())
|
||||
|
||||
flattenDPDKNet(d, dpdk)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func dataSourceDPDKNetSchemaMake() map[string]*schema.Schema {
|
||||
res := map[string]*schema.Schema{
|
||||
"dpdk_id": {
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
Description: "The unique ID of the subscriber-owner of the DPDK network",
|
||||
},
|
||||
"account_access": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
},
|
||||
Description: "List of accounts with access",
|
||||
},
|
||||
"created_time": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "Created time",
|
||||
},
|
||||
"desc": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "Description of DPDK network",
|
||||
},
|
||||
"gid": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "ID of the grid (platform)",
|
||||
},
|
||||
"guid": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "DPDK network ID on the storage side",
|
||||
},
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "Name of network",
|
||||
},
|
||||
"rg_access": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
},
|
||||
Description: "List of resource groups with access",
|
||||
},
|
||||
"status": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "DPDK network status",
|
||||
},
|
||||
"ovs_bridge": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "OVS bridge in which interfaces for computers created",
|
||||
},
|
||||
"vlan_id": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "vlan ID",
|
||||
},
|
||||
"compute_ids": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
},
|
||||
Description: "Compute IDs which uses this DPDK network",
|
||||
},
|
||||
"updated_time": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "Updated time",
|
||||
},
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
func DataSourceDPDKNet() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
SchemaVersion: 1,
|
||||
|
||||
ReadContext: dataSourceDPDKNetRead,
|
||||
|
||||
Timeouts: &schema.ResourceTimeout{
|
||||
Read: &constants.Timeout30s,
|
||||
Default: &constants.Timeout60s,
|
||||
},
|
||||
|
||||
Schema: dataSourceDPDKNetSchemaMake(),
|
||||
}
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
/*
|
||||
Copyright (c) 2019-2022 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Kasim Baybikov, <kmbaybikov@basistech.ru>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package dpdknet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/constants"
|
||||
)
|
||||
|
||||
func dataSourceDPDKNetListRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
|
||||
dpdkList, err := utilityDPDKNetListCheckPresence(ctx, d, m)
|
||||
if err != nil {
|
||||
d.SetId("")
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
id := uuid.New()
|
||||
d.SetId(id.String())
|
||||
d.Set("items", flattenDPDKNetList(dpdkList))
|
||||
d.Set("entry_count", dpdkList.EntryCount)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func dataSourceDPDKNetListSchemaMake() map[string]*schema.Schema {
|
||||
res := map[string]*schema.Schema{
|
||||
"by_id": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Description: "Find by ID",
|
||||
},
|
||||
"gid": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Description: "Find by GID",
|
||||
},
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: "Find by name",
|
||||
},
|
||||
"desc": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: "Find by description",
|
||||
},
|
||||
"status": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: "Find by status",
|
||||
},
|
||||
"compute_ids": {
|
||||
Type: schema.TypeList,
|
||||
Optional: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
},
|
||||
Description: "Find by compute IDs",
|
||||
},
|
||||
"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{
|
||||
"dpdk_id": {
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
Description: "The unique ID of the subscriber-owner of the DPDK network",
|
||||
},
|
||||
"account_access": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
},
|
||||
Description: "List of accounts with access",
|
||||
},
|
||||
"created_time": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "Created time",
|
||||
},
|
||||
"desc": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "Description of DPDK network",
|
||||
},
|
||||
"gid": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "ID of the grid (platform)",
|
||||
},
|
||||
"guid": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "DPDK network ID on the storage side",
|
||||
},
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "Name of network",
|
||||
},
|
||||
"rg_access": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
},
|
||||
Description: "List of resource groups with access",
|
||||
},
|
||||
"status": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "DPDK network status",
|
||||
},
|
||||
"ovs_bridge": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "OVS bridge in which interfaces for computers created",
|
||||
},
|
||||
"vlan_id": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "vlan ID",
|
||||
},
|
||||
"compute_ids": {
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
},
|
||||
Description: "Compute IDs which uses this DPDK network",
|
||||
},
|
||||
"updated_time": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "Updated time",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"entry_count": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func DataSourceDPDKNetList() *schema.Resource {
|
||||
return &schema.Resource{
|
||||
SchemaVersion: 1,
|
||||
|
||||
ReadContext: dataSourceDPDKNetListRead,
|
||||
|
||||
Timeouts: &schema.ResourceTimeout{
|
||||
Read: &constants.Timeout30s,
|
||||
Default: &constants.Timeout60s,
|
||||
},
|
||||
|
||||
Schema: dataSourceDPDKNetListSchemaMake(),
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package dpdknet
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
dpdk "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/dpdknet"
|
||||
)
|
||||
|
||||
func flattenDPDKNet(d *schema.ResourceData, dpdk *dpdk.RecordDPDKNet) {
|
||||
d.Set("dpdk_id", dpdk.ID)
|
||||
d.Set("account_access", dpdk.AccountAccess)
|
||||
d.Set("created_time", dpdk.CreatedTime)
|
||||
d.Set("desc", dpdk.Description)
|
||||
d.Set("gid", dpdk.GID)
|
||||
d.Set("guid", dpdk.GUID)
|
||||
d.Set("name", dpdk.Name)
|
||||
d.Set("rg_access", dpdk.RGAccess)
|
||||
d.Set("status", dpdk.Status)
|
||||
d.Set("ovs_bridge", dpdk.OVSBridge)
|
||||
d.Set("vlan_id", dpdk.VlanID)
|
||||
d.Set("compute_ids", dpdk.ComputeIDs)
|
||||
d.Set("updated_time", dpdk.UpdatedTime)
|
||||
}
|
||||
|
||||
func flattenDPDKNetList(list *dpdk.ListDPDKNet) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0, len(list.Data))
|
||||
for _, dpdk := range list.Data {
|
||||
temp := map[string]interface{}{
|
||||
"dpdk_id": dpdk.ID,
|
||||
"account_access": dpdk.AccountAccess,
|
||||
"desc": dpdk.Description,
|
||||
"gid": dpdk.GID,
|
||||
"guid": dpdk.GUID,
|
||||
"name": dpdk.Name,
|
||||
"rg_access": dpdk.RGAccess,
|
||||
"status": dpdk.Status,
|
||||
"ovs_bridge": dpdk.OVSBridge,
|
||||
"vlan_id": dpdk.VlanID,
|
||||
"compute_ids": dpdk.ComputeIDs,
|
||||
"updated_time": dpdk.UpdatedTime,
|
||||
}
|
||||
res = append(res, temp)
|
||||
}
|
||||
return res
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
/*
|
||||
Copyright (c) 2019-2022 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Kasim Baybikov, <kmbaybikov@basistech.ru>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package dpdknet
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
log "github.com/sirupsen/logrus"
|
||||
dpdk "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/dpdknet"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/controller"
|
||||
)
|
||||
|
||||
func utilityDPDKNetCheckPresence(ctx context.Context, d *schema.ResourceData, m interface{}) (*dpdk.RecordDPDKNet, error) {
|
||||
c := m.(*controller.ControllerCfg)
|
||||
req := dpdk.GetRequest{}
|
||||
|
||||
if d.Get("dpdk_id") != nil {
|
||||
if d.Get("dpdk_id").(int) == 0 {
|
||||
id, _ := strconv.ParseUint(d.Id(), 10, 64)
|
||||
req.DPDKID = id
|
||||
} else {
|
||||
req.DPDKID = uint64(d.Get("dpdk_id").(int))
|
||||
}
|
||||
} else {
|
||||
id, _ := strconv.ParseUint(d.Id(), 10, 64)
|
||||
req.DPDKID = id
|
||||
}
|
||||
|
||||
log.Debugf("utilityDPDKCheckPresence: get DPDK network")
|
||||
dpdk, err := c.CloudAPI().DPDKNet().Get(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return dpdk, nil
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright (c) 2019-2022 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Kasim Baybikov, <kmbaybikov@basistech.ru>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package dpdknet
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
dpdk "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/dpdknet"
|
||||
"repository.basistech.ru/BASIS/terraform-provider-decort/internal/controller"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func utilityDPDKNetListCheckPresence(ctx context.Context, d *schema.ResourceData, m interface{}) (*dpdk.ListDPDKNet, error) {
|
||||
c := m.(*controller.ControllerCfg)
|
||||
req := dpdk.ListRequest{}
|
||||
|
||||
if byID, ok := d.GetOk("by_id"); ok {
|
||||
req.ByID = uint64(byID.(int))
|
||||
}
|
||||
if GID, ok := d.GetOk("gid"); ok {
|
||||
req.GID = uint64(GID.(int))
|
||||
}
|
||||
if name, ok := d.GetOk("name"); ok {
|
||||
req.Name = name.(string)
|
||||
}
|
||||
if desc, ok := d.GetOk("description"); ok {
|
||||
req.Description = desc.(string)
|
||||
}
|
||||
if status, ok := d.GetOk("status"); ok {
|
||||
req.Status = status.(string)
|
||||
}
|
||||
if computeIDs, ok := d.GetOk("compute_ids"); ok {
|
||||
IDs := computeIDs.([]interface{})
|
||||
for _, ID := range IDs {
|
||||
req.ComputeIDs = append(req.ComputeIDs, uint64(ID.(int)))
|
||||
}
|
||||
}
|
||||
if sortBy, ok := d.GetOk("sort_by"); ok {
|
||||
req.SortBy = sortBy.(string)
|
||||
}
|
||||
if page, ok := d.GetOk("page"); ok {
|
||||
req.Page = uint64(page.(int))
|
||||
}
|
||||
if size, ok := d.GetOk("size"); ok {
|
||||
req.Size = uint64(size.(int))
|
||||
}
|
||||
|
||||
log.Debugf("utilityDPDKListCheckPresence: load DPDK network list")
|
||||
dpdkList, err := c.CloudAPI().DPDKNet().List(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return dpdkList, nil
|
||||
}
|
@ -1,67 +1,60 @@
|
||||
/*
|
||||
Copyright (c) 2019-2022 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Kasim Baybikov, <kmbaybikov@basistech.ru>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package image
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func resourceImageVirtualSchemaMake(sch map[string]*schema.Schema) map[string]*schema.Schema {
|
||||
delete(sch, "show_all")
|
||||
sch["name"] = &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "Name of the rescue disk",
|
||||
}
|
||||
|
||||
sch["link_to"] = &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
Description: "ID of real image to link this virtual image to upon creation",
|
||||
}
|
||||
|
||||
sch["permanently"] = &schema.Schema{
|
||||
Type: schema.TypeBool,
|
||||
Optional: true,
|
||||
Default: false,
|
||||
Description: "whether to completely delete the image",
|
||||
}
|
||||
|
||||
sch["image_id"] = &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "Image id",
|
||||
}
|
||||
|
||||
return sch
|
||||
}
|
||||
/*
|
||||
Copyright (c) 2019-2022 Digital Energy Cloud Solutions LLC. All Rights Reserved.
|
||||
Authors:
|
||||
Petr Krutov, <petr.krutov@digitalenergy.online>
|
||||
Stanislav Solovev, <spsolovev@digitalenergy.online>
|
||||
Kasim Baybikov, <kmbaybikov@basistech.ru>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
Terraform DECORT provider - manage resources provided by DECORT (Digital Energy Cloud
|
||||
Orchestration Technology) with Terraform by Hashicorp.
|
||||
|
||||
Source code: https://repository.basistech.ru/BASIS/terraform-provider-decort
|
||||
|
||||
Please see README.md to learn where to place source code so that it
|
||||
builds seamlessly.
|
||||
|
||||
Documentation: https://repository.basistech.ru/BASIS/terraform-provider-decort/wiki
|
||||
*/
|
||||
|
||||
package image
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
)
|
||||
|
||||
func resourceImageVirtualSchemaMake(sch map[string]*schema.Schema) map[string]*schema.Schema {
|
||||
delete(sch, "show_all")
|
||||
sch["name"] = &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Description: "Name of the rescue disk",
|
||||
}
|
||||
|
||||
sch["link_to"] = &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Required: true,
|
||||
Description: "ID of real image to link this virtual image to upon creation",
|
||||
}
|
||||
|
||||
sch["image_id"] = &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
Description: "Image id",
|
||||
}
|
||||
|
||||
return sch
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue