- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
VMUtils is a class in the ServiceNow system that offers utility functions for discovering and provisioning virtual machines. This class comes in handy for system administrators and developers who work with virtual machines in their work environment.
VMUtils provides two methods that allow administrators to convert between the Universal Unique Identifier (UUID) and Correlation ID formats.
Finding UUID using the Correlation ID
Let's consider a scenario where a system administrator wants to find the UUID for a virtual machine using its correlation ID. In this case, the administrator can use the turnCorrelationIdToUuid(String correlationId) method. The method takes in a single parameter, correlationId, which is the correlation ID of the virtual machine. The method returns the UUID in string format, or an empty string if the conversion is invalid.
Example
gs.info(VMUtils.turnCorrelationIdToUuid('42 10 82 82 62 35 ca 68-b5 1c 1e f8 5c 0a 0d 5b')); Output: 42108282-6235-ca68-b51c-1ef85c0a0d5b
Finding Correlation ID using UUID
Now, let's consider a scenario where a system administrator wants to find the correlation ID for a virtual machine using its UUID. In this case, the administrator can use the turnUuidToCorrelationId(String uuid) method. The method takes in a single parameter, uuid, which is the UUID of the virtual machine. The method returns the identifier in the ServiceNow format.
Example
gs.info(VMUtils.turnUuidToCorrelationId('13eb78d0-d504-11e1-9b23-0800200c9a66')); Output: 13 eb 78 d0 d5 04 11 e1-9b 23 08 00 20 0c 9a 66
In conclusion, VMUtils is a useful class in the ServiceNow system that provides administrators and developers with the ability to convert between the UUID and Correlation ID formats, enabling them to effectively manage virtual machines in their work environment. Whether it's finding the UUID for a virtual machine using its correlation ID or vice versa, VMUtils makes it easy and convenient for administrators to manage virtual machines in their work environment.
If my content helped you in anyway, please mark this content as BOOKMARK, SUBSCRIBE & HELPFUL
Best Regards,
Prashant Kumar (LearnIT)
YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant
Blog LearnIT: https://medium.com/@LearnITbyPrashant
Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/
ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635
- 508 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.