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

xe pif-list would usefuly report host-uuid param by default #5263

Open
ydirson opened this issue Nov 27, 2023 · 5 comments
Open

xe pif-list would usefuly report host-uuid param by default #5263

ydirson opened this issue Nov 27, 2023 · 5 comments

Comments

@ydirson
Copy link
Contributor

ydirson commented Nov 27, 2023

In a pool we can naturally have the same interface name on several hosts; xe pif-list by default would not allow to distinguish between interfaces of similar names on different hosts, it would be useful to have host-uuid be part of the default printed parameters:

# xe pif-list uuid=b0e4b993-daea-bd53-34c5-7c1159a9109c
uuid ( RO)                  : b0e4b993-daea-bd53-34c5-7c1159a9109c
                device ( RO): eth2
    currently-attached ( RO): true
                  VLAN ( RO): 10
          network-uuid ( RO): 6c4e1cdc-9fe0-0603-e53d-4790d1fce8dd


# xe pif-list uuid=4f831d0d-73af-413f-6e71-893690c8e68d
uuid ( RO)                  : 4f831d0d-73af-413f-6e71-893690c8e68d
                device ( RO): eth2
    currently-attached ( RO): true
                  VLAN ( RO): 10
          network-uuid ( RO): 6c4e1cdc-9fe0-0603-e53d-4790d1fce8dd

OTOH:

# xe pif-list uuid=4f831d0d-73af-413f-6e71-893690c8e68d params=uuid,host-uuid
uuid ( RO)         : 4f831d0d-73af-413f-6e71-893690c8e68d
    host-uuid ( RO): 0aea61f4-c9d1-4060-94e8-4eb2024d082c


# xe pif-list uuid=b0e4b993-daea-bd53-34c5-7c1159a9109c params=uuid,host-uuid
uuid ( RO)         : b0e4b993-daea-bd53-34c5-7c1159a9109c
    host-uuid ( RO): f26eb0a5-1d91-4682-ae58-96df405a3af6
@robhoes
Copy link
Member

robhoes commented Nov 27, 2023

I'm fine with that. Try adding host-uuid to the list at https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi-cli-server/cli_operations.ml#L938. By the way, I think that line has a mistake, and "mac" should be "MAC".

@ydirson
Copy link
Contributor Author

ydirson commented Nov 27, 2023

"mac" should be "MAC"

Shouldn't an error be issued when such mismatches happen?

@ydirson
Copy link
Contributor Author

ydirson commented Nov 27, 2023

Also what about L2683, L6464, L6485 ?

@robhoes
Copy link
Member

robhoes commented Nov 27, 2023

A compiler error would generally be better, but this is just a filter based on strings unfortunately.

ydirson added a commit to xcp-ng/xen-api that referenced this issue Nov 27, 2023
Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
@robhoes
Copy link
Member

robhoes commented Nov 27, 2023

Also what about L2683, L6464, L6485 ?

Capitalisation is inconsistent, unfortunately. For example, vif-create expects lowercase:

# xe vif-create 
device=        mac=           network-uuid=  vm-uuid=   

ydirson added a commit to xcp-ng/xen-api that referenced this issue Nov 27, 2023
Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
psafont added a commit that referenced this issue Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants