Skip to content

Commit

Permalink
Merge pull request #246 from HewlettPackard/US65034
Browse files Browse the repository at this point in the history
US65034: Test external cloud
  • Loading branch information
reubenur-rahman authored Jul 16, 2024
2 parents ae81e42 + d32a978 commit 91d4f78
Show file tree
Hide file tree
Showing 23 changed files with 137 additions and 3 deletions.
6 changes: 6 additions & 0 deletions acc-external-testcases/data-sources/cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
acc:
- config: |
name = "External-Cloud"
validations:
json.zone.id: 2
tf.id: 2
6 changes: 6 additions & 0 deletions acc-external-testcases/data-sources/cloud_folder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
acc:
- config: |
name = "ExternalVMFolder"
cloud_id = 2
validations:
json.folder.id: 11
4 changes: 4 additions & 0 deletions acc-external-testcases/data-sources/datastore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
acc:
- config: |
name = "glcicd-G2i-1-Bs-1"
cloud_id = 2
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/edge_cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "edge_cluster"
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "dev"
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/group.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "External-group2"
4 changes: 4 additions & 0 deletions acc-external-testcases/data-sources/layout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
acc:
- config: |
name = "Vmware VM"
instance_type_code = "vmware"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
acc:
- config: |
name = "Test SSL Cert"
validations:
json.certificates.id: 8
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/network.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "Dhcp-net1"
6 changes: 6 additions & 0 deletions acc-external-testcases/data-sources/network_interface.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
acc:
- config: |
name = "VMXNET 3"
cloud_id = 2
validations:
tf.id: 10
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/network_pool.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "Post-pool"
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/network_proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "test-proxy"
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/network_type.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "NSX Segment"
5 changes: 5 additions & 0 deletions acc-external-testcases/data-sources/nsx-tier1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
acc:
- config: |
name = "tf-dont-delete"
validations:
json.networkRouter.providerId: "/infra/tier-1s/9c995f68-f873-42f0-bb1b-8c5021c8f64a"
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/plan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "G2i-small"
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/power_schedule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "power-schedule"
4 changes: 4 additions & 0 deletions acc-external-testcases/data-sources/resource_pool.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
acc:
- config: |
name = "ExternalResourcePool"
cloud_id = 2
3 changes: 3 additions & 0 deletions acc-external-testcases/data-sources/template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acc:
- config: |
name = "External-Centos"
28 changes: 28 additions & 0 deletions acc-external-testcases/resources/instance-template_err.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
vars:
rand_name_1: tf_acc_%rand_int
rand_storage_1: "%rand_int{5,8}"
acc:
- config: |
name = "$(rand_name_1)"
cloud_id = 1
group_id = 2
layout_id = 113
plan_id = 407
instance_type_code = "vmware"
network {
id = 3
}
volume {
name = "root_vol"
datastore_id = "auto"
size = $(rand_storage_1)
}
config {
resource_pool_id = 2
no_agent = true
folder_code = "group-v284"
}
scale = 1
validations:
tf.status: "running"
expect_error: ".*template.*"
27 changes: 27 additions & 0 deletions acc-external-testcases/resources/instance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
vars:
instance_name: tf_external_acc_%rand_int
rand_storage_1: "%rand_int{5,8}"
acc:
- config: |
name = "$(instance_name)"
cloud_id = 2
group_id = 29
layout_id = 415
plan_id = 877
instance_type_code = "vmware"
network {
id = 119
}
volume {
name = "root_vol"
datastore_id = "auto"
size = $(rand_storage_1)
}
config {
resource_pool_id = 14
template_id = 5069
folder_code = "group-v7199"
}
scale = 1
validations:
tf.status: "running"
9 changes: 9 additions & 0 deletions acc-external-testcases/resources/instance_clone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
vars:
instance_name: tf_external_acc_clone_%rand_int
acc:
- config: |
source_instance_id = 476
name = "$(instance_name)"
network {
id = 119
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/HewlettPackard/hpegl-vmaas-terraform-resources
go 1.21

require (
github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.9
github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.10
github.com/golang/mock v1.6.0
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-docs v0.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.9 h1:SjJgSnyD1XXAHy6kExOYTFiwAaAmBwvj/0BA+e+AyeA=
github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.9/go.mod h1:UzXizYR6sUVsvDRMcLC2E4eabJsPH/3nM8rlKL2BLSc=
github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.10 h1:RLRtdCjl12eunpAxSNrlUJTGFALbDR0lmZuW/ICbiOQ=
github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk v0.1.10/go.mod h1:UzXizYR6sUVsvDRMcLC2E4eabJsPH/3nM8rlKL2BLSc=
github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
Expand Down

0 comments on commit 91d4f78

Please sign in to comment.