Skip to content

Commit 8ef656e

Browse files
author
Shiva Shankar Vaddepally
committed
code cleanup
Signed-off-by: Shiva Shankar Vaddepally <shivashankar.vaddepally@cloud.com>
1 parent cf53a90 commit 8ef656e

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

migrationtool/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ python3 convert_yaml.py -i input_playbook.yaml -o output_playbook.yaml
2929

3030
- `-i, --input`: (Required) Path to the input YAML playbook
3131
- `-o, --output`: (Optional) Path for the output file. Defaults to `output.yaml`
32+
- `-v, --verbose`: (Optional) Enable verbose mode
3233

3334
### Example
3435

@@ -85,21 +86,18 @@ Converts `citrix_adc_nitro_request` tasks to specific resource modules:
8586
- `action` → Uses the action value from the task
8687

8788
## Files
88-
8989
- `convert_yaml.py`: Main conversion script
9090
- `resourcelist.py`: Contains `resource_map` and `state_map` mappings
91-
- `template.j2`: Jinja2 template (if used)
9291

9392
## Requirements
9493

9594
- Python 3.x
9695
- PyYAML
97-
- Jinja2
9896

9997
## Installation
10098

10199
```bash
102-
pip install pyyaml jinja2
100+
pip install pyyaml
103101
```
104102

105103
## Input Format Support

migrationtool/convert_yaml.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import yaml
22
import argparse
3-
import jinja2
43
from resourcelist import (
54
resource_map,
65
state_map
76
)
87

9-
from collections import OrderedDict
10-
118
class CustomDumper(yaml.SafeDumper):
129
def ignore_aliases(self, data):
1310
return True
@@ -147,7 +144,7 @@ def main():
147144
parser = argparse.ArgumentParser(description="Convert YAML files for migration")
148145
parser.add_argument("-i", "--input", required=True, help="Input YAML file")
149146
parser.add_argument("-o", "--output", required=False, help="Output YAML file")
150-
parser.add_argument("-v", "--verbose", required=False, help="verbose mode")
147+
parser.add_argument("-v", "--verbose", action="store_true", help="verbose mode")
151148
args = parser.parse_args()
152149

153150
input_file = args.input

0 commit comments

Comments
 (0)