-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CP-49366: Implement xenserver_sr provider data source
Signed-off-by: xueqingz <[email protected]>
- Loading branch information
Showing
8 changed files
with
421 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "xenserver_sr Data Source - xenserver" | ||
subcategory: "" | ||
description: |- | ||
The data source of XenServer storage repository | ||
--- | ||
|
||
# xenserver_sr (Data Source) | ||
|
||
The data source of XenServer storage repository | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "xenserver_sr" "sr" { | ||
name_label = "Local storage" | ||
} | ||
output "local_storage_output" { | ||
value = data.xenserver_sr.sr.data_items | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `name_label` (String) The name of the storage repository | ||
- `uuid` (String) The UUID of the storage repository | ||
|
||
### Read-Only | ||
|
||
- `data_items` (Attributes List) The return items of storage repositories (see [below for nested schema](#nestedatt--data_items)) | ||
|
||
<a id="nestedatt--data_items"></a> | ||
### Nested Schema for `data_items` | ||
|
||
Read-Only: | ||
|
||
- `allowed_operations` (List of String) The list of the operations allowed in this state | ||
- `blobs` (Map of String) The binary blobs associated with this SR | ||
- `clustered` (Boolean) True if the SR is using aggregated local storage | ||
- `content_type` (String) The type of the SR's content, if required (e.g. ISOs) | ||
- `current_operations` (Map of String) The links each of the running tasks using this object (by reference) to a current_operation enum which describes the nature of the task | ||
- `introduced_by` (String) The disaster recovery task which introduced this SR | ||
- `is_tools_sr` (Boolean) True if this is the SR that contains the Tools ISO VDIs | ||
- `local_cache_enabled` (Boolean) True if this SR is assigned to be the local cache for its host | ||
- `name_description` (String) The human-readable description of the storage repository | ||
- `name_label` (String) The name of the storage repository | ||
- `other_config` (Map of String) The additional configuration | ||
- `pbds` (List of String) Describes how particular hosts can see this storage repository | ||
- `physical_size` (Number) The total physical size of the storage repository (in bytes) | ||
- `physical_utilisation` (Number) The physical space currently utilised on this storage repository (in bytes) | ||
- `shared` (Boolean) True if this SR is (capable of being) shared between multiple hosts | ||
- `sm_config` (Map of String) The SM dependent data | ||
- `tags` (List of String) The user-specified tags for categorization purposes | ||
- `type` (String) The type of the storage repository | ||
- `uuid` (String) The UUID of the storage repository | ||
- `vdis` (List of String) The all virtual disks known to this storage repository | ||
- `virtual_allocation` (Number) The sum of virtual_sizes of all VDIs in this storage repository (in bytes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
data "xenserver_sr" "sr" { | ||
name_label = "Local storage" | ||
} | ||
|
||
output "local_storage_output" { | ||
value = data.xenserver_sr.sr.data_items | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.