Issue: Script produces incorrect output, if RV Tools input has a VM name with Spaces in it
Closed this issue · 2 comments
adamswbrown commented
- rvtools2azmigrate version: 0.1.2 (2023-02-16)
- Python version: Python 3.9.6
- Operating System: Mac OS Ventura
Description
When trying to convert an RV tools input that has a VM with a space in the name (such as "zScaler Log Streamer", the output produced does not import into Azure Migrate, as VM names cant have spaces. (underscores are allowed)
To Reproduce
Steps to reproduce the behavior:
- Use a RV Tools Input that has a VM with a Space in the name
- Run
rvtools2azmigrate --debug convert -i Testing/Small/RVTOOLS_EXPORT.XLSX-o Output/Small1_out.csv
- Observe that the Outputted file has spaces in the names within the Server Name field
Expected behavior
Spaces in VM names should be replaced with Underscores.
Additional context
I attempted to add .replace(" ", "_") to line 46 of RVTools_vm.py - with no luck.
lrivallain commented
Hi @adamswbrown,
Thanks a lot for this feedback.
I added a simple replace-based mitigation to remove spaces and other characters.
It will not cover all scenario but will mitigate some common ones.
If needed, you can use the --anonymized
flag to ensure generating compliant server names.
lrivallain commented
New version 0.1.3 is available on [Pypi][https://pypi.org/project/rvtools2azmigrate/), you can use following command to upgrade:
pip install -U rvtools2azmigrate