Skip to content

Commit

Permalink
Use tfplugindocs to generate the provider documentation (#258)
Browse files Browse the repository at this point in the history
* Update the index.md to be tfplugindocs generated

Signed-off-by: Dom Del Nano <[email protected]>

* Update the network data source docs to be tfplugindocs generated

Signed-off-by: Dom Del Nano <[email protected]>

* Update the cloud_config resource docs to be tfplugindocs generated

* Update the cloud_config data source docs to be tfplugindocs generated

Signed-off-by: Dom Del Nano <[email protected]>

* Update the acl resource docs to be tfplugindocs generated

* Update the host data source docs to be tfplugindocs generated

* Update the hosts data source docs to be tfplugindocs generated

* Update the pif data source docs to be tfplugindocs generated

* Update the pool data source docs to be tfplugindocs generated and refactor host data source cpus description

* Update the resource set data source docs to be tfplugindocs generated

* Update the resource set resource docs to be tfplugindocs generated

Signed-off-by: Dom Del Nano <[email protected]>

* Update the user data source docs to be tfplugindocs generated

* Update the sr data source docs to be tfplugindocs generated

* Update the template data source docs to be tfplugindocs generated

* Update the vdi data source docs to be tfplugindocs generated

* Update the vdi resource docs to be tfplugindocs generated

* Update the vms data source and vm resource schemas with doc descriptions and add examples

Signed-off-by: Dom Del Nano <[email protected]>

---------

Signed-off-by: Dom Del Nano <[email protected]>
  • Loading branch information
ddelnano authored Sep 8, 2023
1 parent 76e9a7d commit 8a0b0cd
Show file tree
Hide file tree
Showing 55 changed files with 1,121 additions and 481 deletions.
31 changes: 21 additions & 10 deletions docs/data-sources/cloud_config.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
# xenorchestra_cloud_config
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xenorchestra_cloud_config Data Source - terraform-provider-xenorchestra"
subcategory: ""
description: |-
Provides information about cloud config.
NOTE: If there are multiple cloud configs with the same name Terraform will fail. Ensure that your names are unique when using the data source.
---

# xenorchestra_cloud_config (Data Source)

Provides information about cloud config.

**NOTE:** If there are multiple cloud configs with the same name Terraform will fail. Ensure that your names are unique when using the data source.

## Example Usage

```hcl
```terraform
data "xenorchestra_cloud_config" "cloud_config" {
name = "Name of cloud config"
}
```

## Argument Reference
* name - (Required) The name of the cloud config you want to look up.
<!-- schema generated by tfplugindocs -->
## Schema

### Required

~> **NOTE:** If there are multiple cloud configs with the same name
Terraform will fail. Ensure that your names are unique when
using the data source.
- `name` (String) The name of the cloud config you want to look up.

### Read-Only

## Attributes Reference
* id - Id of the resource set.
* template - The contents of the cloud-config.
- `id` (String) The ID of this resource.
- `template` (String) The contents of the cloud-config.
53 changes: 34 additions & 19 deletions docs/data-sources/host.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
# xenorchestra_host
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xenorchestra_host Data Source - terraform-provider-xenorchestra"
subcategory: ""
description: |-
Provides information about a host.
NOTE: If there are multiple hosts with the same name
Terraform will fail. Ensure that your names are unique when
using the data source.
---

# xenorchestra_host (Data Source)

Provides information about a host.

**NOTE:** If there are multiple hosts with the same name
Terraform will fail. Ensure that your names are unique when
using the data source.

## Example Usage

```hcl
```terraform
data "xenorchestra_host" "host1" {
name_label = "Your host"
}
resource "xenorchestra_vm" "node" {
//...
affinity_host = data.xenorchestra_host.ng6.id
affinity_host = data.xenorchestra_host.host1.id
//...
}
```

## Argument Reference
* name_label - (Required) The name of the host you want to look up.
<!-- schema generated by tfplugindocs -->
## Schema

~> **NOTE:** If there are multiple hosts with the same name
Terraform will fail. Ensure that your names are unique when
using the data source.
### Required

- `name_label` (String) The name label of the host.

### Optional

- `tags` (Set of String) The tags (labels) applied to the given entity.

### Read-Only

## Attributes Reference
* id - The id of the host.
* name_label - Name label of the host.
* pool_id - Id of the pool that the host belongs to.
* tags - The tags applied to the host.
* memory - The memory size for the host.
* memory_usage - The memory usage for the host.
* cpus - Host cpu information.
* cores - The number of cores.
* sockets - The number of sockets.
- `cpus` (Map of Number) CPU information about the host. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
- `id` (String) The ID of this resource.
- `memory` (Number) The memory size of the host.
- `memory_usage` (Number) The memory usage of the host.
- `pool_id` (String) Id of the pool that the host belongs to.
61 changes: 41 additions & 20 deletions docs/data-sources/hosts.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# xenorchestra_hosts
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xenorchestra_hosts Data Source - terraform-provider-xenorchestra"
subcategory: ""
description: |-
Use this data source to filter Xenorchestra hosts by certain criteria (name_label, tags) for use in other resources.
---

# xenorchestra_hosts (Data Source)

Use this data source to filter Xenorchestra hosts by certain criteria (name_label, tags) for use in other resources.

## Example Usage

```hcl
```terraform
data "xenorchestra_hosts" "pool1" {
pool_id = data.xenorchestra_pool.pool.id
Expand All @@ -27,21 +35,34 @@ resource "xenorchestra_vm" "vm" {
}
```

## Argument Reference
* pool_id - (Required) The pool id used to filter the resulting hosts by
* tags - (Optional) The tags used to filter the resulting hosts by
* sorted_by - (Optional) The host field you would like to sort by (id and name_label supported)
* sort_order - (Optional) Valid options are "asc" or "desc" and the sort order is applied to the `sorted_by` argument

## Attributes Reference
* master - The primary host of the pool
* hosts - List containing the matching hosts after applying the argument filtering.
* id - The id of the host.
* name_label - Name label of the host.
* pool_id - Id of the pool that the host belongs to.
* tags - The tags applied to the host.
* memory - The memory size for the host.
* memory_usage - The memory usage for the host.
* cpus - Host cpu information.
* cores - The number of cores.
* sockets - The number of sockets.
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `pool_id` (String) The pool id used to filter the resulting hosts by.

### Optional

- `sort_by` (String) The host field to sort the results by (id and name_label are supported).
- `sort_order` (String) Valid options are `asc` or `desc` and sort order is applied to `sort_by` argument.
- `tags` (Set of String) The tags (labels) applied to the given entity.

### Read-Only

- `hosts` (List of Object) The resulting hosts after applying the argument filtering. (see [below for nested schema](#nestedatt--hosts))
- `id` (String) The ID of this resource.
- `master` (String) The primary host of the pool.

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

Read-Only:

- `cpus` (Map of Number)
- `id` (String)
- `memory` (Number)
- `memory_usage` (Number)
- `name_label` (String)
- `pool_id` (String)
- `tags` (Set of String)
46 changes: 28 additions & 18 deletions docs/data-sources/network.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
# xenorchestra_network
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xenorchestra_network Data Source - terraform-provider-xenorchestra"
subcategory: ""
description: |-
Provides information about a network of a Xenserver pool.
Note: If there are multiple networks with the same name terraform will fail. Ensure that your network, pool_id and other arguments identify a unique network.
---

# xenorchestra_network (Data Source)

Provides information about a network of a Xenserver pool.

**Note:** If there are multiple networks with the same name terraform will fail. Ensure that your network, pool_id and other arguments identify a unique network.

## Example Usage

```hcl
```terraform
data "xenorchestra_network" "net" {
name_label = "Pool-wide network associated with eth0"
}
Expand All @@ -14,22 +25,21 @@ resource "xenorchestra_vm" "demo-vm" {
network {
network_id = data.xenorchestra_network.net.id
}
// ...
}
```

## Argument Reference
* name_label - (Required) The name of the network.
* pool_id - (Optional) The id of the pool associated with the network.

**Note:** If there are multiple networks with the same name terraform will fail.
Ensure that your network, pool_id and other arguments identify a unique network.

## Attributes Reference
* id is set to the ID generated by the XO api.
* attached - If the PIF is attached to the network
* uuid - uuid of the PIF.
* host - The host the PIF is associated with.
* pool_id - The pool the PIF is associated with.
* network - The network the PIF is associated with.
* vlan - The vlan the PIF is associated with.
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name_label` (String) The name of the network.

### Optional

- `bridge` (String) The name of the bridge network interface.
- `pool_id` (String) The pool the network is associated with.

### Read-Only

- `id` (String) The ID of this resource.
49 changes: 33 additions & 16 deletions docs/data-sources/pif.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# xenorchestra_pif
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xenorchestra_pif Data Source - terraform-provider-xenorchestra"
subcategory: ""
description: |-
Provides information about a physical network interface (PIF) of a XenServer host specified by the interface name or whether it is the management interface.
Note: If there are multiple PIFs that match terraform will fail.
Ensure that your device, vlan, host_id and other arguments identify a unique PIF.
---

# xenorchestra_pif (Data Source)

Provides information about a physical network interface (PIF) of a XenServer host specified by the interface name or whether it is the management interface.

**Note:** If there are multiple PIFs that match terraform will fail.
Ensure that your device, vlan, host_id and other arguments identify a unique PIF.

## Example Usage

```hcl
```terraform
data "xenorchestra_pif" "eth0" {
device = "eth0"
vlan = -1
Expand All @@ -19,19 +32,23 @@ resource "xenorchestra_vm" "demo-vm" {
}
```

## Argument Reference
* device - (Required) The name of the network device. Examples include eth0, eth1, etc. See `ifconfig` for possible devices.
* vlan - (Required) The VLAN the PIF belongs to.
* host_id - (Optional) The ID of the host that the PIF belongs to.
<!-- schema generated by tfplugindocs -->
## Schema

**Note:** If there are multiple PIFs that match terraform will fail.
Ensure that your device, vlan, host_id and other arguments identify a unique PIF.
### Required

- `device` (String) The name of the network device. Examples include eth0, eth1, etc. See `ifconfig` for possible devices.
- `vlan` (Number) The VLAN the PIF belongs to.

### Optional

- `host_id` (String) The ID of the host that the PIF belongs to.

### Read-Only

## Attributes Reference
* id is set to the ID generated by the XO api.
* attached - If the PIF is attached to the network
* uuid - uuid of the PIF.
* host - The host the PIF is associated with.
* pool_id - The pool the PIF is associated with.
* network - The network the PIF is associated with.
* vlan - The vlan the PIF is associated with.
- `attached` (Boolean) If the PIF is attached to the network.
- `host` (String) The host the PIF is associated with.
- `id` (String) The ID of this resource.
- `network` (String) The network the PIF is associated with.
- `pool_id` (String) The pool the PIF is associated with.
- `uuid` (String) The uuid of the PIF.
33 changes: 22 additions & 11 deletions docs/data-sources/pool.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# xenorchestra_pool
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "xenorchestra_pool Data Source - terraform-provider-xenorchestra"
subcategory: ""
description: |-
Provides information about a pool.
---

# xenorchestra_pool (Data Source)

Provides information about a pool.

## Example Usage

```hcl
```terraform
data "xenorchestra_pool" "pool" {
name_label = "Your pool"
}
Expand All @@ -14,13 +22,16 @@ data "xenorchestra_sr" "local_storage" {
}
```

## Argument Reference
* name_label - (Required) The name of the pool you want to look up.
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name_label` (String) The name_label of the pool to look up.

### Read-Only

## Attributes Reference
* id - Id of the pool.
* description - The description of the pool.
* master - The id of the primary instance in the pool.
* cpus - CPU information about the pool.
* cores - Number of cores in the pool.
* sockets - Number of sockets in the pool.
- `cpus` (Map of String) CPU information about the pool. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
- `description` (String) The description of the pool.
- `id` (String) The ID of this resource.
- `master` (String) The id of the primary instance in the pool.
Loading

0 comments on commit 8a0b0cd

Please sign in to comment.