Skip to content

Commit

Permalink
Merge pull request nutanix#140 from terraform-providers/docs-80
Browse files Browse the repository at this point in the history
Updated docs and attributes for test client
  • Loading branch information
PacoDw authored Jun 19, 2020
2 parents 79b4050 + f63a7d8 commit 4409b76
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 5 deletions.
22 changes: 17 additions & 5 deletions client/v3/v3_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ func TestOperations_CreateVM(t *testing.T) {
expected := map[string]interface{}{
"api_version": "3.1",
"metadata": map[string]interface{}{
"kind": "vm",
"kind": "vm",
"should_force_translate": false,
},
"spec": map[string]interface{}{
"cluster_reference": map[string]interface{}{
Expand All @@ -66,7 +67,8 @@ func TestOperations_CreateVM(t *testing.T) {
"api_version": "3.1",
"metadata": {
"kind": "vm",
"uuid": "cfde831a-4e87-4a75-960f-89b0148aa2cc"
"uuid": "cfde831a-4e87-4a75-960f-89b0148aa2cc",
"should_force_translate" : false
}
}`)
})
Expand Down Expand Up @@ -95,7 +97,8 @@ func TestOperations_CreateVM(t *testing.T) {
&VMIntentInput{
APIVersion: utils.StringPtr("3.1"),
Metadata: &Metadata{
Kind: utils.StringPtr("vm"),
Kind: utils.StringPtr("vm"),
ShouldForceTranslate: utils.BoolPtr(false),
},
Spec: &VM{
ClusterReference: &Reference{
Expand All @@ -109,8 +112,9 @@ func TestOperations_CreateVM(t *testing.T) {
&VMIntentResponse{
APIVersion: utils.StringPtr("3.1"),
Metadata: &Metadata{
Kind: utils.StringPtr("vm"),
UUID: utils.StringPtr("cfde831a-4e87-4a75-960f-89b0148aa2cc"),
Kind: utils.StringPtr("vm"),
UUID: utils.StringPtr("cfde831a-4e87-4a75-960f-89b0148aa2cc"),
ShouldForceTranslate: utils.BoolPtr(false),
},
},
false,
Expand Down Expand Up @@ -847,6 +851,10 @@ func TestOperations_CreateImage(t *testing.T) {
"spec": map[string]interface{}{
"resources": map[string]interface{}{
"image_type": "DISK_IMAGE",
"data_source_reference": map[string]interface{}{
"kind": "vm_disk",
"uuid": "0005a238-f165-08ba-317e-ac1f6b6e5442",
},
},
"name": "image.create",
},
Expand Down Expand Up @@ -901,6 +909,10 @@ func TestOperations_CreateImage(t *testing.T) {
Name: utils.StringPtr("image.create"),
Resources: &ImageResources{
ImageType: utils.StringPtr("DISK_IMAGE"),
DataSourceReference: &Reference{
Kind: utils.StringPtr("vm_disk"),
UUID: utils.StringPtr("0005a238-f165-08ba-317e-ac1f6b6e5442"),
},
},
},
},
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - image name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories

Expand Down
1 change: 1 addition & 0 deletions website/docs/d/clusters.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - image name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories

Expand Down
1 change: 1 addition & 0 deletions website/docs/d/image.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ The following attributes are exported:
* `retrieval_uri_list`: - List of URIs where the raw image data can be accessed.
* `size_bytes`: - The size of the image in bytes.
* `state`: - The state of the image.
* `data_source_reference`: - Reference to a data source.

### Metadata

Expand Down
1 change: 1 addition & 0 deletions website/docs/d/network_security_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - image name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories

Expand Down
1 change: 1 addition & 0 deletions website/docs/d/project.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ The metadata attribute exports the following:
* `spec_version` - Version number of the latest spec.
* `spec_hash` - Hash of the spec. This will be returned from server.
* `name` - vm name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories
The categories attribute supports the following:
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/projects.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ The metadata attribute exports the following:
* `spec_version` - Version number of the latest spec.
* `spec_hash` - Hash of the spec. This will be returned from server.
* `name` - vm name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories
The categories attribute supports the following:
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/subnet.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - subnet name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories

Expand Down
1 change: 1 addition & 0 deletions website/docs/d/virtual_machine.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - vm name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories

Expand Down
1 change: 1 addition & 0 deletions website/docs/d/volume_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - volume_group name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Reference

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/image.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The following arguments are supported:
* `source_uri`: - (Optional) The source URI points at the location of the source image which is used to create/update image.
* `source_path`: - (Optional) A local path to upload an image.
* `version`: - (Optional) The image version.
* `data_source_reference` - (Optional) Reference to a data source.

### Version

Expand Down Expand Up @@ -64,6 +65,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - image name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Reference

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/network_security_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - image name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Reference

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/project.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ The metadata attribute exports the following:
* `spec_version` - Version number of the latest spec.
* `spec_hash` - Hash of the spec. This will be returned from server.
* `name` - vm name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories
The categories attribute supports the following:
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/subnet.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - subnet name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/virtual_machine.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ The following arguments are supported:
* `vga_console_enabled`: - (Optional) Indicates whether VGA console should be enabled or not.
* `disk_list` Disks attached to the VM.
* `use_hot_add`: - (Optional) Use Hot Add when modifying VM resources. Passing value false will result in VM reboots. Default value is `true`.
* `num_threads_per_core`: - (Optional) Number of threads per core.

### Disk List

Expand Down Expand Up @@ -189,6 +190,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - vm name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Categories

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/volume_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The metadata attribute exports the following:
* `spec_version`: - Version number of the latest spec.
* `spec_hash`: - Hash of the spec. This will be returned from server.
* `name`: - volume_group name.
* `should_force_translate`: - Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.

### Reference

Expand Down

0 comments on commit 4409b76

Please sign in to comment.