Closed robsee closed 4 years ago
It looks like a helper such as https://github.com/terraform-providers/terraform-provider-vsphere/blob/master/vsphere/internal/helper/nsx/nsx_helper.go would be needed.
@robsee:
If I understand you correctly, the issue occurs here. Do you know what needs to be changed for this to work? I can help you with the ruby side of the issue, but would need some help with the logic.
Yes this is correct. You have access to nic.backing.opaqueNetworkId which is a UUID. The problem is that you can't work backwards directly from that to a network name or id. As far as I know you have to do a scan of all of the available port groups, and the look for the one with the matching opaqueNetworkId to get the actual portgroup name/id. I couldn't see a way to do this within the existing models of fog-vsphere. I'm sure it can be done using direct rbvmomi calls though
https://github.com/OpenNebula/one/blob/master/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb#L740-759 is how one project handled it
@robsee: Nice, do you mind opening a PR? There are some small nits we need to address, but I can totally see the PR merged soon.
I think we can close this, no ? @ezr-ondrej can you make a new release plz fingers crossed :) would be nice to also have this included in the v2.0 repo
@fwdIT : There you go: https://rubygems.org/gems/fog-vsphere/versions/3.3.0
To bump the version in foreman, do you mind opening a PR at the foreman-packaging repo?
@fwdIT let me know if you have any issues bumping the release, I can create the PR if you hit too many issues.
@timogoebel thx @chris1984 will have a look at it now, first time but let's see if I can figure it out :)
@chris1984 not there yet, it was a busy day at work but through irc I learnt this morning at least about the need / use of git-annex for the reference to the gem. installation on macos was easy but then when following the steps in the README I got stuck on spectool (rpm stuff is not that nice on macos). So I created a docker rhel7 image mapping to my git repo folder (with my ssh/git config) and I got annex to init, setup_sources.sh is running at the moment and taking quite some time (perhaps due to the not so optimal docker workaround) nevertheless it seems to progress so to be continued tomorrow. will first try to learn the process myself before fallback on your suggestion :) keep you updated
def raw_to_hash currently returns nil for the network when an interface is linked to an NSX-T segment. This breaks provisioning within foreman when using nsx-t segments