Skip to content

Commit

Permalink
Resolve conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjun666 committed Sep 9, 2024
2 parents 2250243 + ee3acac commit 5192ff8
Show file tree
Hide file tree
Showing 15 changed files with 604 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ FEATURES:
* **New Data Source:** `netapp-ontap_security_roles` ([#139](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/139))
* **New Data Source:** `netapp-ontap_security_login_message` ([#17](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/17))
* **New Data Source:** `netapp-ontap_security_login_messages` ([#17](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/17))
<<<<<<< HEAD
* **New Data Source:** `netapp-ontap_storage_qtree` ([#83](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/83))
* **New Data Source:** `netapp-ontap_storage_qtrees` ([#83](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/83))
=======
* **New Data Source:** `netapp-ontap_volume_efficiency_policy` ([#81](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/81))
* **New Data Source:** `netapp-ontap_volume_efficiency_policies` ([#81](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/81))
>>>>>>> ee3acac96bccfcf7ea3af5066c81436f2856ddde
* **New Resource:** `netapp-ontap_volume_efficiency_policies` ([#80](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/80))
* **New Resource:** `netapp-ontap_quota_rules` ([#136](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/136))
* **New Resource:** `netapp-ontap_volumes_files` ([#5](https://github.com/NetApp/terraform-provider-netapp-ontap/issues/5))
Expand Down
82 changes: 82 additions & 0 deletions docs/data-sources/storage_volume_efficiency_policies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netapp-ontap_volume_efficiency_policies Data Source - terraform-provider-netapp-ontap"
subcategory: "Storage"
description: |-
VolumeEfficiencyPolicies data source
---

# netapp-ontap_volume_efficiency_policies (Data Source)

VolumeEfficiencyPolicies data source

## Example Usage

```terraform
data "netapp-ontap_volume_efficiency_policies" "volume_efficiency_policies" {
# required to know which system to interface with
cx_profile_name = "cluster1"
filter = {
svm = "terraform"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `cx_profile_name` (String) Connection profile name

### Optional

- `filter` (Attributes) (see [below for nested schema](#nestedatt--filter))

### Read-Only

- `volume_efficiency_policies` (Attributes List) (see [below for nested schema](#nestedatt--volume_efficiency_policies))

<a id="nestedatt--filter"></a>
### Nested Schema for `filter`

Optional:

- `name` (String) VolumeEfficiencyPolicy name
- `svm_name` (String) VolumeEfficiencyPolicy svm name


<a id="nestedatt--volume_efficiency_policies"></a>
### Nested Schema for `volume_efficiency_policies`

Required:

- `cx_profile_name` (String) Connection profile name
- `name` (String) VolumeEfficiencyPolicy name
- `svm` (Attributes) SVM details for StorageVolumeEfficiencyPolicies (see [below for nested schema](#nestedatt--volume_efficiency_policies--svm))

Read-Only:

- `comment` (String) StorageVolumeEfficiencyPolicies duration
- `duration` (Number) StorageVolumeEfficiencyPolicies duration
- `enabled` (Boolean) StorageVolumeEfficiencyPolicies duration
- `id` (String) StorageVolumeEfficiencyPolicies UUID
- `qos_policy` (String) StorageVolumeEfficiencyPolicies duration
- `schedule` (Attributes) schedule details for StorageVolumeEfficiencyPolicies (see [below for nested schema](#nestedatt--volume_efficiency_policies--schedule))
- `start_threshold_percent` (Number) StorageVolumeEfficiencyPolicies duration
- `type` (String) StorageVolumeEfficiencyPolicies type

<a id="nestedatt--volume_efficiency_policies--svm"></a>
### Nested Schema for `volume_efficiency_policies.svm`

Required:

- `name` (String) name of the SVM


<a id="nestedatt--volume_efficiency_policies--schedule"></a>
### Nested Schema for `volume_efficiency_policies.schedule`

Read-Only:

- `name` (String) name of the schedule
59 changes: 59 additions & 0 deletions docs/data-sources/storage_volume_efficiency_policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netapp-ontap_volume_efficiency_policy Data Source - terraform-provider-netapp-ontap"
subcategory: "Storage"
description: |-
VolumeEfficiencyPolicy data source
---

# netapp-ontap_volume_efficiency_policy (Data Source)

VolumeEfficiencyPolicy data source

## Example Usage

```terraform
data "netapp-ontap_volume_efficiency_policy" "volume_efficiency_policy" {
# required to know which system to interface with
cx_profile_name = "cluster1"
name = "test"
svm = {
name = "terraform"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `cx_profile_name` (String) Connection profile name
- `name` (String) VolumeEfficiencyPolicy name
- `svm` (Attributes) SVM details for StorageVolumeEfficiencyPolicies (see [below for nested schema](#nestedatt--svm))

### Read-Only

- `comment` (String) StorageVolumeEfficiencyPolicies duration
- `duration` (Number) StorageVolumeEfficiencyPolicies duration
- `enabled` (Boolean) StorageVolumeEfficiencyPolicies duration
- `id` (String) StorageVolumeEfficiencyPolicies UUID
- `qos_policy` (String) StorageVolumeEfficiencyPolicies duration
- `schedule` (Attributes) schedule details for StorageVolumeEfficiencyPolicies (see [below for nested schema](#nestedatt--schedule))
- `start_threshold_percent` (Number) StorageVolumeEfficiencyPolicies duration
- `type` (String) StorageVolumeEfficiencyPolicies type

<a id="nestedatt--svm"></a>
### Nested Schema for `svm`

Required:

- `name` (String) name of the SVM


<a id="nestedatt--schedule"></a>
### Nested Schema for `schedule`

Read-Only:

- `name` (String) name of the schedule
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
data "netapp-ontap_volume_efficiency_policies" "volume_efficiency_policies" {
# required to know which system to interface with
cx_profile_name = "cluster1"
filter = {
svm = "terraform"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
data "netapp-ontap_volume_efficiency_policy" "volume_efficiency_policy" {
# required to know which system to interface with
cx_profile_name = "cluster1"
name = "test"
svm = {
name = "terraform"
}
}
4 changes: 2 additions & 2 deletions internal/interfaces/storage_volume_efficiency_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ func GetStorageVolumeEfficiencyPoliciesByName(errorHandler *utils.ErrorHandler,

// GetStorageVolumeEfficiencyPolicies to get storage_volume_efficiency_policies info for all resources matching a filter
func GetStorageVolumeEfficiencyPolicies(errorHandler *utils.ErrorHandler, r restclient.RestClient, filter *StorageVolumeEfficiencyPoliciesDataSourceFilterModel) ([]StorageVolumeEfficiencyPoliciesGetDataModelONTAP, error) {
api := "api_url"
api := "storage/volume-efficiency-policies"
query := r.NewQuery()
query.Fields([]string{"name", "svm.name", "scope"})
query.Fields([]string{"name", "svm.name", "type", "qos_policy", "comment", "enabled", "schedule", "duration", "start_threshold_percent", "uuid"})
if filter != nil {
var filterMap map[string]interface{}
if err := mapstructure.Decode(filter, &filterMap); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ func (p *ONTAPProvider) DataSources(ctx context.Context) []func() datasource.Dat
storage.NewStorageQtreesDataSource,
storage.NewStorageVolumeSnapshotDataSource,
storage.NewStorageVolumeSnapshotsDataSource,
storage.NewVolumeEfficiencyPolicyDataSource,
storage.NewVolumeEfficiencyPoliciesDataSource,
storage.NewStorageVolumeDataSource,
storage.NewStorageVolumesDataSource,
storage.NewStorageVolumesFilesDataSource,
Expand Down
Loading

0 comments on commit 5192ff8

Please sign in to comment.