Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenAPI based vcd_network_routed_v2 resource and datasource for handling NSX-T and NSX-V routed networks #628

Merged
merged 24 commits into from
Feb 15, 2021

Conversation

Didainius
Copy link
Collaborator

@Didainius Didainius commented Jan 25, 2021

Closes #101

This PR add OpenAPI based vcd_network_routed_v2 resource and datasource for handling NSX-T and NSX-V routed networks.

Note. It does not include DHCP pool definition, because this depends on backing network provider (NSX-V and/org NSX-T) therefore it will be two separate resources a bit later (NSX-V and NSX-T DHCP management).

Note. The tests does not yet include end to end flow (with VM, etc), but I have tested it manually. I will add it once we have all org networks and DHCP definitions in place.

Additionally:

  • make install will usegit describe --tags so that lightweight tags are also included in build version.
  • Adds compatibility layer for lockParentEdgeGtw and unLockParentEdgeGtw because some older resources would acquire lock by name, but new resources acquire lock by Edge gateway ID. These functions are now smart enough to lookup ID when only name was passed. That way we can ensure new and older resources are able to share lock.
  • Changes VirtualQuantity type from int to int64 (related to Error Refreshing Vapp after VM Creation #626)
  • Remove setCatalogStorageProfile for tests as Terraform provider supports storage_profile_id when creating catalog to specify correct storage.
  • Tunes make test to capture previously undetected errors

@dataclouder dataclouder mentioned this pull request Jan 28, 2021
@Didainius Didainius marked this pull request as ready for review February 1, 2021 07:02
vcd/datasource_vcd_network_routed_v2.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_network_routed_v2.go Outdated Show resolved Hide resolved
vcd/datasource_vcd_network_routed_v2_test.go Outdated Show resolved Hide resolved
@@ -1614,7 +1614,7 @@ func resourceVcdVAppVmDelete(d *schema.ResourceData, meta interface{}) error {
}

log.Printf("[TRACE] Removing VM: %s", vm.VM.Name)

// sleep() sad
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover from the other issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Total leftover from troubleshooting another issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

website/docs/r/network_routed_v2.html.markdown Outdated Show resolved Hide resolved
website/docs/r/network_routed_v2.html.markdown Outdated Show resolved Hide resolved
website/vcd.erb Outdated Show resolved Hide resolved
website/docs/r/network_routed.html.markdown Outdated Show resolved Hide resolved
website/docs/d/network_routed.html.markdown Outdated Show resolved Hide resolved
Copy link
Collaborator

@lvirbalas lvirbalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great effort!

@Didainius Didainius merged commit 7c16246 into vmware:master Feb 15, 2021
@Didainius Didainius deleted the pr-openapi-routed-network branch February 15, 2021 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform vCD provider support for current vCloud API versions
4 participants