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

Consistant naming of Nodes #164

Open
petermcd opened this issue Jan 3, 2024 · 2 comments
Open

Consistant naming of Nodes #164

petermcd opened this issue Jan 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@petermcd
Copy link
Contributor

petermcd commented Jan 3, 2024

Describe the bug
When calling the api/bmc?opt=get&type=power endpoint a response such as the following is returned:

{'result': [{'node1': '0', 'node2': '0', 'node3': '0', 'node4': '0'}]}

When calling the api/bmc?opt=get&type=usb endpoint the following response is received:

{'result': [{'mode': 'Device', 'node': 'Node 3', 'route': 'UsbA'}]}

As can be seen, in response to the power call the node is called something like 'node3' however when calling the USB endpoint it is instead called 'Node 3' (namely there is now a space in the node name along with a capital N in node)

This is a minor issue but an unnecessary difference in the naming of nodes.

To Reproduce
Steps to reproduce the behaviour:

Calling both API end points will demonstrate the issue.

Expected behaviour
Naming of nodes to be consistent

Screenshots
n/a

Versions
linux version= Linux turing-master-1 5.4.61 #1 SMP PREEMPT Tue Nov 28 13:52:46 UTC 2023 armv7l GNU/Linux
bmc version= 2.0.5

Additional context
n/a

@petermcd petermcd added the bug Something isn't working label Jan 3, 2024
@barrenechea
Copy link
Contributor

barrenechea commented May 14, 2024

My two cents: For an API response, I think it would be better to receive node1, node2, and so on, as "human-readable texts" should, in an ideal case, be handled by I18n on the receiving side to match the desired user's language.

@petermcd
Copy link
Contributor Author

Personally I don't think so. The reason being is there is no unique id for the nodes. In essence the string node1 is the unique id but is inconsistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants