adding 'vlan_tag' values in autogenerated tests
Change-Id: I9d89d101892e7ceb9822d7ce87eca906793112b0
diff --git a/src/test/cord-api/Framework/utils/utils.py b/src/test/cord-api/Framework/utils/utils.py
index 773fa2c..153ef72 100644
--- a/src/test/cord-api/Framework/utils/utils.py
+++ b/src/test/cord-api/Framework/utils/utils.py
@@ -294,6 +294,8 @@
return random.choice(['in', 'out'])
if value == 'flavor':
return random.choice(['m1.large', 'm1.medium', 'm1.small'])
+ if value == 'vlan_tag':
+ return random.choice(['555', '1-4096', 'ANY'])
else:
return None
diff --git a/src/test/cord-api/Tests/targets/xoslibrary.xtarget b/src/test/cord-api/Tests/targets/xoslibrary.xtarget
index 0bdfc74..614bec5 100644
--- a/src/test/cord-api/Tests/targets/xoslibrary.xtarget
+++ b/src/test/cord-api/Tests/targets/xoslibrary.xtarget
@@ -87,6 +87,9 @@
{% elif f.name == "flavor" -%}
${json_{{ m.name | lower}}_{{ f.name }}_1}= Generate Random Value flavor
${json_{{ m.name | lower }}_1}= Set Json Value ${json_{{ m.name | lower }}_1} /{{ f.name }} "${json_{{ m.name | lower }}_{{ f.name }}_1}"
+ {% elif f.name == "s_tag" -%}
+ ${json_{{ m.name | lower}}_{{ f.name }}_tmp}= Generate Random Value vlan_tag
+ ${json_{{ m.name | lower}}_tmp}= Set Json Value ${json_{{ m.name | lower }}_tmp} /{{ f.name }} "${json_{{ m.name | lower}}_{{ f.name }}_tmp}"
{% else -%}
${json_{{ m.name | lower}}_{{ f.name }}_1}= Generate Random Value {{ f.type }}
${json_{{ m.name | lower }}_1}= Set Json Value ${json_{{ m.name | lower }}_1} /{{ f.name }} "${json_{{ m.name | lower }}_{{ f.name }}_1}"
@@ -190,6 +193,9 @@
{% elif f.name == "flavor" -%}
${json_{{ m.name | lower}}_{{ f.name }}_tmp}= Generate Random Value flavor
${json_{{ m.name | lower}}_tmp}= Set Json Value ${json_{{ m.name | lower }}_tmp} /{{ f.name }} "${json_{{ m.name | lower}}_{{ f.name }}_tmp}"
+ {% elif f.name == "s_tag" -%}
+ ${json_{{ m.name | lower}}_{{ f.name }}_tmp}= Generate Random Value vlan_tag
+ ${json_{{ m.name | lower}}_tmp}= Set Json Value ${json_{{ m.name | lower }}_tmp} /{{ f.name }} "${json_{{ m.name | lower}}_{{ f.name }}_tmp}"
{% else -%}
${json_{{ m.name | lower}}_{{ f.name }}_tmp}= Generate Random Value {{ f.type }}
${json_{{ m.name | lower}}_tmp}= Set Json Value ${json_{{ m.name | lower }}_tmp} /{{ f.name }} "${json_{{ m.name | lower}}_{{ f.name }}_tmp}"