On Fri, Jun 26, 2020 at 12:33 AM Martin Perina <[email protected]> wrote:

>
>
> On Thu, Jun 25, 2020 at 11:17 AM Ales Musil <[email protected]> wrote:
>
>>
>>
>> On Thu, Jun 25, 2020 at 11:13 AM Ales Musil <[email protected]> wrote:
>>
>>>
>>>
>>> On Thu, Jun 25, 2020 at 11:03 AM Prajith Kesava Prasad <
>>> [email protected]> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Jun 25, 2020 at 2:26 PM Ales Musil <[email protected]> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Thu, Jun 25, 2020 at 10:46 AM Prajith Kesava Prasad <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hey Everyone,
>>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>
>>>> Thank you for a quick response :-)
>>>>
>>>>>
>>>>> what I'm trying to achieve here is to get the list of network
>>>>>> interfaces attached to each host,
>>>>>> and then further get the ipv4Address from the corresponding attached
>>>>>> logical network (as seen in the in the column in the image below).
>>>>>>
>>>>>> So i tried to get the list of interfaces of current host by
>>>>>> getVds().getInterfaces() and it is returning an empty list
>>>>>> of List<VdsNetworkInterface>.
>>>>>> even though its showing in the UI.
>>>>>>
>>>>>
>>>>> So the first thing is where are you trying to get this list? In which
>>>>> part of the code?
>>>>>
>>>>
>>>> in class :- InstallVdsInternalCommand.java
>>>>
>>>
> Prajith, you cannot access VdsInterfaces in InstallVdsInternal, because
> they are not yet know. First the host needs to finish installation (ansible
> playbook), then we need to establish connection from engine to host, then
> we need to execute setupNetworks and only afterwards when host is activated
> and host monitoring started we fetch all network interfaces from the host
> and store them to database.
>
>

> What's the usecase? Why do you need to know host interface during host
> installation/reinstallation?
>

  Hi Martin, i think this doc
<https://docs.google.com/document/d/1A_pFciKHki7QaPJj4Eaq_wkwER66tZvIKAfOYujfXzk/edit?usp=sharing>
link would explain my usecase (i have shared it via another email as well),
im using it with a conditional check(for replace host[RFE]), also only in
the case of reinstall

>
>>>>>
>>>>>>
>>>>>> Could you tell me if I'm missing something?
>>>>>>
>>>>>
>>>>> The interfaces are not populated and you would need an extra database
>>>>> call in order to get them properly.
>>>>>
>>>>
>>>> i assumed since getVds() could be called here, further methods in VDS
>>>> could be called without a DB call.
>>>>
>>>
>>> Unfortunately not. Because Vds is huge not everything is filled with a
>>> single DB call. You will need something like getVdsInterfacesByNetworkId
>>> from InterfaceDao.
>>>
>>
>> Correction: Something like GetVdsInterfacesByVdsIdQuery.
>>
>
Thanks @Ales Musil <[email protected]>  this works fine, i did try
interfaceDao, by i guess i made the call getByclusterId Instead of vds.

>
>>>
>>>>
>>>>>
>>>>>> FYI:- (I'm ran vdsm-cliend Host getCapablities and
>>>>>> getNetworkCapablities and it was returning correctly.)
>>>>>>
>>>>>
> That's exactly the calls which are executed from engine during host
> monitoring
>
>>
>>>>>> Regards,
>>>>>> Prajith.
>>>>>>
>>>>>>
>>>>> Hopefully this helps.
>>>>>
>>>>> Regards,
>>>>> Ales
>>>>>
>>>>>
>>>>>>
>>>>>> [image: image.png]
>>>>>> _______________________________________________
>>>>>> Devel mailing list -- [email protected]
>>>>>> To unsubscribe send an email to [email protected]
>>>>>> 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/[email protected]/message/3LXPIMKJICGHOY6E2HJ3SXHGMQ2GYUJD/
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Ales Musil
>>>>>
>>>>> Software Engineer - RHV Network
>>>>>
>>>>> Red Hat EMEA <https://www.redhat.com>
>>>>>
>>>>> [email protected]    IM: amusil
>>>>> <https://red.ht/sig>
>>>>>
>>>>
>>>
>>> --
>>>
>>> Ales Musil
>>>
>>> Software Engineer - RHV Network
>>>
>>> Red Hat EMEA <https://www.redhat.com>
>>>
>>> [email protected]    IM: amusil
>>> <https://red.ht/sig>
>>>
>>
>>
>> --
>>
>> Ales Musil
>>
>> Software Engineer - RHV Network
>>
>> Red Hat EMEA <https://www.redhat.com>
>>
>> [email protected]    IM: amusil
>> <https://red.ht/sig>
>> _______________________________________________
>> Devel mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
>> 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/[email protected]/message/OAYTFQGQ2OBB3TYIPYSZ3HESWX4DNG6W/
>>
>
>
> --
> Martin Perina
> Manager, Software Engineering
> Red Hat Czech s.r.o.
>
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]/message/C6TY2CUVSUUMSH7CIJLY7H7N5SDEHQJL/

Reply via email to