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

lookup the correct network_id for a given network #1136

Merged
merged 4 commits into from Feb 22, 2021

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Feb 3, 2021

Fixes: #1104

draft because:

  • doesn't work on oVirt/RHV
  • only tested on VMware
  • no idea how to properly test that in CI

@evgeni
Copy link
Member Author

evgeni commented Feb 3, 2021

cc @SimonLorentz @fgoebel @cmeissner if y'all want to play around with this.

plugins/modules/host.py Outdated Show resolved Hide resolved
@SimonLorentz
Copy link

I tried it against foreman 1.24.3 and 2.1.4 and it works fine with both, thank you very much :D

@evgeni
Copy link
Member Author

evgeni commented Feb 10, 2021

Thanks @SimonLorentz for testing! I guess you're also on VMware?

@SimonLorentz
Copy link

Hi @evgeni, yes I tested it against VMware, shell I test it against proxmox or something else?

@evgeni
Copy link
Member Author

evgeni commented Feb 11, 2021

That would be greatly appreciated, yes. Proxmox is something I don't have easily available here.

@SimonLorentz
Copy link

Okay I tried it against proxmox, it works, but in proxmox we have as id and name the same value, so that also works without the modification

@evgeni
Copy link
Member Author

evgeni commented Feb 15, 2021

Okay, updated to error out when the network can't be found. Also made it work on oVirt/RHV.

@evgeni
Copy link
Member Author

evgeni commented Feb 15, 2021

the devel failures are unrelated and fixed in #1140

@evgeni evgeni force-pushed the issue1104 branch 2 times, most recently from 85f78bf to ab30c1f Compare February 15, 2021 09:50
@evgeni
Copy link
Member Author

evgeni commented Feb 15, 2021

okay, maybe that's a bit more complicated for compute_profiles…

@evgeni
Copy link
Member Author

evgeni commented Feb 15, 2021

(compute_profile takes cluster name, not cluster id, …) only on vmware, bleh

@evgeni evgeni marked this pull request as ready for review February 15, 2021 10:21
@evgeni
Copy link
Member Author

evgeni commented Feb 15, 2021

whoa, even better, when listing the networks of a cluster, vmware takes cluster name, ovirt cluster id, what is this…

@evgeni
Copy link
Member Author

evgeni commented Feb 16, 2021

@SimonLorentz would you mind retesting again in your envs? I did a few changes, which shouldn't affect things that already worked, but you never know.

@evgeni
Copy link
Member Author

evgeni commented Feb 16, 2021

@m-bucher you might be interested in this too!

@@ -41,22 +41,22 @@ ovirt:
compute_profile:
name: app-small
attrs:
cluster: c95c55f3-705e-4182-92a6-f66754aadf02
cluster: Devel-Infra
Copy link
Member Author

Choose a reason for hiding this comment

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

there, a working change! :)

cores: 2
sockets: 1
memory: 1073741824
ha: 0
interfaces_attributes:
0:
name: ""
network: 390666e1-dab3-4c99-9f96-006b2e2fd801
network: ovirtmgmt
Copy link
Member Author

Choose a reason for hiding this comment

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

there, a working change too! :)

interface: virtio
volumes_attributes:
0:
size_gb: 16
storage_domain: 19c50090-1ab4-4023-a63f-75ee1018ed5e
size_gb: '16'
Copy link
Member Author

Choose a reason for hiding this comment

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

this is "unrelated", but Foreman wants all params to be strings here, whyever.

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.

Automatically match network_name to network_id for the deployement of new VM´s on VMWare
3 participants