multiple new networks

Hi all, We have Ovirt 4.3, with 11 hosts, and need a bunch of VLANs for our student's to be isolated and do specific things. We have created the VLANs on the switch, but need to create them on the admin portal, with vlan tagging and then add them to the interface on the hosts. We are talking about 400 VLANs. I have done this manually for 4 VLANs and all works fine, but was wondering if there is a way of doing this in one go for all? So I don't have to do it 400 times (at least creating the VLANs on the admin portal). Thanks. Kim

On Wed, Oct 21, 2020 at 10:12 AM <kim.kargaard@noroff.no> wrote:
Hi all,
We have Ovirt 4.3, with 11 hosts, and need a bunch of VLANs for our student's to be isolated and do specific things. We have created the VLANs on the switch, but need to create them on the admin portal, with vlan tagging and then add them to the interface on the hosts. We are talking about 400 VLANs. I have done this manually for 4 VLANs and all works fine, but was wondering if there is a way of doing this in one go for all? So I don't have to do it 400 times (at least creating the VLANs on the admin portal).
Thanks.
Kim _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/3YDTCIKQ4GY3KF...
Hello, you can automate this using oVirt API. The documentation is available on [0]. Another way is to use python-sdk [1]. Python SDK uses the oVirt API under the hood so it corresponds one to another. [1] contains some real python code that is used to manipulate networks through the SDK. Hopefully this helps. Regards, Ales [0] http://ovirt.github.io/ovirt-engine-api-model/4.3/ [1] http://ovirt.github.io/ovirt-engine-sdk/4.3/4.3.2/ [2] https://github.com/oVirt/ovirt-system-tests/blob/master/basic-suite-master/t... -- Ales Musil Software Engineer - RHV Network Red Hat EMEA <https://www.redhat.com> amusil@redhat.com IM: amusil <https://red.ht/sig>

Hi, Thank you, will check that out. Kind regards Kim From: Ales Musil <amusil@redhat.com> Date: Wednesday, 21 October 2020 at 10:28 To: Kim Kargaard <Kim.Kargaard@noroff.no> Cc: users <users@ovirt.org> Subject: Re: [ovirt-users] multiple new networks On Wed, Oct 21, 2020 at 10:12 AM <kim.kargaard@noroff.no<mailto:kim.kargaard@noroff.no>> wrote: Hi all, We have Ovirt 4.3, with 11 hosts, and need a bunch of VLANs for our student's to be isolated and do specific things. We have created the VLANs on the switch, but need to create them on the admin portal, with vlan tagging and then add them to the interface on the hosts. We are talking about 400 VLANs. I have done this manually for 4 VLANs and all works fine, but was wondering if there is a way of doing this in one go for all? So I don't have to do it 400 times (at least creating the VLANs on the admin portal). Thanks. Kim _______________________________________________ Users mailing list -- users@ovirt.org<mailto:users@ovirt.org> To unsubscribe send an email to users-leave@ovirt.org<mailto:users-leave@ovirt.org> Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/3YDTCIKQ4GY3KF... Hello, you can automate this using oVirt API. The documentation is available on [0]. Another way is to use python-sdk [1]. Python SDK uses the oVirt API under the hood so it corresponds one to another. [1] contains some real python code that is used to manipulate networks through the SDK. Hopefully this helps. Regards, Ales [0] http://ovirt.github.io/ovirt-engine-api-model/4.3/ [1] http://ovirt.github.io/ovirt-engine-sdk/4.3/4.3.2/ [2] https://github.com/oVirt/ovirt-system-tests/blob/master/basic-suite-master/t... -- Ales Musil Software Engineer - RHV Network Red Hat EMEA<https://www.redhat.com> amusil@redhat.com<mailto:amusil@redhat.com> IM: amusil [Image removed by sender.]<https://red.ht/sig>

I'm not sure if 4.3 supports it, but in 4.4 you can create a network LABEL and attach that LABEL to the host interface, later you can add a new network and LABEL that network, it will be automatically added to the host/interface where that LABEL is attached. Example: Create a LABEL named: MYLABEL Attach "MYLABEL" LABEL to a Host interface, let's say bond0. You will now have "MYLABEL" attached to bond0. Create a new network, fill all the settings (VM Network, VLAN tag, etc..) but you will also be able to choose to add a LABEL, add "MYLABEL". After doing this the network will be automatically created on bond0. You can automate the task of adding "MYLABEL" to bond0 on all the hosts using the API or manually just once.

Have you checked the ovirt_host_network ansible module ? It got a VLAN example and I guess you can loop over all the VLANs. Best Regards, Strahil Nikolov В сряда, 21 октомври 2020 г., 11:12:53 Гринуич+3, kim.kargaard@noroff.no <kim.kargaard@noroff.no> написа: Hi all, We have Ovirt 4.3, with 11 hosts, and need a bunch of VLANs for our student's to be isolated and do specific things. We have created the VLANs on the switch, but need to create them on the admin portal, with vlan tagging and then add them to the interface on the hosts. We are talking about 400 VLANs. I have done this manually for 4 VLANs and all works fine, but was wondering if there is a way of doing this in one go for all? So I don't have to do it 400 times (at least creating the VLANs on the admin portal). Thanks. Kim _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/3YDTCIKQ4GY3KF...
participants (5)
-
Ales Musil
-
Erez Zarum
-
Kim Kargaard
-
kim.kargaard@noroff.no
-
Strahil Nikolov