VMware Cloud Community
EMCDD11
Contributor
Contributor
Jump to solution

How to calculate Esxi Host FQDN when iterator type is ALPHA ?

At emc, we use a tool called PEQ(Pre Engagement Questionnaire) which calculates the complete FQDN for Esxi Host. I provide below the image.

Capture.PNG

As per my requirement, I need to calculate the FQDN when iterator is ALPHA.

I have written the code which does exactly like the PEQ as shown in the image. Recently I got to know that PEQ is calculating wrongly.

As per the above tool PEQ if we enter values like 26, 27, we get the following output.

26 -> aa

27 -> ab

But got to know from PDMs and Field engineers that it should be like this.

26 - ba

27 - bb

Somehow I have derived the logic to calcuate as per PEQ. Please suggest whether PEQ is calculating wrongly or not.

If PEQ is calculating wrongly what is the correct one. Is there any algorithm to calculate the FQDN based on iterator type ALPHA ?

Could please provide me the algorithm details about how to calcuate FQDN if the iterator is ALPHA.

Is there any tool which calculates correctly so that while writing code I can validate FQDN against that tool ?

Please help in this regard.

Tags (3)
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

"ALPHA" converts the numeric input to something like an alphabetical "Base 26" code.

0...25 -> a...z

26...51 -> aa..az

52..77 -> ba...bz

...

So to me this looks ok.


André

View solution in original post

8 Replies
scott28tt
VMware Employee
VMware Employee
Jump to solution

Are you using VxRack? If so, I can move this thread to the correct forum area. If not, you should ask your question on an EMC forum instead (PEQ is not a VMware tool)


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
EMCDD11
Contributor
Contributor
Jump to solution

Hi Sir, we are using VxRail. I am only interested only about the FQDN formation if the iterator is of ALPHA type. Yes it is true that PEQ is an emc tool.

If you have any algorithm to calculate, please share with me. I will be thankful to you.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

"ALPHA" converts the numeric input to something like an alphabetical "Base 26" code.

0...25 -> a...z

26...51 -> aa..az

52..77 -> ba...bz

...

So to me this looks ok.


André

scott28tt
VMware Employee
VMware Employee
Jump to solution

There is no area on the VMware forums specific to VxRail, this question belongs on an EMC forum.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
EMCDD11
Contributor
Contributor
Jump to solution

Hi Sir, I appreciate your answer, please suggest me when we have 3 digits and 4 digits numbers like 888, 9999 since offset can vary from 0 to 9999. If you provide me some examples with 3 and 4 digit numbers and their corresponding characters, it will be quite helpful for me. If possible, I will also post the code after completion of my task here so that others may be benefited. Hi André Sir, can I presume that all the numbers have to be represented based upon base 26 in between 0 to 9999 while forming the FQDN ? Besides is there any tool so that I can validate my calculations ? Please help with the following numbers.

99, 123, 786 ,8888, 9999

​Again thanks a lot for providing me a direction to think.

0 Kudos
scott28tt
VMware Employee
VMware Employee
Jump to solution

Perhaps you could contact the guy internally who publishes the tool:

EMC Community Network - DECN: VxRail 4.7 Customer Enabled, Pre-Engagement Questionnaire (PEQ) (PEQ)


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

No special tools required. You can use e.g. Excel for this.

Enter the formula =COLUMN()-1 into each cell in e.g. row 1. This will show the decimal number below each column header.

To find out the result for a given decimal number you can also use a formula. Setting e.g. cell "B3" to =ADDRESS(1;A3+1) will  show the result for a given number in cell "A3".

Note that the "-1" and "+1" in the formulas is required, because counting starts at zero (not one).

pastedImage_3.png

André

0 Kudos
EMCDD11
Contributor
Contributor
Jump to solution

I offer vote of thanks to all for your expert suggestions. I have also got the new PEQ, there was an issue with PEQ. I have also changed my code logic. I have written the code in Typescript based upon our underlying technologies.

0 Kudos